i965/vs: Pack uniform registers before optimization
authorEric Anholt <eric@anholt.net>
Wed, 7 Sep 2011 05:13:20 +0000 (22:13 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 9 Sep 2011 04:34:03 +0000 (21:34 -0700)
We don't expect uniform accesses to generally go away from being dead
code at this point, and we will want to have uniforms packed before
spilling them out to pull constants when we are forced to do that.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index 30bb0f67631f24d3cbfbcd7e359dde0d737308c1..3567949b811383fa97b1decdf377ce822f3bfd5e 100644 (file)
@@ -607,6 +607,7 @@ vec4_visitor::run()
     */
    move_grf_array_access_to_scratch();
    move_uniform_array_access_to_pull_constants();
+   pack_uniform_registers();
 
    bool progress;
    do {
@@ -614,7 +615,6 @@ vec4_visitor::run()
       progress = dead_code_eliminate() || progress;
    } while (progress);
 
-   pack_uniform_registers();
 
    if (failed)
       return false;