OSDN Git Service

i965/vec4: Don't overwrite op[1] when doing a UBO load.
authorEric Anholt <eric@anholt.net>
Thu, 31 Oct 2013 00:09:53 +0000 (17:09 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 1 Nov 2013 17:25:33 +0000 (10:25 -0700)
commit3641b97bdce558d980799b00422c6aee7d472cf5
treeb9a3846da73defc24c8bf26f60d663204610aa6e
parent2197967cd4e04365fd9c2eae0351f3e39f839766
i965/vec4: Don't overwrite op[1] when doing a UBO load.

Prior to the GLSL CSE pass, all of our testing happened to have a freshly
computed temporary in op[1], from the multiply by 16 to get a byte offset.
As of CSE you'll get var_refs of a reused value when you've got multiple
loads from the same offset.

Make a proper temporary for computing our temporary value, to avoid
shifting the value farther and farther down.  Avoids a regression in
gs-float-array-variable-index

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp