Shaders: hardware probe for s_bitset0_b32 and s_bitset1_b32 #1365
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!1365
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1365/head"
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-24 17:36 UTC · original
LouisRiverstone:shaders/s-bfm-bitset-test→main· +16 −0 · 1 files · 1 commits · closed without mergingAdds probes for
s_bitset0_b32/s_bitset1_b32(SOP1 0x1b / 0x1d) inscalar_probes: the destination is seeded with the first operand, then bitsrc[4:0]is cleared or set. Reduced after triage:s_bfm_b32is already covered on main.@matheusfermiano-source on GitHub · 2026-11-24 18:08 UTC · original
First GPU run of this PR's test that I could find, on an AMD GPU under Proton on Linux:
s_bfm_and_s_bitset_use_the_low_five_bits: pass on a Radeon 660M (RDNA2).a4c994b. Built on Linux with llvm-mingw forx86_64-pc-windows-gnullvm(Rust 1.98.1) and run under Proton Experimental (11.0-20261027b) with its vkd3d-proton 3.1.0, one GPU at a time;dxil.dllfrom DXC 1.9.2609 was loaded, so the test modules were validated.victory-shadersuite 120 passed, 1 failed, 1 ignored. Nothing fails that passes onmain(ffe310e). The one failure,emit::tests::stub_pipeline_is_created, fails onmainhere too: vkd3d-proton accepts the zeroed DXIL hash that the Windows runtime refuses (one of the Wine failures listed in #1218).This is RADV, not AMD's Windows driver, so it adds to a Windows run rather than replacing it. Synthetic tests only, no game files. AI-assisted (Claude Code, Opus 5.5); every run was on this machine.
@wwwwwwww3333333 on GitHub · 2026-11-24 19:13 UTC · original
Native Windows run on AMD RDNA2: RX 6750 XT (RDNA2, gfx1031), AMD driver 32.0.21045.29003, i5-13400F, Windows 11, Rust 1.98.1 MSVC. Head a4c994b on main
ffe310e(clean merge).cargo test -p victory-shader --lib -- --test-threads=1: 121 passed, 0 failed, 1 ignored (main alone: 120 passed).s_bfm_and_s_bitset_use_the_low_five_bitsran on the hardware adapter and then on WARP, and passed on both. The earlier RDNA2 runs on this PR went through vkd3d-proton on Linux; this one is AMD's own D3D12 driver.Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine).
@Marvisak on GitHub · 2026-11-25 02:37 UTC · original · edited 2026-11-25 16:45 UTC
Automated triage for the maintainers.
Merge candidate.
The PR is now what the last triage asked for. The
s_bfm_b32cases that duplicated main are gone, and thes_bitset0_b32/s_bitset1_b32probes (SOP1 0x1B/0x1D) moved intoscalar_probesincrates/victory-shader/src/emit/semantics_tests.rs, using main's existingsop1,vop1,scalarandpairshelpers. Each probe first sets the destination withs_mov_b32 s20, s16, so the test checks that only one bit of the old value changes. The bit index is the low five bits of the source (inputs include 32, 33 and 0xFFFFFFE1). That matches the RDNA2 ISA and thes_bitset0_b32 | s_bitset1_b32arm inlower.rs. No SCC is expected, which is correct.CI: passing (
check).Generated by Claude Code
@Marvisak on GitHub · 2026-11-25 22:00 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing as covered by #2015, which adds the same two probes (destination seeded from another register, bit indices including 32 and above). The probes here are right and pass on an RX 6700 XT and on WARP.
If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed