From 4e570133253d0fe1ec30753ccdec4e94fbd6ed1f Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 28 Jun 2018 14:09:00 +1000 Subject: [PATCH] Added wined3d-texture-blt-device patchset --- patches/patchinstall.sh | 19 ++++++++++++ ...nt-blt-textures-on-different-devices.patch | 30 +++++++++++++++++++ patches/wined3d-texture-blt-device/definition | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 patches/wined3d-texture-blt-device/0001-wined3d-Dont-blt-textures-on-different-devices.patch create mode 100644 patches/wined3d-texture-blt-device/definition diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b0367bfe..b6a579e0 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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: diff --git a/patches/wined3d-texture-blt-device/0001-wined3d-Dont-blt-textures-on-different-devices.patch b/patches/wined3d-texture-blt-device/0001-wined3d-Dont-blt-textures-on-different-devices.patch new file mode 100644 index 00000000..0c3584eb --- /dev/null +++ b/patches/wined3d-texture-blt-device/0001-wined3d-Dont-blt-textures-on-different-devices.patch @@ -0,0 +1,30 @@ +From e6e3c84e63ad7e10d76fef20d7526bcc7b29586c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B3zef=20Kucia?= +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 + diff --git a/patches/wined3d-texture-blt-device/definition b/patches/wined3d-texture-blt-device/definition new file mode 100644 index 00000000..908df2ce --- /dev/null +++ b/patches/wined3d-texture-blt-device/definition @@ -0,0 +1,2 @@ +Fixes: [45382] Stop the Sting demo crashing +