mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 13:38:36 +00:00
A 1,308 s boot ended in a title fault with 2 builds still running, and the exit save kept the old file, so the run's pipelines were lost again. At exit there is no later moment to wait for: after wait_ms the cache is written with the pipelines finished so far (it is not created EXTERNALLY_SYNCHRONIZED, so reading it during a build is valid). The write runs on its own thread and is given 3 s, so a driver that blocks the read cannot hold the ending process; the file is published by a rename, so a write cut off leaves the previous one whole. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.3 KiB
C++
21 lines
1.3 KiB
C++
// The process is ending with the Vulkan device still alive (gta6rt's ExitProcess after the title's run, a console
|
|
// Ctrl+C, Ctrl+Break or close). Without this, ExitProcess ends the pipeline compiler's thread wherever it is,
|
|
// possibly inside the driver's compiler with its locks held. A device released normally needs none of this: ~Device
|
|
// cancels and joins its background builds (PipelineCompiler in d3d12_pipeline_compile.h).
|
|
#pragma once
|
|
|
|
namespace rt::d3d12 {
|
|
|
|
// Drops the queued background pipeline builds, refuses new ones and waits up to `wait_ms` for the running one.
|
|
// False when one was still running at the deadline. Defined with the Vulkan device (d3d12_vulkan_device.cpp).
|
|
bool stop_pipeline_compiles(unsigned wait_ms);
|
|
|
|
// Writes each live device's session pipeline cache (pipeline_cache.session.bin), as ~Device does, for a process that
|
|
// ends with its devices alive: after stop_pipeline_compiles, so the compiler's own builds are done. A build still
|
|
// running on another thread is given `wait_ms`, then the cache is written without it (the pipelines finished so far);
|
|
// the write itself is given 3 s before the process goes on ending. Runs once per process; true when a cache write
|
|
// finished.
|
|
bool save_pipeline_caches_at_exit(unsigned wait_ms);
|
|
|
|
} // namespace rt::d3d12
|