Repository navigation
fix(libSceAgcDriver): skip depth and stencil tests whose plane is absent - #453
Merged
oneandonlydean merged 1 commit intoOct 4, 2026
Merged
Conversation
This was referenced Oct 3, 2026
oneandonlydean
pushed a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit cde2df1) integ: astrobot's resident depth model already skips the tests of an absent plane (decodeDepth: depthTest needs hasZ, the stencil test needs the stencil plane, both absent gives no attachment), so boykopovar#453's State.cpp change is not taken; its test is, reading state.depth.*. Its second case no longer asserts the stencil test: astrobot drops a stencil test that always passes and writes nothing (STENCILFUNC ALWAYS, KEEP ops), as it did before.
Collaborator
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SP4C3B4R-8
force-pushed
the
fix/absent-depth-stencil-plane
branch
from
October 4, 2026 10:21
cde2df1 to
48ebf31
Compare
Contributor
Author
|
Rebased onto main (2cf901b), now 48ebf31. The only conflict was in Written with AI assistance (Claude Code). |
Collaborator
|
Thanks for the rebase. Keeping main's |
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 5, 2026
Conflicts resolved: - libSceAudioPropagation/Export.cpp: upstream's boykopovar#482 + boykopovar#489 version taken; it is the same no-propagation model as astrobot's stand-in, with SourceRender and the handle-only UnregisterMaterial already in it. - State.cpp (boykopovar#453): astrobot's resident depth model kept; it already skips the tests of an absent plane (boykopovar#453's test is on astrobot since e087a4f). - Graphics.cpp, State.hpp, ShaderResources.cpp: astrobot's DepthTarget model kept (exportIndex, no DepthSurface.hpp), upstream's ThreadOwned include added. - BdaResources.cpp: astrobot's form with boykopovar#390's message. - VulkanDevice.cpp, Context.hpp, PacketExecution.cpp: both sides kept (calibrated timestamps, host query reset, GDS, memory budget; pipeline stats). - Spirv: astrobot's split-wave rules first, then boykopovar#608's wave-mask ballot and boykopovar#587's host subgroup lane; astrobot's function LDS sizing and boykopovar#573's LDS lock both kept; conditionalDepth kept in the atomic update loops; upstream's buffer atomics (boykopovar#321 boykopovar#332 boykopovar#594) and 64-bit LDS atomics taken. - TechnicalDebt.md: both sides, duplicate lines dropped. Build fixes folded in: the upstream boykopovar#453 test block duplicated next to astrobot's adapted copy removed; a lost closing brace after the host query reset block restored; lookupLog() is a function since boykopovar#590; the duplicate MUTEX_TYPE_ADAPTIVE constant (astrobot's 93b2d0e equals boykopovar#156) removed; the ops boykopovar#596 drops removed from the masked-select list and the BDA test message updated (the gate-batch-2 integ commits 559e4fab6 and 2ec968fb5).
SP4C3B4R-8
added a commit
to SP4C3B4R-8/AnyPS5
that referenced
this pull request
Oct 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit cde2df1) integ: astrobot's resident depth model already skips the tests of an absent plane (decodeDepth: depthTest needs hasZ, the stencil test needs the stencil plane, both absent gives no attachment), so boykopovar#453's State.cpp change is not taken; its test is, reading state.depth.*. Its second case no longer asserts the stencil test: astrobot drops a stencil test that always passes and writes nothing (STENCILFUNC ALWAYS, KEEP ops), as it did before. (cherry picked from commit 375fe31)
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A draw can enable the depth or stencil test in
DB_DEPTH_CONTROLwhileDB_Z_INFO/DB_STENCIL_INFOdeclare the corresponding plane absent (format 0 /INVALID), for example a stencil test withALWAYSandKEEPon a depth-only surface. Such a draw was rejected with "stencil test without a stencil plane" (or "depth test without a depth plane"), so none of its depth writes happened either.The hardware behaves as if the test of an absent plane were disabled.
decodeDepthnow clears the test bits of an absent plane instead of throwing, and a draw whose planes are both declared absent is treated like a depth pass-through instead of being rejected byDrawRejection. A depth or stencil register that is missing entirely still goes through the existing checks.Tested
Windows 11, MinGW-w64 GCC 15.2.0.
agc_driver_graphics_testsandagc_driver_pm4_testspass on this branch alone;Graphics.cppchecks that tests on two absent planes are dropped and not rejected, and that a depth test without a depth plane is dropped while the stencil test of a present stencil plane is kept. With a retail title, about 13k draws per minute that write the main depth buffer are no longer skipped.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code
https://claude.ai/code/session_018m6Ad8zkQKPKZmyUQK9vfE