d3d12_xs: LEONIDA_TITLE_HUD shows frame rate, memory and pipeline compiles in the window's title bar (RT-TITLE-HUD) #1922
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1922
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1922/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kawaii-shakal on GitHub · 2026-11-25 15:52 UTC · original
kawaii-shakal:title-bar-hud→main· +280 −4 · 5 files · 2 commits · merged 2026-11-25 19:39 UTCClaimed in the coordination issue as RT-TITLE-HUD: #1608
Problem
During a boot, a tester can't tell whether the game is slow because of frame time, because of memory pressure, or because pipelines are being compiled in the frame. The log has the numbers, but only every
LEONIDA_MEM_PROBEseconds and scattered over hundreds of thousands of lines.Change
With
LEONIDA_TITLE_HUD=1, the title bar of the window the title presents in shows, updated twice a second:GetProcessMemoryInfo).IDXGIAdapter3::QueryVideoMemoryInfo). The adapter is the hardware one with the most dedicated memory, taken from the host's owndxgi.dll.vkCreate*Pipelinesin the last interval. Several compiler threads can push this above the interval. It needsLEONIDA_MEM_PROBE, which counts them; without it the field readsPSO -.The text is set from a thread of its own with
SendMessageTimeout(SMTO_ABORTIFHUNG), so a busy or hung window thread never holds a present.runtime/shims/title_hud.himplements it, and it is wired intod3d12_xs_device.cpp's PresentX state.docs/boot.mddocuments the variable. It is off by default.Tested (Windows 11 Pro 26300, RTX 5070 Ti, VS 2026 RelWithDebInfo)
title_hud: a real window owned by the test's main thread gets the HUD text from the HUD thread. ~60 Hz presents give a plausible frame rate (35 fps underSleep(16)here). A window that stops pumping does not hang the HUD's shutdown, and a HUD destroyed at once returns at once.LEONIDA_MEM_PROBE=10, while library compute pipelines were being compiled in the frame.🤖 Generated with Claude Code
@aslan2142 on GitHub · 2026-11-25 19:39 UTC · original
Merged, thanks! Tested
1c5e2dcabmerged ontomainwith the full Windows suite under Wine (llvmpipe and a RADV iGPU):title_hudis new and passes on both devices, and no other test changed. The one difference,xmem_no_write_watchon lavapipe, is the known first-run flake: re-run alone it passed every time, andmainfails it the same way in a fresh prefix.It also works in a retail run under Wine on an RX 7900 XTX with
LEONIDA_TITLE_HUD=1.maine18b59a5b+1c5e2dcab: it merges cleanly; the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 5 changed files.VK_EXT_memory_budgetwould give the VRAM side from the Vulkan device itself.AI-assisted (Claude Code, Claude Opus 5.5).