[Mesa-dev] [PATCH] glsl: add new variable declaration in function body in lower_output_read
Vincent Lejeune
vljn at ovi.com
Fri Nov 23 13:33:35 PST 2012
---
src/glsl/lower_output_reads.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/glsl/lower_output_reads.cpp b/src/glsl/lower_output_reads.cpp
index 90d71b0..a6192a5 100644
--- a/src/glsl/lower_output_reads.cpp
+++ b/src/glsl/lower_output_reads.cpp
@@ -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 */
--
1.7.11.7
More information about the mesa-dev
mailing list