From: Eric Anholt Date: Wed, 7 Sep 2011 18:00:03 +0000 (-0700) Subject: glsl: Fix setting of OutputsWritten for whole array dereference. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d00deae3ef3a7828de1e566ad95b3a5b1ab7034d;p=mesa.git 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 --- 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); }