[PATCH 4/6] wined3d: Fix shader_arb_load_constantsF().
Henri Verbeet
hverbeet at codeweavers.com
Mon Sep 7 04:15:15 CDT 2009
Make sure enabling +d3d_shader doesn't change the initial value of i.
---
dlls/wined3d/arb_program_shader.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index a26950c..9727783 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -276,7 +276,7 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con
GLuint target_type, unsigned int max_constants, const float *constants, char *dirty_consts)
{
local_constant* lconst;
- DWORD i = 0, j;
+ DWORD i, j;
unsigned int ret;
if (TRACE_ON(d3d_shader)) {
@@ -287,6 +287,9 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, con
constants[i * 4 + 2], constants[i * 4 + 3]);
}
}
+
+ i = 0;
+
/* In 1.X pixel shaders constants are implicitly clamped in the range [-1;1] */
if (target_type == GL_FRAGMENT_PROGRAM_ARB && This->baseShader.reg_maps.shader_version.major == 1)
{
--
1.6.0.6
More information about the wine-patches
mailing list