Added wined3d-texture-blt-device patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-06-28 14:09:00 +10:00
parent 19db07f062
commit 4e57013325
3 changed files with 51 additions and 0 deletions

View File

@ -376,6 +376,7 @@ patch_enable_all ()
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_UAV_Counters="$1"
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1"
enable_wined3d_texture_blt_device="$1"
enable_wined3d_wined3d_guess_gl_vendor="$1"
enable_winedbg_Process_Arguments="$1"
enable_winedevice_Default_Drivers="$1"
@ -1306,6 +1307,9 @@ patch_enable ()
wined3d-WINED3D_RS_COLORWRITEENABLE)
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$2"
;;
wined3d-texture-blt-device)
enable_wined3d_texture_blt_device="$2"
;;
wined3d-wined3d_guess_gl_vendor)
enable_wined3d_wined3d_guess_gl_vendor="$2"
;;
@ -7726,6 +7730,21 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-texture-blt-device
# |
# | This patchset fixes the following Wine bugs:
# | * [#45382] Stop the Sting demo crashing
# |
# | Modified files:
# | * dlls/wined3d/texture.c
# |
if test "$enable_wined3d_texture_blt_device" -eq 1; then
patch_apply wined3d-texture-blt-device/0001-wined3d-Dont-blt-textures-on-different-devices.patch
(
printf '%s\n' '+ { "Józef Kucia", "wined3d: Dont blt textures on different devices.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_guess_gl_vendor
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,30 @@
From e6e3c84e63ad7e10d76fef20d7526bcc7b29586c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B3zef=20Kucia?= <jkucia@codeweavers.com>
Date: Thu, 28 Jun 2018 14:03:41 +1000
Subject: [PATCH] wined3d: Dont blt textures on different devices
Fixes: https://bugs.winehq.org/show_bug.cgi?id=45382
---
dlls/wined3d/texture.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index c316906..d54a648 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -3097,6 +3097,12 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
return WINED3DERR_INVALIDCALL;
}
+ if (dst_texture->resource.device != src_texture->resource.device)
+ {
+ ERR("Rejecting blit.\n");
+ return WINED3DERR_INVALIDCALL;
+ }
+
wined3d_cs_emit_blt_sub_resource(dst_texture->resource.device->cs, &dst_texture->resource, dst_sub_resource_idx,
&dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter);
--
1.9.1

View File

@ -0,0 +1,2 @@
Fixes: [45382] Stop the Sting demo crashing