shader: lower v_bfm_b32 and v_bcnt_u32_b32 in the mesh frontend (Part of #2413) #3657
No reviewers
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!3657
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3655"
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?
@mumba17 on GitHub · 2026-11-30 21:59 UTC · original
mumba17:shader/mesh-bfm→main· +17 −2 · 2 files · 1 commits · merged 2026-12-01 00:12 UTCPart of #2413.
The shared ALU already lowers both instructions for direct compute:
v_bfm_b32since #2986, andv_bcnt_u32_b32throughunaryBits(popcount) plus the second source. The mesh frontend's vector ALU list did not admit either one, so they were refused asunsupported mesh instruction or EXEC state. This PR adds both to that list as two-source operations, so the uniform-result proof checks both operands.Census (454 cached slot 57 requests, #3418 layout, main plus #3637/#3645/#3646):
v_bfm_b32is the first refusal for 40 requests.v_bfm_b32orv_bcnt_u32_b32. They now stop at later refusals: 19unsupported mesh SAVEEXEC operands, and the rest at several smaller reasons (v_cvt_f16_f32,v_cmpx_*, other SAVEEXEC shapes).v_bfm_b32is no longer a refusal reason.Tests (
tests/native_direct_mesh_check.py):v-bfm-b32:v_bfm_b32 v1, v0, 2feeds the position. The check pinsshl 1, width, the- 1and the& 31offset of 2.v-bcnt-u32-b32:v_bcnt_u32_b32 v1, v0, 5feeds the position. The check pinsunaryBitsop 31 plus 5.Each of these mutations fails
native_direct_mesh:v_bfm_b32not admitted;- 1dropped;v_bcnt_u32_b32not admitted;+ src1dropped.ctest -R "mesh|compile_dxil|bfm": 215/215 with thev_bfm_b32change;native_direct_meshpasses again withv_bcnt_u32_b32added.🤖 Generated with Claude Code
@R0Y00 on GitHub · 2026-12-01 00:10 UTC · original · approved these changes
Reviewed the mesh ALU admission for
v_bfm_b32andv_bcnt_u32_b32. Both reuse the shared lowering and declare both operands for the uniformity analysis. The tests tie the resulting mask/count to the exported position.ctest --test-dir <build> --no-tests=error -j1 -R '^native_direct_mesh$' --output-on-failurepassed on the Windows Release integration.