Skip to content

fix(agc): defer Windows exceptions during shader preparation - #8592

Closed
gohansharma79-svg wants to merge 2 commits into
boykopovar:mainfrom
gohansharma79-svg:fix/shader-signal-deferral-20261020
Closed

gohansharma79-svg wants to merge 2 commits into
boykopovar:mainfrom
gohansharma79-svg:fix/shader-signal-deferral-20261020

Conversation

@gohansharma79-svg

@gohansharma79-svg gohansharma79-svg commented Oct 20, 2026 •

Copy link
Copy Markdown

What

Prevent redirected Windows guest exceptions from entering a handler while the target is acquiring or holding a shader preparation transaction. A handler that prepares shaders can otherwise wait on a writer mutex held by the thread it interrupted. Defer delivery through acquisition and the full transaction lifetime, release staged state before ending deferral, and preserve nesting when a native thread is adopted by scePthreadSelf.

Resubmits #7686, which was closed automatically by the open-PR limit before #7680 merged. The original prerequisite #7652 has also merged. This branch contains only the follow-up fix on current main, preserving main's newer running-code classification and deferred image classification outside the suspended-thread interval.

This is a host deadlock correction. No gameplay FPS improvement is claimed. The existing one-second retry limit remains and throws if a target remains in a protected scope; other host locks and POSIX delivery are outside this change, recorded in the AGC debt file.

Overlap scan: #8512 has merged. This branch incorporates its 50 ms host-code deadline while retaining the one-second limit for protected shader scopes. #8539 also changes the delivery condition, without adding shader-transaction deferral; if merged subsequently it must preserve the guard. #8224 edits the adjacent strided-buffer debt note, unrelated to this fix. Older already-conflicted PRs also share files, as reported by the overlap tool; this is not a claim that those PRs merge cleanly together.

Tested

