diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:16:25 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 18:18:57 -0500 |
| commit | 38385762bd400e8260c7b3c8a80bb0c03fcc44c4 (patch) | |
| tree | e0d983ce74468edfde736ab699a695b80702ddbf /docs/boot.md | |
| parent | d4fb292344088e7925ddeb3bbceb5a9ac46de8c2 (diff) | |
dev overlay: the title HUD's VRAM and private memory figures
LEONIDA_DEV_OVERLAY (#2137) showed the working set and free RAM, with
no GPU memory and no private memory. It now shows both, from the same
code as the title HUD:
- src/memory_figures.h holds VramBudget, the private-bytes choice (the
larger of PrivateUsage and PagefileUsage, since Wine fills only the
latter), the "RAM ..." and "VRAM ..." text with "n/a" where there is
no figure, and a publisher for the device's GPU memory figure. No
Vulkan, and Win32 only under _WIN32, so the overlay's test still
builds on every host.
- A device with VK_EXT_memory_budget publishes a reader when it is
created and withdraws it first thing when it is destroyed (the lock
is held during a read, so a reader never outlives its device).
latest_vram() calls the reader at most once per 500 ms for both
views. The HUD reads it instead of its own per-device lambda.
- The overlay's last line is now "RAM 2.5 GB (ws 1.0) VRAM
3.5/16.0 GB +0.5 shared"; cores and free RAM keep their own line.
Tests: dev_overlay_test checks the text with and without figures, the
private-bytes fallback, and the publisher (one read per refresh, only
the publishing device withdraws). title_hud_test checks that a HUD
without its own source shows the published figure.
d3d12_vram_budget_test checks that the device publishes its figure
while it lives and withdraws it on release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/boot.md')
| -rw-r--r-- | docs/boot.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/boot.md b/docs/boot.md index 831787057..3ba791f88 100644 --- a/docs/boot.md +++ b/docs/boot.md | |||
| @@ -126,7 +126,8 @@ Useful switches: | |||
| 126 | and working set; | 126 | and working set; |
| 127 | - its GPU memory: in use and the budget over the device-local heaps, and in use in the other heaps, read from | 127 | - its GPU memory: in use and the budget over the device-local heaps, and in use in the other heaps, read from |
| 128 | the Vulkan device through `VK_EXT_memory_budget`. Without that extension it falls back to DXGI's | 128 | the Vulkan device through `VK_EXT_memory_budget`. Without that extension it falls back to DXGI's |
| 129 | `QueryVideoMemoryInfo`, which reads 0 under Wine; with neither the field reads `VRAM n/a`, not a false 0; | 129 | `QueryVideoMemoryInfo`, which reads 0 under Wine; with neither the field reads `VRAM n/a`, not a false 0. |
| 130 | Both memory figures and their text come from `runtime/src/memory_figures.h`, which the dev overlay shows too; | ||
| 130 | - the graphics and compute pipelines created, and the seconds spent in `vkCreate*Pipelines` in the last half | 131 | - the graphics and compute pipelines created, and the seconds spent in `vkCreate*Pipelines` in the last half |
| 131 | second. A pipeline compiled in the frame shows up there as a hitch. This needs `LEONIDA_MEM_PROBE`; without it | 132 | second. A pipeline compiled in the frame shows up there as a hitch. This needs `LEONIDA_MEM_PROBE`; without it |
| 132 | the field reads `PSO -`. | 133 | the field reads `PSO -`. |
| @@ -136,7 +137,9 @@ Useful switches: | |||
| 136 | * `LEONIDA_DEV_OVERLAY=1` (Windows) shows what the runtime is doing in a small click-through window over the top left | 137 | * `LEONIDA_DEV_OVERLAY=1` (Windows) shows what the runtime is doing in a small click-through window over the top left |
| 137 | corner of the title's window, while that window is in front (`runtime/src/dev_overlay.h`): frames and submissions a | 138 | corner of the title's window, while that window is in front (`runtime/src/dev_overlay.h`): frames and submissions a |
| 138 | second, where a submission's CPU time goes, the phase that is running now and for how long, pipeline builds in | 139 | second, where a submission's CPU time goes, the phase that is running now and for how long, pipeline builds in |
| 139 | flight, indirect draws emitted and skipped, cores, memory. The figures cover the last two seconds. It has its own | 140 | flight, indirect draws emitted and skipped, cores, free RAM, and the same private memory and GPU memory figures as |
| 141 | `LEONIDA_TITLE_HUD` (`VRAM n/a` without `VK_EXT_memory_budget`). The device publishes its GPU memory figure, and | ||
| 142 | the overlay and the HUD read it at most once per half second. The rates cover the last two seconds. It has its own | ||
| 140 | thread, so it also counts while the title presents nothing, and it is in no capture. `LEONIDA_TITLE_HUD` shows frame | 143 | thread, so it also counts while the title presents nothing, and it is in no capture. `LEONIDA_TITLE_HUD` shows frame |
| 141 | times and compile times in the title bar instead; both can be on. | 144 | times and compile times in the title bar instead; both can be on. |
| 142 | * `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` when MSI Afterburner or OBS is installed; their | 145 | * `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` when MSI Afterburner or OBS is installed; their |