From d00deae3ef3a7828de1e566ad95b3a5b1ab7034d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Sep 2011 11:00:03 -0700 Subject: glsl: Fix setting of OutputsWritten for whole array dereference. 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. Reviewed-by: Ian Romanick --- src/glsl/ir_set_program_inouts.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index 085456533c5..3b10b909724 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); } -- cgit v1.2.3