From: Matt Turner Date: Fri, 19 Jun 2020 19:33:31 +0000 (-0700) Subject: intel/compiler: Don't emit no-op cr0 changes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8da810a7fbc6c8338a395228955ce0be2823d0cb;p=mesa.git intel/compiler: Don't emit no-op cr0 changes If mask is 0, we're asking for no changes to cr0. Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index bf8e615a274..5e06f10a0f4 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -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)); }