Skip to content

Commit

Permalink
release proton-osu-9-14 (upstream cachyos-9.0-20250126)
Browse files Browse the repository at this point in the history
- add tentative reverts to possibly fix freeze-on-map-end issue
  - NelloKudo/osu-winello#152
  - NelloKudo/osu-winello#65
- update umu-launcher
- misc build updates
  • Loading branch information
whrvt committed Jan 31, 2025
1 parent adf672f commit f9949ff
Show file tree
Hide file tree
Showing 9 changed files with 263 additions and 120 deletions.
2 changes: 1 addition & 1 deletion patches/proton/0004-Makefile.in-revert-haswell.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ index b86d2cc5..e4474332 100644
endif

CROSSLDFLAGS += -Wl,--file-alignment,4096
-CFLAGS ?= -O3 -march=haswell -mtune=generic
-CFLAGS ?= -O2 -march=core-avx2 -mtune=core-avx2
+CFLAGS ?= -O2 -march=nocona -mtune=core-avx2
OPTIMIZE_FLAGS := $(CFLAGS) -mfpmath=sse
SANITY_FLAGS := -fwrapv -fno-strict-aliasing
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
From 1cdd690a124a20c8d03d8786de2fe81d2ab2f36f Mon Sep 17 00:00:00 2001
From: William Horvath <[email protected]>
Date: Fri, 31 Jan 2025 11:04:58 -0800
Subject: [PATCH 1/2] Revert "ntdll: Wait for thread suspension in
NtSuspendThread()."

This reverts commit bfa83480970ff96bb4e4c6290f1b45745ff5d757.
---
dlls/ntdll/unix/thread.c | 26 ++++----------------------
server/protocol.def | 6 ++----
server/thread.c | 28 ++++------------------------
3 files changed, 10 insertions(+), 50 deletions(-)

diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index c3ab1317295..b50a5b1483d 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1622,40 +1622,22 @@ NTSTATUS WINAPI NtOpenThread( HANDLE *handle, ACCESS_MASK access,
/******************************************************************************
* NtSuspendThread (NTDLL.@)
*/
-NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *ret_count )
+NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *count )
{
BOOL self = FALSE;
- unsigned int ret, count = 0;
- HANDLE wait_handle = NULL;
+ unsigned int ret;

SERVER_START_REQ( suspend_thread )
{
req->handle = wine_server_obj_handle( handle );
- if (!(ret = wine_server_call( req )) || ret == STATUS_PENDING)
+ if (!(ret = wine_server_call( req )))
{
self = reply->count & 0x80000000;
- count = reply->count & 0x7fffffff;;
- wait_handle = wine_server_ptr_handle( reply->wait_handle );
+ if (count) *count = reply->count & 0x7fffffff;
}
}
SERVER_END_REQ;
-
if (self) usleep( 0 );
-
- if (ret == STATUS_PENDING && wait_handle)
- {
- NtWaitForSingleObject( wait_handle, FALSE, NULL );
-
- SERVER_START_REQ( suspend_thread )
- {
- req->handle = wine_server_obj_handle( handle );
- req->waited_handle = wine_server_obj_handle( wait_handle );
- ret = wine_server_call( req );
- }
- SERVER_END_REQ;
- }
-
- if (!ret && ret_count) *ret_count = count;
return ret;
}

diff --git a/server/protocol.def b/server/protocol.def
index f52d2cf3b49..e434e261ffb 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -1203,11 +1203,9 @@ typedef volatile struct input_shared_memory input_shm_t;

/* Suspend a thread */
@REQ(suspend_thread)
- obj_handle_t handle; /* thread handle */
- obj_handle_t waited_handle; /* handle waited on */
+ obj_handle_t handle; /* thread handle */
@REPLY
- int count; /* new suspend count */
- obj_handle_t wait_handle; /* handle to wait on */
+ int count; /* new suspend count */
@END


diff --git a/server/thread.c b/server/thread.c
index 71c00fb6e35..67821c1b735 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -1816,32 +1816,12 @@ DECL_HANDLER(suspend_thread)
{
struct thread *thread;

- if (req->waited_handle)
- {
- struct context *context;
-
- if (!(context = (struct context *)get_handle_obj( current->process, req->waited_handle,
- 0, &context_ops )))
- return;
- close_handle( current->process, req->waited_handle ); /* avoid extra server call */
- set_error( context->status );
- release_object( context );
- return;
- }
-
- if (!(thread = get_thread_from_handle( req->handle, THREAD_SUSPEND_RESUME ))) return;
-
- if (thread->state != RUNNING) set_error( STATUS_ACCESS_DENIED );
- else
+ if ((thread = get_thread_from_handle( req->handle, THREAD_SUSPEND_RESUME )))
{
- reply->count = suspend_thread( thread );
- if (!get_error() && thread != current && thread->context && thread->context->status == STATUS_PENDING)
- {
- set_error( STATUS_PENDING );
- reply->wait_handle = alloc_handle( current->process, thread->context, SYNCHRONIZE, 0 );
- }
+ if (thread->state == TERMINATED) set_error( STATUS_ACCESS_DENIED );
+ else reply->count = suspend_thread( thread );
+ release_object( thread );
}
- release_object( thread );
}

