wined3d: Use the MAX_TEXTURES define in a few more places.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2017-03-10 00:32:01 +01:00 committed by Alexandre Julliard
parent 7ea7680966
commit 72deec5295
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ struct atifs_ffp_desc
struct ffp_frag_desc parent; struct ffp_frag_desc parent;
GLuint shader; GLuint shader;
unsigned int num_textures_used; unsigned int num_textures_used;
enum atifs_constant_value constants[8]; enum atifs_constant_value constants[MAX_TEXTURES];
}; };
struct atifs_private_data struct atifs_private_data
@ -938,7 +938,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES],
constants[ATIFS_CONST_TFACTOR - GL_CON_0_ATI] = ATIFS_CONSTANT_TFACTOR; constants[ATIFS_CONST_TFACTOR - GL_CON_0_ATI] = ATIFS_CONSTANT_TFACTOR;
/* Assign unused constants to avoid reloading due to unused <-> bump matrix switches. */ /* Assign unused constants to avoid reloading due to unused <-> bump matrix switches. */
for (stage = 0; stage < 8; ++stage) for (stage = 0; stage < MAX_TEXTURES; ++stage)
{ {
if (constants[stage] == ATIFS_CONSTANT_UNUSED) if (constants[stage] == ATIFS_CONSTANT_UNUSED)
constants[stage] = ATIFS_CONSTANT_BUMP; constants[stage] = ATIFS_CONSTANT_BUMP;
@ -1062,7 +1062,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
GL_EXTCALL(glBindFragmentShaderATI(desc->shader)); GL_EXTCALL(glBindFragmentShaderATI(desc->shader));
ctx_priv->last_shader = desc; ctx_priv->last_shader = desc;
for (i = 0; i < 8; i++) for (i = 0; i < MAX_TEXTURES; i++)
{ {
if (last_shader && last_shader->constants[i] == desc->constants[i]) if (last_shader && last_shader->constants[i] == desc->constants[i])
continue; continue;