Module: Mesa
Branch: master
Commit: 5e87f48f1d755478cb919d7041ff11a9a2d37c57
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e87f48f1d755478cb919d7041ff11a9a2d37c57

Author: Andres Gomez <[email protected]>
Date:   Tue Sep 24 01:37:57 2019 +0300

i965/fs: set rounding mode when emitting the flrp instruction

flrp was forgotten when already adding the rounding mode for other
instructions.

Fixes: ba1e25e1aa6 ("i965/fs: set rounding mode when emitting fadd, fmul and 
ffma instructions")
Suggested-by: Ian Romanick <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>

---

 src/intel/compiler/brw_fs_nir.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/intel/compiler/brw_fs_nir.cpp 
b/src/intel/compiler/brw_fs_nir.cpp
index 5b37f4dc382..6a9a2548b6c 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -1817,6 +1817,13 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, 
nir_alu_instr *instr,
       break;
 
    case nir_op_flrp:
+      if (nir_has_any_rounding_mode_enabled(execution_mode)) {
+         brw_rnd_mode rnd =
+            brw_rnd_mode_from_execution_mode(execution_mode);
+         bld.emit(SHADER_OPCODE_RND_MODE, bld.null_reg_ud(),
+                  brw_imm_d(rnd));
+      }
+
       inst = bld.LRP(result, op[0], op[1], op[2]);
       inst->saturate = instr->dest.saturate;
       break;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to