From dff74f4169f0d61f4c612ccf2fcfa1a59ab00a28 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 1 Jul 2019 08:18:20 +1000 Subject: [PATCH] Added wined3d-unset-flip-gdi patchset --- patches/patchinstall.sh | 19 +++++++ ...nt-set-DDSCAPS_FLIP-for-gdi-renderer.patch | 51 +++++++++++++++++++ patches/wined3d-unset-flip-gdi/definition | 1 + 3 files changed, 71 insertions(+) create mode 100644 patches/wined3d-unset-flip-gdi/0001-wined3d-Dont-set-DDSCAPS_FLIP-for-gdi-renderer.patch create mode 100644 patches/wined3d-unset-flip-gdi/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 6ddeafd4..615c2593 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -325,6 +325,7 @@ patch_enable_all () enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1" enable_wined3d_WINED3D_TEXF_ANISOTROPIC="$1" enable_wined3d_mesa_texture_download="$1" + enable_wined3d_unset_flip_gdi="$1" enable_wined3d_wined3d_guess_gl_vendor="$1" enable_winedbg_Process_Arguments="$1" enable_winedevice_Default_Drivers="$1" @@ -1099,6 +1100,9 @@ patch_enable () wined3d-mesa_texture_download) enable_wined3d_mesa_texture_download="$2" ;; + wined3d-unset-flip-gdi) + enable_wined3d_unset_flip_gdi="$2" + ;; wined3d-wined3d_guess_gl_vendor) enable_wined3d_wined3d_guess_gl_vendor="$2" ;; @@ -6643,6 +6647,21 @@ if test "$enable_wined3d_mesa_texture_download" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-unset-flip-gdi +# | +# | This patchset fixes the following Wine bugs: +# | * [#47419] wined3d: Dont set DDSCAPS_FLIP for gdi renderer. +# | +# | Modified files: +# | * dlls/wined3d/adapter_gl.c, dlls/wined3d/adapter_vk.c, dlls/wined3d/directx.c +# | +if test "$enable_wined3d_unset_flip_gdi" -eq 1; then + patch_apply wined3d-unset-flip-gdi/0001-wined3d-Dont-set-DDSCAPS_FLIP-for-gdi-renderer.patch + ( + printf '%s\n' '+ { "Henri Verbeet", "wined3d: Dont set DDSCAPS_FLIP for gdi renderer.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-wined3d_guess_gl_vendor # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-unset-flip-gdi/0001-wined3d-Dont-set-DDSCAPS_FLIP-for-gdi-renderer.patch b/patches/wined3d-unset-flip-gdi/0001-wined3d-Dont-set-DDSCAPS_FLIP-for-gdi-renderer.patch new file mode 100644 index 00000000..d2df1038 --- /dev/null +++ b/patches/wined3d-unset-flip-gdi/0001-wined3d-Dont-set-DDSCAPS_FLIP-for-gdi-renderer.patch @@ -0,0 +1,51 @@ +From f29cd7a5fe2f118e9d52c40a8a2ae102108c6f4b Mon Sep 17 00:00:00 2001 +From: Henri Verbeet +Date: Fri, 28 Jun 2019 14:27:10 +1000 +Subject: [PATCH] wined3d: Dont set DDSCAPS_FLIP for gdi renderer + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47419 +--- + dlls/wined3d/adapter_gl.c | 1 + + dlls/wined3d/adapter_vk.c | 1 + + dlls/wined3d/directx.c | 1 - + 3 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c +index c8ebe34643..16c3f2175c 100644 +--- a/dlls/wined3d/adapter_gl.c ++++ b/dlls/wined3d/adapter_gl.c +@@ -4355,6 +4355,7 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s + const struct wined3d_gl_info *gl_info = &adapter->gl_info; + + caps->ddraw_caps.dds_caps |= WINEDDSCAPS_3DDEVICE ++ | WINEDDSCAPS_FLIP + | WINEDDSCAPS_MIPMAP + | WINEDDSCAPS_TEXTURE + | WINEDDSCAPS_VIDEOMEMORY +diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c +index 0dc6458070..b316910c9b 100644 +--- a/dlls/wined3d/adapter_vk.c ++++ b/dlls/wined3d/adapter_vk.c +@@ -315,6 +315,7 @@ static void adapter_vk_get_wined3d_caps(const struct wined3d_adapter *adapter, s + BOOL sampler_anisotropy = limits->maxSamplerAnisotropy > 1.0f; + + caps->ddraw_caps.dds_caps |= WINEDDSCAPS_3DDEVICE ++ | WINEDDSCAPS_FLIP + | WINEDDSCAPS_MIPMAP + | WINEDDSCAPS_TEXTURE + | WINEDDSCAPS_VIDEOMEMORY +diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c +index 7202a907ab..22479b30e2 100644 +--- a/dlls/wined3d/directx.c ++++ b/dlls/wined3d/directx.c +@@ -2177,7 +2177,6 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in + + caps->ddraw_caps.dds_caps = WINEDDSCAPS_ALPHA + | WINEDDSCAPS_BACKBUFFER +- | WINEDDSCAPS_FLIP + | WINEDDSCAPS_FRONTBUFFER + | WINEDDSCAPS_OFFSCREENPLAIN + | WINEDDSCAPS_PALETTE +-- +2.17.1 + diff --git a/patches/wined3d-unset-flip-gdi/definition b/patches/wined3d-unset-flip-gdi/definition new file mode 100644 index 00000000..a1769db8 --- /dev/null +++ b/patches/wined3d-unset-flip-gdi/definition @@ -0,0 +1 @@ +Fixes: [47419] wined3d: Dont set DDSCAPS_FLIP for gdi renderer.