summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-05 12:24:36 -0700
committerEric Anholt <[email protected]>2010-08-05 12:56:03 -0700
commitb259eb28049fc06ebc75a7714834b9ed037a3454 (patch)
tree39902c665b8ca45b37c080a127e1c934a44290f7 /src
parent9f82806c7b5109553cf806a5652e6b6198665094 (diff)
glsl2: Don't tree-grafting out assignment to an out variable.
Fixes: glsl-deadcode-varying.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ir_tree_grafting.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/ir_tree_grafting.cpp b/src/glsl/ir_tree_grafting.cpp
index 38034a61977..1a742f412cb 100644
--- a/src/glsl/ir_tree_grafting.cpp
+++ b/src/glsl/ir_tree_grafting.cpp
@@ -319,6 +319,10 @@ tree_grafting_basic_block(ir_instruction *bb_first,
if (!lhs_var)
continue;
+ if (lhs_var->mode == ir_var_out ||
+ lhs_var->mode == ir_var_inout)
+ continue;
+
struct variable_entry *entry = info->refs->get_variable_entry(lhs_var);
if (!entry->declaration ||