brw: Enable saturating float to integer conversion opcodes

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37186>
This commit is contained in:
Ian Romanick 2025-09-08 09:46:11 -07:00 committed by Marge Bot
parent 986086c846
commit 65e8220180
2 changed files with 8 additions and 0 deletions

View file

@ -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,

View file

@ -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)