Shaders: hardware test for the 32-bit scalar logic ops and s_ashr_i32 #1874
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!1874
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1874/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 23:58 UTC · original
LouisRiverstone:shaders/s-logic-b32-test→main· +47 −0 · 1 files · 1 commits · closed without mergings_and_b32,s_xor_b32,s_andn2_b32,s_orn2_b32,s_nand_b32,s_nor_b32,s_xnor_b32(SOP2),s_not_b32(SOP1 0x07) ands_ashr_i32(SOP2 0x22) share two arms inlower.rs: then2/nand/nor/xnorforms are built from an inversion and a base op, and the shift masks its amount to five bits. No hardware test ran them.New test
s_logic_not_and_ashr_b32_match_rdna2runs all 49 ordered pairs of seven values (including shift amounts 31, 32 and a value with the sign bit set) through each SOP2 op, and the same values throughs_not_b32. Expected values come from plain Rust operators. Adds a smallsop1encoder next tosop2.Test only, no production change.
Verify:
cargo test -p victory-shader s_logic_not_and_ashr(Windows, hardware GPU or WARP). I type-checked it with clippy forx86_64-pc-windows-msvc, but could not run it locally: the shader test module is Windows-only.🤖 Generated with Claude Code
@Marvisak on GitHub · 2026-11-25 07:26 UTC · original
Automated triage for the maintainers.
This is a test-only change:
s_logic_not_and_ashr_b32_match_rdna2incrates/victory-shader/src/emit/valu_tests.rsrunss_and/xor/andn2/orn2/nand/nor/xnor_b32ands_ashr_i32(SOP2) ands_not_b32(SOP1) through the lowering on hardware and WARP. I checked the GFX10 opcodes (SOP2 0x0e, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x22; SOP1 0x07) and the newsop1encoding (0xBE80_0000 | sdst<<16 | op<<8 | src0). The expected values (!-based forms, 5-bit shift amount, sign bit set) are what the ISA defines, andbuild_valu_csputs the inputs ins0/s1as the test assumes.This inserts at the same place in the file as #1875 and #1876, so whichever merges later needs a trivial rebase.
CI: passing.
Generated by Claude Code
@sinan-cmyk on GitHub · 2026-11-25 12:02 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
adc971bbontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 22:03 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, whose
more_scalar_alu_matches_the_hardwareruns the same eight logic opcodes over 24x24 edge pairs ands_not_b32over all edges, checks SCC for each and adds the 64-bit forms.s_and_b32ands_ashr_i32are already onmain. The opcodes and expected values here are right.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