zink: support more nir opcodes

There are sadly no SPIRV variants for hadd or iadd_sat we can use, so
lower those.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
This commit is contained in:
Karol Herbst 2023-09-19 14:44:26 +02:00 committed by Marge Bot
parent c5abb7c8d1
commit 82eed326f4
2 changed files with 3 additions and 0 deletions

View file

@ -1834,6 +1834,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
UNOP(nir_op_f2f64, SpvOpFConvert)
UNOP(nir_op_bitfield_reverse, SpvOpBitReverse)
UNOP(nir_op_bit_count, SpvOpBitCount)
UNOP(nir_op_fisnormal, SpvOpIsNormal)
#undef UNOP
case nir_op_f2f16_rtz:

View file

@ -1210,6 +1210,8 @@ zink_screen_init_compiler(struct zink_screen *screen)
.lower_flrp32 = true,
.lower_fpow = true,
.lower_fsat = true,
.lower_hadd = true,
.lower_iadd_sat = true,
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_insert_byte = true,