mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
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.
This commit is contained in:
parent
e070c1d183
commit
64be837b0b
1 changed files with 1 additions and 1 deletions
|
|
@ -172,13 +172,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 );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue