intel/compiler: Don't emit no-op cr0 changes
[mesa.git] / src / intel / compiler / brw_fs_visitor.cpp
index bf8e615a274521f4bdff61605dbdc641e8a07f53..5e06f10a0f40942297e4d9db558c7934b3ed193f 100644 (file)
@@ -258,6 +258,9 @@ fs_visitor::emit_shader_float_controls_execution_mode()
    fs_builder abld = bld.annotate("shader floats control execution mode");
    unsigned mask, mode = brw_rnd_mode_from_nir(execution_mode, &mask);
 
+   if (mask == 0)
+      return;
+
    abld.emit(SHADER_OPCODE_FLOAT_CONTROL_MODE, bld.null_reg_ud(),
              brw_imm_d(mode), brw_imm_d(mask));
 }