mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 18:50:33 +01:00
elk: 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:
parent
65e8220180
commit
073ffceef6
3 changed files with 10 additions and 0 deletions
|
|
@ -1059,13 +1059,19 @@ fs_nir_emit_alu(nir_to_elk_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 == ELK_REGISTER_TYPE_B ||
|
||||
result.type == ELK_REGISTER_TYPE_UB ||
|
||||
result.type == ELK_REGISTER_TYPE_HF)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#define COMMON_OPTIONS \
|
||||
.compact_arrays = true, \
|
||||
.discard_is_demote = true, \
|
||||
.has_f2i_sat = true, \
|
||||
.has_f2u_sat = true, \
|
||||
.has_uclz = true, \
|
||||
.lower_fdiv = true, \
|
||||
.lower_scmp = true, \
|
||||
|
|
|
|||
|
|
@ -1122,7 +1122,9 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
|
|||
|
||||
case nir_op_f2f32:
|
||||
case nir_op_f2i32:
|
||||
case nir_op_f2i32_sat:
|
||||
case nir_op_f2u32:
|
||||
case nir_op_f2u32_sat:
|
||||
if (nir_src_bit_size(instr->src[0].src) == 64)
|
||||
emit_conversion_from_double(dst, op[0]);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue