diff options
| author | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-26 22:45:08 +0100 |
|---|---|---|
| committer | OreoFR <29048345+OreoFR@users.noreply.github.com> | 2026-11-26 23:07:38 +0100 |
| commit | 62be3fa1898ffdb80e0ea0ea6a7e6a0be2af3b94 (patch) | |
| tree | d2fe022d725451446e113776e562b951449b2f49 /docs/d3d12_vulkan.md | |
| parent | e5a7c8942678b323f655939c81f5d8855d20c248 (diff) | |
compile gate: a submission waits at most 15 s for creates in the driver, then goes ahead (LEONIDA_COMPILE_GATE_WAIT_MS)
The gate keeps vkQueueSubmit out of the driver while a pipeline create is
in it (on NVIDIA 630.20 a submission that entered during a long compute
create waited 10 s in the driver and lost the device). The waiter holds the
submit lock, so every queue stops behind it: on an RTX 4070 Laptop (NVIDIA
621.40) one compute create stayed in the driver for over 54 s during the
story load and the title's 30 s hang watchdog ended the process.
A submission now goes ahead after LEONIDA_COMPILE_GATE_WAIT_MS (15 s by
default; 0: no limit). The creates in the driver then hold no later
submission back; creates that enter afterwards are waited for again. On
630.20 that only gives up creates over 25 s (15 s here plus the driver's
10 s), which the watchdog ends anyway. With the watchdog kept kicked
(LEONIDA_TITLE_WATCHDOG=0 and LEONIDA_TITLE_WATCHDOG_KICK) the default stays
no limit. The log names each submission that goes ahead and how long it then
spent in the driver. The README row, which still described the gate as
opt-in, now says it is on by default.
Tested: submit_mutex (new gate_wait_limit case), MSVC, Windows 11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/d3d12_vulkan.md')
| -rw-r--r-- | docs/d3d12_vulkan.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md index 45d4b4be4..1d1334f57 100644 --- a/docs/d3d12_vulkan.md +++ b/docs/d3d12_vulkan.md | |||
| @@ -2882,6 +2882,18 @@ submitting thread; at the maintainers' decision it was replaced by this one when | |||
| 2882 | title submits (a submission in the last second, `src/pipeline_wait.h`); the pipeline is built at its first use | 2882 | title submits (a submission in the last second, `src/pipeline_wait.h`); the pipeline is built at its first use |
| 2883 | instead. Opt-in: unset or 0, every warm-up runs, as on `main`, and `LargeModuleGate` (#1889) orders them behind a | 2883 | instead. Opt-in: unset or 0, every warm-up runs, as on `main`, and `LargeModuleGate` (#1889) orders them behind a |
| 2884 | submission's compiles. Smaller warm-ups, and every warm-up before the first submission, run as before. | 2884 | submission's compiles. Smaller warm-ups, and every warm-up before the first submission, run as before. |
| 2885 | - **A bounded wait at the compile gate** (`SubmitMutex::enter_submit`, `src/vulkan_device_fault.h`). The gate keeps a | ||
| 2886 | `vkQueueSubmit` out of the driver while a create is in it, since on NVIDIA 630.20 one that entered during a long | ||
| 2887 | `vkCreateComputePipelines` waited 10 s and lost the device. The waiting submission holds the submit lock, so all | ||
| 2888 | queues stop: on an RTX 4070 Laptop (NVIDIA 621.40) one compute create of a 2.3 MB module stayed in the driver for | ||
| 2889 | more than 54 s during the story load, the submission waited for all of it and the title's 30 s hang watchdog ended | ||
| 2890 | the process; with `LEONIDA_COMPILE_GATE=0` the same build went past that point. A submission now waits at most | ||
| 2891 | `LEONIDA_COMPILE_GATE_WAIT_MS` (15 s by default) and then goes ahead; the creates in the driver at that moment hold | ||
| 2892 | no later submission back, and creates that enter after it are waited for again. On 630.20 that loses only creates | ||
| 2893 | over 25 s (15 s here, then the driver's 10 s), which the watchdog ends anyway. With the watchdog kept kicked | ||
| 2894 | (`LEONIDA_TITLE_WATCHDOG=0` and `LEONIDA_TITLE_WATCHDOG_KICK`) the default is no limit, as before. The log names | ||
| 2895 | each submission that goes ahead and how long it then took in the driver, which tells whether that driver holds a | ||
| 2896 | submission behind a create at all. Tested by `submit_mutex` (no GPU); not yet measured in the title. | ||
| 2885 | 2897 | ||
| 2886 | **Open:** whether the game uses `D3D12_PIPELINE_STATE_STREAM_DESC` for mesh/RT and which subobject types appear. | 2898 | **Open:** whether the game uses `D3D12_PIPELINE_STATE_STREAM_DESC` for mesh/RT and which subobject types appear. |
| 2887 | The trace will enumerate them. | 2899 | The trace will enumerate them. |