[Mesa-dev] [PATCH 1/4] glsl: Fix setting of OutputsWritten for whole array dereference.

Eric Anholt eric at anholt.net
Wed Sep 7 12:24:28 PDT 2011


We just want to mark the whole thing used, not mark from each element
the whole size in use.  Fixes undefined URB entry writes on i965,
which blew up with debugging enabled.
---
 src/glsl/ir_set_program_inouts.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp
index 0854565..3b10b90 100644
--- a/src/glsl/ir_set_program_inouts.cpp
+++ b/src/glsl/ir_set_program_inouts.cpp
@@ -94,10 +94,8 @@ ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir)
       return visit_continue;
 
    if (ir->type->is_array()) {
-      for (unsigned int i = 0; i < ir->type->length; i++) {
-	 mark(this->prog, ir->var, i,
-	      ir->type->length * ir->type->fields.array->matrix_columns);
-      }
+      mark(this->prog, ir->var, 0,
+	   ir->type->length * ir->type->fields.array->matrix_columns);
    } else {
       mark(this->prog, ir->var, 0, ir->type->matrix_columns);
    }
-- 
1.7.5.4



More information about the mesa-dev mailing list