Commit Graph

3 Commits

Author SHA1 Message Date
f95b23e518 d3d12: write the session pipeline cache when the run ends with the device alive (RT-SESSION-CACHE-AT-EXIT)
pipeline_cache.session.bin was written only in ~Device. A title never
releases its device, so a real boot kept none of what it compiled: not
after a normal exit, a console close or a crash, and every boot built the
world start again.

save_pipeline_caches_at_exit writes the session cache of every live device
(a registry the Device constructor and destructor keep), once per process,
after stop_pipeline_compiles. A build still running on another thread is
given wait_ms, then the previous file is kept, as at teardown. gta6rt calls
it at the run's exit, at a console close, and from an unhandled-exception
filter (a fault in the title or its DLLs, the int3 after a device loss),
which then passes the exception on, so the exit code is unchanged.

d3d12_compile_teardown_test's exit case checks that the file is written
with the device alive, and only once.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:24:17 +01:00
c7fdc26d2a runtime test: compile_teardown expects no session cache from llvmpipe
#1723's new d3d12_compile_teardown failed on llvmpipe at line 436: no
pipeline_cache.session.bin after teardown. It passes on the iGPU.

The runtime was right and the test assumed every driver keeps compiled
pipelines in a VkPipelineCache. Measured with a print in
save_session_pipeline_cache: after the warm-up build, llvmpipe's
vkGetPipelineCacheData returns VK_SUCCESS and 32 bytes, the header alone
(the save limit was 64 MiB). The runtime writes no file of a bare header
on purpose, as it is no cache.

The check now reads the driver ID (VkPhysicalDeviceDriverProperties).
On llvmpipe the file must be absent; on every other driver it must be
written at teardown, as before. The rest of the case (the background
build ran, the worker joined) is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 06:00:54 -05:00
ba626820ec Integrate post-story-load memory, queue and Vulkan runtime changes
Preserve physical window aliases across remaps, order console list values,
and replay bounded indirect graphics with captured draw state. Coordinate
pipeline lifetime, texture refresh and queue teardown. Add synthetic CPU
and GPU coverage for the integrated paths.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
2026-11-25 03:44:43 -06:00