diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 3700fa38..96213dce 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -352,6 +352,7 @@ patch_enable_all () enable_wined3d_CSMT_Main="$1" enable_wined3d_DXTn="$1" enable_wined3d_Dual_Source_Blending="$1" + enable_wined3d_Improved_RCP_Support="$1" enable_wined3d_Indexed_Vertex_Blending="$1" enable_wined3d_QUERY_Stubs="$1" enable_wined3d_Restore_DirectX10_Support="$1" @@ -1218,6 +1219,9 @@ patch_enable () wined3d-Dual_Source_Blending) enable_wined3d_Dual_Source_Blending="$2" ;; + wined3d-Improved-RCP_Support) + enable_wined3d_Improved_RCP_Support="$2" + ;; wined3d-Indexed_Vertex_Blending) enable_wined3d_Indexed_Vertex_Blending="$2" ;; @@ -7292,6 +7296,22 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-Improved-RCP_Support +# | +# | This patchset fixes the following Wine bugs: +# | * [#36089] Improve dirt rendering in SpinTires +# | * [#45375] Halo online black display problems +# | +# | Modified files: +# | * dlls/wined3d/glsl_shader.c +# | +if test "$enable_wined3d_Improved_RCP_Support" -eq 1; then + patch_apply wined3d-Improved-RCP_Support/0001-wined3d-Improve-dirt-rendering-in-SpinTires.patch + ( + printf '%s\n' '+ { "Józef Kucia", "wined3d: Improve dirt rendering in SpinTires.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-WINED3D_RS_COLORWRITEENABLE # | # | Modified files: diff --git a/patches/wined3d-Improved-RCP_Support/0001-wined3d-Improve-dirt-rendering-in-SpinTires.patch b/patches/wined3d-Improved-RCP_Support/0001-wined3d-Improve-dirt-rendering-in-SpinTires.patch new file mode 100644 index 00000000..a2118d84 --- /dev/null +++ b/patches/wined3d-Improved-RCP_Support/0001-wined3d-Improve-dirt-rendering-in-SpinTires.patch @@ -0,0 +1,28 @@ +From 4ee7b500311daa517d03d197a1adb9a29c8eeb32 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B3zef=20Kucia?= +Date: Mon, 2 Jul 2018 14:08:49 +1000 +Subject: [PATCH] wined3d: Improve dirt rendering in SpinTires + +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36089 +Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45375 +--- + dlls/wined3d/glsl_shader.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c +index 86259ae..b6a858d 100644 +--- a/dlls/wined3d/glsl_shader.c ++++ b/dlls/wined3d/glsl_shader.c +@@ -4400,6 +4400,9 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) + + if (dst_size > 1 && shader_version < WINED3D_SHADER_VERSION(4, 0)) + shader_addline(buffer, "vec%u(%s%s%s));\n", dst_size, prefix, src0_param.param_str, suffix); ++ else if (ins->handler_idx == WINED3DSIH_RCP) ++ shader_addline(buffer, "%s == 0.0f ? 0.0f : %s%s%s);\n", ++ src0_param.param_str, prefix, src0_param.param_str, suffix); + else + shader_addline(buffer, "%s%s%s);\n", prefix, src0_param.param_str, suffix); + } +-- +1.9.1 + diff --git a/patches/wined3d-Improved-RCP_Support/definition b/patches/wined3d-Improved-RCP_Support/definition new file mode 100644 index 00000000..ef4c5e65 --- /dev/null +++ b/patches/wined3d-Improved-RCP_Support/definition @@ -0,0 +1,2 @@ +Fixes: [36089] Improve dirt rendering in SpinTires +Fixes: [45375] Halo online black display problems