upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/main.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:56:01 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:56:01 -0500
commit244387529b6fb4992b601704d32016e7beeadd28 (patch)
tree4715745590a613d6fc4f0c5d3642617d83f398ad /runtime/src/main.cpp
parent1fe5072afb95a3026eb3f4a471f37a2921021b85 (diff)
title HUD: VRAM from VK_EXT_memory_budget, private bytes under Wine
The title HUD (#1922, LEONIDA_TITLE_HUD=1) read VRAM from DXGI's QueryVideoMemoryInfo on the host dxgi.dll and private memory from PROCESS_MEMORY_COUNTERS_EX::PrivateUsage. Under Wine both read 0. - VRAM: the runtime's device enables VK_EXT_memory_budget when the GPU has it (VulkanDeviceInfo::memory_budget), and rt::d3d12::vulkan_vram_budget sums heapUsage and heapBudget over the DEVICE_LOCAL heaps (other heaps' usage shown as shared), from src/vulkan_memory_budget.h. The HUD calls it once per refresh on its own thread. Without the extension it falls back to DXGI, and where that has no figure either it shows "VRAM n/a" rather than 0. - Private memory: Wine's GetProcessMemoryInfo fills only the PROCESS_MEMORY_COUNTERS part and leaves PrivateUsage 0; PagefileUsage is the same commit-charge figure on Windows 8 and later, so the HUD takes the larger of the two. Tests: title_hud_test checks the sums, the DXGI fallback, the "n/a" text and the private-bytes choice with made-up values, and that a VRAM source reaches the title at most once per refresh. The new d3d12_vram_budget_test checks that the device enables the extension exactly when the GPU has it and reads a non-zero budget, and skips (77) without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions