Henri Verbeet : wined3d: Pass a wined3d_vec4 structure to walk_constant_heap().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 26 10:33:42 CDT 2016
Module: wine
Branch: master
Commit: d7596b08ea62cb7d96298345d284f6c05fae07e8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d7596b08ea62cb7d96298345d284f6c05fae07e8
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Apr 25 17:19:31 2016 +0200
wined3d: Pass a wined3d_vec4 structure to walk_constant_heap().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/glsl_shader.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index d9f1108..db2322c 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -551,7 +551,7 @@ static void shader_glsl_load_samplers(const struct wined3d_gl_info *gl_info,
}
/* 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)
{
unsigned int start = ~0U, end = 0;
@@ -620,7 +620,7 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con
}
}
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()");
}
@@ -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,
constant_locations, heap, stack, version);
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)
{
More information about the wine-cvs
mailing list