fix(libSceAgcDriver): SPI_PS_INPUT_CNTL registers start at their clear-state value #2128
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2128"
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 MathiasDevelopes on 2026-10-09T09:40:47Z.
What
A title that never writes
SPI_PS_INPUT_CNTL_0(context register0x191) relies on its clear-state value, 0. The driver's initial context did not contain theSPI_PS_INPUT_CNTLregisters. As a result, every draw of a pixel shader with interpolants (SPI_PS_IN_CONTROL.NUM_INTERP> 0) was rejected when[DecodePixelStageInfo](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceAgcDriver/Graphics/src/ShaderInputState.cpp)read register0x191.Planet Coaster (PPSA01736) writes
SPI_PS_INPUT_CNTL_1..31(0x192..0x1b0, values 1..31) and leavesSPI_PS_INPUT_CNTL_0at its reset value. Without this change it stops at its first UI and video draws:On older main the same draws were skipped instead (
[gpu] skipped draw: AGC graphics: missing register at DWORD 0x191), and every presented frame was black.All 32
SPI_PS_INPUT_CNTLregisters (0x191..0x1b0) now start at 0 in[InitialContextRegisters](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp). The initial context andCLEAR_STATEalready share that table.Source for the value: the GFX10 clear state in amdgpu,
clearstate_gfx10.hlines 427–458. Ingfx10_SECT_CONTEXT_def_2, whose extent starts at0xa0d8,SPI_PS_INPUT_CNTL_0is entry 185. That is register0xa191, the driver's0x191. It andSPI_PS_INPUT_CNTL_1..31are all0x00000000.Tested
Windows 11, MinGW-w64 15.2.0, RTX 3060.
agc_driver_graphics_tests: a fresh queue state whose pixel stage has two interpolants and writes onlySPI_PS_INPUT_CNTL_1decodesCNTL_0as 0 andCNTL_1as written.ClearContext(CLEAR_STATE) resets all 32 to 0. Without the change, the test fails withmissing register at DWORD 0x191.tools/check_conventions.py --base origin/mainpasses.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 repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-09T09:40:52Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.