Shaders: lower the console's scalar bit searches (s_flbit_i32_b64, s_ff0_i32_b32/b64) #233
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!233
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-233"
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?
@pablogonz12 on GitHub · 2026-11-24 22:52 UTC · original
pablogonz12:scalar-bit-ops→main· +178 −0 · 3 files · 2 commits · openSetup: RX 9070 XT (RDNA4), RADV Mesa 26.3.1, Linux, GE-Proton11-14, Series X files.
The decoder names
s_flbit_i32_b64,s_ff0_i32_b32,s_ff0_i32_b64(and the dwordwidths in
gfx10/fields.rsknow their 64-bit sources), but the scalar lowering has noarms for them: they fall through to the catch-all and a shader containing one is refused
whole. This adds them in DXIL
unaryBits, as TuxBox does: the 64-bit searches test thehigh word first and continue 32 past the low word's own result, −1 for a zero pair
(
s_flbit) or an all-ones pair (s_ff0); none writes SCC.Complements #171 (GeaorgeAyvazov), which lowers
s_bcnt0_i32_b32/b64; that family isleft out here so the two changes do not both touch it.
Adapted from TuxBox (brcly/TuxBox, Apache-2.0, commit 1a50eb9 "shader: restore
s_flbit_i32_b64 and s_ff0_i32 lowering dropped by a merge", Copyright (c) 2026 the TuxBox
authors);
NOTICEadded. Not ported:s_flbit_i32_i64, which TuxBox guards but does notlower either.
On an RX 9070 XT this changes 0 of our 751 world programs and 0 of the 25,586 archive
programs (all 767 emitted DXIL containers byte-identical); it is for the console
programs that carry these instructions, which our captures do not contain. Tests: a
Windows/WARP + hardware oracle for the three against the console's answers, and a
platform-neutral test whose hand-assembled encodings decode to the three names (refused
before).
cargo clippy --workspace --all-targets [--all-features] -- -D warningsclean.AI-assisted: written and tested with an AI coding agent; the port was compared
against TuxBox's source by hand.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:53 UTC · original
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.4db8615ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:53 UTC · original
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
@HAL9000RELOADED on GitHub · 2026-11-25 19:29 UTC · original
RX 7900 XTX (RDNA3), Windows 10 + #402 for SM 6.6, main
d510ee4: both new tests pass on the card with this PR. With the tests alone on the base,scalar_bit_searches_match_the_consolefails (the other test is inline). No other test changed. Run table: #129 (#129).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.