From 302ad29742b11d911d8a337122d220f92b3f4bd7 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 16 Apr 2013 08:13:43 +0200 Subject: [PATCH] wined3d: Constants in constants_set should always have a valid location in shader_glsl_load_constantsB(). --- dlls/wined3d/glsl_shader.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c84d73b8779..057763f6e7a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -650,12 +650,8 @@ static void shader_glsl_load_constantsB(const struct wined3d_shader *shader, con * locations of the constants to avoid looking up each time */ snprintf(tmp_name, sizeof(tmp_name), "%s_b[%i]", prefix, i); tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name)); - if (tmp_loc != -1) - { - /* We found this uniform name in the program - go ahead and send the data */ - GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, &constants[i])); - checkGLcall("glUniform1ivARB"); - } + GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, &constants[i])); + checkGLcall("glUniform1ivARB"); } /* Load immediate constants */ -- 2.11.4.GIT