diff --git a/src/intel/compiler/brw/brw_compiler.c b/src/intel/compiler/brw/brw_compiler.c index 3b76dd208b0..1b89bcbcbff 100644 --- a/src/intel/compiler/brw/brw_compiler.c +++ b/src/intel/compiler/brw/brw_compiler.c @@ -42,6 +42,8 @@ const struct nir_shader_compiler_options brw_scalar_nir_options = { .has_bfe = true, .has_bfi = true, .has_bfm = true, + .has_f2i_sat = true, + .has_f2u_sat = true, .has_pack_32_4x8 = true, .has_uclz = true, .lower_base_vertex = true, diff --git a/src/intel/compiler/brw/brw_from_nir.cpp b/src/intel/compiler/brw/brw_from_nir.cpp index f96bbbbbc93..b433fa7c2e0 100644 --- a/src/intel/compiler/brw/brw_from_nir.cpp +++ b/src/intel/compiler/brw/brw_from_nir.cpp @@ -1074,13 +1074,19 @@ brw_from_nir_emit_alu(nir_to_brw_state &ntb, nir_alu_instr *instr, case nir_op_i2i32: case nir_op_u2u32: case nir_op_f2i32: + case nir_op_f2i32_sat: case nir_op_f2u32: + case nir_op_f2u32_sat: case nir_op_i2f16: case nir_op_u2f16: case nir_op_f2i16: + case nir_op_f2i16_sat: case nir_op_f2u16: + case nir_op_f2u16_sat: case nir_op_f2i8: + case nir_op_f2i8_sat: case nir_op_f2u8: + case nir_op_f2u8_sat: if (result.type == BRW_TYPE_B || result.type == BRW_TYPE_UB || result.type == BRW_TYPE_HF)