mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-14 00:49:49 +00:00
Plumb through a basic Ge debugger window (no real functionality yet)
This commit is contained in:
parent
e94defbb15
commit
16c6855ef0
@ -13,6 +13,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "ext/imgui/imgui.h"
|
||||
#include "Common/Profiler/Profiler.h"
|
||||
|
||||
#include "Common/GraphicsContext.h"
|
||||
@ -1975,3 +1976,14 @@ bool GPUCommon::DescribeCodePtr(const u8 *ptr, std::string &name) {
|
||||
// which is owned by the drawengine.
|
||||
return drawEngineCommon_->DescribeCodePtr(ptr, name);
|
||||
}
|
||||
|
||||
void GPUCommon::DrawImGuiDebugger() {
|
||||
// First, let's list any active display lists.
|
||||
ImGui::Text("Next list ID: %d", nextListID);
|
||||
for (auto index : dlQueue) {
|
||||
const auto &list = dls[index];
|
||||
ImGui::Text("List %d", list.id);
|
||||
ImGui::Text("pc: %08x (start: %08x)", list.pc, list.startpc);
|
||||
ImGui::Text("bbox: %d", (int)list.bboxResult);
|
||||
}
|
||||
}
|
||||
|
@ -131,6 +131,8 @@ public:
|
||||
|
||||
void SwitchToGe();
|
||||
|
||||
void DrawImGuiDebugger() override;
|
||||
|
||||
uint32_t SetAddrTranslation(uint32_t value) override;
|
||||
uint32_t GetAddrTranslation() override;
|
||||
|
||||
|
@ -221,6 +221,7 @@ public:
|
||||
|
||||
// Tells the GPU to update the gpuStats structure.
|
||||
virtual void GetStats(char *buffer, size_t bufsize) = 0;
|
||||
virtual void DrawImGuiDebugger() = 0;
|
||||
|
||||
// Invalidate any cached content sourced from the specified range.
|
||||
// If size = -1, invalidate everything.
|
||||
|
@ -821,6 +821,7 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("Graphics")) {
|
||||
ImGui::MenuItem("Ge Debugger", nullptr, &cfg_.geDebuggerOpen);
|
||||
ImGui::MenuItem("Display Output", nullptr, &cfg_.displayOpen);
|
||||
ImGui::MenuItem("Textures", nullptr, &cfg_.texturesOpen);
|
||||
ImGui::MenuItem("Framebuffers", nullptr, &cfg_.framebuffersOpen);
|
||||
@ -919,6 +920,10 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUDebugInterface *gpuDebu
|
||||
if (cfg_.structViewerOpen) {
|
||||
structViewer_.Draw(mipsDebug, &cfg_.structViewerOpen);
|
||||
}
|
||||
|
||||
if (cfg_.geDebuggerOpen) {
|
||||
DrawGeDebuggerWindow(cfg_);
|
||||
}
|
||||
}
|
||||
|
||||
void ImDisasmWindow::Draw(MIPSDebugInterface *mipsDebug, bool *open, CoreState coreState) {
|
||||
|
@ -78,6 +78,7 @@ struct ImConfig {
|
||||
bool kernelObjectsOpen;
|
||||
bool audioChannelsOpen;
|
||||
bool debugStatsOpen;
|
||||
bool geDebuggerOpen;
|
||||
|
||||
// HLE explorer settings
|
||||
// bool filterByUsed = true;
|
||||
|
@ -68,3 +68,15 @@ void DrawDebugStatsWindow(ImConfig &cfg) {
|
||||
ImGui::TextUnformatted(statbuf);
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
// Stub
|
||||
void DrawGeDebuggerWindow(ImConfig &cfg) {
|
||||
if (!ImGui::Begin("Debug Stats", &cfg.geDebuggerOpen)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
|
||||
gpu->DrawImGuiDebugger();
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ void DrawFramebuffersWindow(ImConfig &cfg, FramebufferManagerCommon *framebuffer
|
||||
void DrawTexturesWindow(ImConfig &cfg, TextureCacheCommon *textureCache);
|
||||
void DrawDisplayWindow(ImConfig &cfg, FramebufferManagerCommon *framebufferManager);
|
||||
void DrawDebugStatsWindow(ImConfig &cfg);
|
||||
void DrawGeDebuggerWindow(ImConfig &cfg);
|
||||
|
||||
class ImGeDebugger {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user