From: Keith Whitwell Date: Sun, 15 Nov 2009 03:48:42 +0000 (-0800) Subject: mesa/st: don't calculate unused input_flags data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ffdd1c1e897c448cbc359aea3e3a3ba098bbfe5;p=mesa.git mesa/st: don't calculate unused input_flags data --- diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 3d6c2158191..81f02d01e9f 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -704,7 +704,6 @@ st_translate_mesa_program( const ubyte inputSemanticName[], const ubyte inputSemanticIndex[], const GLuint interpMode[], - const GLbitfield inputFlags[], GLuint numOutputs, const GLuint outputMapping[], const ubyte outputSemanticName[], diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h index c0d1ff59e1f..384831762db 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.h +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h @@ -49,7 +49,6 @@ st_translate_mesa_program( const ubyte inputSemanticName[], const ubyte inputSemanticIndex[], const GLuint interpMode[], - const GLbitfield inputFlags[], GLuint numOutputs, const GLuint outputMapping[], const ubyte outputSemanticName[], diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index b6c9e7463a8..fd1b213eb81 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -75,11 +75,9 @@ st_translate_vertex_program(struct st_context *st, ubyte vs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS]; uint vs_num_outputs = 0; - GLbitfield input_flags[MAX_PROGRAM_INPUTS]; GLbitfield output_flags[MAX_PROGRAM_OUTPUTS]; // memset(&vs, 0, sizeof(vs)); - memset(input_flags, 0, sizeof(input_flags)); memset(output_flags, 0, sizeof(output_flags)); if (stvp->Base.IsPositionInvariant) @@ -91,14 +89,10 @@ st_translate_vertex_program(struct st_context *st, */ for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) { if (stvp->Base.Base.InputsRead & (1 << attr)) { - const GLuint slot = vs_num_inputs; + stvp->input_to_index[attr] = vs_num_inputs; + stvp->index_to_input[vs_num_inputs] = attr; vs_num_inputs++; - - stvp->input_to_index[attr] = slot; - stvp->index_to_input[slot] = attr; - - input_flags[slot] = stvp->Base.Base.InputFlags[attr]; } } @@ -266,7 +260,6 @@ st_translate_vertex_program(struct st_context *st, NULL, /* input semantic name */ NULL, /* input semantic index */ NULL, - input_flags, /* outputs */ vs_num_outputs, outputMapping, @@ -316,11 +309,9 @@ st_translate_fragment_program(struct st_context *st, ubyte fs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS]; uint fs_num_outputs = 0; - GLbitfield input_flags[MAX_PROGRAM_INPUTS]; GLbitfield output_flags[MAX_PROGRAM_OUTPUTS]; // memset(&fs, 0, sizeof(fs)); - memset(input_flags, 0, sizeof(input_flags)); memset(output_flags, 0, sizeof(output_flags)); /* which vertex output goes to the first fragment input: */ @@ -392,8 +383,6 @@ st_translate_fragment_program(struct st_context *st, stfp->input_semantic_index[slot] = num_generic++; interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE; } - - input_flags[slot] = stfp->Base.Base.InputFlags[attr]; } } @@ -451,7 +440,6 @@ st_translate_fragment_program(struct st_context *st, stfp->input_semantic_name, stfp->input_semantic_index, interpMode, - input_flags, /* outputs */ fs_num_outputs, outputMapping,