summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/opt_conditional_discard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/opt_conditional_discard.cpp')
-rw-r--r--src/compiler/glsl/opt_conditional_discard.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/opt_conditional_discard.cpp b/src/compiler/glsl/opt_conditional_discard.cpp
index 1ca8803f643..03665c37364 100644
--- a/src/compiler/glsl/opt_conditional_discard.cpp
+++ b/src/compiler/glsl/opt_conditional_discard.cpp
@@ -65,13 +65,13 @@ opt_conditional_discard_visitor::visit_leave(ir_if *ir)
{
/* Look for "if (...) discard" with no else clause or extra statements. */
if (ir->then_instructions.is_empty() ||
- !ir->then_instructions.head->next->is_tail_sentinel() ||
- !((ir_instruction *) ir->then_instructions.head)->as_discard() ||
+ !ir->then_instructions.get_head_raw()->next->is_tail_sentinel() ||
+ !((ir_instruction *) ir->then_instructions.get_head_raw())->as_discard() ||
!ir->else_instructions.is_empty())
return visit_continue;
/* Move the condition and replace the ir_if with the ir_discard. */
- ir_discard *discard = (ir_discard *) ir->then_instructions.head;
+ ir_discard *discard = (ir_discard *) ir->then_instructions.get_head_raw();
discard->condition = ir->condition;
ir->replace_with(discard);