[Mesa-dev] [PATCH 3/2] i965/vec4: initialize the pull param count 0 every time we run the visitor

Iago Toral Quiroga itoral at igalia.com
Thu Nov 3 11:16:22 UTC 2016


This was being initialized just once to 0, but we want to reset it
every time we call run() on the visitor, which can happen more than
once in scenarios where we failed the compilation using a method and
we are falling back to a different configuration. This is possible,
for example, with geometry shaders.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 6d487da..6d2bbfa 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1968,6 +1968,12 @@ vec4_visitor::run()
 
    calculate_cfg();
 
+   /* Always initialize this to zero, since we can call this method
+    * more than once if we failed compilation with a particular strategy
+    * and we are falling back to a different method.
+    */
+   stage_prog_data->nr_pull_params = 0;
+
    /* 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
-- 
2.7.4



More information about the mesa-dev mailing list