Added wined3d-atomic_minmax_merge patchset

This commit is contained in:
Alistair Leslie-Hughes 2023-02-07 19:12:12 +11:00
parent 87f3369577
commit 0159beff44
3 changed files with 105 additions and 0 deletions

View File

@ -217,6 +217,7 @@ patch_enable_all ()
enable_wined3d_SWVP_shaders="$1"
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$1"
enable_wined3d_atomic_minmax_merge="$1"
enable_wined3d_bindless_texture="$1"
enable_wined3d_mesa_texture_download="$1"
enable_wined3d_rotate_WINED3D_SWAP_EFFECT_DISCARD="$1"
@ -662,6 +663,9 @@ patch_enable ()
wined3d-WINED3DFMT_B8G8R8X8_UNORM)
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$2"
;;
wined3d-atomic_minmax_merge)
enable_wined3d_atomic_minmax_merge="$2"
;;
wined3d-bindless-texture)
enable_wined3d_bindless_texture="$2"
;;
@ -3195,6 +3199,18 @@ if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -eq 1; then
patch_apply wined3d-WINED3DFMT_B8G8R8X8_UNORM/0001-wined3d-Implement-WINED3DFMT_B8G8R8X8_UNORM-to-WINED.patch
fi
# Patchset wined3d-atomic_minmax_merge
# |
# | This patchset fixes the following Wine bugs:
# | * [#52233] wined3d: Handle u/signed integers that same
# |
# | Modified files:
# | * dlls/wined3d/glsl_shader.c
# |
if test "$enable_wined3d_atomic_minmax_merge" -eq 1; then
patch_apply wined3d-atomic_minmax_merge/0001-wined3d-Merged-ATOMIC_IMIN-and-ATOMIC_UMIN-together.patch
fi
# Patchset wined3d-bindless-texture
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,88 @@
From 0320ea65de3bfc694d6f24bc410433a544555292 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 29 Jul 2021 12:28:20 +1000
Subject: [PATCH] wined3d: Merged ATOMIC_IMIN and ATOMIC_UMIN together
Batman: Arkham Knight.
0670:fixme:d3d_shader:shader_glsl_atomic Unhandled opcode 0x6 for unsigned integers.
0670:fixme:d3d_shader:shader_glsl_atomic Unhandled opcode 0x7 for unsigned integers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52233
---
dlls/wined3d/glsl_shader.c | 36 ++++++++----------------------------
1 file changed, 8 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 5cccd31207b..9928134c799 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -5628,26 +5628,30 @@ static void shader_glsl_atomic(const struct wined3d_shader_instruction *ins)
op = "imageAtomicAdd";
break;
case WINED3DSIH_ATOMIC_IMAX:
+ case WINED3DSIH_ATOMIC_UMAX:
case WINED3DSIH_IMM_ATOMIC_IMAX:
+ case WINED3DSIH_IMM_ATOMIC_UMAX:
if (is_tgsm)
op = "atomicMax";
else
op = "imageAtomicMax";
- if (data_type != WINED3D_DATA_INT)
+ if (data_type != WINED3D_DATA_INT && data_type != WINED3D_DATA_UINT)
{
- FIXME("Unhandled opcode %#x for unsigned integers.\n", ins->handler_idx);
+ FIXME("Unhandled opcode %#x for integers.\n", ins->handler_idx);
return;
}
break;
case WINED3DSIH_ATOMIC_IMIN:
+ case WINED3DSIH_ATOMIC_UMIN:
case WINED3DSIH_IMM_ATOMIC_IMIN:
+ case WINED3DSIH_IMM_ATOMIC_UMIN:
if (is_tgsm)
op = "atomicMin";
else
op = "imageAtomicMin";
- if (data_type != WINED3D_DATA_INT)
+ if (data_type != WINED3D_DATA_INT && data_type != WINED3D_DATA_UINT)
{
- FIXME("Unhandled opcode %#x for unsigned integers.\n", ins->handler_idx);
+ FIXME("Unhandled opcode %#x for integers.\n", ins->handler_idx);
return;
}
break;
@@ -5658,30 +5662,6 @@ static void shader_glsl_atomic(const struct wined3d_shader_instruction *ins)
else
op = "imageAtomicOr";
break;
- case WINED3DSIH_ATOMIC_UMAX:
- case WINED3DSIH_IMM_ATOMIC_UMAX:
- if (is_tgsm)
- op = "atomicMax";
- else
- op = "imageAtomicMax";
- if (data_type != WINED3D_DATA_UINT)
- {
- FIXME("Unhandled opcode %#x for signed integers.\n", ins->handler_idx);
- return;
- }
- break;
- case WINED3DSIH_ATOMIC_UMIN:
- case WINED3DSIH_IMM_ATOMIC_UMIN:
- if (is_tgsm)
- op = "atomicMin";
- else
- op = "imageAtomicMin";
- if (data_type != WINED3D_DATA_UINT)
- {
- FIXME("Unhandled opcode %#x for signed integers.\n", ins->handler_idx);
- return;
- }
- break;
case WINED3DSIH_ATOMIC_XOR:
case WINED3DSIH_IMM_ATOMIC_XOR:
if (is_tgsm)
--
2.30.2

View File

@ -0,0 +1 @@
Fixes: [52233] wined3d: Handle u/signed integers the same