Repository navigation
fix(agc): flush the shared logger from native clients - #7709
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.
|
karimibrahim07
left a comment
There was a problem hiding this comment.
Windows run of head 88c8320e3, merged onto main ccbd40240 together with #7669, #7670, #7717 and #7680 (each merge clean, built once). Windows 11 Pro (26300), Ryzen 5 3600, NVIDIA GeForce RTX 3060 (driver 610.88), WinLibs GCC 15.2.0 r7, Ninja Release, BUILD_TESTING=ON, ANYPS5_AGC_EXECUTION_TESTS with PreparedShaders and ShutdownThreads added.
- All 29 cases you list pass (the 19
agc_driver_prepared_shaders*, the 8agc_driver_shutdown_threads*,agc_async_logandagc_async_log_fatal),--repeat until-fail:3. - Negative control: with
main'sAsyncLog.hppandLifecycle.cpp, the same six cases as in your description fail:abi_deferred_pixel,_stages,_undecodable_state,_registration_failure,_vertex_inputsand_rectangle_pairs, each withlibc: end flush already registered(0xc0000409).abi_deferred_computeandabi_deferred_rectanglepass either way. Here all six were0xc0000409; I didn't see the access violation you got on one of them.
Code: an inline function whose body calls the header-local AsyncLog::Get() gives each PE image its own logger, so a native test exe and libSceAgcDriver each register an end-flush callback. The out-of-line definition in Lifecycle.cpp matches HoldAsyncLog() just below it, which already does this. InstallAsyncLog_nid_no_patch and FlushAsyncLogAtEnd_nid_no_patch stay inline. Their callers are inside the driver, so that's fine. I have no requests.
AI-assisted: yes. I ran the build, the tests and the negative control above.
What
FlushAsyncLog_nid_no_patchis inline and reaches the header-localAsyncLog::Get. A Windows executable that calls it creates its own logger instead of flushing the driver's logger. When the other PE image initializes its logger, libc rejects its different end-flush callback withlibc: end flush already registered; the new ABI-deferral tests abort before checking shader behavior.Define this existing helper in the driver's lifecycle translation unit and leave its declaration in the header. Native clients then flush the same logger as the driver. The async logger, shutdown hook and test assertions keep their existing behavior.
Tested
Windows 11 Pro build 26200, MinGW-w64 GCC 15.2.0, Release, SPIRV-Tools OFF; RTX 5070 Ti / NVIDIA 617.42 / Ryzen 7800X3D.
324e0e48e, original production code and unchanged existing fixtures: all sixagc_driver_prepared_shaders_abi_deferred_{pixel,stages,undecodable_state,registration_failure,vertex_inputs,rectangle_pairs}cases fail. Five report0xc0000409, one reports an access violation during the failing logger initialization; the control captures the duplicate end-flush diagnostic.88c8320e3: 29/29 pass (19.92 s) across all registeredagc_driver_prepared_shaders*,agc_driver_shutdown_threads*,agc_async_logandagc_async_log_fatalcases. This includes all six original failures, with no fixture changes.7bdb95886: 114/114 native checks pass (52.81 s), including serialization, image-table reuse, indirect draws, HDR, APR and the logger/shutdown checks.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)