[Mesa-dev] [PATCH 3/3] i965/vec4: Remove useless conditionals.

Matt Turner mattst88 at gmail.com
Mon Jun 30 10:11:42 PDT 2014


Setting a couple of bits is the same cost or less as conditionally
setting a couple of bits.
---
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 8f5b205..509c32c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1266,12 +1266,9 @@ vec4_generator::generate_code(exec_list *instructions)
 
          brw_inst *last = &p->store[pre_emit_nr_insn];
 
-         if (inst->conditional_mod)
-            brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
-         if (inst->no_dd_clear)
-            brw_inst_set_no_dd_clear(brw, last, true);
-         if (inst->no_dd_check)
-            brw_inst_set_no_dd_check(brw, last, true);
+         brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
+         brw_inst_set_no_dd_clear(brw, last, inst->no_dd_clear);
+         brw_inst_set_no_dd_check(brw, last, inst->no_dd_check);
       }
    }
 
-- 
1.8.3.2



More information about the mesa-dev mailing list