[Mesa-dev] [PATCH] i965/fs/nir: Emit CMPs instead of MOV.NZ.
Matt Turner
mattst88 at gmail.com
Thu Feb 12 15:39:07 PST 2015
---
I guess this is kind of a companion to the patch I sent recently
that converts MOV -> CMP in opt_algebraic.
src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index da81b61..14e2f82 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -443,10 +443,9 @@ void
fs_visitor::nir_emit_if(nir_if *if_stmt)
{
/* first, put the condition into f0 */
- fs_inst *inst = emit(MOV(reg_null_d,
- retype(get_nir_src(if_stmt->condition),
- BRW_REGISTER_TYPE_UD)));
- inst->conditional_mod = BRW_CONDITIONAL_NZ;
+ emit(CMP(reg_null_d,
+ retype(get_nir_src(if_stmt->condition), BRW_REGISTER_TYPE_UD),
+ fs_reg(0), BRW_CONDITIONAL_NZ));
emit(IF(BRW_PREDICATE_NORMAL));
--
2.0.5
More information about the mesa-dev
mailing list