feat(agc): run DB depth copies into a single-sample R32 float target #5499
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5499"
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 codingreapermaps on 2026-10-13T21:27:12Z.
What
A draw with
DB_RENDER_CONTROL.DEPTH_COPYthrewDB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported. PPSA12361 (Transport Fever 2: Console Edition) issues one in every frame of a map:DB_RENDER_CONTROL = 0x84(DEPTH_COPYwithCOPY_CENTROID), a two-sampleZ_32_FLOATdepth surface (2688x1512) and a single-sample R32 float color target of the same size that its ambient occlusion pass samples next.DecodeDepthCopyPassrecognises the draw before shader compilation: depth copy only (no stencil copy, clear, resummarize or decompress), no depth or stencil tests, aZ_32_FLOATdepth plane, color writes to the red channel of color target 0 alone, a single-sample R32 float target of the depth surface's extent, the fullPA_SC_AA_MASKand a viewport and scissor covering the whole surface. Anything else throws, and draws withoutDEPTH_COPYare unchanged.DepthSample.comp) that fetches one sample of the host depth image and stores it into the target's resident storage image, which is then marked dirty like any other GPU write.COPY_CENTROIDthe copied sample is the first one the draw covers. radeonsi programs its DB to CB copies withCOPY_CENTROIDand a one-sample mask per sample (loop insi_blit_dbcb_copy); under the full sample mask required here that is sample 0. WithoutCOPY_CENTROID,COPY_SAMPLEselects it. The console is not measured; this is recorded indocs/dev/debt/libSceAgcDriver.md.SAMPLEDusage when the device can sample their format at their sample count; single-sample surfaces keep it unconditionally as before.drawCoversand is reused here.Overlap with #1395. That draft also recognises depth copy draws (
DecodeDepthCopyPass) together with depth clears, and is blocked on proving that a draw selected from register state really covers the whole surface. This PR has the same limitation: the copy is chosen from the viewport and scissor, not from the draw's geometry. It is narrower (depth copies into an R32 float target only) and adds a title that needs it (PPSA12361) and an execution test of the copy on the GPU. If the maintainers prefer to land the copy through #1395, this can be closed in its favour and the title data moved there.Tested
Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce MX450 (driver 581.83).
agc_driver_graphics_tests: newdepthCopyPassTestsdecode the PPSA12361 register state and refuse a stencil copy, a missing sample, a partial sample mask, depth tests, a non-Z_32_FLOATplane, writes beyond the red channel, a non-R32 float target and a viewport over part of the surface. All graphics tests pass.agc_driver_depth_storage_tests: newDepthCopyCasecopies samples 0 and 1 of a cleared two-sample depth surface into aRenderTarget-tiled R32 float target and reads the cleared depth back from every texel of guest memory; a copy without a depth surface, of a third sample and of another extent are refused. The suite passes. On this machine the first Vulkan device is an Intel Iris Xe withoutshaderInt64, so it ran withVK_LOADER_DRIVERS_SELECT=*nv*.mainat0aa4cb1c2.Checklist
main; no other open PR implements the same functions (overlaps the draft #1395, see above)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T05:10:52Z.
The copy is picked from the viewport and scissor, not from what the draw covers, which is the same open problem as #1395. Could the copy run as the draw itself (a pixel shader reading the depth sample, rasterized from the title's geometry) so coverage comes from the draw and nothing needs guessing?
Also,
SAMPLEDusage on every multisampled depth surface changes surfaces that work on main today; please say which titles you ran with that part.Imported from boykopovar/AnyPS5. Originally posted by codingreapermaps on 2026-10-14T10:08:59Z.
Only PPSA12361 ran with the
SAMPLEDpart; no other title was run with it. I'll take that out of the general path.Running the copy as the draw itself makes sense, and it's the only way I see to close the coverage gap #1395 is also stuck on. Before rewriting I'd like to check the design with you, since it reaches beyond this PR:
DEPTH_COPY, the driver runs it through the normal draw path on a copy of the register state: the title's vertex stage and geometry,DB_RENDER_CONTROLcleared, no depth target bound, and a driver-owned pixel program in place of the title's (likeNullPixelCode). That program reads the depth sample withimage_loadon a 2D MSAAT#that describes the depth plane, at the pixel position, and exports it to MRT0. Coverage, culling, clipping, viewport and scissor then come from rasterising the title's draw. The sample is the one chosen today (COPY_CENTROID→ first covered sample under the full mask, otherwiseCOPY_SAMPLE; the console is still unmeasured, debt entry kept).GuestTextureResourcerejects MSAA descriptors andDepthSurface::Sampledrequires one sample. Instead of addingSAMPLEDto every multisampled depth image, the sampled view would come from a lazily created shadow image with the same sample count, refreshed withvkCmdCopyImagefrom the depth image (it already hasTRANSFER_SRC) when the surface was written since the last copy. Surfaces that work onmainkeep their usage.Two questions:
ShaderResources)?I'll convert this PR to draft until the design is settled.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T11:19:50Z.
A second concrete workload is now reported in issue #6304:
DB_RENDER_CONTROL=0x84, a single-sample D32 source, and a same-size R32_FLOAT destination on PPSA34501. Your current PR description and execution case focus on the two-sample PPSA12361 path. This could be useful as an additional regression shape for the single-sample branch, if the current decoder and pass support it; I have not verified that path locally.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:07:53Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/Draw.hppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/include/TextureDetiler.hppcore/libs/prx/libSceAgcDriver/Graphics/shaders/DepthSample.compcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureDetiler.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/tests/execution/DepthStorage.cppdocs/dev/debt/libSceAgcDriver.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/debt/libSceAgcDriver.mddocs/dev/debt/libSceAgcDriver.mdImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T12:44:14Z.
Review: COMMENTED
One untested case appears to be accepted by the decoder:
pass.samplescan be 1, andDepthSurface::CopySampletreats a one-sample target as sampleable, butDepthSample.compdeclaressampler2DMS. That shader expects a multisampled image. The single-sample source in #6304 would reach this path if the PR is merged unchanged. Could the decoder reject one-sample depth for now, or add a separate single-sample shader path and execution test? I have not run this case locally.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T23:48:22Z.
Review: COMMENTED
I rechecked the current head
c483040e. Two points from my earlier review still appear unresolved in the diff:DepthSurfacecomputessampleableas true for multisample targets whenever the format supports sampled usage, then addsVK_IMAGE_USAGE_SAMPLED_BITto the depth image used by every target of that shape. Your reply said only PPSA12361 ran with the sampled-usage change and that you would remove it from the general path. Could this pass use a dedicated sampled view/image or otherwise opt in only for the depth-copy path, so ordinary multisample depth surfaces keep their current usage?DecodeDepthCopyPasspermitssamples == 1, butDepthSample.compdeclaressampler2DMS. The single-sample case reported in #6304 therefore still needs either an explicit rejection or a separatesampler2Dshader path and regression test.I have not run these paths locally; this is based on the current diff and shader/decoder contract. I’ll revisit if the implementation changes.
Imported from boykopovar/AnyPS5. Originally posted by alexpournaras on 2026-10-16T14:35:08Z.
@MarcZX100, I tested PPSA34501 from
mainwith this PR's changes plus #5956, and successfully reached the game's main menu. This resolves issue #6304. Thanks!Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-16T23:54:23Z.
Both parts make sense. Yes, please put MSAA depth sampling through the shadow image in its own PR first, with a test that sampling returns the depth values at each sample count, and this one depending on it. A driver-owned guest pixel program is fine with me: it keeps everything on the normal draw path; just mark it in the debt file as driver-authored code. For the single-sample case from #6304, either a
sampler2Dpath with its own test, or an explicit rejection, as MarcZX100 asked.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T17:37:03Z.
Checking in, since #6304 now has a second region (PPSA34502) reproducing the same 0x84 abort on Linux. Where this stands against current
main:DepthSurface.cpp,TextureDetiler.cpp/.hppand the debt doc conflict. Main's MSAA depth sampleable handling now covers what theSAMPLEDusage hunk did, so that hunk can go.main; the earlier tester's tree just predated it.sampler2DMS, which is invalid in Vulkan and only happens to work on NVIDIA. That is PPSA34501's case.The Z32 to R32 copy and the sample pick look right. When you have a rebased head with the 1-sample case fixed, we'll review and run full CI.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T23:17:11Z.
I opened #7318 as the separate multisample depth shadow-image prerequisite requested here. It copies the native depth samples into a same-format, same-sample-count sampled image and leaves sampled usage off the attachment. The focused target builds on Linux; its runtime stops at this host's CPU-feature guard before device selection, so I have no GPU result for this change. If the implementation matches the planned path, #5499 can rebase on it and list it as a dependency after review/merge.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T19:45:19Z.
The
drawnDepthpropagation and native-attachment usage review findings are now fixed on #7318 at head132dbd1f0. Its isolatedDepthSurfaceReusefixture passes; I could not run GPU validation here, and the GitHub platform build/test jobs are skipped. If this path is still needed, please rebase/integrate #7318 after its review, then rerun the reported GPU regression. The separate single-samplesampler2DMSmismatch and the agreed draw-based copy design still need to be addressed in this PR.Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-19T18:22:48Z.
Datapoint from a third title on the
DB_RENDER_CONTROL = 0x84stop: Horizon Call of the Mountain (PPSA05666, v01.004.011, PS VR2-only). On a local tree that gets the title through its PS VR2 set-up (main324e0e48e+ #7658 + #7690 and environment-gated stubs, see D6214 and #7649), it aborts at its first draw onDB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000084), 3 of 3. With this PR (headc483040e7, hand-merged) the depth copy runs every frame, and the title stops on the next DB pass of the same frame:0x88 is
STENCIL_COPYwithCOPY_CENTROID, whichDecodeDepthCopyPassrefuses by design. The register state of that draw:DB_DEPTH_CONTROL0,DB_Z_INFO0xa0000183 (Z_32_FLOAT, 1 sample),DB_STENCIL_INFO0x20000181, surface 2304x1184 in the first frame and 3328x1664 afterwards, colour target 0VK_FORMAT_R8_UINTof the same extent (1 sample, tile mode 24),CB_TARGET_MASK0x2 andCB_SHADER_MASK0x3 withCB_COLOR0_INFO0x00050c04 (COMP_SWAPALT), full sample mask, viewport and scissor covering the surface. So the stencil export lands in the green channel and the swap routes it into the target's one 8-bit channel; a rule that only admits the red channel refuses it.A stencil variant of the pass, written locally to see what comes next:
DecodeDepthCopyPassalso accepts bit 3 (stencil plane required instead of Z_32_FLOAT, 8-bit single-sample target instead of R32 float, write mask 1 or 2),CopySampletakes a stencil flag and creates aVK_IMAGE_ASPECT_STENCIL_BITview of the same image, and a second compute shader that differs fromDepthSample.componly inusampler2DMS/r8ui uimage2Dwrites through the target's R8_UINT view. With it the title runs both copies every frame and renders its first VR scene, 3 of 3 full-cap runs, no throw. Not checked: the shaders read withsampler2DMSalthough this surface has one sample (fine on NVIDIA 616.92, validation layers off), and whetherCOPY_CENTROIDon a one-sample surface means sample 0. The diff is about 100 lines over 9 files; I can post it here or open it as a follow-up once the pass lands, whichever suits the split into #7318 and this PR.Setup. Windows 11 (26200), RTX 4090 (NVIDIA 616.92), WinLibs GCC 15.2.0 r7 (UCRT), Release
libstarget; runs on 2026-10-18, 600 s cap, no input.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T10:55:38Z.
Status update: the proposed multisample-depth shadow prerequisite, #7318, has now merged. On the current #5499 head (
c483040e), the earlier review points still apply: the copy is selected from viewport/scissor rather than title geometry, and the decoder accepts a one-sample source for asampler2DMSshader. The new Horizon Call of the Mountain report’sDB_RENDER_CONTROL=0x88is a separate stencil-copy case; the local stencil experiment is not yet validated, so it can remain out of this depth-copy scope.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T16:58:16Z.
@codingreapermaps, I rebased this onto current
mainand fixed the one-sample case, since PPSA34501 and PPSA34502 (#6304) both stop on this refusal. The branch is milescoviello/AnyPS5rebase/5499-db-depth-copy(815c622e3a, onmaind0852defa2). It holds your commit (22b93dcd44, your authorship) and one of mine on top.Rebase. It conflicted in
CMakeLists.txt,TextureDetiler.hpp/.cpp,DepthSurface.cppand the debt file.CopySamplereads through it, as the texture path does: it creates the shadow, refreshes it, and the recorder keeps it. TheSAMPLEDusage hunk is gone, as @oneandonlydean said.DescriptorRingthroughallocateFrom, as main's other detiler passes do now, instead of a pool of their own.815c622e3a: the one-sample case (@oneandonlydean's and @MarcZX10's point):
DepthSample.compis built twice, once withsampler2DMSand once withsampler2D(-DMULTISAMPLED, asMultisampleSampledReadback.compis built). The copy picks the variant by the surface's sample count.samplingActive. I added that check in my first rebase, copied from the texture path. It concerns importing guest memory into a native multisample image, but the copy reads the host image that the draws rendered. With the check in place, the existing two-sample case failed (native multisample depth sampling requires its creation-time owner).VK_PIPELINE_STAGE_HOST_BITnext toALL_COMMANDS, as the CMASK clear's do, because their access masks include host bits.depthCopyPassTestsnow decodes a one-sample plane and refuses its sample 1.DepthCopyCase, after the two-sample checks, copies from a one-sample D32 surface, expects its clear value in every texel, and refuses sample 1.Tested on Ubuntu 24.04, GCC 13.3, RTX 4070 Ti, driver 595.99.02:
agc_driver_depth_storageandagc_driver_graphics: both pass 3 of 3.ctest -R '^(agc_|shader_cache)': 834 of 835 pass, and the usual three skip themselves. The one failure,agc_driver_lookup_log_fits_build, failed once in that-j4run and passed 7 of 7 reruns. This branch doesn't touch its code.agc_driver_depth_storage*andagc_driver_graphics:VUID-RuntimeSpirv-samples-08726×2 (the one-sample view bound tosampler2DMS), plusVUID-vkCmdPipelineBarrier-srcAccessMask-02815×6 and-dstAccessMask-02816×12 (host bits onALL_COMMANDS).main661f8b7171stops at 15 s withDB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000084).Still open from the review: the copy is chosen from the viewport and scissor and isn't drawn from the title's geometry (the driver pixel program plan from 16 Oct). I haven't started on that.
Would you reset this PR's branch to mine? That would be
git fetch https://github.com/milescoviello/AnyPS5 rebase/5499-db-depth-copy, thengit reset --hard FETCH_HEADand a force-push. If you'd rather not, I can open it as a separate PR with your commit and authorship and link it here.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by alexpournaras on 2026-10-20T17:16:41Z.
@milescoviello, I tested your branch with PPSA34501 and it gets past the
0x00000084error. Whether it lands in this PR or in one of your own, your changes resolve #6304 too. Great work!Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T17:28:41Z.
@codingreapermaps @milescoviello alexpournaras reports above that milescoviello's rebase of this PR (
rebase/5499-db-depth-copyat 815c622e3a on their fork: this PR's commit on currentmain, plus a one-sample fix) gets PPSA34501 past the0x00000084error, which also covers #6304.To get that reviewed and merged, could the rebased branch become this PR's head? @codingreapermaps, if you're happy to, reset this branch to 815c622e3a (your commit is kept as is). If you'd rather not, @milescoviello could open it as a new PR crediting you, and we'd close this one in its favour. Either works for us. Tell us which you prefer. The draw-based copy and
sampler2DMSpoints from MarcZX10's review still apply to whichever PR carries it.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T17:28:44Z.
Thanks @alexpournaras. That's the single-sample case from #6304 on the other region's release, so both regions now get past the 0x84 stop with 815c622e3a.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T17:44:06Z.
Thanks @oneandonlydean. Either way works for me too. I'll wait for @codingreapermaps until tomorrow before opening anything.
One correction: the
sampler2DMSpoint is the one-sample fix in 815c622e3a. A one-sample surface now goes through asampler2Dbuild of the shader, andVUID-RuntimeSpirv-samples-08726is gone from the validation run (details in my comment above). The open point is the draw-based copy. If I end up carrying this, I'll take that one on in the new PR.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-20T22:55:04Z.
Another title stops on the same draw: Metal Gear & Metal Gear 2: Solid Snake (PPSA14408, #8737). Its game executable (started with
sceSystemServiceLoadExecfrom the launcher) stops on its first depth-copy draw withDB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000084)on main61d0fa5b3c(Linux, RX 6650 XT, RADV). This branch currently conflicts with main, and its relinker predates--module-dir .beside--executable, so I could not test the title with it. I can run it again once the branch is rebased.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T23:21:13Z.
@JJenkx a rebased copy is on my fork:
milescoviello:rebase/5499-db-depth-copy, head 95ca794b31 onmaineea640a5bf. It holds codingreapermaps's commit plus my one-sample fix from above, unchanged; only the base moved (previous head 815c622e3a). It also merges cleanly onto today'smain4e79d81392, and its relinker has--module-dir.At this head, on Linux, RTX 4070 Ti (NVIDIA 595.99.02), GCC 13.3, Release,
ctest -R '^agc_'passes 843 of 844. The one failure isagc_driver_lookup_log_fits_build, which fails under load onmaintoo (#8601); it passes 3 of 3 run alone. I haven't rerun the validation layer or a title at this head yet.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T08:07:05Z.
As @oneandonlydean offered, I opened the carry as #8975. It holds @codingreapermaps's commit, with their authorship, plus my one-sample fix, rebased onto
mainf894ba69d3(the 29 depth tests pass). It's a draft until the draw-based copy (the driver pixel program from the 16 Oct plan) is in. #8975 says #5499 can be closed in its favour, whenever you're ready.@JJenkx: the fork branch
rebase/5499-db-depth-copymoved to that head (120900a342), so PPSA14408 can be tested against #8975 directly.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T08:16:50Z.
@milescoviello thanks for opening #8975 with @codingreapermaps's authorship kept. We'll review it once it's out of draft with the draw-based copy, and close this one in its favour then.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T08:26:48Z.
@milescoviello your rebase (95ca794b31) passes our review, including your one-sample fix, and we'd like to merge it. Could you open it as a PR from your branch, crediting @codingreapermaps (their commits kept, or a Co-authored-by line)? Then we'll run full CI and merge it, and close this one as carried by yours. The whole-surface compute copy is fine for now; please keep the debt line for it.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T13:22:02Z.
Carried by #8975, which landed this change with credit. Thanks for the original work here.
Pull request closed