aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-29 12:25:28 +0100
committermarha <marha@users.sourceforge.net>2011-11-29 12:25:28 +0100
commit2cfebffb491807a465a8e5f7daca582d8aefb829 (patch)
tree1e17cf480a441bc4b941008005fcd0cc6c3d09a6 /mesalib/src/mesa/main/ffvertex_prog.c
parent7417e9a171736b5279881cd4381fb58c617a23d9 (diff)
downloadvcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.gz
vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.tar.bz2
vcxsrv-2cfebffb491807a465a8e5f7daca582d8aefb829.zip
mesa git update 29 nov 2011
Diffstat (limited to 'mesalib/src/mesa/main/ffvertex_prog.c')
-rw-r--r--mesalib/src/mesa/main/ffvertex_prog.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c
index 2c937386a..19d319a56 100644
--- a/mesalib/src/mesa/main/ffvertex_prog.c
+++ b/mesalib/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;
@@ -230,7 +230,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
key->point_attenuated = 1;
#if FEATURE_point_size_array
- if (ctx->Array.ArrayObj->PointSize.Enabled)
+ if (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled)
key->point_array = 1;
#endif
@@ -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);
}