mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 22:20:27 +01:00
aco: fix nir_f2u64 translation
mantissa needs to be at the lower part for shift left.
This fixes large integer value conversion.
Cc: mesa-stable
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22570>
(cherry picked from commit 6a39d35df0)
This commit is contained in:
parent
4db176201c
commit
36b466aedd
2 changed files with 4 additions and 4 deletions
|
|
@ -2754,7 +2754,7 @@
|
|||
"description": "aco: fix nir_f2u64 translation",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3296,7 +3296,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
mantissa = bld.vop2(aco_opcode::v_or_b32, bld.def(v1), Operand::c32(0x800000u), mantissa);
|
||||
Temp exponent_small = bld.vsub32(bld.def(v1), Operand::c32(24u), exponent);
|
||||
Temp small = bld.vop2(aco_opcode::v_lshrrev_b32, bld.def(v1), exponent_small, mantissa);
|
||||
mantissa = bld.pseudo(aco_opcode::p_create_vector, bld.def(v2), Operand::zero(), mantissa);
|
||||
mantissa = bld.pseudo(aco_opcode::p_create_vector, bld.def(v2), mantissa, Operand::zero());
|
||||
Temp new_exponent = bld.tmp(v1);
|
||||
Temp cond_small =
|
||||
bld.vsub32(Definition(new_exponent), exponent, Operand::c32(24u), true).def(1).getTemp();
|
||||
|
|
@ -3332,7 +3332,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
Operand::c32(24u), exponent);
|
||||
Temp small = bld.sop2(aco_opcode::s_lshr_b32, bld.def(s1), bld.def(s1, scc), mantissa,
|
||||
exponent_small);
|
||||
mantissa = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), Operand::zero(), mantissa);
|
||||
mantissa = bld.pseudo(aco_opcode::p_create_vector, bld.def(s2), mantissa, Operand::zero());
|
||||
Temp exponent_large = bld.sop2(aco_opcode::s_sub_u32, bld.def(s1), bld.def(s1, scc),
|
||||
exponent, Operand::c32(24u));
|
||||
mantissa = bld.sop2(aco_opcode::s_lshl_b64, bld.def(s2), bld.def(s1, scc), mantissa,
|
||||
|
|
@ -3340,7 +3340,7 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
Temp cond =
|
||||
bld.sopc(aco_opcode::s_cmp_ge_i32, bld.def(s1, scc), Operand::c32(64u), exponent);
|
||||
mantissa = bld.sop2(aco_opcode::s_cselect_b64, bld.def(s2), mantissa,
|
||||
Operand::c32(0xffffffffu), cond);
|
||||
Operand::c64(~0llu), cond);
|
||||
Temp lower = bld.tmp(s1), upper = bld.tmp(s1);
|
||||
bld.pseudo(aco_opcode::p_split_vector, Definition(lower), Definition(upper), mantissa);
|
||||
Temp cond_small =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue