-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workaround Xwayland fps lock for AMD and re-add some patches that weren't actually causing issues
- Loading branch information
Showing
15 changed files
with
1,237 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ion/0001-misc-osu-related/0019-winex11-Force-disable-glXWaitForSbcOML-AMD-on-Waylan.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 1d3ea526ce3be6afcf009c338c2500fb1a1b28fc Mon Sep 17 00:00:00 2001 | ||
From: William Horvath <[email protected]> | ||
Date: Tue, 10 Sep 2024 07:23:38 -0700 | ||
Subject: [PATCH] winex11: Force disable glXWaitForSbcOML (AMD) on Wayland to | ||
circumvent Xwayland locking FPS to the monitor's refresh rate. | ||
|
||
It should only break ingame vsync, but WINE_XWAYLAND_FPS_LOCK_WORKAROUND=0 can override-disable this behavior. | ||
--- | ||
dlls/winex11.drv/opengl.c | 3 ++- | ||
dlls/winex11.drv/x11drv.h | 12 ++++++++++++ | ||
2 files changed, 14 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c | ||
index b6c73b8d0af..aaa9956808d 100644 | ||
--- a/dlls/winex11.drv/opengl.c | ||
+++ b/dlls/winex11.drv/opengl.c | ||
@@ -714,7 +714,8 @@ static void init_opengl(void) | ||
|
||
if (has_extension( glxExtensions, "GLX_OML_sync_control" )) | ||
{ | ||
- pglXWaitForSbcOML = pglXGetProcAddressARB( (const GLubyte *)"glXWaitForSbcOML" ); | ||
+ if (!disable_glXWaitForSbcOML()) | ||
+ pglXWaitForSbcOML = pglXGetProcAddressARB( (const GLubyte *)"glXWaitForSbcOML" ); | ||
pglXSwapBuffersMscOML = pglXGetProcAddressARB( (const GLubyte *)"glXSwapBuffersMscOML" ); | ||
} | ||
|
||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h | ||
index 00c54b19767..d967c721499 100644 | ||
--- a/dlls/winex11.drv/x11drv.h | ||
+++ b/dlls/winex11.drv/x11drv.h | ||
@@ -944,7 +944,19 @@ static inline BOOL intersect_rect( RECT *dst, const RECT *src1, const RECT *src2 | ||
dst->bottom = min( src1->bottom, src2->bottom ); | ||
return !IsRectEmpty( dst ); | ||
} | ||
+static inline BOOL disable_glXWaitForSbcOML(void) | ||
+{ | ||
+ const char *override_env = getenv("vblank_mode"); | ||
+ if (override_env) | ||
+ if (*override_env != '\0' && *override_env != '0') | ||
+ return FALSE; | ||
+ else | ||
+ return TRUE; | ||
+ | ||
+ if (!getenv("WAYLAND_DISPLAY")) return FALSE; | ||
|
||
+ return TRUE; | ||
+} | ||
/* registry helpers */ | ||
|
||
extern HKEY open_hkcu_key( const char *name ); | ||
-- | ||
2.46.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...m-integration/0004-proton/0002-winex11-Always-synchronize-gdi_display-after-window-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From e285015e53896814701e1bb1ce9e675e29625097 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <[email protected]> | ||
Date: Thu, 30 Nov 2023 17:29:05 +0100 | ||
Subject: [PATCH 0178/1562] winex11: Always synchronize gdi_display after | ||
window creation. | ||
|
||
--- | ||
dlls/winex11.drv/window.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c | ||
index e68c4abdf93..696edd6675c 100644 | ||
--- a/dlls/winex11.drv/window.c | ||
+++ b/dlls/winex11.drv/window.c | ||
@@ -1759,7 +1759,6 @@ Window create_client_window( HWND hwnd, const XVisualInfo *visual, Colormap colo | ||
cx = min( max( 1, data->rects.client.right - data->rects.client.left ), 65535 ); | ||
cy = min( max( 1, data->rects.client.bottom - data->rects.client.top ), 65535 ); | ||
|
||
- XSync( gdi_display, False ); /* make sure whole_window is known from gdi_display */ | ||
ret = data->client_window = XCreateWindow( gdi_display, | ||
data->whole_window ? data->whole_window : dummy_parent, | ||
x, y, cx, cy, 0, default_visual.depth, InputOutput, | ||
@@ -2095,6 +2094,7 @@ static void create_whole_window( struct x11drv_win_data *data ) | ||
sync_window_opacity( data->display, data->whole_window, alpha, layered_flags ); | ||
|
||
XFlush( data->display ); /* make sure the window exists before we start painting to it */ | ||
+ XSync( gdi_display, False ); /* make sure whole_window is known from gdi_display */ | ||
|
||
done: | ||
if (win_rgn) NtGdiDeleteObjectApp( win_rgn ); | ||
-- | ||
2.45.2 | ||
|
26 changes: 26 additions & 0 deletions
26
...m-integration/0004-proton/0058-winex11.drv-Default-swap-interval-to-0-for-child-win.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 970f435f0158e7f7e91c71546ab03a3415f41ebd Mon Sep 17 00:00:00 2001 | ||
From: Paul Gofman <[email protected]> | ||
Date: Tue, 30 Jan 2024 11:55:31 -0600 | ||
Subject: [PATCH 1241/1516] winex11.drv: Default swap interval to 0 for child | ||
window drawables in create_gl_drawable(). | ||
|
||
CW-Bug-Id: #23329 | ||
--- | ||
dlls/winex11.drv/opengl.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c | ||
index 43f87e11..af404540 100644 | ||
--- a/dlls/winex11.drv/opengl.c | ||
+++ b/dlls/winex11.drv/opengl.c | ||
@@ -1541,6 +1541,7 @@ static struct gl_drawable *create_gl_drawable( HWND hwnd, const struct wgl_pixel | ||
(visual->class == PseudoColor || visual->class == GrayScale || | ||
visual->class == DirectColor) ? AllocAll : AllocNone ); | ||
gl->window = create_client_window( hwnd, visual, gl->colormap ); | ||
+ gl->swap_interval = 0; | ||
if (gl->window) | ||
{ | ||
gl->drawable = pglXCreateWindow( gdi_display, gl->format->fbconfig, gl->window, NULL ); | ||
-- | ||
2.44.0 | ||
|
Oops, something went wrong.