aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-08-07 12:15:26 -0700
committerEric Anholt <[email protected]>2011-08-16 13:04:42 -0700
commitd0e4d71070cd7fa197ed98612782484ec1f27123 (patch)
treeb05f099356ac8731dd3c6691826646a5a2b88800 /src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
parent758c3c2b4588f235def48b2f28c0479a70f7c194 (diff)
i965/vs: Move virtual GRFs with array accesses to them to scratch space.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_emit.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_emit.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index bc3110b0458..57eb467567e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -321,7 +321,7 @@ vec4_visitor::generate_vs_instruction(vec4_instruction *instruction,
bool
vec4_visitor::run()
{
- /* Generate FS IR for main(). (the visitor only descends into
+ /* Generate VS IR for main(). (the visitor only descends into
* functions called "main").
*/
foreach_iter(exec_list_iterator, iter, *shader->ir) {
@@ -332,6 +332,14 @@ vec4_visitor::run()
emit_urb_writes();
+ /* Before any optimization, push array accesses out to scratch
+ * space where we need them to be. This pass may allocate new
+ * virtual GRFs, so we want to do it early. It also makes sure
+ * that we have reladdr computations available for CSE, since we'll
+ * often do repeated subexpressions for those.
+ */
+ move_grf_array_access_to_scratch();
+
if (failed)
return false;