summaryrefslogtreecommitdiff
path: root/src/glsl/opt_dead_code.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/opt_dead_code.cpp')
-rw-r--r--src/glsl/opt_dead_code.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp
index 47247e20d9f..dad307af779 100644
--- a/src/glsl/opt_dead_code.cpp
+++ b/src/glsl/opt_dead_code.cpp
@@ -77,10 +77,11 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
if (entry->assign) {
/* Remove a single dead assignment to the variable we found.
- * Don't do so if it's a shader output, though.
+ * Don't do so if it's a shader or function output, though.
*/
- if (entry->var->mode != ir_var_out &&
- entry->var->mode != ir_var_inout) {
+ if (entry->var->mode != ir_var_function_out &&
+ entry->var->mode != ir_var_function_inout &&
+ entry->var->mode != ir_var_shader_out) {
entry->assign->remove();
progress = true;