Henri Verbeet : wined3d: Immediate constants should always have a valid location in shader_glsl_load_constantsF ().

Alexandre Julliard julliard at winehq.org
Wed Apr 17 15:14:45 CDT 2013


Module: wine
Branch: master
Commit: 84219f196404a90b34a1ddd75cee9be392e25ffa
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=84219f196404a90b34a1ddd75cee9be392e25ffa

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Apr 17 08:47:57 2013 +0200

wined3d: Immediate constants should always have a valid location in shader_glsl_load_constantsF().

---

 dlls/wined3d/glsl_shader.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 904d6ec..d6540ba 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -582,9 +582,7 @@ static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, con
     /* Immediate constants are clamped to [-1;1] at shader creation time if needed */
     LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry)
     {
-        GLint location = constant_locations[lconst->idx];
-        /* We found this uniform name in the program - go ahead and send the data */
-        if (location != -1) GL_EXTCALL(glUniform4fvARB(location, 1, (const GLfloat *)lconst->value));
+        GL_EXTCALL(glUniform4fvARB(constant_locations[lconst->idx], 1, (const GLfloat *)lconst->value));
     }
     checkGLcall("glUniform4fvARB()");
 }




More information about the wine-cvs mailing list