diff options
author | Mathias Fröhlich <[email protected]> | 2018-01-27 16:07:22 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2018-02-01 22:39:06 +0100 |
commit | 38b41fd718cfffd11dab637d9d0cbd6c2a30b2c2 (patch) | |
tree | 24910d5640ca92b20285f40cda11279fca976468 /src/mesa/main/ffvertex_prog.c | |
parent | f37e29ac224887f1b4f0cb7c61e47fb4bc6671e1 (diff) |
mesa: Use defines for the aliased material array attributes.
Instead of just assuming that the material attributes
just overlap with the generic attributes 0-12, give
them symbolic defines so that we can easier move them
to an other range.
Signed-off-by: Mathias Fröhlich <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/ffvertex_prog.c')
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 6d852496e02..6a022b83bdc 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -138,7 +138,7 @@ static GLboolean check_active_shininess( struct gl_context *ctx, (key->light_color_material_mask & (1 << attr))) return GL_TRUE; - if (key->varying_vp_inputs & VERT_BIT_GENERIC(attr)) + if (key->varying_vp_inputs & VERT_BIT_MAT(attr)) return GL_TRUE; if (ctx->Light.Material.Attrib[attr][0] != 0.0F) @@ -851,7 +851,8 @@ static void set_material_flags( struct tnl_program *p ) p->color_materials = p->state->light_color_material_mask; } - p->materials |= (p->state->varying_vp_inputs >> VERT_ATTRIB_GENERIC0); + p->materials |= ((p->state->varying_vp_inputs & VERT_BIT_MAT_ALL) + >> VERT_ATTRIB_MAT(0)); } @@ -866,7 +867,7 @@ static struct ureg get_material( struct tnl_program *p, GLuint side, /* Put material values in the GENERIC slots -- they are not used * for anything in fixed function mode. */ - return register_input( p, attrib + VERT_ATTRIB_GENERIC0 ); + return register_input( p, VERT_ATTRIB_MAT(attrib) ); } else return register_param3( p, STATE_MATERIAL, side, property ); |