Added patch to pass correct index to shader_glsl_ffp_vertex_lighting_footer.

This commit is contained in:
Sebastian Lackner 2017-05-27 03:25:08 +02:00
parent 27d1ed8f59
commit e5fb1dda8d
3 changed files with 74 additions and 1 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "799230c78ab102fa0034cb4477ce1be78c456a87"
echo "7d2ce5cbe7c84dd193e982d4cfe882265867f998"
}
# Show version information
@ -431,6 +431,7 @@ patch_enable_all ()
enable_wined3d_WINED3DFMT_R32G32_UINT="$1"
enable_wined3d_buffer_create="$1"
enable_wined3d_check_format_support="$1"
enable_wined3d_glsl_ffp_vertex_lighting="$1"
enable_winedbg_Process_Arguments="$1"
enable_winedevice_Fix_Relocation="$1"
enable_winemenubuilder_Desktop_Icon_Path="$1"
@ -1528,6 +1529,9 @@ patch_enable ()
wined3d-check_format_support)
enable_wined3d_check_format_support="$2"
;;
wined3d-glsl_ffp_vertex_lighting)
enable_wined3d_glsl_ffp_vertex_lighting="$2"
;;
winedbg-Process_Arguments)
enable_winedbg_Process_Arguments="$2"
;;
@ -8847,6 +8851,21 @@ if test "$enable_wined3d_check_format_support" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-glsl_ffp_vertex_lighting
# |
# | This patchset fixes the following Wine bugs:
# | * [#43053] Pass correct index to shader_glsl_ffp_vertex_lighting_footer
# |
# | Modified files:
# | * dlls/wined3d/glsl_shader.c
# |
if test "$enable_wined3d_glsl_ffp_vertex_lighting" -eq 1; then
patch_apply wined3d-glsl_ffp_vertex_lighting/0001-wined3d-Pass-correct-index-to-shader_glsl_ffp_vertex.patch
(
printf '%s\n' '+ { "Józef Kucia", "wined3d: Pass correct index to shader_glsl_ffp_vertex_lighting_footer.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset has the following (direct or indirect) dependencies:

View File

@ -0,0 +1,53 @@
From 4047696eda07c8fe788d717eb6cdfdd04a7ad2d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B3zef=20Kucia?= <jkucia@codeweavers.com>
Date: Sat, 27 May 2017 03:17:22 +0200
Subject: wined3d: Pass correct index to
shader_glsl_ffp_vertex_lighting_footer.
---
dlls/wined3d/glsl_shader.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index f53b755a131..7304b2bdcc0 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8272,7 +8272,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
continue;
}
shader_addline(buffer, "dir = normalize(dir);\n");
- shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i);
+ shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx);
shader_addline(buffer, "}\n");
}
@@ -8313,7 +8313,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
shader_addline(buffer, "}\n");
continue;
}
- shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i);
+ shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx);
shader_addline(buffer, "}\n");
}
@@ -8324,7 +8324,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
continue;
shader_addline(buffer, "att = 1.0;\n");
shader_addline(buffer, "dir = normalize(ffp_light[%u].direction.xyz);\n", idx);
- shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i);
+ shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx);
}
for (i = 0; i < settings->parallel_point_light_count; ++i, ++idx)
@@ -8334,7 +8334,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer
continue;
shader_addline(buffer, "att = 1.0;\n");
shader_addline(buffer, "dir = normalize(ffp_light[%u].position.xyz);\n", idx);
- shader_glsl_ffp_vertex_lighting_footer(buffer, settings, i);
+ shader_glsl_ffp_vertex_lighting_footer(buffer, settings, idx);
}
shader_addline(buffer, "ffp_varying_diffuse.xyz = %s.xyz * ambient + %s.xyz * diffuse + %s.xyz;\n",
--
2.12.2

View File

@ -0,0 +1 @@
Fixes: [43053] Pass correct index to shader_glsl_ffp_vertex_lighting_footer