Recompiler: preserve untouched half and honour OP_SEL[3] in v_sat_pk_u8_i16 #1147
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1147
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1147"
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?
@b3IKK on GitHub · 2026-11-24 12:32 UTC · original
b3IKK:recomp/sat-pk-u8-i16-preserve-half→main· +39 −1 · 2 files · 1 commits · openv_sat_pk_u8_i16writes a 16-bit packed result (2 x u8,VDSTsize: 16inrdna2_spec.rs) intoVDST[15:0]orVDST[31:16]depending onOP_SEL[3], preserving the untouched 16-bit half ofVDST. The emitter overwrote all 32 bits ofVDST(zeroing the upper half) and ignoredOP_SEL[3].This updates
v_sat_pk_u8_i16to matchv_cvt_f16_f32's 16-bit destination placement: preserving the untouched half, honouringOP_SEL[3], and deferring tosdwa_dstfor SDWA.What is in it
crates/xcl/src/gpu/recomp/emit.rs: preserve the untouched half and honourOP_SEL[3]inv_sat_pk_u8_i16.crates/xcl/src/gpu/recomp/tests.rs: add GPU testgpu_sat_pk_u8_i16_preserves_other_halfcovering VOP1 low-half preservation, VOP3OP_SEL[3]=1high-half preservation, and signed saturation across wave32 and split wave64 (verified failing before the fix).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 2no wave64—gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware)cargo test -p xcl --lib gpu_sat_pk_u8_i16_preserves_other_half: 1 passed, 0 failed across wave32 and split wave64 (failed on the GPU before the fix, zeroing the upper half)Regression run
main:
PR:
Not tested
AI use
emit.rs, wrote the fix and GPU test, ran the test suite andscripts/smoke.ps1regression runs, and drafted this PR description.@DavidM1911 on GitHub · 2026-11-24 12:43 UTC · original
Independent verification on current
main384f7f7(branch already contains it — clean).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
cargo test -p xcl --lib sat_pk: 1 passed, 0 failed —gpu_sat_pk_u8_i16_preserves_other_halfcovers the untouched-half preservation and OP_SEL[3] on real hardware.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
@bjarngard on GitHub · 2026-11-24 13:05 UTC · original
Test report for head
551c6c8(AMD, native wave64)Tested
XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPEDXCL_REQUIRE_GPU=wave64:gpu_sat_pk_u8_i16_preserves_other_halfpassedNot tested: retail titles, RDNA3/RDNA4.
AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
@JoaoPauluu on GitHub · 2026-11-24 13:57 UTC · original
A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.
Tested
x86_64-pc-windows-gnu.551c6c8as it is (based on47efa2e), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).gpu::recomp::tests::gpu_sat_pk_u8_i16_preserves_other_half: ok, no SKIPPED.Not tested
AI use
@luckyteagirl on GitHub · 2026-11-25 04:26 UTC · original
RX 6800M focused GPU report for PR #1147 at
551c6c804c1c80b0736d60706d00411c11cd6059Setup: Windows 11 build 26200, AMD Radeon RX 6800M (driver
30.0.13002.13003), Ryzen 9 5980HX, Rust1.99.0MSVC, DXC/DXIL1.9.2609.5. Clean exact-head worktree;XCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1,XCL_DIRECT_DXIL=0.Tested
cargo test --locked -p xcl --lib -j 2 gpu_sat_pk_u8_i16_preserves_other_half -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, no printedSKIPPEDsubcases. This covers low- and high-half placement plus untouched-half preservation forv_sat_pk_u8_i16on the AMD GPU.cargo build --locked --workspace -j 2: passed.Not tested: Full workspace suite, paired retail-title smoke, other GPUs, or the Direct DXIL path. This verifies the focused HLSL regression on the PR head; it does not establish a green full suite or world-load behavior. No game data was used.
AI assistance: OpenAI Codex (GPT-6) ran the commands, extracted the test counts from the log, and drafted this report.
@JJAutoCompare on GitHub · 2026-11-25 05:00 UTC · original
Passed on native Windows at clean, detached commit
551c6c804c1c80b0736d60706d00411c11cd6059. The PR was open at that exact head before and after the run. PR #1147Tested. STOR-WINLAB, Intel Arc A770 driver
32.0.101.9175, Ryzen 7 3800X, Windows 11 25H2 x64 build26200.9974, Rust and Cargo1.100.0MSVC, DXC and DXIL1.9.2609.5.cargo test --locked -p xcl --lib --no-runbuilt the debug fixture outside the Arc mutex with two jobs, incremental compilation and debuginfo disabled, and privateTEMP/TMP. Cargo exited0.& 'L:/XclTooling/pr2008-dc0d25fe/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_sat_pk_u8_i16_preserves_other_half --exact --nocapture --test-threads=1underInvoke-ArcTest.ps1, withXCL_ADAPTER=A770and HLSL/DXC. The wrapper ran in a fresh PowerShell process with process-scopedRemoteSigned.0. All 96 checks across 32 lanes passed: VOP1 preserved the upper half (0xDEAD0201), VOP3 withOP_SEL[3]=1preserved the lower half (0xABCD5678), and signed inputs−5and300saturated to0and255(0xCAFEFF00).Not tested. Native or split wave64, SDWA, direct DXIL, other adapters or revisions, the full suite, and retail smoke. The checked-in fixture selected standalone wave32 on this adapter.
AI use. T3 Code / Codex (
gpt-6.2-sol) ran the validation and wrote this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.