[Mesa-dev] [PATCH 4/6] i965/vs: Pack uniform registers before optimization

Eric Anholt eric at anholt.net
Wed Sep 7 13:03:35 PDT 2011


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.
---
 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp |    2 +-
 1 files changed, 1 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 9d04a33..79ca6be 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -613,6 +613,7 @@ vec4_visitor::run()
     */
    move_grf_array_access_to_scratch();
    move_uniform_array_access_to_pull_constants();
+   pack_uniform_registers();
 
    bool progress;
    do {
@@ -623,7 +624,6 @@ vec4_visitor::run()
       progress = opt_compute_to_mrf() || progress;
    } while (progress);
 
-   pack_uniform_registers();
 
    if (failed)
       return false;
-- 
1.7.5.4



More information about the mesa-dev mailing list