Commit d7596b08 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass a wined3d_vec4 structure to walk_constant_heap().

parent cf3d5a20
...@@ -551,7 +551,7 @@ static void shader_glsl_load_samplers(const struct wined3d_gl_info *gl_info, ...@@ -551,7 +551,7 @@ static void shader_glsl_load_samplers(const struct wined3d_gl_info *gl_info,
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const float *constants, static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const struct wined3d_vec4 *constants,
const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
{ {
unsigned int start = ~0U, end = 0; unsigned int start = ~0U, end = 0;
...@@ -620,7 +620,7 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con ...@@ -620,7 +620,7 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con
} }
} }
if (start <= end) if (start <= end)
GL_EXTCALL(glUniform4fv(constant_locations[start], end - start + 1, &constants[start * 4])); GL_EXTCALL(glUniform4fv(constant_locations[start], end - start + 1, &constants[start].x));
checkGLcall("walk_constant_heap()"); checkGLcall("walk_constant_heap()");
} }
...@@ -712,7 +712,8 @@ static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, con ...@@ -712,7 +712,8 @@ static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, con
walk_constant_heap_clamped(gl_info, (const struct wined3d_vec4 *)constants, walk_constant_heap_clamped(gl_info, (const struct wined3d_vec4 *)constants,
constant_locations, heap, stack, version); constant_locations, heap, stack, version);
else else
walk_constant_heap(gl_info, constants, constant_locations, heap, stack, version); walk_constant_heap(gl_info, (const struct wined3d_vec4 *)constants,
constant_locations, heap, stack, version);
if (!shader->load_local_constsF) if (!shader->load_local_constsF)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment