From 0727cad0c93e17f79b5b284fbc1e758886cdf8a6 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 17 Sep 2017 23:14:09 +0200 Subject: [PATCH] Added patch to skip validation of SYSMEM location if memory was evicted. --- patches/patchinstall.sh | 19 +++++++++++++ ...aim-SYSMEM-location-to-be-current-if.patch | 28 +++++++++++++++++++ patches/wined3d-cpu_blitter_blit/definition | 1 + 3 files changed, 48 insertions(+) create mode 100644 patches/wined3d-cpu_blitter_blit/0001-wined3d-Don-t-claim-SYSMEM-location-to-be-current-if.patch create mode 100644 patches/wined3d-cpu_blitter_blit/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ecdc5c1c..685ffeaa 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -465,6 +465,7 @@ patch_enable_all () enable_wined3d_WINED3DFMT_R32G32_UINT="$1" enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1" enable_wined3d_buffer_create="$1" + enable_wined3d_cpu_blitter_blit="$1" enable_wined3d_draw_primitive_arrays="$1" enable_wined3d_sample_c_lz="$1" enable_wined3d_wined3d_guess_gl_vendor="$1" @@ -1673,6 +1674,9 @@ patch_enable () wined3d-buffer_create) enable_wined3d_buffer_create="$2" ;; + wined3d-cpu_blitter_blit) + enable_wined3d_cpu_blitter_blit="$2" + ;; wined3d-draw_primitive_arrays) enable_wined3d_draw_primitive_arrays="$2" ;; @@ -9924,6 +9928,21 @@ if test "$enable_wined3d_buffer_create" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-cpu_blitter_blit +# | +# | This patchset fixes the following Wine bugs: +# | * [#43701] Don't claim SYSMEM location to be current if memory was evicted +# | +# | Modified files: +# | * dlls/wined3d/surface.c +# | +if test "$enable_wined3d_cpu_blitter_blit" -eq 1; then + patch_apply wined3d-cpu_blitter_blit/0001-wined3d-Don-t-claim-SYSMEM-location-to-be-current-if.patch + ( + printf '%s\n' '+ { "Matteo Bruni", "wined3d: Don'\''t claim SYSMEM location to be current if memory was evicted.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-sample_c_lz # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wined3d-cpu_blitter_blit/0001-wined3d-Don-t-claim-SYSMEM-location-to-be-current-if.patch b/patches/wined3d-cpu_blitter_blit/0001-wined3d-Don-t-claim-SYSMEM-location-to-be-current-if.patch new file mode 100644 index 00000000..2262462a --- /dev/null +++ b/patches/wined3d-cpu_blitter_blit/0001-wined3d-Don-t-claim-SYSMEM-location-to-be-current-if.patch @@ -0,0 +1,28 @@ +From de71bb993001835fd384ac3bbff386e03b240f89 Mon Sep 17 00:00:00 2001 +From: Matteo Bruni +Date: Fri, 15 Sep 2017 15:12:22 +0200 +Subject: wined3d: Don't claim SYSMEM location to be current if memory was + evicted. + +Signed-off-by: Matteo Bruni +--- + dlls/wined3d/surface.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c +index 608447f2cc1..f35d5df775d 100644 +--- a/dlls/wined3d/surface.c ++++ b/dlls/wined3d/surface.c +@@ -3539,7 +3539,8 @@ static DWORD cpu_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit + ERR("Failed to blit.\n"); + wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, context, dst_location); + +- return dst_texture->resource.map_binding | dst_location; ++ return dst_location | (dst_texture->sub_resources[dst_sub_resource_idx].locations ++ & dst_texture->resource.map_binding); + } + + static const struct wined3d_blitter_ops cpu_blitter_ops = +-- +2.14.1 + diff --git a/patches/wined3d-cpu_blitter_blit/definition b/patches/wined3d-cpu_blitter_blit/definition new file mode 100644 index 00000000..bc83157a --- /dev/null +++ b/patches/wined3d-cpu_blitter_blit/definition @@ -0,0 +1 @@ +Fixes: [43701] Don't claim SYSMEM location to be current if memory was evicted