fix(libs): keep thread_local objects with destructors out of module teardown on Windows #4029

Merged
AlxcBTW merged 7 commits from upstream-pr/4029 into main 2026-10-12 05:25:29 +00:00
AlxcBTW commented 2026-10-11 21:35:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T21:35:55Z.


What

Fixes #2980 and the rare 0xc0000374 exit of #3171. On Windows (MinGW, emulated TLS) a thread_local with a destructor in a module DLL is destroyed after its storage is freed: when a thread ends, winpthread runs libgcc's emutls key destructor (emutls_destroy frees the thread's thread_local objects), and only then does the loader's DLL_THREAD_DETACH run the module's tls_atexit list, so the destructors run on freed memory. In libSceAgcDriver this corrupts the heap when Driver::stop joins the queue worker.

  • fix(agc): the driver's dispatch-ahead map, pending waits, draw-snapshot compare vectors and image decode memo move to HostThreadLocal. The memo keeps its unique_ptr, now owned by HostThreadLocal, so Linux builds the same thread_local as main.
  • fix(libs): the same for PreciseSleepUs's timer, libkernel's directory path, socket waker and UUID random device, libSceRandom's random device and libScePosixForWebKit's random device and host lookup. Every other thread_local in core/ is trivially destructible or Linux-only.
  • test(libs): prx_thread_local_destructors checks every built module for calls to __cxa_thread_atexit (outside libc's registration of guest destructors) and fails with the registering function.

Confirmed on #3171:

  • @Silverash-i8 (page heap run, Arrow Lake iGPU): 4 of 4 runs on main fault in ~vector<PendingWait> via tls_callback/run_dtor_list; 6 of 6 runs on the branch end without a fault, and 20 runs without page heap give no 0xc0000374.
  • @kr4y4 (check of 20dfb170, RTX 4070 Laptop): agc_driver_dword_pattern_fill, agc_driver_draw_cache_reuse and agc_driver_prepared_shaders --deferred stop with c0000374 every time under gdb on main and are clean on the branch; the 8-way --deferred run goes from 2 of 64 failures to 0 of 64.

Tested

Windows 11 (26200), WinLibs GCC 15.2.0, Release, rebased onto main a11c8f7f7.

  • Before the rebase (RTX 5070 Laptop, NVIDIA 616.92, on main 0f863c102): agc_driver_draw_cache_reuse under cdb (debug heap): before 127 of 127 runs stopped with heap corruption at the worker's exit (also with APS5_NO_PIPELINE_LTO=1 and APS5_NO_GPL=1), after 38 of 38 clean. Normal runs with a cold NVIDIA shader cache: before 2 of 143 exited 0xc0000374, after 98 of 98 passed. prx_thread_local_destructors fails with main's libSceRandom (it reports sceRandomGetRandomNumber) and passes on the branch for all 122 modules.
  • Non-GPU suite (Lenovo node, ctest -E "^agc_driver|^video_out|^guest_video"): 528/531 pass, including prx_thread_local_destructors and host_thread_local. The three failures, guest_kernel_sys, guest_filesystem (access denied on a created file) and windows_exceptions, fail the same way (0xc0000409) on unrelated trees there; windows_exceptions also fails on main (CI).
  • GPU suites on NVIDIA (RTX 5070 Laptop, AMD iGPU hidden): agc_driver_graphics, agc_driver_draw_cache_reuse and agc_driver_draw_cache_reuse_off: 3/3 pass.
  • Conventions: tools/check_conventions.py --base origin/main passes.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822540971 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T21:35:55Z. --- ### What Fixes #2980 and the rare `0xc0000374` exit of #3171. On Windows (MinGW, emulated TLS) a `thread_local` with a destructor in a module DLL is destroyed after its storage is freed: when a thread ends, winpthread runs libgcc's emutls key destructor (`emutls_destroy` frees the thread's `thread_local` objects), and only then does the loader's `DLL_THREAD_DETACH` run the module's `tls_atexit` list, so the destructors run on freed memory. In libSceAgcDriver this corrupts the heap when `Driver::stop` joins the queue worker. - **`fix(agc)`:** the driver's dispatch-ahead map, pending waits, draw-snapshot compare vectors and image decode memo move to `HostThreadLocal`. The memo keeps its `unique_ptr`, now owned by `HostThreadLocal`, so Linux builds the same `thread_local` as `main`. - **`fix(libs)`:** the same for `PreciseSleepUs`'s timer, libkernel's directory path, socket waker and UUID random device, libSceRandom's random device and libScePosixForWebKit's random device and host lookup. Every other `thread_local` in `core/` is trivially destructible or Linux-only. - **`test(libs)`:** `prx_thread_local_destructors` checks every built module for calls to `__cxa_thread_atexit` (outside libc's registration of guest destructors) and fails with the registering function. Confirmed on #3171: - @Silverash-i8 ([page heap run](https://github.com/boykopovar/AnyPS5/issues/3171#issuecomment-6109569792), Arrow Lake iGPU): 4 of 4 runs on `main` fault in `~vector<PendingWait>` via `tls_callback`/`run_dtor_list`; 6 of 6 runs on the branch end without a fault, and 20 runs without page heap give no `0xc0000374`. - @kr4y4 ([check of 20dfb170](https://github.com/boykopovar/AnyPS5/issues/3171#issuecomment-6111702947), RTX 4070 Laptop): `agc_driver_dword_pattern_fill`, `agc_driver_draw_cache_reuse` and `agc_driver_prepared_shaders --deferred` stop with `c0000374` every time under gdb on `main` and are clean on the branch; the 8-way `--deferred` run goes from 2 of 64 failures to 0 of 64. ### Tested Windows 11 (26200), WinLibs GCC 15.2.0, Release, rebased onto `main` a11c8f7f7. - **Before the rebase** (RTX 5070 Laptop, NVIDIA 616.92, on `main` 0f863c102): `agc_driver_draw_cache_reuse` under cdb (debug heap): before 127 of 127 runs stopped with heap corruption at the worker's exit (also with `APS5_NO_PIPELINE_LTO=1` and `APS5_NO_GPL=1`), after 38 of 38 clean. Normal runs with a cold NVIDIA shader cache: before 2 of 143 exited `0xc0000374`, after 98 of 98 passed. `prx_thread_local_destructors` fails with `main`'s libSceRandom (it reports `sceRandomGetRandomNumber`) and passes on the branch for all 122 modules. - **Non-GPU suite (Lenovo node, `ctest -E "^agc_driver|^video_out|^guest_video"`):** 528/531 pass, including `prx_thread_local_destructors` and `host_thread_local`. The three failures, `guest_kernel_sys`, `guest_filesystem` (access denied on a created file) and `windows_exceptions`, fail the same way (`0xc0000409`) on unrelated trees there; `windows_exceptions` also fails on `main` (CI). - **GPU suites on NVIDIA (RTX 5070 Laptop, AMD iGPU hidden):** `agc_driver_graphics`, `agc_driver_draw_cache_reuse` and `agc_driver_draw_cache_reuse_off`: 3/3 pass. - **Conventions:** `tools/check_conventions.py --base origin/main` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Amoenus commented 2026-10-11 22:16:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-11T22:16:18Z.


Independent Windows validation of the three production commits 3408e4856, 1385c40a3, 28e73c2b3 from head 28e73c2b3ca46ba9a25bae97e6a1490aed974477, applied with author credit to a diagnostic integration based on main a672688e (local head 274d3f9b2). One adjacent include conflict in ShaderResources.cpp was resolved by retaining both includes. The PR's CMake test registration was not imported; its original ThreadLocalDestructors.cmake was run externally.

Environment: Windows 11 / RTX 5080, MinGW GCC 15.2 UCRT POSIX SEH r7, Release, BUILD_TESTING=ON; native Vulkan required, shader cache off.

Before: the exact same original production module hashes, with a separate test-fixture correction described on #2261, produced 0xC0000374 in prepared-shader debug mode in a parallel repeated run and deferred-undecodable mode in a sequential repeated run. Earlier pre-fixture runs also failed in deferred mode. The preserved original patched AGC module fails this PR's scanner, reporting destructor registrations in resolvedAhead, pendingWaits, draw-snapshot scratch and image decoding. This is a structural fault control, not a debugger trace of our crashes.

After:

  • Full build, libs, registration and convention checks pass. Original scanner: 122 modules register no thread_local destructors on the built unpatched modules.
  • Nine prepared-shader groups ×5; seven thread-local/directory/network groups ×5; thirteen native multisample groups ×5; full recorder ×5: all pass without skips.
  • The three previously failing prepared-shader modes, agc_driver_draw_cache_reuse, and agc_driver_dword_pattern_fill: 100/100 runs pass, --repeat until-fail:20 --parallel 4 --timeout 30, no skips.
  • Full suite: 863 pass, 0 fail, 5 explicit skips of 868 tests; maximum duration 15.50 s (cache off). This is a finite campaign, not proof that every rare heap failure is gone.

The integration includes experimental multisample support and the exact #4021 Windows select correction. These results do not validate the unchanged whole PR head or Linux execution, and do not independently establish the faulting teardown stack. Four PPSA99902 startup controls (before / after twice / restored before) still stop at the intentional native depth fast-clear guard, without timeouts; no additional title startup or frames claimed. Original dump/module, converted guest libc and exact 123-file runtime baseline restored and hash verified. No push or new PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114477614 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6114477614). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-11T22:16:18Z. --- <!-- amoenus-validation:4029-native-windows --> Independent Windows validation of the **three production commits** `3408e4856`, `1385c40a3`, `28e73c2b3` from head `28e73c2b3ca46ba9a25bae97e6a1490aed974477`, applied with author credit to a diagnostic integration based on main `a672688e` (local head `274d3f9b2`). One adjacent include conflict in `ShaderResources.cpp` was resolved by retaining both includes. The PR's CMake test registration was not imported; its original `ThreadLocalDestructors.cmake` was run externally. Environment: Windows 11 / RTX 5080, MinGW GCC 15.2 UCRT POSIX SEH r7, Release, `BUILD_TESTING=ON`; native Vulkan required, shader cache off. **Before:** the exact same original production module hashes, with a separate test-fixture correction described on [#2261](https://github.com/boykopovar/AnyPS5/pull/2261#issuecomment-6114263721), produced `0xC0000374` in prepared-shader debug mode in a parallel repeated run and deferred-undecodable mode in a sequential repeated run. Earlier pre-fixture runs also failed in deferred mode. The preserved original patched AGC module fails this PR's scanner, reporting destructor registrations in `resolvedAhead`, `pendingWaits`, draw-snapshot scratch and image decoding. This is a structural fault control, not a debugger trace of our crashes. **After:** - Full build, `libs`, registration and convention checks pass. Original scanner: `122 modules register no thread_local destructors` on the built unpatched modules. - Nine prepared-shader groups ×5; seven thread-local/directory/network groups ×5; thirteen native multisample groups ×5; full recorder ×5: all pass without skips. - The three previously failing prepared-shader modes, `agc_driver_draw_cache_reuse`, and `agc_driver_dword_pattern_fill`: **100/100 runs pass**, `--repeat until-fail:20 --parallel 4 --timeout 30`, no skips. - Full suite: **863 pass, 0 fail, 5 explicit skips** of 868 tests; maximum duration 15.50 s (cache off). This is a finite campaign, not proof that every rare heap failure is gone. The integration includes experimental multisample support and the exact #4021 Windows select correction. These results do **not** validate the unchanged whole PR head or Linux execution, and do not independently establish the faulting teardown stack. Four PPSA99902 startup controls (before / after twice / restored before) still stop at the intentional native depth fast-clear guard, without timeouts; no additional title startup or frames claimed. Original dump/module, converted guest libc and exact 123-file runtime baseline restored and hash verified. No push or new PR.
AlxcBTW commented 2026-10-11 22:17:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T22:17:16Z.


@Amoenus thank you, that's a thorough campaign. The before/after on the three prepared-shader modes (failing → 100/100) and the scanner catching resolvedAhead, pendingWaits, the draw-snapshot scratch and image decoding on the unpatched module are exactly the evidence this PR needed. Noted on scope too: Windows only, three production commits on your integration, and no claim about the teardown stack itself.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114489255 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6114489255). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T22:17:16Z. --- @Amoenus thank you, that's a thorough campaign. The before/after on the three prepared-shader modes (failing → 100/100) and the scanner catching `resolvedAhead`, `pendingWaits`, the draw-snapshot scratch and image decoding on the unpatched module are exactly the evidence this PR needed. Noted on scope too: Windows only, three production commits on your integration, and no claim about the teardown stack itself. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-11 23:20:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:20:32Z.


Conflicts with main in ShaderResources.cpp and Udp.cpp; please rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115039037 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6115039037). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:20:32Z. --- Conflicts with main in `ShaderResources.cpp` and `Udp.cpp`; please rebase.
AlxcBTW commented 2026-10-12 00:22:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T00:22:49Z.


