diff options
author | Mathias Fröhlich <[email protected]> | 2011-10-31 18:32:59 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2011-11-29 06:35:44 +0100 |
commit | dca6a28a14f22d77273d79d44f57b0d853c0242d (patch) | |
tree | c917c9372e56b864262991cf82f48b62b9625bc2 /src/mesa/main/ffvertex_prog.c | |
parent | f364ac1da10ff67eba5196c1074aff579864f741 (diff) |
mesa: Make gl_program::InputsRead 64 bits.
Make gl_program::InputsRead a 64 bits bitfield.
Adapt the intel and radeon driver to handle a 64 bits
InputsRead value.
Signed-off-by: Mathias Froehlich <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/ffvertex_prog.c')
-rw-r--r-- | src/mesa/main/ffvertex_prog.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index 2c937386a9f..f88110fd5df 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -68,7 +68,7 @@ struct state_key { unsigned texture_enabled_global:1; unsigned fragprog_inputs_read:12; - unsigned varying_vp_inputs; + GLbitfield64 varying_vp_inputs; struct { unsigned light_enabled:1; @@ -130,16 +130,16 @@ static GLboolean check_active_shininess( struct gl_context *ctx, const struct state_key *key, GLuint side ) { - GLuint bit = 1 << (MAT_ATTRIB_FRONT_SHININESS + side); + GLuint attr = MAT_ATTRIB_FRONT_SHININESS + side; if ((key->varying_vp_inputs & VERT_BIT_COLOR0) && - (key->light_color_material_mask & bit)) + (key->light_color_material_mask & (1 << attr))) return GL_TRUE; - if (key->varying_vp_inputs & (bit << 16)) + if (key->varying_vp_inputs & VERT_ATTRIB_GENERIC(attr)) return GL_TRUE; - if (ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_SHININESS + side][0] != 0.0F) + if (ctx->Light.Material.Attrib[attr][0] != 0.0F) return GL_TRUE; return GL_FALSE; @@ -445,10 +445,10 @@ static struct ureg register_param5(struct tnl_program *p, */ static struct ureg register_input( struct tnl_program *p, GLuint input ) { - assert(input < 32); + assert(input < VERT_ATTRIB_MAX); - if (p->state->varying_vp_inputs & (1<<input)) { - p->program->Base.InputsRead |= (1<<input); + if (p->state->varying_vp_inputs & VERT_BIT(input)) { + p->program->Base.InputsRead |= VERT_BIT(input); return make_ureg(PROGRAM_INPUT, input); } else { @@ -871,7 +871,7 @@ 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 >> 16); + p->materials |= (p->state->varying_vp_inputs >> VERT_ATTRIB_GENERIC0); } |