summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp2
-rw-r--r--src/mesa/main/ffvertex_prog.c18
-rw-r--r--src/mesa/main/mtypes.h4
-rw-r--r--src/mesa/main/state.c2
-rw-r--r--src/mesa/main/state.h2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7f6933ddb5b..0090481701a 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -798,7 +798,7 @@ init_attrib_groups(struct gl_context *ctx)
ctx->NewState = _NEW_ALL;
ctx->ErrorValue = (GLenum) GL_NO_ERROR;
ctx->ResetStatus = (GLenum) GL_NO_ERROR;
- ctx->varying_vp_inputs = ~0;
+ ctx->varying_vp_inputs = VERT_BIT_ALL;
return GL_TRUE;
}
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index 3d7947bae10..008da0d0e3d 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -334,7 +334,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx )
else if (!(vertexProgram || vertexShader)) {
/* Fixed function vertex logic */
/* _NEW_ARRAY */
- GLbitfield varying_inputs = ctx->varying_vp_inputs;
+ GLbitfield64 varying_inputs = ctx->varying_vp_inputs;
/* These get generated in the setup routine regardless of the
* vertex program:
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);
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6d242c17b76..bedb87ca485 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1857,7 +1857,7 @@ struct gl_program
struct prog_instruction *Instructions;
- GLbitfield InputsRead; /**< Bitmask of which input regs are read */
+ GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */
GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */
GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */
@@ -3364,7 +3364,7 @@ struct gl_context
GLboolean ViewportInitialized; /**< has viewport size been initialized? */
- GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
+ GLbitfield64 varying_vp_inputs; /**< mask of VERT_BIT_* flags */
/** \name Derived state */
/*@{*/
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index bed6c898dc3..12ebd6d2568 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -737,7 +737,7 @@ _mesa_update_state( struct gl_context *ctx )
*/
void
_mesa_set_varying_vp_inputs( struct gl_context *ctx,
- GLbitfield varying_inputs )
+ GLbitfield64 varying_inputs )
{
if (ctx->varying_vp_inputs != varying_inputs) {
ctx->varying_vp_inputs = varying_inputs;
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index 2b5b3d514a7..29a25409268 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -39,7 +39,7 @@ _mesa_update_state_locked(struct gl_context *ctx);
extern void
-_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs);
+_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield64 varying_inputs);
extern void