Skip to content

fix(agc): draw stencil clears requested through DB_RENDER_CONTROL - #2504

Closed
esatturan wants to merge 1 commit into
boykopovar:mainfrom
esatturan:fix/agc-stencil-clears
Closed

esatturan wants to merge 1 commit into
boykopovar:mainfrom
esatturan:fix/agc-stencil-clears

Conversation

@esatturan

Copy link
Copy Markdown
Contributor

Split from #2053 in review.

What

A draw with DB_RENDER_CONTROL.STENCIL_CLEAR_ENABLE threw depth/stencil clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is unsupported. It is now drawn with a stencil test that always passes and replaces with DB_STENCIL_CLEAR on both faces.

  • A partial stencil write mask (front, or back when back-face stencil is on), a read-only stencil view or a missing stencil plane throw.
  • The other DB_RENDER_CONTROL operations (depth clear, copy, resummarize, decompress) still throw.
  • Whether the hardware applies the draw's own stencil function under STENCIL_CLEAR_ENABLE, and the HTILE state a fast clear leaves, are recorded in TechnicalDebt.

PPSA29141 clears its stencil this way while Unity starts. On main with #1482, it stops with depth/stencil clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is unsupported (register 0x0 = 0x00000022).

Tested

Windows 11, i7-13650HX, RTX 4070 Laptop, MinGW-w64 GCC 15.2.

  • agc_driver_graphics: the decode of a stencil clear draw (ALWAYS and REPLACE with DB_STENCIL_CLEAR on both faces) and the three refusals. It fails on main with the error above.
  • Full ctest on current main (c6e3aa76) merged with this branch, the other LEGO Party! PRs and feat(libkernel): implement _umtx_op wait and wake operations #1482: 547/547 pass. On Windows, main's libs step currently fails with duplicate patched export name: LibwuIonIBw: feat(videoout): implement sceVideoOutGetResolutionStatus #1714 added APS5_EXPORTs for sceVideoOutAddVrrActiveStatusEvent and sceVideoOutAddVrrStatusFlagsPrivilege, whose names the NID table already maps. Those two lines were removed locally for the run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Claude Code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

intake paused Closed while PR intake is limited to authors with at least 10 PRs merged into main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant