wined3d: Use wined3d_bit_scan() in shader_glsl_load_constants_i().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2022-01-28 15:47:19 +01:00 committed by Alexandre Julliard
parent cd30bf64d6
commit 6f150854e7
1 changed files with 3 additions and 4 deletions

View File

@ -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));
}