shader: lower scalar bit ops and v_rcp_iflag in the mesh frontend #3740
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!3740
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3738"
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?
@lambirou on GitHub · 2026-12-01 13:28 UTC · original
lambirou:codex/mesh-scalar-alu→main· +197 −1 · 3 files · 1 commits · closed without mergingThe forced slot 86 mesh path refused 2 873 real title requests. The refusal
census ordered the missing forms
s_bfe_i32(458),s_not_b32(433),v_rcp_iflag_f32(145) ands_brev_b32(107); each one alone kept therequest from reaching a desktop mesh profile.
s_not_b32ands_bfe_i32join the mesh scalar branches and reuse thecompute
arithmetic()lowering:D = ~S0, and the sign-extended field withthe offset in
S1[4:0]and the width inS1[22:16], zero for a zero widthand the arithmetic shift kept at a width of 32 or more. Both write
SCC = (D != 0).s_brev_b32reverses the 32 bits through the sharedunary.i32intrinsic and leaves SCC unchanged, as the compute frontend andthe
gfx2hlsl.pySOP1 table do.v_rcp_iflag_f32joins the vector listthat already handles
v_rcp_f32, so it takes the same1.0 / xrule.All three scalar forms refuse an EXEC or VCC destination.
Validation (Windows, Release; AMD Radeon RX 9060 XT for the hardware run):
cmake --build --preset release --target compile_dxil— 17/17 steps.python -B tests/native_direct_mesh_check.py out\\build\\release\\compile_dxil.exe "<DXC dir>"— pass, including one source-built program per form and the EXEC/VCC and
unbound-source controls.
ctest --preset release --no-tests=error -R '^native_direct'— 2/2 pass.Refs #3705
@mumba17 on GitHub · 2026-12-01 16:38 UTC · original
Hi @lambirou, heads-up on overlap: these forms are already up in two earlier PRs, both approved by @lukaslw-lab this morning:
s_not_b32,s_brev_b32ands_bfe_i32in the mesh frontend (with SCC and EXEC/VCC-destination controls)v_rcp_iflag_f32(plusv_ashrrev_i32) through the same lane ALU list asv_rcp_f32Both were posted on #3705 when they went up. To save reviewers a second pass over the same lines, could #3740 drop these, or be closed if nothing else is left? If your version handles a case ours misses, tell me and I'll add it to #3710 or #3711.
Your #3760 stack already merges #3731, thanks for picking that up.
AI-assisted.
@lambirou on GitHub · 2026-12-01 16:53 UTC · original
Thanks for the pointer — I checked both branches, and there is no behavioral gap: #3710 and #3711 cover all four forms, including the SCC and EXEC/VCC rules. I'll close this one instead of asking for a second review of the same lines.\n\nThe only unique bits here are the census note from the title run (2,873 slot 86 requests; first refusals s_bfe_i32 458, s_not_b32 433, _rcp_iflag_f32 145, s_brev_b32 107) and a few extra refusal tests for s_bfe_i32 to EXEC/VCC and unproven source/control. I'll keep those on the branch and can send a small tests/docs follow-up after #3710 and #3711 land; there is nothing to add to your PRs.\n\nAI-assisted.
Pull request closed