fix(agc): SPI_PS_INPUT_ENA/ADDR start at their reset value #1178
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1178"
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 MichonGoddijn231849 on 2026-10-07T16:44:23Z.
What
A context that never wrote SPI_PS_INPUT_ENA or SPI_PS_INPUT_ADDR after CLEAR_STATE reads them as zero, like the hardware, instead of refusing the draw for a missing register. GTA V does this for a depth-only draw whose pixel shader takes no inputs.
Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB, MinGW-w64 GCC 15.2.0.
gta-v/testingbranch (Performance mode, the prologue).ctestpasses. Not run here: the relinker's Python tests (my local Python does not find their helper modules) andguest_gameupdate.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 (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by orbz22 on 2026-10-08T03:15:49Z.
Tested with Astro's Playroom (PPSA01325) on Windows 11 (RTX 3060 Laptop, WinLibs GCC 15.2.0 r7), on a local branch that also carries #283, #285, #425, #570, #759, #903 and #1072.
Without this change, 5 draws per frame are refused with
missing register at DWORD 0x1b3: 2230 refusals over 445 presents, all with color target 0 and mask 0. With it, I counted 0 refusals over 506 presents:depth/stencil clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is unsupported (register 0x0 = 0x00000002). 0x2 is the stencil clear bit, which is the case #1395 handles. This change does not cover it.No other draw failures appeared, and the frame dumps through the intro look the same as before.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T08:48:17Z.
Checked: build + full ctest green on current main + this PR; the change matches the CLEAR_STATE reset list (0x1b3/0x1b4 = 0), and the existing tests that erase 0x1b3 explicitly still require the rejection for a real pixel program.
The PR had no test, so I added one commit pinning it:
Submit.cppchecks that CLEAR_STATE leaves SPI_PS_INPUT_ENA/ADDR present and 0 (fails without the change, passes with it). Merging once CI is green on the new head.