Shaders: hardware test for the s_cmpk_* scalar comparisons #1046
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!1046
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1046/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 15:16 UTC · original
LouisRiverstone:shaders/s-cmpk-test→main· +60 −0 · 1 files · 1 commits · merged 2026-11-25 21:49 UTCFixes #867.
The twelve
s_cmpk_*compares (SOPK 0x003..0x00e) share a branch withs_cmp_*inlower.rs, but nothing ran them. The signed forms sign-extend the 16-bit immediate and the unsigned forms zero-extend it, which is the part worth pinning.New test
s_cmpk_compares_against_the_extended_immediate: for each condition (eq, lg, gt, ge, lt, le) in both types, with immediates0x0005and0x8000, it runs nine operands around the sign boundaries (0, 4..6, 0x7FFF, 0x8000, 0xFFFF8000, 0xFFFFFFFF, 0x80000000). SCC is read back withs_cselect_b32, and the expected value comes from comparingi64s in Rust. Adds a smallsopkencoder next tosop2.Test only, no production change.
Verify:
cargo test -p victory-shader s_cmpk(Windows, hardware GPU or WARP). I could not run it locally: the shader test module is Windows-only.🤖 Generated with Claude Code
@ThomasHFWright on GitHub · 2026-11-24 15:27 UTC · original
Independent Linux/Wine hardware run of
5f9a0d247df7644c7779a1a6ef8eea65f7bd7d5aon baseffe310e: the changed regression passes, exercising 216 comparisons across all twelve s_cmpk forms, two immediates and nine operands. Built and run from this PR alone, without instrumentation changes.Rust 1.98.1, Windows MSVC target, Wine 11.22, RTX 5090 / NVIDIA 620.73.04, vkd3d-proton
30b0eb9bc12dc9f. Both requested backend paths completed, but this Wine/DXVK setup is not evidence of genuine Windows WARP coverage. No device/backend skip was reported. These are dispatch/readback checks.Separately, I combined #1046, #1048, #1050, #1052 and #1053 (all patches applied cleanly) and ran all 14 generated workspace unit/integration test executables with all features. Combined: 345 passed, 5 failed, 6 ignored; matched baseline: 341 passed, 5 failed, 6 ignored. This full-suite result belongs to the combined tree. The five failures match baseline: empty pipeline library (#347), Wine Winsock export (#217), checksum-rejection expectation, nested Cargo fixture build, and Windows xtask launching host Git. Native Linux checks of that tree pass: shader 96 passed / 1 ignored, xtask 4 passed, asset policy clean.
Windows-target shader Clippy with all targets/features and
-D warningspasses on this PR alone. Combined workspace Clippy finds a type-complexity warning in #1052, reported there.Offline and offscreen; no game data, gameplay, native Windows or Wine doctests. Native
d3dcompiler_47supplied for full-suite GPU fixtures. Aggregate counts include existing early-return tests without optional console compilers/DXIL validator; these changed GPU tests executed. Coverage overlaps #1045, but its exact head was not tested here.AI-assisted testing with Codex.
@Zipettte on GitHub · 2026-11-24 16:30 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 5f9a0d2:
cargo test -p victory-shaderpasses, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@DeerSilver on GitHub · 2026-11-24 18:39 UTC · original
Tested head
5f9a0d2merged ontomainffe310e(clean merge) on NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1: pass. No game files: the test suite only.no SM 6.6skip:s_cmpk_compares_against_the_extended_immediate--all-featuressovictory-gpuenables it, plus a local, uncommittedEnableDebugLayerinemit::host::Host::newfor the shader tests), the run logs no debug-layer message thatmaindoesn't log too.cargo test --workspace --all-features --locked: 347 passed, 0 failed, 6 ignored (mainwith all features: 346 / 6).cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 02:33 UTC · original
Automated triage for the maintainers. Recommended for a maintainer's look. This adds a test-only hardware/WARP check,
s_cmpk_compares_against_the_extended_immediateincrates/victory-shader/src/emit/valu_tests.rs, for all twelves_cmpk_*compares thatlower.rshandles together withs_cmp_*. I checked the SOPK encoder and opcodes 0x03..0x0e against the RDNA2 ISA, and the expected results come from i64 comparisons with sign- or zero-extended immediates, so the test checks the right behaviour rather than repeating the code. No production change. CI: passing.Generated by Claude Code