fix(libSceAgcDriver): take out-of-place DB expands with vertex layer-export bits set #21486
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21486"
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 akkadbakkad89 on 2026-11-16T08:16:54Z.
What
DecodeDepthExpandPassrejected every out-of-place DB expand whosePA_CL_VS_OUT_CNTLregister (0x207) carried vertex shader layer-export bits (PRIMTYPE_ENABLE, streamout/layer export enables). The expand is a fixed-function host pass: it never executes the guest vertex shader, so those enable bits are inert leftover state from earlier layered draws. The draw decoder already masksLayerExportsout of its own0x207checks for the same reason; only the expand path still rejected them. This change removes that single reject so the expand is accepted, and adds alayer-exportscase toagc_driver_depth_expand_out_of_place_teststhat sets the exact register value a title emitted ((1<<18)|(1<<19)|(1<<21)|(1<<24)) and verifies the expanded depth plane through sampled and raw detiled reads.Tested
Windows 11, relinked PPSA32786 and
agc_driver_depth_expand_out_of_place_testson the same machine and GPU.PA_CL_VS_OUT_CNTLholding the bit set above and aborts the presentation thread onmainwithAGC graphics: an out-of-place DB expand (DB_RENDER_CONTROL 0x00000060, DB_Z_INFO 0x20000183, DB_Z_READ_BASE ..., DB_Z_WRITE_BASE ...) with layer exports is not implemented.layer-exportscase reproduces that signature bit-for-bit onmainand passes with the change: 15360 of 15360 texels match the read surface's depth through both the texture read and the raw detiled read.mainvs change,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1withVK_LAYER_KHRONOS_validation(SDK 1.4.363,VK_HEADER_VERSION335): the loader inserts the layer in both runs, neither log containswas not found but was requested, and the change adds noVUID-lines. All suite cases pass identically on both.unimported-copied-buffer-readfails standalone with an identicalheap mirrors made: 1 (expected none)signature onmainand on the change — a pre-existing host-import-budget artifact independent of this fix (it passes in the full-suite ordering on both).Checklist
main; no other open PR implements the same functionsNotImplemented_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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T08:45:10Z.
Review: APPROVED
Reviewed — looks good
The change removes the layer-export rejection from the out-of-place depth expand decoder and adds a regression case for the reported register bits.
What I ran
Reviewed head
bb8b16f744c2a8a561cd0fbbf03389c3058a2cc1. I read the prepared description, commit list, manifest, diff, and the relevant decoder and test code. No tests were run in this review.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I read both changed files and the relevant decoder and test sections.
files.jsonwas unavailable; the reader’s file listing reports both changed files as included. The test suite, build, runtime behavior, and author-reported results were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T20:05:34Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
07f1b4f3d2b11d1ac6cb398666cd55928c86866using the prepared diff andrepo_read.pyto inspect changed code and targeted context. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded because it was too large for the review folder; its diff hunk was inspected. No build, automated tests, or physical console behavior was verified. The test results in the PR description are author-reported.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T07:12:27Z.
Review: COMMENTED
Actionable comments posted: 1
435d6ae7-c7a4-41ea-b7c1-c2a5ca382b12Reviewing files that changed from the base of the PR and between
c6331cc61band43d0a63395.core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/execution/DepthExpandOutOfPlace.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T07:18:39Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this; the change removes the stale layer-export rejection and adds a focused execution case for the register bits cited in the PR description.
What I ran
Reviewed head
43d0a6339537be83f1d622afa8ff3e83133d1768using the prepared diff andrepo_read.py. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Build and runtime behavior were not independently verified. The full text of
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded because it exceeded the review folder limit; its changed hunk was inspected from the diff. Read files:review/description.md,review/commits.md,review/manifest.json,review/diff.patch,core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp,core/libs/prx/libSceAgcDriver/tests/Graphics.cpp(lines 3350–3420), andcore/libs/prx/libSceAgcDriver/tests/execution/DepthExpandOutOfPlace.cpp.review/files.jsonwas not present in the prepared listing.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T12:47:18Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
096e0eb10c21daffb831f3b7da2891b6eb0e8d6d. I inspected the prepared diff and targeted source ranges usingrepo_read.py; I did not run tests or builds. All three changed files were read in the relevant sections. No files were excluded by the review rules.Results
Findings
Blocking
None.
Non-blocking
None.
Sources
The decoder no longer rejects the vertex layer-export bits when identifying an out-of-place depth expand. The added execution case sets those bits and checks both sampled and raw detiled output: State.cpp at the reviewed head, DepthExpandOutOfPlace.cpp at the reviewed head.
Not verified
I did not run the test suite or verify the reported Windows 11/GPU results. I read the changed hunks and relevant surrounding code, not unrelated portions of the three changed files.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:37:17Z.
Review: COMMENTED
I tested
096e0eb10cagainstmainat9d362fb088on Linux with Mesa lavapipe. The GCN scalar-buffer control and both out-of-place depth-expand cases passed on both revisions. The branch's normal expand fixture includes the added vertex layer-export case. Both runs required Vulkan, disabled the shader cache, and showed the loader inserting Khronos validation 1.4.369. Neither log had missing-layer warnings orVUID-messages. This comparison used software Vulkan.AI-assisted: yes.