shader: lower 64-bit scalar bit counts and bit scans in the direct compute path #3072
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#3072
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@legacy-code-archaeologist on GitHub · 2026-11-27 14:10 UTC · original
Part of #2935 (closing the remaining
gfx2hlsl.pygaps in the direct C++ compute path; 64-bit counterparts of #3050/#3051).src/gfx1013_direct_compute.inldoes not yet lower the 64-bit-source scalar bit counts and bit scanss_bcnt0_i32_b64,s_bcnt1_i32_b64,s_ff0_i32_b64,s_ff1_i32_b64,s_flbit_i32_b64ands_flbit_i32_i64(they hitunsupported wave64 scalar operationordirect ALU operand modifiers).Scope:
src/gfx1013_direct_compute.inlusing 32-bit DXILunaryBits.i32(Countbits,FirstbitLo,FirstbitHi— noInt64Opsneeded), matchingtools/startup/gfx2hlsl.py:s0..s105(32-biti32result).S0: aligned SGPR pairs0..s104even, inline integer-16..64, or 32-bit literal (sign-extended fors_flbit_i32_i64, zero-extended for_b64).s_bcnt0_i32_b64ands_bcnt1_i32_b64writeSCC = (D != 0); all four scans preserveSCCand return0xffffffffwhen no bit qualifies.transfer()insrc/gfx1013_compute_native.cppso_i32_b64ops (whose source is 64-bit but destination is 32-bit) do not clears[dst + 1]and clobber adjacent descriptors.s_bcnt0_i32_b64ands_bcnt1_i32_b64as overwritingSCCinuses_scc_after().tests/native_salu_bitscan64_check.py,tests/cmake/native_salu_bitscan64.cmake) anddocs/experiments/native-direct-salu-bitscan64.md.I am taking it. AI-assisted.