Henri Verbeet : wined3d: Pass a wined3d_vec4 structure to walk_constant_heap_clamped().
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 26 10:33:42 CDT 2016
Module: wine
Branch: master
Commit: cf3d5a2046891c6b43cf4c7bef8dfea79cba19c8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cf3d5a2046891c6b43cf4c7bef8dfea79cba19c8
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Apr 25 17:19:30 2016 +0200
wined3d: Pass a wined3d_vec4 structure to walk_constant_heap_clamped().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/glsl_shader.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 8c3958d..d9f1108 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -641,8 +641,9 @@ static inline void apply_clamped_constant(const struct wined3d_gl_info *gl_info,
}
/* Context activation is done by the caller. */
-static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info, const float *constants,
- const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
+static inline void walk_constant_heap_clamped(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)
{
int stack_idx = 0;
unsigned int heap_idx = 1;
@@ -651,7 +652,7 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
if (heap->entries[heap_idx].version <= version) return;
idx = heap->entries[heap_idx].idx;
- apply_clamped_constant(gl_info, constant_locations[idx], (const struct wined3d_vec4 *)&constants[idx * 4]);
+ apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx]);
stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
while (stack_idx >= 0)
@@ -666,8 +667,7 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
{
heap_idx = left_idx;
idx = heap->entries[heap_idx].idx;
- apply_clamped_constant(gl_info, constant_locations[idx],
- (const struct wined3d_vec4 *)&constants[idx * 4]);
+ apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx]);
stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT;
stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
@@ -682,8 +682,7 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
{
heap_idx = right_idx;
idx = heap->entries[heap_idx].idx;
- apply_clamped_constant(gl_info, constant_locations[idx],
- (const struct wined3d_vec4 *)&constants[idx * 4]);
+ apply_clamped_constant(gl_info, constant_locations[idx], &constants[idx]);
stack[stack_idx++] = HEAP_NODE_POP;
stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
@@ -710,7 +709,8 @@ static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, con
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
if (shader->reg_maps.shader_version.major == 1
&& shader->reg_maps.shader_version.type == WINED3D_SHADER_TYPE_PIXEL)
- walk_constant_heap_clamped(gl_info, constants, constant_locations, heap, stack, version);
+ 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);
More information about the wine-cvs
mailing list