wined3d: Pass a wined3d_vec4 structure to shader_glsl_load_constants_f().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-04-25 17:19:32 +02:00 committed by Alexandre Julliard
parent d7596b08ea
commit f33c79d387
1 changed files with 7 additions and 9 deletions

View File

@ -700,20 +700,18 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info,
const float *constants, const GLint *constant_locations, const struct constant_heap *heap, const struct wined3d_vec4 *constants, const GLint *constant_locations, const struct constant_heap *heap,
unsigned char *stack, UINT version) unsigned char *stack, unsigned int version)
{ {
const struct wined3d_shader_lconst *lconst; const struct wined3d_shader_lconst *lconst;
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */ /* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
if (shader->reg_maps.shader_version.major == 1 if (shader->reg_maps.shader_version.major == 1
&& shader->reg_maps.shader_version.type == WINED3D_SHADER_TYPE_PIXEL) && shader->reg_maps.shader_version.type == WINED3D_SHADER_TYPE_PIXEL)
walk_constant_heap_clamped(gl_info, (const struct wined3d_vec4 *)constants, walk_constant_heap_clamped(gl_info, constants, constant_locations, heap, stack, version);
constant_locations, heap, stack, version);
else else
walk_constant_heap(gl_info, (const struct wined3d_vec4 *)constants, walk_constant_heap(gl_info, constants, constant_locations, heap, stack, version);
constant_locations, heap, stack, version);
if (!shader->load_local_constsF) if (!shader->load_local_constsF)
{ {
@ -1333,7 +1331,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
update_mask = context->constant_update_mask & prog->constant_update_mask; update_mask = context->constant_update_mask & prog->constant_update_mask;
if (update_mask & WINED3D_SHADER_CONST_VS_F) if (update_mask & WINED3D_SHADER_CONST_VS_F)
shader_glsl_load_constantsF(vshader, gl_info, state->vs_consts_f, shader_glsl_load_constants_f(vshader, gl_info, (const struct wined3d_vec4 *)state->vs_consts_f,
prog->vs.uniform_f_locations, &priv->vconst_heap, priv->stack, constant_version); prog->vs.uniform_f_locations, &priv->vconst_heap, priv->stack, constant_version);
if (update_mask & WINED3D_SHADER_CONST_VS_I) if (update_mask & WINED3D_SHADER_CONST_VS_I)
@ -1406,7 +1404,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
} }
if (update_mask & WINED3D_SHADER_CONST_PS_F) if (update_mask & WINED3D_SHADER_CONST_PS_F)
shader_glsl_load_constantsF(pshader, gl_info, state->ps_consts_f, shader_glsl_load_constants_f(pshader, gl_info, (const struct wined3d_vec4 *)state->ps_consts_f,
prog->ps.uniform_f_locations, &priv->pconst_heap, priv->stack, constant_version); prog->ps.uniform_f_locations, &priv->pconst_heap, priv->stack, constant_version);
if (update_mask & WINED3D_SHADER_CONST_PS_I) if (update_mask & WINED3D_SHADER_CONST_PS_I)