fix(agc): ignore stale depth clear flags when no planes are bound #5855
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5855"
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 tototomate123 on 2026-10-14T13:52:26Z.
What
HFW (PPSA01521) retains DB_RENDER_CONTROL clear bits during color-only draws with both depth/stencil planes disabled. Current main enters depth decoding anyway and throws
depth clear requires a writable depth planebefore the loading screen.Decode depth only when a depth/stencil surface is bound, and apply the precheck's writable-plane requirements only when a plane exists. Clears on existing read-only or missing individual planes still reject. Regression cases cover depth, stencil and combined stale flags without changing color writes or viewport depth.
Tested
Linux x86-64, GCC/G++, Release: built and ran
agc_driver_graphics_tests; conventions and whitespace checks pass. Existing writable-depth/stencil rejection checks remain active. Guest-arena/host-import checks that require the unavailable arena were skipped by the suite.The failure was observed in the user's HFW run on an RTX 4070 SUPER. This environment cannot expose a GPU, so no controlled hardware run is claimed. This fixes the stale-clear startup failure, not the separate 60-second guest-allocation pin timeout or all later loading failures.
Checklist
main; no other open PR found implementing this stale-clear handlingImported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-15T02:09:34Z.
I ran this PR's test on Linux.
Setup: this PR's diff applied to main at
8cd937e29(the PR's base is 485 commits behind it), default CMake build (CMAKE_BUILD_TYPE empty, unoptimized), clean environment.ctest -R '^agc_driver_graphics$', 3 runs each. The test did not open a GPU device, so this is a CPU-only run.So the new test catches the old behaviour here. I did not check Windows, macOS or a real GPU.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:10:31Z.
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/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T13:49:08Z.
Checked on Linux (RADV):
agc_driver_graphicspasses with the PR and fails withState.cppreverted, so the new cases pin the change; the stencil/depth plane rejections that remain are still covered. Matches @Dextroid17's run. Merging once the full build is green.