Skip to content

fix(agc): overestimate single-sample draws with centroid inputs - #6464

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
AymanFE:claude/project-thread-d8qx30
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
AymanFE:claude/project-thread-d8qx30

Conversation

@AymanFE

@AymanFE AymanFE commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Requested by Ayman

What

ASTRO BOT (PPSA21564 01.007.000) stops in its first level, Sky Garden, a few minutes after the player starts walking. On current main it stops at:

[gpu] driver failure: AGC graphics: conservative rasterization with centroid interpolation is unsupported

followed by terminate called after throwing an instance of 'std::runtime_error' from the next sceAgcDcbSetFlip.

The draw sets PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 0x6001 with SPI_PS_INPUT_ENA.PERSP_CENTROID or LINEAR_CENTROID, and decodeConservativeRasterization refused centroid inputs for every sample count. With PA_SC_AA_CONFIG.MSAA_NUM_SAMPLES 0 the one rasterized sample is the pixel centre, and the recompiler already gives the centroid pairs the pixel-centre barycentrics (docs/dev/debt/shader.md), so the draw now decodes to overestimation. More rasterized samples, and a single-sample draw raised to a multisampled color target, still throw, each with its own message. The inference is recorded in docs/dev/debt/libSceAgcDriver.md.

Tested

  • agc_driver_graphics_tests (Linux): ConservativeRasterizationTests now decodes centroid inputs at one rasterized sample and expects the two remaining throws. On main the test fails with AGC graphics: conservative rasterization with centroid interpolation is unsupported; with this change it passes.
  • ASTRO BOT 01.007.000 on Windows 11, NVIDIA GeForce RTX 5070 Ti, from the same save and route (Sky Garden, walking the first path): main (8856f18) stopped with the line above 4.3 minutes into the walk; with this change (on 92e5041) the walk went on for 9.2 minutes, past the first enemies onto the stone platforms, with no throw, assert or abort, until the window was closed (exit code 0).

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 under Silent stubs in their library's technical debt file
  • 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
  • Unblocks: PPSA21564 (ASTRO BOT), first level
  • GPUs tested: GPU tests not run; the change is in state decoding, covered by the CPU-only agc_driver_graphics_tests. The game run above used an NVIDIA GeForce RTX 5070 Ti on Windows 11
  • AI-assisted: yes

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJ3RTcWpqBBdVE8QRtKxJD

A draw with PA_SC_CONSERVATIVE_RASTERIZATION_CNTL 0x6001 and
SPI_PS_INPUT_ENA.PERSP_CENTROID or LINEAR_CENTROID threw in DecodeState,
whatever its rasterized sample count. With PA_SC_AA_CONFIG.MSAA_NUM_SAMPLES
0 the single rasterized sample is the pixel centre, which is where the
recompiler already puts the centroid barycentrics, so such a draw now
decodes to overestimation. More rasterized samples, and a single-sample
draw raised to a multisampled color target, still throw.

Extends agc_driver_graphics and records the inference in the driver's
technical debt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJ3RTcWpqBBdVE8QRtKxJD
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6312 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6454 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6457 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6472 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6479 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6498 docs/dev/debt/libSceAgcDriver.md
PR 6529 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6543 docs/dev/debt/libSceAgcDriver.md
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6549 docs/dev/debt/libSceAgcDriver.md
PR 6563 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6612 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6730 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6941 docs/dev/debt/libSceAgcDriver.md
PR 6946 docs/dev/debt/libSceAgcDriver.md
PR 6947 docs/dev/debt/libSceAgcDriver.md
PR 6970 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7008 docs/dev/debt/libSceAgcDriver.md
PR 7154 docs/dev/debt/libSceAgcDriver.md
PR 7250 docs/dev/debt/libSceAgcDriver.md
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7258 docs/dev/debt/libSceAgcDriver.md
PR 7390 docs/dev/debt/libSceAgcDriver.md
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md

@mrfelek

mrfelek commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Astro Bot (PPSA21564) on Linux (RTX 3080 Ti, NVIDIA 615.71.09): without this PR, Sky Garden stops after about 8 minutes on AGC graphics: conservative rasterization with centroid interpolation is unsupported. With this PR, 40 minutes in the same level with no stop (build main 44df21632 + #5390 + #5998 + #5997 + #6492 + #6465, merged with this head 76cc70c24).

AI-assisted: this comment was drafted with the help of Claude Code and checked against the logs by us.

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@adriadam10
adriadam10 merged commit 12c1d18 into boykopovar:main Oct 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants