fix(diagnostics): capture failed shader preparation requests #2313
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2313"
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 JulioCacko on 2026-10-09T15:17:35Z.
What
Shader preparation failures can occur before the existing request capture point. With
APS5_DUMP_SHADERSset, serialize the failed preparation request and rethrow the original exception. Route registered compute/graphics and unregistered compute preparation through one wrapper; a failed diagnostic write must not replace the original preparation error.The regression verifies disabled capture writes nothing, enabled capture matches the complete serialized request, replay round-trips, and the original failure message is preserved. A CTest resource lock prevents the prepared-shader variants from racing on their shared diagnostic fixture filename. No proprietary shader dumps or title data are included.
Upstream's overlap tool reports nearby edits in #2257 (deferred preparation), #2261 (NGG workgroups), #2285 (draw offsets), and #2302 (user-data call targets). I inspected those patches: they implement separate behavior rather than this failure-capture wrapper. There is no functional dependency on them, but their merge order can require rebasing this PR's call sites/public declaration. This branch merges cleanly with current
main.Tested
Windows 11 x64, MinGW GCC, RelWithDebInfo, NVIDIA GeForce RTX 3070. Focused build passed;
agc_driver_prepared_shadersand its indirect/uncached/debug/debug_failure modes passed 5/5 withANYPS5_REQUIRE_VULKAN=1, no skips (each 0.45-1.13 s). The debug_failure mode passed its expected-failure check. The branch/title/body conventions check passed. Built and tested with the integrated contribution set on upstreamd70b8998; this branch contains only the diagnostic capture change and its test resource lock.Checklist
main; open-PR overlap checked before submissionImported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-09T20:00:55Z.
Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at
c079c935:/tmp/anyps5_build) with zero warnings/errors.python3 tools/check_conventions.py --base origin/main --head HEAD-> PASS (0 errors).agc_driver_prepared_shaders_debug_failure(FailureCapture). Diagnostic capture withAPS5_DUMP_SHADERS=1correctly dumps serialized.reqshader preparation files on failure for replay analysis without altering error semantics.LGTM!
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T05:18:36Z.
Conflicts with main in
ShaderRegistry.cpp; please rebase. The red build came from a main breakage that is fixed now, not from this PR.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:32:11Z.
Rebased onto current
main(conflict inShaderRegistry.cpp/Driver.hpp, as noted above).PrepareShadernow takes aShaderPreparationContext*and the unregistered/deferred branch was merged, soPrepareShaderWithDiagnosticstakes an optionalShaderPreparationContext*and forwards it; all four call sites go through it, andShaderPreparationContextis forward-declared inShaderRegistry.hpp.Checked on Linux (scoped build + ctest): all
agc_driver_prepared_shaders*pass, includingdebug_failure. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T06:34:46Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppL22-23, L180-184, L234-238core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppL22-23, L180-184, L234-238core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hppL16, L73-74core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppL179-184, L233-238