Repository navigation
Conversation
image_msaa_load / image_load on MSAA resources issued Texture2DMS.Load with sample indices at or past the resource's count and only zeroed the result afterwards. An out-of-range ld2dms index is undefined, and RDNA4 faults on it (gpu_direct_msaa_image_loads, STATUS_ACCESS_VIOLATION on RX 9070 / 9070 XT). The load now takes sample 0 for those lanes; the result mask is unchanged. Patch as suggested by imnicho in review. TRANSLATOR_VERSION 7 -> 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@bmjask @imnicho retested as asked: on the RX 9070, The test's program reduced to one MIMG instruction at a time (local change only:
In every crashing case, translation and Tested
Not tested: which module faults (no dump), pipeline creation vs dispatch, the HLSL-path compare above, other AMD generations. AI use: Claude Code (Claude Opus 5.5) ran the tests, made the local bisect change and wrote this comment. |
|
@HKEY-Funk-Machine thank you for the retest and for splitting the program - that settles it. @bmjask the patch I suggested on #1679 does not fix the crash, and my heads-up there that Two consequences for this PR:
Not tested: anything on AMD (I have no such card); the "different blocks" form is taken from #1900's description, not run by me. AI use: Claude Code with Claude Fable 5.2 read #1900 and this thread and wrote this comment. |
Melow-code
left a comment
There was a problem hiding this comment.
The clamp-to-0 approach is reasonable, but the RX 9070 crash report from HKEY-Funk-Machine suggests the access violation is not caused by the sample index alone. Agree with imnicho that this should wait for #1900 and an RDNA4 investigation.
…SLATOR_VERSION=10), and xcl-dev#1899 (vram::forget_queue)
Hardware test report — commit
|
|
Update: on AI use: Claude Code (Claude Opus 5.5) ran the test and wrote this comment. |
Keeps xcl-dev#1900's ordering: the sample count is read in its own block and the clamped loads start a new block, so no textureLoad follows getDimensions in one basic block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
[P3, high confidence] A v8 cache from the previous PR head still returns its old MSAA bytecode.
I tested 215528eefe24c75cd336197e909393749fc15220 with XCL_DIRECT_DXIL=1. I seeded a dynamically indexed Texture2DMS shader on pre-#1900 commit 689f2db. In three independent upgrades, this head selected a new v8 entry. Its DXIL matched a fresh translation byte for byte. All three format branches placed the texture load in a separate block after the dimensions query.
There is one narrower case for PR testers. Earlier head b5cfa8c9944e2ff1650b0e708d4b7c4cefc21ec1 already wrote v8 entries. Across three upgrades from that head, the cached DXIL kept the old same-block order in all three branches. Fresh output had it in none. Please consider a new version for this revised emitter if caches from the earlier PR head are supported. A regression can seed that exact head and inspect the bytes returned by console_to_dxil_in(). Cache version
The targeted gpu::dxil::msaa_tests suite on this head reported 5 passed, 0 failed, 0 ignored and 0 skip notices. Windows 11 build 26200.9974, Ryzen 7 5800X, RTX 3080 driver 616.92, debug Rust 1.100.0 MSVC and DXC 1.9.2602.17. The upgrade test checked bytecode. AMD driver execution was outside this run.
Follow-up on main 8c4a46a. I applied this exact PR locally after #1898. In three upgrades per shader, v7 seeds returned fresh DXIL for both directed rounding and MSAA. With stale v8 seeds, the rounding shader still returned NaN and the MSAA shader kept the old instruction order. Adding #1947 at 1831ec4 to the same local build regenerated both shaders from v8 in all three trials per shader. Related source-hash change
Codex (GPT-6) assisted with the synthetic cache tests, disassembly checks and analysis.
Pulls in xcl-dev#1836 (graphics and two-pass PSO disk cache + lazy MS/GS + shader build coalescing), xcl-dev#1930 (DXIL CSE across discard), xcl-dev#1900, xcl-dev#1005, xcl-dev#1053, xcl-dev#1864, xcl-dev#1866, xcl-dev#1869, xcl-dev#1876, and xcl-dev#1898 while keeping our RDNA4 MSAA clamp (xcl-dev#1908), wave64 graphics Direct DXIL guard (xcl-dev#1913), atomic writable-range tracking, static-sampler cache keys, and 4M-group indirect dispatch clamp.
|
Status check: Please let us know whether this PR can be closed as superseded by |
Empirical test report — PR #1908 (
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
@raylitebull, I’m withdrawing my P3 cache objection for a rebase onto current main. It reproduced on the standalone On main #1900 addressed the reported RDNA4 instruction-ordering crash. The remaining hardening is a separate decision. Main zeroes the result after the load. #1908 also redirects an out-of-range sample index to 0 before loading, while keeping OpenAI Codex (GPT-6) assisted with the cache tests, source comparison and this reply. |
Follow-up to #1679.
What is in it
getDimensions) is read in its own block, and the clampedtextureLoads start a new block, so notextureLoadfollowsgetDimensionsin one basic block.direct_msaa_loads_precede_get_dimensionsstill passes.TRANSLATOR_VERSION7 -> 8 so cached direct containers re-key.Tested
cargo test -p xcl --lib msaa -- --include-ignored: 6 passed, incl.gpu_direct_msaa_image_loadson the GPU anddirect_msaa_loads_precede_get_dimensionscargo test -p xcl --lib gpu::dxil: 101 passed, 0 failed, 3 ignoredXCL_DIRECT_DXIL=1 cargo test -p xcl --lib gpu::recomp: 261 passed, 0 failed, 18 ignoredcargo build --workspaceandcargo test --workspace -- --test-threads=4: 0 failed (xcl lib: 927 passed, 25 ignored)Regression run
scripts/smoke.ps1, 60 s,XCL_PRESS_AT=2:B,4:B,6:B,8:B XCL_PRESS_A_AT=10,15,20,25,30,40(B presses at 2/4/6/8 s, A presses at 10/15/20/25/30/40 s), run back to back. main is a release build of origin/main (20cf130); PR is a release build of the head (215528e). Each block comes from its own checkout'sscripts/smoke.ps1.main:
PR:
Not tested
AI use
🤖 Generated with Claude Code