diff options
author | Eric Anholt <eric@anholt.net> | 2010-01-09 02:03:13 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-01-18 13:52:47 -0800 |
commit | d5b964234c37673ec6b444d0a8fa3b823f03fd05 (patch) | |
tree | 40d66b43886ded430294963f6e3366368e1fb177 /src/mesa/drivers | |
parent | c6559b7e01bbbf7f8d23d6ca58b5fe3d8514ad97 (diff) |
i965: Fix loads of non-relative-addr constants after a reladdr load.
Fixes piglit vp-arl-constant-array-huge-overwritten.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_emit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index 1b84dd505f..59334c9ebb 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -771,7 +771,13 @@ get_constant(struct brw_vs_compile *c, if (c->current_const[argIndex].index != src->Index || relAddr) { struct brw_reg addrReg = c->regs[PROGRAM_ADDRESS][0]; - c->current_const[argIndex].index = src->Index; + /* If using a non-relative-addressed constant, then keep track of it for + * later use without reloading. + */ + if (relAddr) + c->current_const[argIndex].index = -1; + else + c->current_const[argIndex].index = src->Index; #if 0 printf(" fetch const[%d] for arg %d into reg %d\n", |