AGC: BDA span reads use stale guest bytes under native MSAA color storage #6625
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-15T23:25:41Z.
Current candidate status — 27 October 2026
Keep open pending #6628: head
8814fff88a4ecf7ad6870532fa2db68930407572. The author's fixture correction uses a fresh pre-draw owner, preserving accessible-before-draw, refused-after-draw and ordinary-neighbor checks. Older fleet failures concern the preceding691cb4head.Independently validated on Windows against main
4a6005955f: the clean main + #6628 composition passes all 45 selected processes, including seven GPU groups repeated 3/3 on both RTX 5080 and AMD RDNA2 iGPU, plus graphics/cache checks. Main passes its corresponding 45 processes. Restoring the four production files to main while retaining the PR tests produces all nine intended failures (three cache and three sampled-MSAA per GPU). Each GPU process verifies its physical device and loaded Khronos validation layer; no skips, timeouts, validation diagnostics or VUIDs. Native libraries/relinker and selected real fixtures build on all three arms; conventions pass. Report · logs, exact pins and control patch. Synthetic fixtures only; no new title-progress claim.BunnyFl's independent Windows/RX9070XT report provides another physical AMD data point. Barrier/fault propagation remains separate in #6689. The original reproduction and earlier validation below are historical pins. AI-assisted maintenance: yes (Codex).
Reproduction
A public synthetic extension of
tests/execution/SampleMultisampleTarget.cppconfirms that address-table BDA accesses are outside the native-MSAA guest-access refusal, even with #6498 applied.Test pin: fixture
36dda4841, branchcodex/test-native-msaa-bda-main5d. Composition: main5d9dcc42d2ec5401aebd089028b8d4d7410a77b4+ #6498 headf9feba0b2f8915da712e3cf92af4a58c7769cc84+ the separate #6452 Windows fixture-alignment correction. The new work changes the existing test only.ShaderAddressResources.cpp,BdaResources.cppandGuestBufferMemory.cppare byte-identical to main. This is a tested composition, not a bare-main execution.The fixture creates a 16x16 RGBA16F, four-sample native color target in a registered four-block allocation, draws, then applies a recognized full color fill. MIMG verifies all 1,024 native samples are ones. The ordinary guard rejects the native range. All six ordinary V# refusal cases from #6498 pass in the same processes.
It then recompiles the existing
BdaSpanReads.cppbounded span program, asserting an actualBdaPagetablebinding. Four coherent/barrier combinations each run first in the adjacent ordinary 64KiB block, then in the native color block. Both are inside the same registered allocation. The span's first read starts at the surface base; its first output includes the stale zero DWORD at color+4. Stores replace seeded sentinels at color+0x8000 + mode*0x400(512 bytes per mode, inside the owned color block). No access leaves the fixture allocation.Every native dispatch succeeds and produces the exact guest-byte load/store results, despite the native samples remaining ones. Whole-block comparisons verify all results and unchanged bytes outside the intended output windows. The adjacent block also passes every mode. The final assertion intentionally reports:
Expected: unsupported access to resident sample storage is refused until a sample-preserving path exists. The legitimate neighboring block in the same registered heap must remain usable.
Validation
Windows 11 Enterprise 26200, WinLibs GCC 15.2r7 Release; Vulkan required and shader cache disabled. Physical vendor/device verified in every fresh process:
10de:2c02)1002:13c0)All ten processes exit 1 solely at the missing-refusal assertion; no device loss or timeout. Maximum 1.617s. Changed target build, conventions and test registration pass. No full-build, Linux runtime, title replay or console-equivalence claim for this diagnostic pin.
To reproduce, build
agc_driver_sample_multisample_target_testsat the pinned branch, select a GPU withANYPS5_GPU, require Vulkan withANYPS5_REQUIRE_VULKAN=1, disable shader cache withANYPS5_NO_SHADER_CACHE=1, then runctest --test-dir <build> -R '^agc_driver_sample_multisample_target$' -V. The expected diagnostic is a failing regression, not a passing test.Scope and next correction
ShaderResources::prepareAddressBindingsacquires registered heaps for BDA;GuestBufferMemory::UploadFinish/AddressRangesand the cached BDA table expose those ranges without the native-owner check used by the descriptor paths. This inspection identifies the separate route; it is not yet a validated fix. Rejecting an entire registered heap merely because it contains one native surface would also reject the passing neighbor control. Any table/range correction must account for owner creation/retirement and cached-table reuse.#6480/#6498 concern ordinary buffer descriptors; #6579/#6590 concern fixed-function index inputs. This report concerns actual BDA span reads/stores through address tables. Existing BDA fault/unaligned-access work concerns different behavior. No equivalent native-owner table correction was found in the current source or reviewed open BDA PRs.
Found while extending public regressions for the PPSA99902 bring-up work. This does not identify that title's first failing writer/plane or explain another title's device loss. AI-assisted investigation and fixture: Codex.
Historical Windows validation of #6628
The proposed fix in #6628 passes the native-MSAA/neighbor regression five times on each physical GPU (RTX 5080 and AMD Radeon iGPU); restoring main production code fails five times on each. Independent review also found a new cache-hit descriptor-length regression and supplies a tested one-line correction plus its regression assertion. Full Windows build and repeated corrected tests pass. Validation, exact pins and proposed correction. Synthetic fixtures only; no new title-progress claim.
Barrier variants subsequently exposed #6689, independently reproduced with a test on main alone. The proposed compute fault-handling follow-up and its dependency on #6416 are tracked there.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T00:05:58Z.
A focused fix is in PR #6628. It filters active native multisample color spans from the BDA table while preserving neighboring ranges, and restores access after the owner is cleared. The regression warms the BDA table before target creation and checks both refusal and adjacent-range access. The reported focused Mesa llvmpipe test passed; the platform CI jobs were skipped.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T02:16:23Z.
I tried building
agc_driver_sample_multisample_target_testson Linux at #6628 current head2705518fe721eee5a89d856242e45f0f426c829a. Configuration succeeds, but GCC 12 stops in the existing shader recompiler dependency atcore/shader/recompiler/Optimization/src/SrtWalker/SrtDescriptorEvaluation.cpp:183:read.read->Flags<MemoryFlags>()needs the dependenttemplatedisambiguator. This happens before the fixture links, so it is not Linux validation of the #6628 regression. The worktree is clean. Windows coverage and the exact fix remain in #6628.