mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
aco: implement 64bit div find_lsb
This can be selected for divergent subgroupBallotFindLSB. Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25407>
This commit is contained in:
parent
4ea611bca0
commit
b91616e800
1 changed files with 7 additions and 0 deletions
|
|
@ -1753,6 +1753,13 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
|
|||
emit_vop1_instruction(ctx, instr, aco_opcode::v_ffbl_b32, dst);
|
||||
} else if (src.regClass() == s2) {
|
||||
bld.sop1(aco_opcode::s_ff1_i32_b64, Definition(dst), src);
|
||||
} else if (src.regClass() == v2) {
|
||||
Temp lo = bld.tmp(v1), hi = bld.tmp(v1);
|
||||
bld.pseudo(aco_opcode::p_split_vector, Definition(lo), Definition(hi), src);
|
||||
lo = bld.vop1(aco_opcode::v_ffbl_b32, bld.def(v1), lo);
|
||||
hi = bld.vop1(aco_opcode::v_ffbl_b32, bld.def(v1), hi);
|
||||
hi = uadd32_sat(bld, bld.def(v1), bld.copy(bld.def(s1), Operand::c32(32u)), hi);
|
||||
bld.vop2(aco_opcode::v_min_u32, Definition(dst), lo, hi);
|
||||
} else {
|
||||
isel_err(&instr->instr, "Unimplemented NIR instr bit size");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue