aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_discard.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2017-09-18 15:30:51 -0500
committerIan Romanick <[email protected]>2017-10-02 14:46:02 -0700
commit6d1765c63aed1b814b29051c702f8e79ead6dbed (patch)
treecd8acdee3c4414b68c940bc6ab6e2f54369aa1b6 /src/compiler/glsl/lower_discard.cpp
parent3cc997c7c81759446f4478d70252015fbe0ed9f5 (diff)
glsl: Don't pass NULL to ir_assignment constructor when not necessary
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_discard.cpp')
-rw-r--r--src/compiler/glsl/lower_discard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/lower_discard.cpp b/src/compiler/glsl/lower_discard.cpp
index b62eb20dcb4..203d9e3b960 100644
--- a/src/compiler/glsl/lower_discard.cpp
+++ b/src/compiler/glsl/lower_discard.cpp
@@ -158,7 +158,7 @@ replace_discard(void *mem_ctx, ir_variable *var, ir_discard *ir)
ir_assignment *assignment =
new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(var),
- condition, NULL);
+ condition);
ir->replace_with(assignment);
}
@@ -180,7 +180,7 @@ lower_discard_visitor::visit_leave(ir_if *ir)
ir_var_temporary);
ir_assignment *temp_initializer =
new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(temp),
- new(mem_ctx) ir_constant(false), NULL);
+ new(mem_ctx) ir_constant(false));
ir->insert_before(temp);
ir->insert_before(temp_initializer);