You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
V_SAT_PK_U8_I16 decodes in both VOP1 and VOP3 forms, but shader translation on main returns Unsupported. Interpret both input halves as signed i16, clamp each to [0, 255], and pack the bytes into the low half of the result. AMD RDNA 2 ISA, section 12.8
The synthetic shader checks all 81 pairs of nine boundary values for each encoding, including the cleared upper 16 bits. The same test reproduced Unsupported on main and passed on WARP after the change. All 36 VALU tests passed on WARP. Strict Clippy for victory-shader and cargo xtask policy passed.
AI-assisted with Codex. Please retain the Git author when cherry-picking or rebasing. If folded into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>.
Environment (software adapter only, no physical GPU used): Windows 11 Pro 10.0.26200 (UBR 9974); d3d10warp.dll 10.0.26100.9818; SDK dxil.dll 1.8.2502.11 (Windows SDK 10.0.26100.0, VICTORY_DXIL); dxc.exe/dxcompiler.dll 1.8.2502.11; rustc/cargo 1.98.1. VICTORY_D3D12_WARP=1 VICTORY_WARP=1 (the second forces the victory-shader test host onto WARP, which otherwise also opens the default hardware adapter). A temporary local probe confirmed DXGI reports the adapter as Microsoft Basic Render Driver (flags 0x2 software, vendor 0x1414, 0 dedicated VRAM). Every hardware label in the output below therefore also ran on WARP. Shared env for all commands: CARGO_TARGET_DIR=D:\victory-3146-3142-warp-target, -j 4.
Parent control (63bcca4 + this PR's valu_tests.rs only): cargo test -p victory-shader --lib -j 4 -- sat_pk_u8_i16 --nocapture -> the PR's test fails with build: Unsupported { offset: 36, what: "v_sat_pk_u8_i16" } (0 passed, 2 failed incl. my local sweep below). Matches the PR description.
Head 078c53a6:
Same command: sat_pk_u8_i16_clamps_signed_halves_into_low_bytes ... ok (81 pairs x VOP1 and VOP3).
Temporary local sweep, not pushed (independent oracle from the ISA text: each half signed i16, clamp to [0,255], low byte | high byte << 8, upper 16 bits zero): 3000 xorshift-random words plus a step-257 sweep of all 16-bit patterns in the low half, high half and both halves, 3768 words per encoding, VOP1 and VOP3: 7536 checks per encoding (two host labels, both WARP), 0 mismatches. On the parent the same sweep fails with the same Unsupported.
cargo test -p victory-shader --lib -j 4 -- emit::valu_tests: 37 passed, 0 failed (includes the local sweep).
Full cargo test -p victory-shader --lib -j 4: 301 passed, 4 failed, 3 ignored. The 4 failures (synthetic_tests::{gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out, a_mask_joined_with_data_at_a_uniform_loop_is_its_number}) are the same four that fail on the parent (299 passed, 6 failed there: those 4 plus the two new tests). They are hardware-only checks, which I forced onto WARP, so they are not attributable to this PR.
cargo test -p victory-gpu --lib --features diagnostics -j 4: 246 passed, 0 failed, 1 ignored, 3 of 3 runs. One earlier run on the parent showed 1 failure (descriptor::host::tests::a_slot_rewritten_while_its_view_is_prepared_views_the_new_record) that did not recur in 3 further parent runs, so I treat it as a flake unrelated to this PR.
Not run: Clippy, cargo xtask policy, any real-GPU run, and anything using game files.
Result: the lowering matches the ISA semantics on WARP for both encodings; no defect found.
AI use: tested by Claude Code (Claude Sonnet 5.5), coordinated by Claude Code (Claude Opus 5.5). No game files, dumps, shader names or hashes were used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V_SAT_PK_U8_I16decodes in both VOP1 and VOP3 forms, but shader translation on main returnsUnsupported. Interpret both input halves as signed i16, clamp each to [0, 255], and pack the bytes into the low half of the result. AMD RDNA 2 ISA, section 12.8The synthetic shader checks all 81 pairs of nine boundary values for each encoding, including the cleared upper 16 bits. The same test reproduced
Unsupportedon main and passed on WARP after the change. All 36 VALU tests passed on WARP. Strict Clippy for victory-shader andcargo xtask policypassed.AI-assisted with Codex. Please retain the Git author when cherry-picking or rebasing. If folded into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>.