summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-05 14:59:04 -0700
committerBrian Paul <[email protected]>2010-02-05 14:59:04 -0700
commit337d3b2b391c50130fa825ee853a570e1a84d309 (patch)
tree7879d67ed4c3ba79e25e0fcb2ed93df794ef3f98 /src
parenta636f5b4d064dccf658f00d152ae9aeaa3751e64 (diff)
st/mesa: allow negative index for PROGRAM_STATE_VAR
The piglit vp-address-01 test uses negative address-relative offsets. In this test we're indexing into PROGRAM_STATE_VAR which, in turn, contains references to ENV vars. We previously fixed this issue for PROGRAM_CONSTANT. piglit/vp-address-01 (the version from Feb 5) passes now. (cherry picked from commit 64be837b0b171c44f47a3c0b83f566d292ffff50)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 6283833463f..3eb4c1ccca7 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -177,13 +177,13 @@ src_register( struct st_translate *t,
t->temps[index] = ureg_DECL_temporary( t->ureg );
return ureg_src(t->temps[index]);
- case PROGRAM_STATE_VAR:
case PROGRAM_NAMED_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_UNIFORM:
ASSERT(index >= 0);
return t->constants[index];
+ case PROGRAM_STATE_VAR:
case PROGRAM_CONSTANT: /* ie, immediate */
if (index < 0)
return ureg_DECL_constant( t->ureg, 0 );