diff options
Diffstat (limited to 'src/glsl/ir_dead_code_local.cpp')
-rw-r--r-- | src/glsl/ir_dead_code_local.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glsl/ir_dead_code_local.cpp b/src/glsl/ir_dead_code_local.cpp index b22cc558df6..4bbedf0ff94 100644 --- a/src/glsl/ir_dead_code_local.cpp +++ b/src/glsl/ir_dead_code_local.cpp @@ -156,7 +156,12 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) } } - /* Add this instruction to the assignment list. */ + /* Add this instruction to the assignment list available to be removed. + * But not if the assignment has other side effects. + */ + if (ir_has_call(ir)) + return progress; + assignment_entry *entry = new(ctx) assignment_entry(var, ir); assignments->push_tail(entry); |