/* resume a thread */
--
2.48.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From c6d874bfefaa22588a58ab24407d2e8771725368 Mon Sep 17 00:00:00 2001
From: William Horvath <[email protected]>
Date: Fri, 31 Jan 2025 11:05:07 -0800
Subject: [PATCH 2/2] Revert "ntdll: HACK: Delay resuming thread after
suspending self."

This reverts commit a65aa9c07be77d44fdc3392ef11a4b581128485e.
---
dlls/ntdll/unix/thread.c | 5 +----
server/thread.c | 6 +-----
2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index b50a5b1483d..3302ea104c2 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1624,7 +1624,6 @@ NTSTATUS WINAPI NtOpenThread( HANDLE *handle, ACCESS_MASK access,
*/
NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *count )
{
- BOOL self = FALSE;
unsigned int ret;

SERVER_START_REQ( suspend_thread )
@@ -1632,12 +1631,10 @@ NTSTATUS WINAPI NtSuspendThread( HANDLE handle, ULONG *count )
req->handle = wine_server_obj_handle( handle );
if (!(ret = wine_server_call( req )))
{
- self = reply->count & 0x80000000;
- if (count) *count = reply->count & 0x7fffffff;
+ if (count) *count = reply->count;
}
}
SERVER_END_REQ;
- if (self) usleep( 0 );
return ret;
}

diff --git a/server/thread.c b/server/thread.c
index 67821c1b735..1c12d0a6276 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -912,11 +912,7 @@ int suspend_thread( struct thread *thread )
int old_count = thread->suspend;
if (thread->suspend < MAXIMUM_SUSPEND_COUNT)
{
- if (!(thread->process->suspend + thread->suspend++))
- {
- stop_thread( thread );
- if (thread == current) return old_count | 0x80000000;
- }
+ if (!(thread->process->suspend + thread->suspend++)) stop_thread( thread );
}
else set_error( STATUS_SUSPEND_COUNT_EXCEEDED );
return old_count;
--
2.48.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 046670cd17d81661e58ac65ad75730df9dcfd957 Mon Sep 17 00:00:00 2001
From: William Horvath <[email protected]>
Date: Mon, 30 Dec 2024 02:31:59 -0800
Subject: [PATCH] configure.ac: Omit frame pointers on x86_64, leaf frame
pointers on i386.

---
configure.ac | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 76e0cc5..de57ff5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1014,11 +1014,13 @@ This is an error since --enable-archs=$wine_arch was requested.])])

case $wine_arch in
i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer])
+ WINE_TRY_PE_CFLAGS([-momit-leaf-frame-pointer])
WINE_TRY_PE_CFLAGS([-mstack-alignment=4])
WINE_TRY_PE_CFLAGS([-mpreferred-stack-boundary=2])
WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup],
[AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;;
- x86_64) WINE_TRY_PE_CFLAGS([-Wformat-overflow])
+ x86_64) WINE_TRY_PE_CFLAGS([-fomit-frame-pointer])
+ WINE_TRY_PE_CFLAGS([-Wformat-overflow])
WINE_TRY_PE_CFLAGS([-Wnonnull])
WINE_TRY_PE_CFLAGS([-mcx16])
WINE_TRY_PE_CFLAGS([-mcmodel=small]) ;;
@@ -2033,8 +2035,9 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=

case $HOST_ARCH in
dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections
- i386) WINE_TRY_CFLAGS([-fno-omit-frame-pointer],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-omit-frame-pointer"]) ;;
+ i386) WINE_TRY_CFLAGS([-fno-omit-frame-pointer -momit-leaf-frame-pointer],[MSVCRTFLAGS="$MSVCRTFLAGS -fno-omit-frame-pointer -momit-leaf-frame-pointer"]) ;;
x86_64)
+ WINE_TRY_CFLAGS([-fomit-frame-pointer],[MSVCRTFLAGS="$MSVCRTFLAGS -fomit-frame-pointer"])
case $host_os in
dnl Mingw uses Windows 64-bit types, not Unix ones
cygwin*|mingw32*) WINE_TRY_CFLAGS([-Wno-format]) ;;
--
2.47.1

This file was deleted.

12 changes: 12 additions & 0 deletions patches/wine/0008-jpeg-SIMD/0012-makedep-nasm-silent-rule.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/tools/makedep.c b/tools/makedep.c
index e8e5512f5f8..ed5731383fc 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -4427,6 +4427,7 @@ static void output_silent_rules(void)
"GEN",
"LN",
"MSG",
+ "NASM",
"SED",
"TEST",
"WIDL",
Loading

0 comments on commit f9949ff

Please sign in to comment.