diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 6846e97b..7c665d8a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -360,6 +360,7 @@ patch_enable_all () enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1" enable_wined3d_WINED3D_TEXF_ANISOTROPIC="$1" enable_wined3d_mesa_texture_download="$1" + enable_wined3d_multisample_quality="$1" enable_wined3d_wined3d_guess_gl_vendor="$1" enable_winedbg_Process_Arguments="$1" enable_winedevice_Default_Drivers="$1" @@ -1243,6 +1244,9 @@ patch_enable () wined3d-mesa_texture_download) enable_wined3d_mesa_texture_download="$2" ;; + wined3d-multisample-quality) + enable_wined3d_multisample_quality="$2" + ;; wined3d-wined3d_guess_gl_vendor) enable_wined3d_wined3d_guess_gl_vendor="$2" ;; @@ -7319,6 +7323,21 @@ if test "$enable_wined3d_mesa_texture_download" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-multisample-quality +# | +# | This patchset fixes the following Wine bugs: +# | * [#39080] wined3d: Ignore multisample quality for MULTISAMPLE_NONE +# | +# | Modified files: +# | * dlls/d3d9/tests/visual.c, dlls/wined3d/context.c +# | +if test "$enable_wined3d_multisample_quality" -eq 1; then + patch_apply wined3d-multisample-quality/0001-wined3d-Ignore-multisample-quality-for-MULTISAMPLE_N.patch + ( + printf '%s\n' '+ { "Paul Gofman", "wined3d: Ignore multisample quality for MULTISAMPLE_NONE in context_find_fbo_entry().", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-wined3d_guess_gl_vendor # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-multisample-quality/0001-wined3d-Ignore-multisample-quality-for-MULTISAMPLE_N.patch b/patches/wined3d-multisample-quality/0001-wined3d-Ignore-multisample-quality-for-MULTISAMPLE_N.patch new file mode 100644 index 00000000..e8b21989 --- /dev/null +++ b/patches/wined3d-multisample-quality/0001-wined3d-Ignore-multisample-quality-for-MULTISAMPLE_N.patch @@ -0,0 +1,43 @@ +From 79a35fd2239cadfa9c8c588c295eef4ca9aba48a Mon Sep 17 00:00:00 2001 +From: Paul Gofman +Date: Tue, 22 Jan 2019 00:22:28 +0300 +Subject: [PATCH] wined3d: Ignore multisample quality for MULTISAMPLE_NONE in + context_find_fbo_entry(). + +Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=39080 +Signed-off-by: Paul Gofman +--- + dlls/d3d9/tests/visual.c | 2 +- + dlls/wined3d/context.c | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c +index 072c6a8364..fb1c7ef21d 100644 +--- a/dlls/d3d9/tests/visual.c ++++ b/dlls/d3d9/tests/visual.c +@@ -21273,7 +21273,7 @@ static void test_depthbias(void) + } + + hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 640, 480, formats[i], +- D3DMULTISAMPLE_NONE, 0, FALSE, &ds, NULL); ++ D3DMULTISAMPLE_NONE, 1, FALSE, &ds, NULL); + ok(SUCCEEDED(hr), "Failed to create depth stencil surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetDepthStencilSurface(device, ds); + ok(SUCCEEDED(hr), "Failed to set depth stencil surface, hr %#x.\n", hr); +diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c +index 37203738fe..c7eb7849fc 100644 +--- a/dlls/wined3d/context.c ++++ b/dlls/wined3d/context.c +@@ -599,7 +599,8 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context, + depth_stencil = &ds_null; + } + else if (ds_texture->resource.multisample_type != rt_texture->resource.multisample_type +- || ds_texture->resource.multisample_quality != rt_texture->resource.multisample_quality) ++ || (ds_texture->resource.multisample_type ++ && ds_texture->resource.multisample_quality != rt_texture->resource.multisample_quality)) + { + WARN("Color multisample type %u and quality %u, depth stencil has %u and %u, disabling ds buffer.\n", + rt_texture->resource.multisample_type, rt_texture->resource.multisample_quality, +-- +2.20.1 + diff --git a/patches/wined3d-multisample-quality/definition b/patches/wined3d-multisample-quality/definition new file mode 100644 index 00000000..56116ad3 --- /dev/null +++ b/patches/wined3d-multisample-quality/definition @@ -0,0 +1 @@ +Fixes: [39080] wined3d: Ignore multisample quality for MULTISAMPLE_NONE