fix(libSceAgcDriver): keep D16 storage coherent with resident depth #1842
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1842"
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 ebarr24 on 2026-10-08T21:24:01Z.
What
Depends on #1684 (included public commit
c46ecda781, cleanly integrated on upstreamb858fdc48e).Matching single-level single-layer R16_UNORM 2D and 2D-array storage over resident D16_UNORM depth currently throws. Transfer its 16-bit Vulkan depth-aspect buffer plane into normalized storage and a separately keyed R16_UINT alias, and return actual compute writes to authoritative resident depth. Attachment writes refresh storage, independent view types and UNORM/UINT formats share revisions, and queued resources retain ownership. Generic storage/sample resource sets and deferred sampled captures created before residency rebuild conservatively instead of trusting stale guest-memory proofs. Existing R8 stencil behavior and unsupported-path diagnostics are preserved.
This narrow alternative overlaps #425's broader depth/array/HTILE implementation and #454's depth coherence/retirement work. Those implementations and reports are real; this PR offers explicit GPU storage/sample/attachment/lifetime/reuse regressions without adopting their broad stacks. #1430's sampled-depth proof work is complementary and needs integration review if chosen. The dependency and competing paths will need integration and revalidation if their contracts change or they merge first.
Vulkan aspect copy rules define the D16 depth plane. Logical resident transport does not verify PS5 tiling/compression, HTILE or raw CPU coherence; DCC0 is not an HTILE proof. Earlier generic-write initialization, other-layout retirement and extra depth formats/mips/layers remain unsupported. No shader ISA semantics or console hardware verification is claimed. This addresses README Status's libSceAgcDriver rendering capability and the next measured Stray blocker on dependency c46; it does not claim Issue #1409 closed, a rendered scene, title playability or controls.
The parent-owned private Stray retest of this exact head stops before the title window at a computed
s_swappc_b64call target that the current shader translator cannot statically resolve. No new menu, rendered scene, controls or playability are verified on this head. Earlier c4ac menu/readback evidence remains historical.Tested
Windows Full validation uses GCC 15.2/MinGW and these core build/test commands, with the workspace supplying its pinned dependency package and compiler cache:
Exact-head Ubuntu uses the upstream Build workflow, with required Vulkan execution and CTest
--repeat until-fail:3 --parallel 4 --output-log ctest.log. No workflow or timeout is changed by this PR.Public hand-authored DB state/T# descriptors and GLSL only. Pure upstream base
b858fdc48eand final candidate use the identical fixture. The base first passes real D16 attachment comparisons, then refuses resident depth storage. Candidate validation covers typed/formatless normalized and integer 2D and one-layer array RMW, exact integer bits, UNORM sampling, positive/negative depth comparisons, attachment refresh, independent view and cross-format round trips with distinct format view identity, queued registry/cache clearing and reusable generic-to-resident storage/sample descriptor routing. D16 attachment quantization has a one-step oracle; UNORM conversion rules permit one integer step for normalized float storage writes. The test propagates actual quantized values; UINT writes and subsequent cross-format alias copies compare exactly, while sampled depth must match the stored canonical bits within2e-7. New PM4 submission/RDNA translation is not exercised by this fixture; the broader existing suite remains required. No proprietary inputs or extracted shader bytes are added.Candidate
66bf9fa39a0226448f9fd754c7e8ea095b0386d9is committed on pure upstreamb858fdc48e29c3ab7476782199d8a41999d46d59. The reusable-resource fixture follows the merged shader runtime contract: typed numeric-class/image-shape storage/sample/sampler heap slots derived with main DescriptorBindingForImage and queried/enabledVK_EXT_robustness2nullDescriptor. The existing stencil regression remains unchanged. Clean committed-head all-target Full Windows validation, including libs, passes 482/482 tests with zero failures or skips on Windows 11, GCC 15.2, NVIDIA GeForce RTX 3080. The D16 and unchanged stencil regressions take 0.75 s and 0.47 s. The identical isolated-base fixture fails at the intended UNORM resident-depth refusal after attachment controls. Exact-head Ubuntu 24.04 lavapipe run 37839541370 passes 464 tests, with 24 individually reviewed capability skips and no failures. Both D16 and unchanged stencil storage regressions execute and pass three times, each under 30 s including the cold run. Reviewed skips require wave-sized subgroups, conservative rasterization, or look-back scan atomic/subgroup features; their corresponding RTX 3080 Windows tests pass. Software Vulkan complements the hardware execution evidence.Checklist
main; no other open PR implements the same functions — pinned upstream baseb858fdc48; explicit scenario alternative overlaps #425/#454, with included dependency #1684 and final complete overlap review.NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T05:33:23Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppL17-18core/libs/prx/libSceAgcDriver/Graphics/include/State.hppL65core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hppL61core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppL13-14, L38, L103-104, L107, L115-116, L155, L157, L179core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL567-571, L2642core/libs/prx/libSceAgcDriver/Graphics/src/State.cppL225core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppL494Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:30:01Z.
Closing: this is a second depth-storage model next to #425 and #454, stacked on #1684, and no title reaches it on main (your Stray run stops earlier, at the
s_swappc_b64registration error). If a title stops at the D16 storage refusal once that's past, please reopen with the title ID and the log line.Pull request closed