Windows 11 x64, Ryzen 7 5800X, GCC 15.2 / MinGW, Release, ANYPS5_ENABLE_SPIRV_TOOLS=OFF.

  • Historical validation of the original fix from fix(agc): defer Windows exceptions during shader preparation #7686: the baseline owner assertion fails; owner, writer-waiter and native-thread-adoption cases pass with the fix, including ten repeated runs. Ten focused exception, shader publication and draw-cache tests passed. A control retaining fix(libkernel): redirect a raise only once the target leaves host code #7652 while disabling only the new deferral check fails; restoring the check passes.
  • Resubmission is refreshed through main b85d972f42; candidate head 16dab33e38. Conventions and whitespace checks pass. Fresh runtime validation after resolving the fix(libkernel): bound the raise wait on host code to 50 ms #8512 merge conflict: main b85d972f42 passes 5/5 focused Vulkan tests; candidate 16dab33e38 passes all 10 focused shader-deferral, exception, prepared-publication and draw-cache tests. Both used the same machine and validation-layer settings; no new VUID- diagnostics and no missing-layer messages were found. The earlier resubmission head also passed 10/10 on recheck (16.03 s).
  • Matched GPU tests used the same RTX 4070 SUPER with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and the official Khronos Windows x64 validation artifact from main commit aea761f4d54b86682be4099c428dba27b6609940. Neither log reports a missing requested layer. Both logs have zero VUID- diagnostics; existing unused-fragment-output warnings occur on both.
  • One initial candidate agc_driver_draw_cache_reuse launch exited before application logging with Windows status 0xc0e90002; the other four GPU tests passed. A subsequent complete ten-test run passed, including that test. The first failure is retained in the validation record and its cause is not established. Draft status is retained pending investigation of that startup failure.
  • No Linux runtime validation or isolated gameplay FPS comparison has been performed.

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
  • 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 (fix(libkernel): redirect a raise only once the target leaves host code #7652 is merged)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 616.64, Windows 11 x64 (original and rebased-head focused validation)
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4563 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 6743 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7149 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7682 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 8041 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 8246 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 9289 docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9563 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9938 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 10193 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 11442 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 11551 docs/dev/debt/libSceAgcDriver.md
PR 11587 docs/dev/debt/libSceAgcDriver.md
PR 11628 core/libs/prx/libkernel/System/src/Exception.cpp
PR 11661 core/libs/prx/libkernel/System/src/Exception.cpp
PR 11689 core/libs/prx/libkernel/System/src/Exception.cpp
PR 11698 core/libs/prx/libkernel/System/src/Exception.cpp
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 12130 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
core/libs/prx/libkernel/Time/TimedWait.cpp
core/libs/prx/libkernel/Time/include/TimedWait.hpp
PR 12324 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12544 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 12568 docs/dev/debt/libSceAgcDriver.md
PR 12642 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
core/libs/prx/libkernel/Time/TimedWait.cpp
core/libs/prx/libkernel/Time/include/TimedWait.hpp
PR 12682 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
PR 12688 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
PR 12700 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
PR 12746 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12792 docs/dev/debt/libSceAgcDriver.md
PR 12828 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 12904 docs/dev/debt/libSceAgcDriver.md
PR 12965 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
PR 12994 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13147 docs/dev/debt/libSceAgcDriver.md
PR 13148 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 13809 docs/dev/debt/libSceAgcDriver.md
PR 13863 docs/dev/debt/libSceAgcDriver.md
PR 13920 docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14964 docs/dev/debt/libSceAgcDriver.md
PR 15040 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 15136 docs/dev/debt/libSceAgcDriver.md
PR 15456 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 15499 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 15529 docs/dev/debt/libSceAgcDriver.md
PR 16260 docs/dev/debt/libSceAgcDriver.md
PR 16427 docs/dev/debt/libSceAgcDriver.md
PR 16790 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 16953 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 17623 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 17943 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 18029 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 18082 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 18173 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 18177 docs/dev/debt/libSceAgcDriver.md
PR 18190 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 18324 core/libs/prx/libkernel/System/src/Exception.cpp
PR 18829 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 19181 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 19462 docs/dev/debt/libSceAgcDriver.md
PR 19557 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 19610 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 19821 docs/dev/debt/libSceAgcDriver.md
PR 20010 docs/dev/debt/libSceAgcDriver.md
PR 20030 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 20131 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 20153 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/debt/libSceAgcDriver.md
PR 20519 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 20580 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 21211 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 21464 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
core/libs/prx/libkernel/Time/TimedWait.cpp
core/libs/prx/libkernel/Time/include/TimedWait.hpp
PR 21499 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 21571 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 22029 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22062 docs/dev/debt/libSceAgcDriver.md
PR 22190 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22251 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 22328 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 22424 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 22434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 22439 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 22546 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 22628 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 22647 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 22697 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 22731 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 23252 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 23545 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 23553 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 23953 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 24049 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24294 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24523 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 24661 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 24714 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 25489 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 25559 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 25999 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 26069 core/libs/prx/libkernel/System/src/Exception.cpp
PR 26174 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 27133 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/debt/libSceAgcDriver.md
PR 27312 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 27801 core/libs/prx/libkernel/System/src/Exception.cpp
PR 27850 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 27864 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 27988 core/libs/prx/libkernel/System/src/Exception.cpp
PR 27994 core/libs/prx/libkernel/Pthread/include/Pthread.hpp
core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28006 core/libs/prx/libkernel/System/src/Exception.cpp
PR 28013 core/libs/prx/libkernel/System/src/Exception.cpp
PR 28095 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28176 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28210 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28229 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28252 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28253 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28255 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28269 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28279 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28280 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28289 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28299 core/libs/prx/libkernel/Pthread/src/Thread.cpp
core/libs/prx/libkernel/System/src/Exception.cpp
core/libs/prx/libkernel/Time/TimedWait.cpp
core/libs/prx/libkernel/Time/include/TimedWait.hpp
PR 28369 core/libs/prx/libkernel/Time/include/TimedWait.hpp
PR 28376 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28400 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28411 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28434 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28470 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28487 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28559 docs/dev/debt/libSceAgcDriver.md
PR 28564 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28586 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28608 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28609 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28622 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28631 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28668 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28673 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 28679 core/libs/prx/libkernel/Pthread/src/Thread.cpp
PR 28702 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 28716 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp

@github-actions github-actions Bot added libkernel build docs agc libSceAgc* needs rebase Conflicts with main, rebase needed labels Oct 20, 2026
@gohansharma79-svg
gohansharma79-svg marked this pull request as ready for review November 2, 2026 21:12
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi gohansharma79-svg,

Thanks for refreshing this fix. It currently conflicts with main in the AGC test registration, exception implementation and debt file. Please rebase and preserve both the deferral guard and main's current exception classification. The current contribution rules put AGC test registrations in their test fragments and require guest API declarations exactly once through the library umbrella header: please replace the test-local extern declarations in ShaderSignalDeferral.cpp with the canonical libkernel.hpp declarations. Please rerun the focused Windows tests on the resulting head; the previously retained startup failure remains unexplained, so a later successful rerun alone does not establish its cause.

A separate point from a second review of 16dab33e38: Holding redirected exceptions while a thread owns a shader preparation transaction looks right, and the nesting and adopted-thread cases are handled. One concern: while the target is deferred, RaiseOn now retries only until the existing one-second limit and then throws out of sceKernelRaiseException (Exception.cpp, the holdingHostLock || restoring branch). A cold shader preparation can take longer than a second, so a title that suspends threads through exceptions (for example a garbage collector stopping the world) while another thread prepares a shader would now fail instead of being delivered late. Could the deferred case keep waiting until the transaction ends (it always ends), or show measured transaction lengths that stay well under the limit? The test would be stronger with a case where the transaction lasts longer than the limit.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The reviewed changes have no verified blocking defects; the author reports passing focused tests, but a startup failure remains unexplained and I could not run the checks independently.

What I ran

Reviewed head 16dab33e389a5d398d0184421ab67788085da4c9 using the prepared diff and repo_read.py. No tests or build commands were run.

Results

Check Result Note
Source review passed All 10 changed files read
Focused runtime tests not run Passing results are author-reported
Startup failure investigation not run Cause remains unknown

Findings

Blocking

None.

Non-blocking

  • The description reports one candidate GPU test startup exit (0xc0e90002) before application logging, with cause undetermined. The later full run reportedly passed, but investigating the initial failure would strengthen confidence in the validation record. See core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp:318 for the changed deferral lifecycle.

Not verified

I did not independently run builds or tests, verify the reported Windows environment, or test Linux runtime behavior or console behavior. The full text of all 10 changed files was included and read: core/libs/prx/libSceAgcDriver/CMakeLists.txt, core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp, core/libs/prx/libSceAgcDriver/tests/ShaderSignalDeferral.cpp, core/libs/prx/libkernel/Pthread/include/Pthread.hpp, core/libs/prx/libkernel/Pthread/src/Thread.cpp, core/libs/prx/libkernel/System/src/Exception.cpp, core/libs/prx/libkernel/Time/TimedWait.cpp, core/libs/prx/libkernel/Time/include/HostSignalDeferral.hpp, core/libs/prx/libkernel/Time/include/TimedWait.hpp, and docs/dev/debt/libSceAgcDriver.md.

To get this to a good state

Nothing is required. Optionally investigate and document the cause of the reported startup failure.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

I am closing this for now. The review asked for changes on the Windows exception deferral in shader preparation, and the branch conflicts with main in the AGC test registration, Exception.cpp and the debt file. There has been no push since 20 Oct. You are welcome to reopen or push a rebased branch at any time and we will look again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs libkernel needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants