Repository navigation
fix(agc): defer Windows exceptions during shader preparation - #8592
gohansharma79-svg wants to merge 2 commits into
Conversation
|
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.
|
|
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 A separate point from a second review of |
MarcZX10
left a comment
There was a problem hiding this comment.
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. Seecore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp:318for 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.
|
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. |
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.b85d972f42; candidate head16dab33e38. 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: mainb85d972f42passes 5/5 focused Vulkan tests; candidate16dab33e38passes all 10 focused shader-deferral, exception, prepared-publication and draw-cache tests. Both used the same machine and validation-layer settings; no newVUID-diagnostics and no missing-layer messages were found. The earlier resubmission head also passed 10/10 on recheck (16.03 s).ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationand the official Khronos Windows x64 validation artifact from main commitaea761f4d54b86682be4099c428dba27b6609940. Neither log reports a missing requested layer. Both logs have zeroVUID-diagnostics; existing unused-fragment-output warnings occur on both.agc_driver_draw_cache_reuselaunch exited before application logging with Windows status0xc0e90002; 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.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)