From: José Fonseca Date: Wed, 25 Jan 2012 13:47:55 +0000 (+0000) Subject: mesa/st: Assign inputsRead at right (previous) location. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ac37b0b81699442893c2894aa1f5293a5cda3a9;p=mesa.git mesa/st: Assign inputsRead at right (previous) location. Fixes the src/mesa/state_tracker/st_glsl_to_tgsi.cpp:4032:src_register: Assertion `t->inputMapping[index] < (sizeof(t->inputs)/sizeof(*(t->inputs)))' failed. assertion failure introduced in 697b9945fb0f55428b06821f98fd8621372f81ad --- diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index cebe39004b8..deee722cfa6 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -477,7 +477,7 @@ st_translate_fragment_program(struct st_context *st, GLuint inputMapping[FRAG_ATTRIB_MAX]; GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */ GLuint attr; - const GLbitfield64 inputsRead = stfp->Base.Base.InputsRead; + GLbitfield64 inputsRead; struct ureg_program *ureg; GLboolean write_all = GL_FALSE; @@ -531,6 +531,7 @@ st_translate_fragment_program(struct st_context *st, /* * Convert Mesa program inputs to TGSI input register semantics. */ + inputsRead = stfp->Base.Base.InputsRead; for (attr = 0; attr < FRAG_ATTRIB_MAX; attr++) { if ((inputsRead & BITFIELD64_BIT(attr)) != 0) { const GLuint slot = fs_num_inputs++; @@ -804,7 +805,7 @@ st_translate_geometry_program(struct st_context *st, GLuint outputMapping[GEOM_RESULT_MAX]; struct pipe_context *pipe = st->pipe; GLuint attr; - const GLbitfield64 inputsRead = stgp->Base.Base.InputsRead; + GLbitfield64 inputsRead; GLuint vslot = 0; GLuint num_generic = 0; @@ -844,6 +845,7 @@ st_translate_geometry_program(struct st_context *st, /* * Convert Mesa program inputs to TGSI input register semantics. */ + inputsRead = stgp->Base.Base.InputsRead; for (attr = 0; attr < GEOM_ATTRIB_MAX; attr++) { if ((inputsRead & BITFIELD64_BIT(attr)) != 0) { const GLuint slot = gs_num_inputs;