summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-01-25 13:47:55 +0000
committerJosé Fonseca <jfonseca@vmware.com>2012-01-25 13:48:18 +0000
commit4ac37b0b81699442893c2894aa1f5293a5cda3a9 (patch)
treecb0873482705aff276a367ab3e0d87e748b22971
parent69c8f468ba93dc2999d4fde8909f8051e910929a (diff)
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
-rw-r--r--src/mesa/state_tracker/st_program.c6
1 files changed, 4 insertions, 2 deletions
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;