Added patch to skip validation of SYSMEM location if memory was evicted.

This commit is contained in:
Sebastian Lackner 2017-09-17 23:14:09 +02:00
parent 63a8a664c9
commit 0727cad0c9
3 changed files with 48 additions and 0 deletions

View File

@ -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:

View File

@ -0,0 +1,28 @@
From de71bb993001835fd384ac3bbff386e03b240f89 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
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 <mbruni@codeweavers.com>
---
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

View File

@ -0,0 +1 @@
Fixes: [43701] Don't claim SYSMEM location to be current if memory was evicted