mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1922] [MERGED] d3d12_xs: LEONIDA_TITLE_HUD shows frame rate, memory and pipeline compiles in the window's title bar (RT-TITLE-HUD) #1930
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1930
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1922
Author: @kawaii-shakal
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:title-bar-hud📝 Commits (2)
e86b3ced3d12_xs: LEONIDA_TITLE_HUD shows frame rate, memory and pipeline compiles in the window's title bar (RT-TITLE-HUD)1c5e2dctitle HUD: with no frame in an interval, show how long since the last one📊 Changes
5 files changed (+280 additions, -4 deletions)
View changed files
📝
docs/boot.md(+12 -0)📝
runtime/CMakeLists.txt(+10 -0)📝
runtime/shims/d3d12_xs_device.cpp(+8 -4)➕
runtime/shims/title_hud.h(+173 -0)➕
runtime/test/title_hud_test.cpp(+77 -0)📄 Description
Claimed in the coordination issue as RT-TITLE-HUD: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7167379777
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.