Repository navigation
fix(agc): keep one trace thread pointer and recording flag across modules - #7336
Merged
oneandonlydean merged 1 commit intoOct 18, 2026
Merged
Conversation
…ules PerformanceTrace kept the recording flag and each thread's trace buffer as inline static members, so on Windows every module that includes the header had its own copies: agc_driver_registration_trace read an empty pointer, and libSceVideoOut's timers never saw the trace recording. They are now defined once in the driver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
agc_driver_registration_trace, added by #7293, fails on Windows on every run witha title thread that registered a shader has no trace buffer.PerformanceTracekept the recording flag and each thread's trace buffer pointer asinline staticmembers in the header, andRecording()andThread()read them inline. On Linux, the copies in every module that includes the header resolve to one definition. A Windows DLL and an executable each get their own. The driver bound the registering thread's buffer inlibSceAgcDriver.prx's copy, while the test read the executable's copy, which stays empty.The same split cuts
libSceVideoOut.prxoff from tracing on Windows. ItsPerformanceTimers (VideoOut.Readiness,VideoOut.Flip) read libSceVideoOut's own copies of the flag and the pointer, and nothing ever sets those.The two members are now defined once, in a small
PerformanceTraceThread.cppin the driver.Recording()andThread()stay inline, but they now read the two throughextern "C"AgcDriverTraceRecording_nid_postfixandAgcDriverTraceThread_nid_postfix, so every module reads the driver's state. They are_nid_postfixfunctions, like libSceVideoOut's other calls into the driver. A first version with out-of-line static member functions made the patched libSceVideoOut.prx fail to load (patched_libraries:libSceVideoOut.prx: LoadLibraryEx failed with error 127).The definitions are not in
PerformanceTrace.cppbecause two test executables compileGuestMemory.cppwithout the driver (agc_shader_memory_tests,agc_write_tracking_tests), andPerformanceTrace.cppwould pull in the Vulkan device. Those two now compile the new file too. On Linux the copies were already one, so nothing changes there.Tested
Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ANYPS5_REQUIRE_VULKAN=1:agc_driver_registration_tracefails 3 of 3 onmaina8581d333witha title thread that registered a shader has no trace buffer. With this change it passes, and so doesagc_driver_registration_trace_disabled.patched_librariestests (38) pass.ctest --parallel 4 --timeout 120onmaina8581d333with this change: 1435 tests. Onlyagc_driver_lds_mixed_width_atomics(agc_* tests: 3 of 483 fail on AMD Radeon RX 6400, pass on NVIDIA RTX 4080 SUPER #5271, fixed by fix(shader): release the LDS lock with an exchange and drop fences inside it #6976) andagc_driver_layered_volume_vertex_no_gpl(AMD Windows: GPL-mode cache failures (alpha/wave32 pass after local driver update) #4768) fail, as onmainhere, whereagc_driver_registration_tracefails too.python tools/check_conventions.py --base origin/mainwith this title and body passes.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)🤖 Generated with Claude Code