diff options
author | Timothy Arceri <[email protected]> | 2016-10-20 14:24:03 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | e81aaeba37f5419323d8f88bc10943c77e25ed14 (patch) | |
tree | 3dc9c65fd0984128fb559aa71ed4ae4c7493995e /src/mesa/program/program_parse.y | |
parent | dfcbdba47119de6c1d81a869f8625bcc3d7560a2 (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/program/program_parse.y')
-rw-r--r-- | src/mesa/program/program_parse.y | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y index 5294d58477a..2210c0ce8a8 100644 --- a/src/mesa/program/program_parse.y +++ b/src/mesa/program/program_parse.y @@ -752,7 +752,7 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */ break; case at_attrib: set_src_reg(& $$, PROGRAM_INPUT, s->attrib_binding); - state->prog->InputsRead |= BITFIELD64_BIT($$.Base.Index); + state->prog->info.inputs_read |= BITFIELD64_BIT($$.Base.Index); if (!validate_inputs(& @1, state)) { YYERROR; @@ -767,7 +767,7 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */ | attribBinding { set_src_reg(& $$, PROGRAM_INPUT, $1); - state->prog->InputsRead |= BITFIELD64_BIT($$.Base.Index); + state->prog->info.inputs_read |= BITFIELD64_BIT($$.Base.Index); if (!validate_inputs(& @1, state)) { YYERROR; @@ -2218,7 +2218,7 @@ set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, int validate_inputs(struct YYLTYPE *locp, struct asm_parser_state *state) { - const GLbitfield64 inputs = state->prog->InputsRead | state->InputsBound; + const GLbitfield64 inputs = state->prog->info.inputs_read | state->InputsBound; if (((inputs & VERT_BIT_FF_ALL) & (inputs >> VERT_ATTRIB_GENERIC0)) != 0) { yyerror(locp, state, "illegal use of generic attribute and name attribute"); @@ -2588,7 +2588,8 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st state->prog->NumInstructions++; state->prog->NumParameters = state->prog->Parameters->NumParameters; - state->prog->NumAttributes = _mesa_bitcount_64(state->prog->InputsRead); + state->prog->NumAttributes = + _mesa_bitcount_64(state->prog->info.inputs_read); /* * Initialize native counts to logical counts. The device driver may |