glsl: add new variable declaration in function body in lower_output_read

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
This commit is contained in:
Vincent Lejeune
2012-11-23 17:53:06 +01:00
parent d2c7fe5389
commit e9f090e8b2
+1
View File
@@ -97,6 +97,7 @@ output_read_remover::visit(ir_dereference_variable *ir)
temp = new(var_ctx) ir_variable(ir->var->type, ir->var->name,
ir_var_temporary);
hash_table_insert(replacements, temp, ir->var);
ir->var->insert_after(temp);
}
/* Update the dereference to use the temporary */