mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 20:10:24 +01:00
nir/lower_bit_size: lower uadd_carry
8/16-bit uadd_carry can exist in SPIR-V. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7615 Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19473>
This commit is contained in:
parent
4239512210
commit
da30fb5df7
1 changed files with 2 additions and 0 deletions
|
|
@ -79,6 +79,8 @@ lower_alu_instr(nir_builder *bld, nir_alu_instr *alu, unsigned bit_size)
|
|||
lowered_dst = nir_ushr_imm(bld, lowered_dst, dst_bit_size);
|
||||
else
|
||||
lowered_dst = nir_ishr_imm(bld, lowered_dst, dst_bit_size);
|
||||
} else if (op == nir_op_uadd_carry) {
|
||||
lowered_dst = nir_ushr_imm(bld, nir_iadd(bld, srcs[0], srcs[1]), dst_bit_size);
|
||||
} else {
|
||||
lowered_dst = nir_build_alu_src_arr(bld, op, srcs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue