fix(agc): ignore a stencil clear on a target without a stencil plane #7720
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7720"
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 LuisAguilarDev on 2026-10-19T02:46:56Z.
What
Dragon Ball Xenoverse 2 (PPSA08587) stops at its first frames:
The draw clears depth and stencil together on a depth-only D16 target:
DB_RENDER_CONTROL0x00000003DEPTH_CLEAR_ENABLEandSTENCIL_CLEAR_ENABLEDB_DEPTH_VIEW0x00000000DB_Z_INFO0xa0000181Z_16DB_STENCIL_INFO0x20000180STENCIL_INVALID, no stencil planedecodeDepthandDrawRejectioninState.cpprefuse a stencil clear when the stencil plane is absent or read-only. A target without a stencil plane has no storage for the clear to write, so the stencil clear is now dropped there; the depth clear and colour writes proceed. A stencil clear on a read-only stencil plane still throws. The skip for draws with no depth surface bound (depthPlanesAbsent) is unchanged; it does not cover this case, because the depth plane is present.Sources (inferred, no source states the hardware behaviour):
gfx9RsrcProcMgr.cppbuilds the clear mask from the image's planes, so it never setsSTENCIL_CLEAR_ENABLEon a depth-only image.si_clear.cdropsPIPE_CLEAR_STENCILwhen the format has no stencil.vk_rasterizer.cppapplies the stencil clear only whenStencilValid(), which is false for an invalid stencil format.The console was not measured; this is recorded under Functional in
docs/dev/debt/libSceAgcDriver.md.Tested
agc_driver_graphicspasses in 7.5 s. The test that asserted the rejection of a stencil clear without a stencil plane now expects the depth clear alone and an empty precheck; without theState.cppchange it fails withstencil clear requires a writable stencil plane.agc_driver_bda_device(#7584) andagc_driver_image_table_reuse(#7710) fail the same way with and without this change.tools/check_conventions.py --base upstream/mainandgit diff --checkpass.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T02:47:14Z.
Thank you for your contribution! Authors with no pull requests merged into
maincan have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.Pull request closed