From 29a2e9133e415de8b010df5b80db758aaf1007a6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 30 Jan 2011 07:59:14 +1000 Subject: glsl: Remove extra checks for constant true assignment conditions. These are already stripped by opt_constant_folding.cpp. --- src/glsl/opt_copy_propagation_elements.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/glsl/opt_copy_propagation_elements.cpp') diff --git a/src/glsl/opt_copy_propagation_elements.cpp b/src/glsl/opt_copy_propagation_elements.cpp index 238a1a75eea..8541d9a8ee1 100644 --- a/src/glsl/opt_copy_propagation_elements.cpp +++ b/src/glsl/opt_copy_propagation_elements.cpp @@ -409,11 +409,8 @@ ir_copy_propagation_elements_visitor::add_copy(ir_assignment *ir) int orig_swizzle[4] = {0, 1, 2, 3}; int swizzle[4]; - if (ir->condition) { - ir_constant *condition = ir->condition->as_constant(); - if (!condition || !condition->value.b[0]) - return; - } + if (ir->condition) + return; ir_dereference_variable *lhs = ir->lhs->as_dereference_variable(); if (!lhs || !(lhs->type->is_scalar() || lhs->type->is_vector())) -- cgit v1.2.3