Skip to content

Shaders: hardware probes for s_bitcmp0_b32 and s_bitcmp1_b32 - #2565

Open
LouisRiverstone wants to merge 1 commit into
Marvisak:mainfrom
LouisRiverstone:shaders/s-bitcmp-b32-test
Open

LouisRiverstone wants to merge 1 commit into
Marvisak:mainfrom
LouisRiverstone:shaders/s-bitcmp-b32-test

Conversation

@LouisRiverstone

Copy link
Copy Markdown
Contributor

Adds s_bitcmp0_b32 and s_bitcmp1_b32 (SOPC 0x0C, 0x0D) probes to scalar_probes. Test-only.

@Vedoxdev123

Copy link
Copy Markdown

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 from 192 passed; 3 failed on main; new test passes and views_bound_while_another_slot_gets_its_texture_do_not_wait now passes).

Only the 2 known 1,000,000 view heap cap tests (dynamic_slots_are_held_until_released and lists_share_a_table_and_copies_keep_their_views from #1744) remain.

@fyernald fyernald left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked on real NVIDIA hardware: RTX 3080 (617.42), Windows 10 (19045), plus WARP, main 67e8ae1 + #486 + #2596 (without #2596 the suite crashes on NVIDIA, #2571). cargo test -p victory-shader --lib --locked -- --test-threads=1 gives 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_b32 are 0x0C/0x0D in SOPC, and the reference reads the bit index from src1[4:0] as the ISA says. The 32/33/0xFFFFFFE1 counts cover the wrap.

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Merge candidate. This is a recommendation to look, not an approval. It merges cleanly into main. CI: check passing.

The PR adds hardware probes for s_bitcmp0_b32 and s_bitcmp1_b32 (SOPC 0x0C/0x0D) to scalar_probes in crates/victory-shader/src/emit/semantics_tests.rs, using the same s_cselect_b32 pattern as the existing compare probes. The model follows the RDNA2 ISA: SCC is whether bit src1[4:0] of src0 is clear or set. It matches the s_bitcmp branch in emit/lower.rs, which masks the index with 31, and the bit indices 32, 33 and 0xFFFFFFE1 exercise that masking. main has only lowering unit tests for these opcodes, not probes, and I found no duplicate open PR.


Generated by Claude Code

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants