summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-20 14:24:03 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commite81aaeba37f5419323d8f88bc10943c77e25ed14 (patch)
tree3dc9c65fd0984128fb559aa71ed4ae4c7493995e /src/mesa/main
parentdfcbdba47119de6c1d81a869f8625bcc3d7560a2 (diff)
r200/i915/st/mesa/compiler: use common inputs read field
And set set inputs_read directly in shader_info. To avoid regressions between changes this change is a squashed version of the following patches. st/mesa changes where: Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/ffvertex_prog.c6
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/state.h4
-rw-r--r--src/mesa/main/texstate.c2
5 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 44b315eec65..65c1b6d0b38 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -743,7 +743,7 @@ check_context_limits(struct gl_context *ctx)
assert(VARYING_SLOT_MAX <=
(8 * sizeof(ctx->VertexProgram._Current->OutputsWritten)));
assert(VARYING_SLOT_MAX <=
- (8 * sizeof(ctx->FragmentProgram._Current->InputsRead)));
+ (8 * sizeof(ctx->FragmentProgram._Current->info.inputs_read)));
/* shader-related checks */
assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS);
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index b318793fbb4..00409cc71df 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -159,7 +159,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
key->need_eye_coords = ctx->_NeedEyeCoords;
- key->fragprog_inputs_read = fp->InputsRead;
+ key->fragprog_inputs_read = fp->info.inputs_read;
key->varying_vp_inputs = ctx->varying_vp_inputs;
if (ctx->RenderMode == GL_FEEDBACK) {
@@ -447,7 +447,7 @@ static struct ureg register_input( struct tnl_program *p, GLuint input )
assert(input < VERT_ATTRIB_MAX);
if (p->state->varying_vp_inputs & VERT_BIT(input)) {
- p->program->InputsRead |= VERT_BIT(input);
+ p->program->info.inputs_read |= VERT_BIT(input);
return make_ureg(PROGRAM_INPUT, input);
}
else {
@@ -1639,7 +1639,7 @@ create_new_program( const struct state_key *key,
p.program->NumParameters =
p.program->NumAttributes = p.program->NumAddressRegs = 0;
p.program->Parameters = _mesa_new_parameter_list();
- p.program->InputsRead = 0;
+ p.program->info.inputs_read = 0;
p.program->OutputsWritten = 0;
build_tnl_program( &p );
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f03f64e129e..476ee2dae80 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1922,7 +1922,6 @@ struct gl_program
struct shader_info info;
- GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */
GLbitfield64 DoubleInputsRead; /**< Bitmask of which input regs are read and are doubles */
GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index 8b6f54b9ca8..7a6cdacf471 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -61,12 +61,12 @@ _mesa_need_secondary_color(const struct gl_context *ctx)
if (ctx->VertexProgram._Current &&
(ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) &&
- (ctx->VertexProgram._Current->InputsRead & VERT_BIT_COLOR1))
+ (ctx->VertexProgram._Current->info.inputs_read & VERT_BIT_COLOR1))
return GL_TRUE;
if (ctx->FragmentProgram._Current &&
(ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) &&
- (ctx->FragmentProgram._Current->InputsRead & VARYING_BIT_COL1))
+ (ctx->FragmentProgram._Current->info.inputs_read & VARYING_BIT_COL1))
return GL_TRUE;
return GL_FALSE;
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 95ea5bd58ee..56446c3af09 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -599,7 +599,7 @@ update_program_texture_state(struct gl_context *ctx, struct gl_program **prog,
if (prog[MESA_SHADER_FRAGMENT]) {
const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1;
ctx->Texture._EnabledCoordUnits |=
- (prog[MESA_SHADER_FRAGMENT]->InputsRead >> VARYING_SLOT_TEX0) &
+ (prog[MESA_SHADER_FRAGMENT]->info.inputs_read >> VARYING_SLOT_TEX0) &
coordMask;
}
}