Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/glsl_shader.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c812b2d8b08..1ebd067ae56 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1211,16 +1211,15 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co
/* Context activation is done by the caller. */ static void shader_glsl_load_constants_i(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, - const struct wined3d_ivec4 *constants, const GLint locations[WINED3D_MAX_CONSTS_I], WORD constants_set) + const struct wined3d_ivec4 *constants, const GLint locations[WINED3D_MAX_CONSTS_I], uint32_t constants_set) { unsigned int i; struct list* ptr;
- for (i = 0; constants_set; constants_set >>= 1, ++i) + while (constants_set) { - if (!(constants_set & 1)) continue; - /* We found this uniform name in the program - go ahead and send the data */ + i = wined3d_bit_scan(&constants_set); GL_EXTCALL(glUniform4iv(locations[i], 1, &constants[i].x)); }