summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index fe65ae53941..9cc56872536 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3772,7 +3772,7 @@ glsl_to_tgsi_visitor::eliminate_dead_code_advanced(void)
if (!inst->dead_mask || !inst->dst.writemask)
continue;
- else if (inst->dead_mask == inst->dst.writemask) {
+ else if ((inst->dst.writemask & ~inst->dead_mask) == 0) {
iter.remove();
delete inst;
removed++;