[PR #2137] [MERGED] runtime: LEONIDA_DEV_OVERLAY shows what the runtime is doing over the title's window (RT-DEV-OVERLAY) #2142

Closed
opened 2026-11-26 21:20:11 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2137
Author: @Snooozs
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/26/2026
Merged by: @aslan2142

Base: main ← Head: dev-overlay


📝 Commits (1)

  • f6cb4ae runtime: LEONIDA_DEV_OVERLAY shows what the runtime is doing over the title's window (RT-DEV-OVERLAY)

📊 Changes

9 files changed (+491 additions, -2 deletions)

View changed files

📝 docs/boot.md (+6 -0)
📝 runtime/CMakeLists.txt (+10 -0)
📝 runtime/README.md (+1 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+3 -0)
➕ runtime/src/dev_overlay.h (+278 -0)
➕ runtime/src/dev_status.h (+51 -0)
📝 runtime/src/main.cpp (+2 -0)
📝 runtime/src/submit_phases.h (+42 -2)
➕ runtime/test/dev_overlay_test.cpp (+98 -0)

📄 Description

Claimed in the coordination issue as: RT-DEV-OVERLAY (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7176377048)

What and why

LEONIDA_DEV_OVERLAY=1 (off by default, Windows) draws what the runtime is doing in a small click-through window over the top left corner of the title's window, while that window is in front:

  • frames and submissions a second;
  • where a submission's CPU time goes (descriptors, textures, copies, replay);
  • the phase that is running right now, and for how long once it passes a second;
  • pipeline builds: how many are done, how many are in flight, the last one started;
  • indirect draws emitted and skipped;
  • cores in use, the process's working set, free RAM.

LEONIDA_TITLE_HUD (#1922) stays as it is: frame times, memory and compile time in the title bar. The overlay is for the boots that look frozen. It has its own thread, window and GDI text, so it keeps counting while the title presents nothing for seconds (a pipeline build, a submission that waits), and its "now" line says which of them it is. It is in no captured frame and changes nothing the GPU does. If you would rather have these lines in title_hud.h, I move them.

  • src/dev_overlay.h: the window and the text (the text is a pure function).
  • src/dev_status.h: pipeline builds in flight. Two atomic operations and a short name copy per build, next to the existing pipeline_profile::DriverCall.
  • src/submit_phases.h: each Scope also counts its thread into its phase, and back into the outer phase when it ends. Counted per phase because queues submit from several threads: one "current phase" value goes stale when two scopes overlap and end in the order they began. Always on, a few relaxed atomics per scope.

Tested

  • New dev_overlay_test (no window, GPU or game file, portable): the text, the counter differences, nested scopes, two threads whose scopes overlap, the builds in flight. Two mutants of submit_phases.h (the outer phase not entered again; the phase not left) fail it.
  • gta6rt, dev_overlay_test and title_hud_test build with Visual Studio 2022 (RelWithDebInfo); both tests pass. Full ctest was not run.
  • In the game: I have used the overlay in my local boots (RTX 5060 Ti) on another base, where it named the state of a boot that looked hung. This cut on main, with the per-phase counts and the other two header changes, has not been booted with the game yet.

GPUs tested: n/a for the test; the local boots ran on an NVIDIA RTX 5060 Ti 16 GB, driver 621.01, Windows 10 19045.

AI-assisted: yes (Claude Code, Claude Opus 5.5).

Checklist

  • Based on current main and merges cleanly (checked against d3b67a704).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • No new translator rule.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2137 **Author:** [@Snooozs](https://github.com/Snooozs) **Created:** 11/25/2026 **Status:** ✅ Merged **Merged:** 11/26/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `dev-overlay` --- ### 📝 Commits (1) - [`f6cb4ae`](https://github.com/ubiquitarianism/leonida/commit/f6cb4aedfc01d8e8421122643ea668ae71a6abf5) runtime: LEONIDA_DEV_OVERLAY shows what the runtime is doing over the title's window (RT-DEV-OVERLAY) ### 📊 Changes **9 files changed** (+491 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/boot.md` (+6 -0) 📝 `runtime/CMakeLists.txt` (+10 -0) 📝 `runtime/README.md` (+1 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+3 -0) ➕ `runtime/src/dev_overlay.h` (+278 -0) ➕ `runtime/src/dev_status.h` (+51 -0) 📝 `runtime/src/main.cpp` (+2 -0) 📝 `runtime/src/submit_phases.h` (+42 -2) ➕ `runtime/test/dev_overlay_test.cpp` (+98 -0) </details> ### 📄 Description Claimed in the coordination issue as: RT-DEV-OVERLAY (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7176377048) ### What and why `LEONIDA_DEV_OVERLAY=1` (off by default, Windows) draws what the runtime is doing in a small click-through window over the top left corner of the title's window, while that window is in front: - frames and submissions a second; - where a submission's CPU time goes (descriptors, textures, copies, replay); - the phase that is running right now, and for how long once it passes a second; - pipeline builds: how many are done, how many are in flight, the last one started; - indirect draws emitted and skipped; - cores in use, the process's working set, free RAM. `LEONIDA_TITLE_HUD` (#1922) stays as it is: frame times, memory and compile time in the title bar. The overlay is for the boots that look frozen. It has its own thread, window and GDI text, so it keeps counting while the title presents nothing for seconds (a pipeline build, a submission that waits), and its "now" line says which of them it is. It is in no captured frame and changes nothing the GPU does. If you would rather have these lines in `title_hud.h`, I move them. - `src/dev_overlay.h`: the window and the text (the text is a pure function). - `src/dev_status.h`: pipeline builds in flight. Two atomic operations and a short name copy per build, next to the existing `pipeline_profile::DriverCall`. - `src/submit_phases.h`: each `Scope` also counts its thread into its phase, and back into the outer phase when it ends. Counted per phase because queues submit from several threads: one "current phase" value goes stale when two scopes overlap and end in the order they began. Always on, a few relaxed atomics per scope. ### Tested - New `dev_overlay_test` (no window, GPU or game file, portable): the text, the counter differences, nested scopes, two threads whose scopes overlap, the builds in flight. Two mutants of `submit_phases.h` (the outer phase not entered again; the phase not left) fail it. - `gta6rt`, `dev_overlay_test` and `title_hud_test` build with Visual Studio 2022 (RelWithDebInfo); both tests pass. Full ctest was not run. - In the game: I have used the overlay in my local boots (RTX 5060 Ti) on another base, where it named the state of a boot that looked hung. This cut on `main`, with the per-phase counts and the other two header changes, has not been booted with the game yet. GPUs tested: n/a for the test; the local boots ran on an NVIDIA RTX 5060 Ti 16 GB, driver 621.01, Windows 10 19045. AI-assisted: yes (Claude Code, Claude Opus 5.5). ### Checklist - [x] Based on current `main` and merges cleanly (checked against d3b67a704). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] No new translator rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 21:20:11 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2142
No description provided.