From: Brian Date: Tue, 26 Feb 2008 15:43:07 +0000 (-0700) Subject: gallium: remove input_map[] from pipe_shader_state X-Git-Tag: 062012170305~17580^2~390^2~2461 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecd50ef58b034e604ff6b2fedbb0815953e510ea;p=profile%2Fivi%2Fmesa.git gallium: remove input_map[] from pipe_shader_state --- diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 15c8888..ddf3c1c 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -162,7 +162,6 @@ struct pipe_shader_state const struct tgsi_token *tokens; ubyte num_inputs; ubyte num_outputs; - ubyte input_map[PIPE_MAX_SHADER_INPUTS]; /* XXX this may be temporary */ ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */ ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS]; ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */ diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index b67b620..10c131d 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -227,7 +227,7 @@ find_translated_vp(struct st_context *st, if (fpInAttrib >= 0) { GLuint fpInSlot = stfp->input_to_slot[fpInAttrib]; if (fpInSlot != ~0) { - GLuint vpOutSlot = stfp->cso->state.input_map[fpInSlot]; + GLuint vpOutSlot = stfp->input_map[fpInSlot]; xvp->output_to_slot[outAttr] = vpOutSlot; numVpOuts++; } diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index dc992ee..aa252c8 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -311,7 +311,7 @@ st_translate_fragment_program(struct st_context *st, defaultInputMapping[attr] = slot; - fs.input_map[slot] = vslot++; + stfp->input_map[slot] = vslot++; fs.num_inputs++; diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 25cf3e9..31558af 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -57,6 +57,9 @@ struct st_fragment_program GLuint input_to_slot[FRAG_ATTRIB_MAX]; /**< Maps FRAG_ATTRIB_x to slot */ GLuint num_input_slots; + /** map FP input back to VP output */ + GLuint input_map[PIPE_MAX_SHADER_INPUTS]; + /** The program in TGSI format */ struct tgsi_token tokens[ST_MAX_SHADER_TOKENS];