Shaders: hardware probes for s_bitcmp0_b32 and s_bitcmp1_b32 #2565
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2565
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2565"
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?
@LouisRiverstone on GitHub · 2026-11-25 15:54 UTC · original
LouisRiverstone:shaders/s-bitcmp-b32-test→main· +16 −0 · 1 files · 1 commits · openAdds s_bitcmp0_b32 and s_bitcmp1_b32 (SOPC 0x0C, 0x0D) probes to scalar_probes. Test-only.
@Vedoxdev123 on GitHub · 2026-11-25 16:04 UTC · original
Tested on Windows with AMD Ryzen 5 5600X + NVIDIA GeForce RTX 4060 (AI-assisted):
cargo test -p victory-gpu --lib-> 193 passed; 2 failed; 1 ignored (improved from192 passed; 3 failedonmain; new test passes andviews_bound_while_another_slot_gets_its_texture_do_not_waitnow passes).Only the 2 known 1,000,000 view heap cap tests (
dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsfrom #1744) remain.@Marvisak on GitHub · 2026-11-25 19:22 UTC · original
Automated triage for the maintainers.
Merge candidate. This is a recommendation to look, not an approval. It merges cleanly into
main. CI:checkpassing.The PR adds hardware probes for
s_bitcmp0_b32ands_bitcmp1_b32(SOPC 0x0C/0x0D) toscalar_probesincrates/victory-shader/src/emit/semantics_tests.rs, using the sames_cselect_b32pattern as the existing compare probes. The model follows the RDNA2 ISA: SCC is whether bitsrc1[4:0]of src0 is clear or set. It matches thes_bitcmpbranch inemit/lower.rs, which masks the index with 31, and the bit indices 32, 33 and 0xFFFFFFE1 exercise that masking.mainhas only lowering unit tests for these opcodes, not probes, and I found no duplicate open PR.Generated by Claude Code
@fyernald on GitHub · 2026-11-25 17:01 UTC · original · approved these changes
Checked on real NVIDIA hardware: RTX 3080 (617.42), Windows 10 (19045), plus WARP,
main67e8ae1+ #486 + #2596 (without #2596 the suite crashes on NVIDIA, #2571).cargo test -p victory-shader --lib --locked -- --test-threads=1gives 267 passed, 3 failed, the same as the base. The 3 are the #1835 failures. The new probes agree with the model on both adapters.s_bitcmp0_b32/s_bitcmp1_b32are 0x0C/0x0D in SOPC, and the reference reads the bit index fromsrc1[4:0]as the ISA says. The 32/33/0xFFFFFFE1 counts cover the wrap.@fuzeofficlal on GitHub · 2026-11-26 19:50 UTC · original · approved these changes
Looks good to me — clean hardware probe coverage for
s_bitcmp0_b32ands_bitcmp1_b32, exercising both clear/set bits across all 32 positions and 5-bit index wrapping (src1[4:0]).Verified locally on Windows 11 with head
bb744a8fcleanly merged ontomain(63bcca43):crates/victory-shader/src/emit/semantics_tests.rs:2803-2818: SOPC0x0C(s_bitcmp0_b32) and0x0D(s_bitcmp1_b32) and thei[1] & 31model matchgfx10/opcodes.rs:194-195andlower.rs:3623.rustfmt --edition 2024 --config skip_children=true) shows no diffs on the added lines.cargo run -p xtask -- policy(191 files ok) andcargo clippy --locked -p victory-shader --all-targets -- -D warnings(both default and--all-features) pass.cargo test --locked -p victory-shader --lib scalar_alu_matches_the_hardware -- --nocapturepasses on bothVICTORY_WARP=0(2.01s) andVICTORY_WARP=1(0.16s), with both new probes (168 inputseach) reportingmodel mismatches ["hardware 0", "warp 0"], hardware/warp differ on 0.@Dukestar69 on GitHub · 2026-11-26 20:19 UTC · original · approved these changes
LGTM — verified on RTX 5090 and
VICTORY_WARP=1(Windows / D3D12) againstorigin/main(63bcca4).s_bitcmp0_b32ands_bitcmp1_b32inscalar_alu_matches_the_hardwarepasses cleanly on both RTX 5090 and WARP.cargo test -p victory-shader --lib emit::semantics_tests::scalar_alu_matches_the_hardware -- --test-threads=1: passed on RTX 5090 andVICTORY_WARP=1.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.