From 78fac1892a3a7a90eb7baf78903d70649028d27a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 5 Aug 2011 16:35:24 -0700 Subject: [PATCH] i965/vs: Allocate storage for "auto" variables just like temps. Fixes segfault in glsl-vs-cross-2. --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index e3779ab0444..3e62c9ebba8 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -634,6 +634,7 @@ vec4_visitor::visit(ir_variable *ir) } break; + case ir_var_auto: case ir_var_temporary: reg = new(mem_ctx) dst_reg(this, ir->type); break; @@ -647,6 +648,9 @@ vec4_visitor::visit(ir_variable *ir) setup_uniform_values(ir->location, ir->type); } break; + + default: + assert(!"not reached"); } reg->type = brw_type_for_base_type(ir->type); -- 2.30.2