fix(agc): skip registration-time preparation for unsupported shader types #1893
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1893"
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 fisherjoey on 2026-10-08T22:51:19Z.
Closes #1892
What
PrepareRegisteredthrowsAGC driver: unsupported registered shader typefor anyShader::typeoutside 0, 1, 2, 4, 5, 6 and 7. Since #639 it runs for everyRegisterShader, so one unknown type ends the run. Stray (PPSA02100, Unreal Engine 4) registers 13 shaders of type 8 at start-up. They have noSPI_SHADER_PGM_*registers and are never used by a draw or dispatch.With this change:
Shader 0x… has unsupported registered shader type N; it is not prepared at registration) and no artifact is prepared.AGC driver: unsupported registered shader type N.Tested
Linux (Nobara 44, GCC), RTX 5070 Ti, NVIDIA 595.91.07.
New check
UnsupportedTypeRegistration()intests/execution/PreparedShaders.cpp. It registers a type 8 header with Stray's sh register table twice, and runs in everyagc_driver_prepared_shadersmode.ctest -R agc_driver_prepared_shadersmain1be6f9f1+ the test onlyagc_driver_prepared_shaders,_indirect,_uncached,_debug) withAGC driver: unsupported registered shader type._debug_failurepasses, as it expects a failure.Stray on
main+ #861 + #1836: without this change it aborts at start-up with the error above. With it, all 13 type 8 registrations are skipped and the title reaches its window. It then stops on a separate, unrelated error.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-09T10:37:53Z.
Another title that needs this: Rise of the Ronin (PPSA04540).
Setup: Linux, RX 9070 XT (RADV). Base is
main43972e69+ #1836 + #1837 + #2105 + #2153, plus local throwing placeholders for imports the title never calls in these runs.AGC driver: unsupported registered shader type.Shader ... has unsupported registered shader type 8; it is not prepared at registrationfor its type 8 shaders. The title goes on to a later, unrelated stop at about 4 min 40 s (NGS2: system option flags are not implemented).Tested and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:23:14Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
21612855, merged ontomaind70b8998in one build with 33 other AGC/shader PRs that had no Windows run.agc_driver_prepared_shaders,agc_driver_prepared_shaders_indirect,agc_driver_prepared_shaders_uncached,agc_driver_prepared_shaders_debug,agc_driver_prepared_shaders_debug_failure. None of them reported skipping a case.PATHsetup.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-10T00:52:24Z.
A third title, with a different type: 007 First Light (PPSA11386 v01.018.000) on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1), RTX 3080 (NVIDIA 615.71.09). Base is
main58706dc2(carried in by #2500's branch) plus the PRs that get the title this far: SleglJan/AnyPS5#15 to #21, #1964, #2282, #2327, #2347, #2471, #2480, #2500 (the last three closed by the intake pause) and #1184'sResourceTracker.cppchange.AGC driver: unsupported registered shader type. With it (21612855), 10 of the 581 registered shaders are logged asShader 0x… has unsupported registered shader type 3; it is not prepared at registration, and start-up goes on to at least 725 shader-cache writes and an unrelated recompiler stop (GetSamplerResource dword 3 is not a valid runtime value; chain: BitReverse32(Immediate)).APS5_TRACE_SHADER_REGS=alllists sh registers 0x148/0x149, 0x10a/0x10b and 0x100 (twice), plus context registers 0x286, 0x287, 0x2d6 and 0x2db; 0x148/0x149 and 0x10b are whatPrepareRegisteredreads for type 5. So for type 3 the skip may only defer a failure to the first use of these shaders. Neither run gets far enough to show what happens then.AI-assisted: yes (Claude Code)