@oneandonlydean done: I merged current main (bab7b3285) into the branch as b6a860f92 rather than force-pushing. The conflicts were include lists only:

  • ShaderResources.cpp: kept both HostThreadLocal.hpp and main's MultisampleTarget.hpp;
  • Udp.cpp: kept both HostThreadLocal.hpp and main's SocketError.hpp.

The imageMemo and ThreadWaker changes are unchanged. The only new thread_local on main is a plain int in tests/shared_memory/Support.cpp, which has no destructor.

Windows build (WinLibs GCC 15.2, Release, with #4021's Socket.cpp guard applied locally, since main doesn't compile on MinGW without it):

  • prx_thread_local_destructors passes;
  • non-GPU ctest 576/579. The 3 failures fail identically on main + #4021 without this PR: log_macros, guest_kernel_stack_protect, and agc_write_tracking, which #4131 fixes.

If you'd rather have it rebased to a linear history, say so and I'll do that instead.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115554448 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6115554448). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T00:22:49Z. --- @oneandonlydean done: I merged current `main` (bab7b3285) into the branch as b6a860f92 rather than force-pushing. The conflicts were include lists only: - `ShaderResources.cpp`: kept both `HostThreadLocal.hpp` and main's `MultisampleTarget.hpp`; - `Udp.cpp`: kept both `HostThreadLocal.hpp` and main's `SocketError.hpp`. The `imageMemo` and `ThreadWaker` changes are unchanged. The only new `thread_local` on main is a plain `int` in `tests/shared_memory/Support.cpp`, which has no destructor. Windows build (WinLibs GCC 15.2, Release, with #4021's `Socket.cpp` guard applied locally, since `main` doesn't compile on MinGW without it): - `prx_thread_local_destructors` passes; - non-GPU `ctest` 576/579. The 3 failures fail identically on `main` + #4021 without this PR: `log_macros`, `guest_kernel_stack_protect`, and `agc_write_tracking`, which #4131 fixes. If you'd rather have it rebased to a linear history, say so and I'll do that instead. AI-assisted: yes (Claude Code)
winstrex commented 2026-10-12 01:11:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by winstrex on 2026-10-12T01:11:08Z.


Hi @AlxcBTW, a heads-up about an overlap: #4200 takes guest entropy from the host OS (getentropy, rand_s on Windows) instead of std::random_device, so it removes the thread_local std::random_device in arc4random_buf, sceRandomGetRandomNumber and sceKernelUuidCreate. If it merges first, those three hunks here are no longer needed; if this PR merges first, I'll resolve the conflict on my side. The rest of your change doesn't overlap with mine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115983219 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6115983219). Originally posted by [winstrex](https://github.com/winstrex) on 2026-10-12T01:11:08Z. --- Hi @AlxcBTW, a heads-up about an overlap: #4200 takes guest entropy from the host OS (`getentropy`, `rand_s` on Windows) instead of `std::random_device`, so it removes the `thread_local std::random_device` in `arc4random_buf`, `sceRandomGetRandomNumber` and `sceKernelUuidCreate`. If it merges first, those three hunks here are no longer needed; if this PR merges first, I'll resolve the conflict on my side. The rest of your change doesn't overlap with mine.
AlxcBTW commented 2026-10-12 01:12:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T01:12:20Z.


@winstrex thanks for the heads-up, agreed. If #4200 merges first, I'll drop the three random_device hunks here (arc4random_buf, sceRandomGetRandomNumber, sceKernelUuidCreate). Taking entropy from the host OS removes those thread_locals altogether, which is the better fix for them. This PR's scanner (ThreadLocalDestructors.cmake) passes either way, since it only fails on a remaining thread_local with a destructor.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115993852 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6115993852). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T01:12:20Z. --- @winstrex thanks for the heads-up, agreed. If #4200 merges first, I'll drop the three `random_device` hunks here (`arc4random_buf`, `sceRandomGetRandomNumber`, `sceKernelUuidCreate`). Taking entropy from the host OS removes those `thread_local`s altogether, which is the better fix for them. This PR's scanner (`ThreadLocalDestructors.cmake`) passes either way, since it only fails on a remaining `thread_local` with a destructor. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-12 03:20:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T03:20:29Z.


Merged current main into this branch (28fea1ce) so it can build again: the Windows heap corruption at worker exit this fixes (agc_driver_flip_compute, exit code 0xc0000374) is turning unrelated full builds red, three so far today. The only conflicts were the three random_device hunks (arc4random_buf, sceRandomGetRandomNumber, sceKernelUuidCreate); I took main's side there, as agreed above with #4200 in. Full build started on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6117137570 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6117137570). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T03:20:29Z. --- Merged current `main` into this branch (28fea1ce) so it can build again: the Windows heap corruption at worker exit this fixes (`agc_driver_flip_compute`, exit code 0xc0000374) is turning unrelated full builds red, three so far today. The only conflicts were the three `random_device` hunks (`arc4random_buf`, `sceRandomGetRandomNumber`, `sceKernelUuidCreate`); I took `main`'s side there, as agreed above with #4200 in. Full build started on this head.
oneandonlydean commented 2026-10-12 04:37:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T04:37:51Z.


Merged main in again (15f345ce): #3661 landed and changed Driver::resolvedAhead in DispatchAhead.cpp to a ThreadOwned pointer, which has no destructor to run at teardown, so I took main's version of that function there. The rest is unchanged. New full build started.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6117843844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6117843844). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T04:37:51Z. --- Merged `main` in again (15f345ce): #3661 landed and changed `Driver::resolvedAhead` in `DispatchAhead.cpp` to a `ThreadOwned` pointer, which has no destructor to run at teardown, so I took `main`'s version of that function there. The rest is unchanged. New full build started.
Scramblrrrr commented 2026-10-12 05:45:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-12T05:45:12Z.


Windows integration cross-test: your production changes applied cleanly to our older retail 007 stack (3408e4856 + 28e73c2b3 + 1385c40a3, original author retained).

The upstream binary inspection also caught two extra destructor-bearing containers in our local performance patches, outside this PR: the stale vector in ShaderResources::MovedReadOnlyBuffers and ColumnMemos in ResourceMaterializer. Local adaptation d7a0d0183 moves them to the same HostThreadLocal pattern. Our intermediate 903d5034b graphics binary fails the inspector; rebuilt d29fd5fe4 passes it. Inspection was scoped to libSceAgcDriver, not all runtime modules.

14 selected native Vulkan tests passed on RTX 5070 Ti in 9.04 s with no skips, including draw-cache reuse GPL on/off, recorder alias lifetime/memory, upload lifetime/failure, idle write-back, graphics, BDA and clip/cull fixtures. A guarded 007 run is underway; no claim of reproducing or resolving all title teardown faults. Public integration: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-thread-lifetime-cross-test . AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118505019 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4029#issuecomment-6118505019). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-12T05:45:12Z. --- Windows integration cross-test: your production changes applied cleanly to our older retail 007 stack (3408e4856 + 28e73c2b3 + 1385c40a3, original author retained). The upstream binary inspection also caught two extra destructor-bearing containers in our local performance patches, outside this PR: the stale vector in ShaderResources::MovedReadOnlyBuffers and ColumnMemos in ResourceMaterializer. Local adaptation d7a0d0183 moves them to the same HostThreadLocal pattern. Our intermediate 903d5034b graphics binary fails the inspector; rebuilt d29fd5fe4 passes it. Inspection was scoped to libSceAgcDriver, not all runtime modules. 14 selected native Vulkan tests passed on RTX 5070 Ti in 9.04 s with no skips, including draw-cache reuse GPL on/off, recorder alias lifetime/memory, upload lifetime/failure, idle write-back, graphics, BDA and clip/cull fixtures. A guarded 007 run is underway; no claim of reproducing or resolving all title teardown faults. Public integration: https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-thread-lifetime-cross-test . AI-assisted: Codex.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!4029
No description provided.