Recompiler: saturate image_load D16 ints and keep odd high half #1555
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1565"
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?
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T17:43:33Z.
Saturates 32-bit integer texels in image_load / image_load_mip when D16=1 and preserves vdst[31:16] on odd dmask channel counts in mimg D16 writeback. Part of #1489.
What is in it
Tested
cargo test --workspace -- --test-threads=2passed.Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:41:25Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:32:36Z.
Tested
Independent Windows/D3D12 verification of PR #1565 at clean head
baa02bef9b8d3de44847663ebe15045b51a2a0f9. The PR was open at that SHA before and after the run.x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5.cargo test --locked -p xcl --lib -j 2 --no-runcompleted outside the Arc lock withCARGO_INCREMENTAL=0,CARGO_PROFILE_DEV_DEBUG=0, andCARGO_PROFILE_TEST_DEBUG=0.XCL_ADAPTER=A770,XCL_DIRECT_DXIL=0,XCL_REQUIRE_GPU=wave64, andXCL_DXC_DIRto the DXC 1.9.2609 x64 directory under%LOCALAPPDATA%. The GPU test ran underL:/XclTooling/Invoke-ArcTest.ps1 -WaitMinutes 30.The translation test checked the upper-half masks for a one-channel
IMAGE_LOADand a three-channelIMAGE_LOAD_MIP. On the GPU, all 64 lanes kept0xCAFEand0xABCDfor the one-channel UINT and FLOATIMAGE_LOADresults, and0xBEEFin the trailing register for the three-channel SINT load. The one-channel SINTIMAGE_LOAD_MIPat mip 0 returned0xDEAD8000on all 64 lanes, preserving0xDEADwhile writing the expected low half. Ordinary integer saturation on both backends was already covered in the #2042 Arc report.Not tested
Nonzero mip levels, direct DXIL on this head, the workspace suite, retail-title smoke runs, and other GPU adapters.
AI use
T3 Code / Codex (
gpt-6.2-sol) ran the checked-in tests, verified the logs, and wrote this report.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:22Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:08:30Z.
Triage (#1607) – head
baa02beOverlaps #2042 (D94): both saturate 32-bit UINT/SINT texels to 16 bits in D16
image_load. #2042 also rounds D16 UNORM/SNORM once and changes the direct-DXIL path (lower_image.rs). This PR instead keeps the odd last high half inwrite_result, which #2042 does not do. #1977 makes the same two changes for buffer FormatLoad, not MIMG.Note that the
write_resultchange applies to every D16 MIMG result with an odd component count (samples too), not onlyimage_load. That matches the title but deserves a GPU run on a sampled D16 path. No problems found in the diff.The branch conflicts with main and needs a rebase.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.