fix(agc): start the viewport control and color masks at the AGC register defaults again #20827

Merged
milescoviello merged 3 commits from upstream-pr/20827 into main 2026-11-19 02:48:01 +00:00
milescoviello commented 2026-11-15 16:16:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-15T16:16:02Z.


What

This trades one title for sixteen (see "Trade-off" below), so it needs a maintainer's decision.

Update 11-18 (after #23165): #23165 keeps a programmed viewport transform when 0x206 was never written. On current main that already turns Super Meat Boy 3D and Steins;Gate upright. MXGP 26 still terminates at 13 s on main and runs on with this PR (recheck). The other titles below were checked before #23165, so some of them may no longer need this PR.

#16053 (merged as 83d984dff5) changed three starting context registers in BuildInitialContextRegisters:

  • PA_CL_VTE_CNTL (0x206) from 0x43f to 0;
  • CB_TARGET_MASK/CB_SHADER_MASK (0x8e/0x8f) from 0 to 0xffffffff.

Since then, four titles have been bisected to that merge in its thread. Four of my own rotation titles show the same regression (second table).

title reported by effect
Kao the Kangaroo (PPSA05595) JJenkx upside down and green-tinted
GTA V (PPSA04264) rth9z upside down
AEW: Fight Forever (PPSA09351) PeterGrieffindor upside down, and stops on a "guest sampler descriptor" error
Stray (PPSA02100) yinx080 upside down, and stops on an invalid image/buffer descriptor
title main d98cbf5b3e (2 runs) this branch c4efc97014 (2 runs)
Super Meat Boy 3D (PPSA31162) upside down and washed-out green; one run never left the loading screen upright, reaches level 1 gameplay
MXGP 26 (PPSA30839) loading screen upside down, then stops at 22 s and 10 s on Rect-list SPIR-V: custom per-vertex interpolation is unsupported upright, reaches the gamma-calibration menu, runs the full 180 s
Steins;Gate Re:Boot (PPSA36591), 1 run each MAGES logo and dialogue box upside down (runs on; it reached an ending on main fbfd87889d before #16053) upright
Forspoken Mini Artbook (PPSA05999), 1 run each SQUARE ENIX logo and the next screen upside down upright

Correction (11-16): the row first listed as Forspoken (PPSA03984) was the Forspoken Mini Artbook (PPSA05999). That is the Unity art-book app that ships in the same disc folder as the game, and my 11-15 runs booted it by mistake (their logs load Unity's sharedassets). The game itself (PPSA03984-app0) renders upright on main 133feb30f0, through its new-game opening to the courtroom scene, so it isn't one of this regression's titles in the screens reached so far. The art book's before/after stands, under its own ID.

Checked on this PR by others since:

  • Formula Retro Racing – World Tour – Special Edition (PPSA17189): upside down with wrong colours on main e046f1e4ce, upright with normal colours with this PR. Windows 11, RTX 5060 Laptop, NVIDIA 617.42 (sharveshprabhu).
  • Super Meat Boy 3D (PPSA31162): flipped and green on main 22317b7339, upright with normal colours and level 1 completed with this PR. Windows 11, RX 6700 XT, AMD 26.10.1 (Feuris).
  • Mandragora: Whispers of the Witch Tree (PPSA06960): main menu upside down on main c8c044b0d8, upright with this PR, same frame rate (2 runs each). Ubuntu 26.04.1, RTX 2080 Ti, NVIDIA 595.99.02 (klosixgaming-arch).
  • Hot Wheels Infinite Rush (PPSA22408): title screen, settings and garage upside down on main e238898fc6 + #22052, upright with this PR merged too; the scripted route reaches the lit, textured garage at about 100 s instead of about 690 s, at 8.0 to 8.2 FPS over three runs. Linux 7.3, RTX 3080 Ti, NVIDIA 615.71.09 (mrfelek).
  • The Smurfs – Dreams (PPSA21607): the title prompt is upside down with a neon yellow/green wash on main e069a7562f, upright without the wash with this PR. Its state capture shows main decoding 77 of 79 draw states with PA_CL_VTE_CNTL = 0, and this PR all 79 with 0x43f. Linux 7.2, RX 6650 XT, RADV Mesa 26.2.7 (JJenkx). A follow-up with this PR reaches village gameplay upright: a loaded save, the opening cutscene skipped and the protagonist moved up the village stairs.
  • God of War Sons of Sparta (PPSA28997): title screen upside down with green and magenta colours. A --first-parent bisect from bb04a4f1ea to a6b259fd45 names 83d984dff5 (the #16053 merge) as the first bad commit, and its first parent 92b57225ac as good. Restoring the three values on main a6b259fd45, as this PR does, gives a correct title screen. Windows 11, Intel UHD Graphics 730 (josealissonbr).
  • Minecraft (PPSA17221): on main the title screen draws only the player character on black; the panorama, logo and menu are missing. A --first-parent bisect names 83d984dff5 (#16053), with its first parent 92b57225ac good. On this title only PA_CL_VTE_CNTL matters: 0x206 = 0x43f alone brings the whole menu back, and 0x8e/0x8f make no difference. Windows 11, RTX 4080 Laptop, NVIDIA 617.42 (tiny123whoop-png).
  • Octopath Traveler II (PPSA09809): traveler selection upside down and a later flat mint frame without this PR. With it, the logo, title town, map and portraits are upright, and a follow-up reaches controllable gameplay in Agnea's chapter, running at about 5 FPS. Linux, RX 6650 XT, RADV Mesa 26.2.7 (JJenkx).
  • Planet Zoo (PPSA18026): on main 28c4880966 the COBRA logo and the EULA panel are upside down, the logo's text lines and the panel's text are missing, and the photosensitivity warning is black. With this PR all of them are upright and drawn. A first-parent bisect ends at 83d984dff5 (#16053). Windows 10, RTX 5080, NVIDIA 621.14 (adam25136).
  • Hell Is Us (PPSA09259), not yet run with this PR: the logo movie plays upright, then the disclaimers, menus and gameplay are upside down on main a85640310d + #21747. Its draws decode with PA_CL_VTE_CNTL = 0 except inside the title's own context push/pop blocks, which write 0x43f. So it depends on the starting value this PR restores. Windows 11, RTX 5070 (ashwin280802, discussion #23071).

Before #16053 both worked on main: MXGP ran 601 s on 3b7f31fa70 on 11-12, and SMB3D reached level 1 on b8194198cf on 11-10. Frames are linked under Tested.

What the reporters' experiments show:

  • Orientation follows 0x206 alone. Setting only {0x206, 0x43f} turns each picture upright (JJenkx, PeterGrieffindor, yinx080). All three call that edit a diagnostic rather than a fix.
  • AEW's stop follows the colour masks. With 0x206 restored, AEW still stops. With 0x206 plus 0x8e/0x8f at 0, it runs past 240 s, like the parent commit (PeterGrieffindor).
  • Not separated for the other stops. Stray reaches its world with all of #16053 reverted but still stops with only 0x206 restored. yinx080 did not test the masks on their own, so Stray's stop is not shown to follow them. Kao's later stop is the sRGB degamma refusal that #20728 addresses.

What this changes

  • The three starting values go back to 0x43f, 0 and 0.
  • Those are the values in every public AGC register-default table (V0, V4, V5 and V7-V11, agcPublicRegDefaults*Tbl0Regs: {0x0206, 0x0000043f}, {0x008e, 0}, {0x008f, 0}). InitDefaultCxState in libSceAgc builds its default context state from the same public table.
  • The internal tables don't contradict this. agcInternalRegDefaults*Tbl1Regs is the shader-register bank, so its {0x0206, 0} is a different register (correction from JJenkx below), and the internal context-bank lists (Tbl0) have no 0x206 entry. Neither table is a console measurement.
  • The rest of #16053 is kept. A title that explicitly writes PA_CL_VTE_CNTL = 0 still decodes, with a viewport covering its render target, and drawCovers/DrawRejection still accept it.

Trade-off (unresolved)
#16053 was itself made for PPSA30528. Its body says that with the old values, the title's first draws decoded a (-1,-1) 2×2 viewport from registers it never wrote, every draw was rejected, and the window was black. With #16053, it renders its loading screen. This PR restores those old values, so it will very likely re-break PPSA30528. I don't have PPSA30528 and have not run it.

The evidence suggests both sides are right for their own titles:

  • PPSA30528 relies on the hardware reset values: it never programs these registers.
  • AEW and the others rely on the public default state. PeterGrieffindor's trace shows AEW wrapping about 5,600 passes in CONTEXT_STATE operation 3 (push, then clear).

PeterGrieffindor tested a split on AEW (comment below): a fresh queue at #16053's values, with CLEAR_STATE/operation 3 restoring 0x43f and 0. It does not work. AEW stays upside down and tinted, because its picture is drawn in the context it pops back to, which is never cleared. So the fresh-queue 0x206 alone decides orientation, and the two sides disagree on exactly that one register. Masks of 0 after a clear avoid AEW's stop; the fresh-queue masks made no difference there.

PeterGrieffindor also confirmed this branch on AEW: upright, colours right, and running past 240 s on two runs. Until it is known what PPSA30528 does differently before its first draws (asked on this PR), this keeps the previous values, which sixteen titles need.

The four reports above are the reporters' evidence, linked from the #16053 thread. I have run neither those four titles nor PPSA30528. The SMB3D and MXGP results are mine.

Tested

Linux (Ubuntu 26.04.1), GCC 15.2, Release, RTX 4070 Ti (NVIDIA 615.71.09).

  • All 56 tests built from agc_driver_graphics_tests, agc_driver_pm4_tests and agc_gcn_color_target_tests pass, including InitialContextTests with the updated checks.
  • Merge checks:
    • git merge-tree against main is clean.
    • I checked the 59 open PRs that touch Execution/include/QueueState.hpp or tests/Graphics.cpp. Against each, this branch produces the same number of conflicts that PR already has against main, so it adds none.
  • Title A/B: main d98cbf5b3e against this branch, the only difference being these three values.
    • Release libs, scripted presses on :0, 180 s per run.
    • Two rounds: main first, then this branch first.
    • Super Meat Boy 3D and MXGP 26 (with APS5_NET_DISCONNECTED=1). Results are in the second table above.
    • Frame dumps are in release pr20827-ab-d98cbf5b3e.
  • tools/check_conventions.py passes on the branch and this body. tools/debt_fold.py --check passes with the fragment applied.

Correction (11-16, 8:40 PM PT) on Borderlands 4 (PPSA01494): I first wrote that this PR takes BL4 past its 81 s rect-list stop on main 459f4f8c22. It doesn't.

  • In that run (main 459f4f8c22 + this PR), BL4 never reached the screen where main stops: it hung during the Borderlands logo and ended at UE's RenderThread watchdog at 174 s, and its log has no rect-list refusal.
  • The refusal itself is fixed by #22052.
  • With #22052 and this PR together (47aed6fbad = main b412486d3e + both), BL4 reached its first-run Accessibility screen fully drawn in 2 of 3 runs. The other run hung at the logo (196 s) the same way.
  • With #22052 alone, the same screen draws only faint outlines (4 runs, none hung).

So for BL4 this PR fixes the UI drawing, as it does for the other titles here, but not the rect-list stop. The queue 0x20 WAIT_REG_MEM / RenderThread hang showed in 2 of 4 runs with this PR and 0 of 4 without. That hang has also shown up on main before #16053, so these counts don't pin it on this change. Frames: release bl4-22052-20827-ab.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
  • Fixes: none (the regression is reported on #16053)
  • Unblocks: PPSA30839 (on main 973026d9b0 MXGP 26 terminates at 13 s on the Rect-list error; with this PR it runs on to the MyNacon welcome screen, see the 11-18 recheck linked above; for PPSA01494 see the 11-16 correction under Tested)
  • GPUs tested: NVIDIA RTX 4070 Ti (615.71.09), Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5324634578 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20827). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-11-15T16:16:02Z. --- ### What **This trades one title for sixteen (see "Trade-off" below), so it needs a maintainer's decision.** **Update 11-18 (after #23165):** #23165 keeps a programmed viewport transform when `0x206` was never written. On current `main` that already turns Super Meat Boy 3D and Steins;Gate upright. MXGP 26 still terminates at 13 s on `main` and runs on with this PR ([recheck](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6995930898)). The other titles below were checked before #23165, so some of them may no longer need this PR. #16053 (merged as 83d984dff5) changed three starting context registers in `BuildInitialContextRegisters`: - `PA_CL_VTE_CNTL` (`0x206`) from 0x43f to 0; - `CB_TARGET_MASK`/`CB_SHADER_MASK` (`0x8e`/`0x8f`) from 0 to 0xffffffff. Since then, four titles have been bisected to that merge in its thread. Four of my own rotation titles show the same regression (second table). | title | reported by | effect | |---|---|---| | Kao the Kangaroo (PPSA05595) | JJenkx | upside down and green-tinted | | GTA V (PPSA04264) | rth9z | upside down | | AEW: Fight Forever (PPSA09351) | PeterGrieffindor | upside down, and stops on a "guest sampler descriptor" error | | Stray (PPSA02100) | yinx080 | upside down, and stops on an invalid image/buffer descriptor | | title | `main` d98cbf5b3e (2 runs) | this branch c4efc97014 (2 runs) | |---|---|---| | Super Meat Boy 3D (PPSA31162) | upside down and washed-out green; one run never left the loading screen | upright, reaches level 1 gameplay | | MXGP 26 (PPSA30839) | loading screen upside down, then stops at 22 s and 10 s on `Rect-list SPIR-V: custom per-vertex interpolation is unsupported` | upright, reaches the gamma-calibration menu, runs the full 180 s | | Steins;Gate Re:Boot (PPSA36591), 1 run each | MAGES logo and dialogue box upside down (runs on; it reached an ending on `main` fbfd87889d before #16053) | upright | | Forspoken Mini Artbook (PPSA05999), 1 run each | SQUARE ENIX logo and the next screen upside down | upright | **Correction (11-16):** the row first listed as Forspoken (PPSA03984) was the Forspoken Mini Artbook (PPSA05999). That is the Unity art-book app that ships in the same disc folder as the game, and my 11-15 runs booted it by mistake (their logs load Unity's `sharedassets`). The game itself (`PPSA03984-app0`) renders upright on `main` `133feb30f0`, through its new-game opening to the courtroom scene, so it isn't one of this regression's titles in the screens reached so far. The art book's before/after stands, under its own ID. Checked on this PR by others since: - **Formula Retro Racing – World Tour – Special Edition (PPSA17189):** upside down with wrong colours on `main` e046f1e4ce, upright with normal colours with this PR. Windows 11, RTX 5060 Laptop, NVIDIA 617.42 (sharveshprabhu). - **Super Meat Boy 3D (PPSA31162):** flipped and green on `main` 22317b7339, upright with normal colours and level 1 completed with this PR. Windows 11, RX 6700 XT, AMD 26.10.1 (Feuris). - **Mandragora: Whispers of the Witch Tree (PPSA06960):** main menu upside down on `main` c8c044b0d8, upright with this PR, same frame rate (2 runs each). Ubuntu 26.04.1, RTX 2080 Ti, NVIDIA 595.99.02 (klosixgaming-arch). - **Hot Wheels Infinite Rush (PPSA22408):** title screen, settings and garage upside down on `main` e238898fc6 + #22052, upright with this PR merged too; the scripted route reaches the lit, textured garage at about 100 s instead of about 690 s, at 8.0 to 8.2 FPS over three runs. Linux 7.3, RTX 3080 Ti, NVIDIA 615.71.09 ([mrfelek](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6972958053)). - **The Smurfs – Dreams (PPSA21607):** the title prompt is upside down with a neon yellow/green wash on `main` e069a7562f, upright without the wash with this PR. Its state capture shows `main` decoding 77 of 79 draw states with `PA_CL_VTE_CNTL = 0`, and this PR all 79 with 0x43f. Linux 7.2, RX 6650 XT, RADV Mesa 26.2.7 ([JJenkx](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6973917606)). A [follow-up](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6975759916) with this PR reaches village gameplay upright: a loaded save, the opening cutscene skipped and the protagonist moved up the village stairs. - **God of War Sons of Sparta (PPSA28997):** title screen upside down with green and magenta colours. A `--first-parent` bisect from bb04a4f1ea to a6b259fd45 names 83d984dff5 (the #16053 merge) as the first bad commit, and its first parent 92b57225ac as good. Restoring the three values on `main` a6b259fd45, as this PR does, gives a correct title screen. Windows 11, Intel UHD Graphics 730 ([josealissonbr](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6981154164)). - **Minecraft (PPSA17221):** on `main` the title screen draws only the player character on black; the panorama, logo and menu are missing. A `--first-parent` bisect names 83d984dff5 (#16053), with its first parent 92b57225ac good. On this title only `PA_CL_VTE_CNTL` matters: `0x206` = 0x43f alone brings the whole menu back, and `0x8e`/`0x8f` make no difference. Windows 11, RTX 4080 Laptop, NVIDIA 617.42 ([tiny123whoop-png](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6983907425)). - **Octopath Traveler II (PPSA09809):** traveler selection upside down and a later flat mint frame without this PR. With it, the logo, title town, map and portraits are upright, and a [follow-up](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6984828446) reaches controllable gameplay in Agnea's chapter, running at about 5 FPS. Linux, RX 6650 XT, RADV Mesa 26.2.7 ([JJenkx](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6984113822)). - **Planet Zoo (PPSA18026):** on `main` 28c4880966 the COBRA logo and the EULA panel are upside down, the logo's text lines and the panel's text are missing, and the photosensitivity warning is black. With this PR all of them are upright and drawn. A first-parent bisect ends at 83d984dff5 (#16053). Windows 10, RTX 5080, NVIDIA 621.14 ([adam25136](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6984164082)). - **Hell Is Us (PPSA09259), not yet run with this PR:** the logo movie plays upright, then the disclaimers, menus and gameplay are upside down on `main` a85640310d6 + #21747. Its draws decode with `PA_CL_VTE_CNTL` = 0 except inside the title's own context push/pop blocks, which write 0x43f. So it depends on the starting value this PR restores. Windows 11, RTX 5070 ([ashwin280802](https://github.com/boykopovar/AnyPS5/pull/20827#issuecomment-6989174067), discussion #23071). Before #16053 both worked on `main`: MXGP ran 601 s on 3b7f31fa70 on 11-12, and SMB3D reached level 1 on b8194198cf on 11-10. Frames are linked under Tested. What the reporters' experiments show: - **Orientation follows `0x206` alone.** Setting only `{0x206, 0x43f}` turns each picture upright (JJenkx, PeterGrieffindor, yinx080). All three call that edit a diagnostic rather than a fix. - **AEW's stop follows the colour masks.** With `0x206` restored, AEW still stops. With `0x206` plus `0x8e`/`0x8f` at 0, it runs past 240 s, like the parent commit (PeterGrieffindor). - **Not separated for the other stops.** Stray reaches its world with all of #16053 reverted but still stops with only `0x206` restored. yinx080 did not test the masks on their own, so Stray's stop is not shown to follow them. Kao's later stop is the sRGB degamma refusal that #20728 addresses. **What this changes** - The three starting values go back to 0x43f, 0 and 0. - Those are the values in every public AGC [register-default table](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceAgc/Command/include/RegisterDefaultsData.hpp) (V0, V4, V5 and V7-V11, `agcPublicRegDefaults*Tbl0Regs`: `{0x0206, 0x0000043f}`, `{0x008e, 0}`, `{0x008f, 0}`). `InitDefaultCxState` in libSceAgc builds its default context state from the same public table. - The internal tables don't contradict this. `agcInternalRegDefaults*Tbl1Regs` is the shader-register bank, so its `{0x0206, 0}` is a different register (correction from JJenkx below), and the internal context-bank lists (`Tbl0`) have no `0x206` entry. Neither table is a console measurement. - The rest of #16053 is kept. A title that explicitly writes `PA_CL_VTE_CNTL = 0` still decodes, with a viewport covering its render target, and `drawCovers`/`DrawRejection` still accept it. **Trade-off (unresolved)** #16053 was itself made for PPSA30528. Its body says that with the old values, the title's first draws decoded a (-1,-1) 2×2 viewport from registers it never wrote, every draw was rejected, and the window was black. With #16053, it renders its loading screen. This PR restores those old values, so it will very likely re-break PPSA30528. I don't have PPSA30528 and have not run it. The evidence suggests both sides are right for their own titles: - PPSA30528 relies on the hardware reset values: it never programs these registers. - AEW and the others rely on the public default state. PeterGrieffindor's trace shows AEW wrapping about 5,600 passes in `CONTEXT_STATE` operation 3 (push, then clear). PeterGrieffindor tested a split on AEW (comment below): a fresh queue at #16053's values, with `CLEAR_STATE`/operation 3 restoring 0x43f and 0. It does not work. AEW stays upside down and tinted, because its picture is drawn in the context it pops back to, which is never cleared. So the fresh-queue `0x206` alone decides orientation, and the two sides disagree on exactly that one register. Masks of 0 after a clear avoid AEW's stop; the fresh-queue masks made no difference there. PeterGrieffindor also confirmed this branch on AEW: upright, colours right, and running past 240 s on two runs. Until it is known what PPSA30528 does differently before its first draws (asked on this PR), this keeps the previous values, which sixteen titles need. The four reports above are the reporters' evidence, linked from the #16053 thread. I have run neither those four titles nor PPSA30528. The SMB3D and MXGP results are mine. ### Tested Linux (Ubuntu 26.04.1), GCC 15.2, Release, RTX 4070 Ti (NVIDIA 615.71.09). - All 56 tests built from `agc_driver_graphics_tests`, `agc_driver_pm4_tests` and `agc_gcn_color_target_tests` pass, including `InitialContextTests` with the updated checks. - Merge checks: - `git merge-tree` against `main` is clean. - I checked the 59 open PRs that touch `Execution/include/QueueState.hpp` or `tests/Graphics.cpp`. Against each, this branch produces the same number of conflicts that PR already has against `main`, so it adds none. - Title A/B: `main` d98cbf5b3e against this branch, the only difference being these three values. - Release libs, scripted presses on `:0`, 180 s per run. - Two rounds: `main` first, then this branch first. - Super Meat Boy 3D and MXGP 26 (with `APS5_NET_DISCONNECTED=1`). Results are in the second table above. - Frame dumps are in [release pr20827-ab-d98cbf5b3e](https://github.com/milescoviello/AnyPS5/releases/tag/pr20827-ab-d98cbf5b3e). - `tools/check_conventions.py` passes on the branch and this body. `tools/debt_fold.py --check` passes with the fragment applied. **Correction (11-16, 8:40 PM PT) on Borderlands 4 (PPSA01494):** I first wrote that this PR takes BL4 past its 81 s rect-list stop on `main` 459f4f8c22. It doesn't. - In that run (main 459f4f8c22 + this PR), BL4 never reached the screen where `main` stops: it hung during the Borderlands logo and ended at UE's RenderThread watchdog at 174 s, and its log has no rect-list refusal. - The refusal itself is fixed by #22052. - With #22052 and this PR together (47aed6fbad = `main` b412486d3e + both), BL4 reached its first-run Accessibility screen fully drawn in 2 of 3 runs. The other run hung at the logo (196 s) the same way. - With #22052 alone, the same screen draws only faint outlines (4 runs, none hung). So for BL4 this PR fixes the UI drawing, as it does for the other titles here, but not the rect-list stop. The queue `0x20` WAIT_REG_MEM / RenderThread hang showed in 2 of 4 runs with this PR and 0 of 4 without. That hang has also shown up on `main` before #16053, so these counts don't pin it on this change. Frames: [release bl4-22052-20827-ab](https://github.com/milescoviello/AnyPS5/releases/tag/bl4-22052-20827-ab). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none (the regression is reported on #16053) - [x] Unblocks: PPSA30839 (on `main` `973026d9b0` MXGP 26 terminates at 13 s on the Rect-list error; with this PR it runs on to the MyNacon welcome screen, see the 11-18 recheck linked above; for PPSA01494 see the 11-16 correction under Tested) - [x] GPUs tested: NVIDIA RTX 4070 Ti (615.71.09), Linux - [x] AI-assisted: yes
MarcZX10 commented 2026-11-16 18:55:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T18:55:40Z.

Review: COMMENTED


Reviewed — comments

The review covers the changed implementation, tests, and debt entry at head c4efc97014b11d30b5c61e1790759d543da7781f; no verified blocking defect was found, but the title-specific trade-off remains unresolved.

What I ran

Read the prepared description, commit summary, manifest, diff, the full text of the included changed files, and targeted source context through repo_read.py. No build or tests were run. Author-reported test and title results were not independently verified.

Results

Check Result Note
Changed implementation and tests passed Targeted source reviewed
Build and automated tests not run Author reports 56 tests pass
Reported title behavior not run Hardware runs are author or reporter evidence

Findings

Blocking

None.

Non-blocking

  • The change restores PA_CL_VTE_CNTL to 0x43f for both initial and cleared context. The description says this likely re-breaks PPSA30528, while the proposed fix for its first draws remains unknown. Consider documenting or tracking the title-specific resolution before treating the conflicting defaults as settled. Changed line: core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp:223.
  • The test now asserts 0x43f and zero masks as defaults, but does not verify the claimed public SDK default tables in a test. The description and debt entry report that source comparison; it was not independently established by the targeted search. Changed lines: core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:5854 and core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:5855.

Not verified

No build, automated test suite, physical-console run, title A/B, or merge check was performed. PPSA30528 behavior was not tested. core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was not read in full; only the changed test and nearby context were read. The review bundle listed three changed files: QueueState.hpp, Graphics.cpp, and fix-agc-restore-initial-viewport-and-masks.md; all changed lines were inspected, and full text was available and read for the first and third files. No excluded-file list was available in the prepared bundle.

To get this to a good state

Nothing is required. Optional: resolve or track the PPSA30528 trade-off, and consider adding a test that ties the asserted defaults to the SDK table source.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5925650909 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20827#pullrequestreview-5925650909). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-16T18:55:40Z. **Review:** COMMENTED --- # Reviewed — comments The review covers the changed implementation, tests, and debt entry at head `c4efc97014b11d30b5c61e1790759d543da7781f`; no verified blocking defect was found, but the title-specific trade-off remains unresolved. ## What I ran Read the prepared description, commit summary, manifest, diff, the full text of the included changed files, and targeted source context through `repo_read.py`. No build or tests were run. Author-reported test and title results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed implementation and tests | passed | Targeted source reviewed | | Build and automated tests | not run | Author reports 56 tests pass | | Reported title behavior | not run | Hardware runs are author or reporter evidence | ## Findings ### Blocking None. ### Non-blocking - The change restores `PA_CL_VTE_CNTL` to `0x43f` for both initial and cleared context. The description says this likely re-breaks PPSA30528, while the proposed fix for its first draws remains unknown. Consider documenting or tracking the title-specific resolution before treating the conflicting defaults as settled. Changed line: `core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp:223`. - The test now asserts `0x43f` and zero masks as defaults, but does not verify the claimed public SDK default tables in a test. The description and debt entry report that source comparison; it was not independently established by the targeted search. Changed lines: `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:5854` and `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp:5855`. ## Not verified No build, automated test suite, physical-console run, title A/B, or merge check was performed. PPSA30528 behavior was not tested. `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` was not read in full; only the changed test and nearby context were read. The review bundle listed three changed files: `QueueState.hpp`, `Graphics.cpp`, and `fix-agc-restore-initial-viewport-and-masks.md`; all changed lines were inspected, and full text was available and read for the first and third files. No excluded-file list was available in the prepared bundle. ## To get this to a good state Nothing is required. Optional: resolve or track the PPSA30528 trade-off, and consider adding a test that ties the asserted defaults to the SDK table source.
MarcZX10 commented 2026-11-18 21:48:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T21:48:05Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the inspected implementation restores the stated context defaults and retains handling for draws that explicitly set the viewport control to zero.

What I ran

Reviewed head 35d32085ec1b20d48417f0a85939e9094a29e097 using the pinned repo_read.py reader. No tests or builds were run. The description reports passing tests and title runs; those results were not independently run here.

Results

Check Result Note
Diff and context review passed Defaults and relevant decode paths inspected
Tests and build not run Author-reported results only
Hardware behavior not run Title outcomes not independently verified

Findings

Blocking

None.

Non-blocking

None.

Not verified

core/libs/prx/libSceAgcDriver/tests/Graphics.cpp was excluded from the review folder because it was too large; its changed lines were inspected in the diff but its full text was not read. The description's test runs, title comparisons, and console default claims were not independently verified. Other files listed as reviewed in the manifest were read: core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp and docs/dev/debt/changes/fix-agc-restore-initial-viewport-and-masks.md.

To get this to a good state

Nothing is required. Optional: retain the reported before-and-after title evidence and investigate the stated PPSA30528 trade-off.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5965711282 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20827#pullrequestreview-5965711282). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-18T21:48:05Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the inspected implementation restores the stated context defaults and retains handling for draws that explicitly set the viewport control to zero. ## What I ran Reviewed head `35d32085ec1b20d48417f0a85939e9094a29e097` using the pinned `repo_read.py` reader. No tests or builds were run. The description reports passing tests and title runs; those results were not independently run here. ## Results | Check | Result | Note | |---|---|---| | Diff and context review | passed | Defaults and relevant decode paths inspected | | Tests and build | not run | Author-reported results only | | Hardware behavior | not run | Title outcomes not independently verified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` was excluded from the review folder because it was too large; its changed lines were inspected in the diff but its full text was not read. The description's test runs, title comparisons, and console default claims were not independently verified. Other files listed as reviewed in the manifest were read: `core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp` and `docs/dev/debt/changes/fix-agc-restore-initial-viewport-and-masks.md`. ## To get this to a good state Nothing is required. Optional: retain the reported before-and-after title evidence and investigate the stated PPSA30528 trade-off.
MarcZX10 commented 2026-11-19 00:44:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T00:44:16Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change based on the source inspected; the author-reported title results are not independently verified here.

What I ran

Reviewed head 24d0aa66ef5275df64dd63425ea18ac4445fe899. I read description.md, commits.md, manifest.json, diff.patch, the full changed QueueState.hpp, the changed debt fragment, and the changed test ranges in Graphics.cpp. Graphics.cpp was excluded from the review folder because it was too large, so I read its relevant changed ranges through repo_read.py. files.json was not available through the reader. No commands or tests were run.

Results

Check Result Note
Source review passed Changed defaults and context reset path inspected
Tests not run No local test execution
Title behavior not run Results in description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the test suite or independently reproduce any title results. The description notes that PPSA30528 may regress; that title was not available for verification. files.json could not be read, so I cannot confirm its reviewed/excluded categorization beyond the manifest provided. No files are claimed missing.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5967555819 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/20827#pullrequestreview-5967555819). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T00:44:16Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change based on the source inspected; the author-reported title results are not independently verified here. ## What I ran Reviewed head `24d0aa66ef5275df64dd63425ea18ac4445fe899`. I read `description.md`, `commits.md`, `manifest.json`, `diff.patch`, the full changed `QueueState.hpp`, the changed debt fragment, and the changed test ranges in `Graphics.cpp`. `Graphics.cpp` was excluded from the review folder because it was too large, so I read its relevant changed ranges through `repo_read.py`. `files.json` was not available through the reader. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed defaults and context reset path inspected | | Tests | not run | No local test execution | | Title behavior | not run | Results in description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run the test suite or independently reproduce any title results. The description notes that PPSA30528 may regress; that title was not available for verification. `files.json` could not be read, so I cannot confirm its reviewed/excluded categorization beyond the manifest provided. No files are claimed missing. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!20827
No description provided.