Devtools: PM4 Explorer (#1094)

* Devtools: Pause system

* Devtools: pm4 viewer

- new menu bar
- refactored video_info layer
- dump & inspect pm4 packets
- removed dumpPM4 config
- renamed System to DebugState
- add docking space
- simple video info constrained to window size

* Devtools: pm4 viewer - add combo to select the queue

* Devtools: pm4 viewer - add hex editor

* Devtools: pm4 viewer - dump current cmd

* add monospaced font to devtools

* Devtools: pm4 viewer - use spec op name

avoid some allocations
This commit is contained in:
Vinicius Rangel 2024-10-03 17:43:23 -03:00 committed by GitHub
parent 009f956d8d
commit af398e3684
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 19323 additions and 242 deletions

View file

@ -10,6 +10,9 @@
#define IM_COL32_GRAY(x) IM_COL32(x, x, x, 0xFF)
#define IMGUI_FONT_TEXT 0
#define IMGUI_FONT_MONO 1
namespace ImGui {
namespace Easing {
@ -27,6 +30,20 @@ inline void CentralizeWindow() {
SetNextWindowPos(display_size / 2.0f, ImGuiCond_Always, {0.5f});
}
inline void KeepWindowInside(ImVec2 display_size = GetIO().DisplaySize) {
const auto cur_pos = GetWindowPos();
if (cur_pos.x < 0.0f || cur_pos.y < 0.0f) {
SetWindowPos(ImMax(cur_pos, ImVec2(0.0f, 0.0f)));
return;
}
const auto cur_size = GetWindowSize();
const auto bottom_right = cur_pos + cur_size;
if (bottom_right.x > display_size.x || bottom_right.y > display_size.y) {
const auto max_pos = display_size - cur_size;
SetWindowPos(ImMin(cur_pos, max_pos));
}
}
inline void KeepNavHighlight() {
GetCurrentContext()->NavDisableHighlight = false;
}