mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-30 17:02:19 +00:00
8b5669828b
This way you can pick out items you want to watch.
112 lines
3.1 KiB
C++
112 lines
3.1 KiB
C++
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
// Official git repository and contact information can be found at
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
#pragma once
|
|
|
|
#include "Common/CommonWindows.h"
|
|
#include "GPU/Common/GPUDebugInterface.h"
|
|
#include "Globals.h"
|
|
#include "Windows/resource.h"
|
|
#include "Windows/W32Util/DialogManager.h"
|
|
#include "Windows/W32Util/TabControl.h"
|
|
#include "Windows/GEDebugger/SimpleGLWindow.h"
|
|
|
|
enum {
|
|
WM_GEDBG_BREAK_CMD = WM_USER + 200,
|
|
WM_GEDBG_BREAK_DRAW,
|
|
WM_GEDBG_STEPDISPLAYLIST,
|
|
WM_GEDBG_TOGGLEPCBREAKPOINT,
|
|
WM_GEDBG_RUNTOWPARAM,
|
|
WM_GEDBG_SETCMDWPARAM,
|
|
WM_GEDBG_UPDATE_WATCH,
|
|
};
|
|
|
|
enum BreakNextType {
|
|
BREAK_NONE,
|
|
BREAK_NEXT_OP,
|
|
BREAK_NEXT_DRAW,
|
|
BREAK_NEXT_TEX,
|
|
BREAK_NEXT_NONTEX,
|
|
BREAK_NEXT_FRAME,
|
|
BREAK_NEXT_PRIM,
|
|
};
|
|
|
|
class CtrlDisplayListView;
|
|
class TabDisplayLists;
|
|
class TabStateFlags;
|
|
class TabStateLighting;
|
|
class TabStateTexture;
|
|
class TabStateSettings;
|
|
class TabVertices;
|
|
class TabMatrices;
|
|
class TabStateWatch;
|
|
struct GPUgstate;
|
|
|
|
class CGEDebugger : public Dialog {
|
|
public:
|
|
CGEDebugger(HINSTANCE _hInstance, HWND _hParent);
|
|
~CGEDebugger();
|
|
|
|
static void Init();
|
|
|
|
protected:
|
|
BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
private:
|
|
void SetupPreviews();
|
|
void UpdatePreviews();
|
|
void UpdatePrimaryPreview(const GPUgstate &state);
|
|
void UpdateSecondPreview(const GPUgstate &state);
|
|
void UpdatePrimPreview(u32 op);
|
|
void CleanupPrimPreview();
|
|
void UpdateSize(WORD width, WORD height);
|
|
void SavePosition();
|
|
void SetBreakNext(BreakNextType type);
|
|
void UpdateTextureLevel(int level);
|
|
void DescribePrimaryPreview(const GPUgstate &state, wchar_t desc[256]);
|
|
void DescribeSecondPreview(const GPUgstate &state, wchar_t desc[256]);
|
|
void PrimaryPreviewHover(int x, int y);
|
|
void SecondPreviewHover(int x, int y);
|
|
void DescribePixel(u32 pix, GPUDebugBufferFormat fmt, int x, int y, wchar_t desc[256]);
|
|
void DescribePixelRGBA(u32 pix, GPUDebugBufferFormat fmt, int x, int y, wchar_t desc[256]);
|
|
|
|
u32 TexturePreviewFlags(const GPUgstate &state);
|
|
|
|
CtrlDisplayListView *displayList;
|
|
TabDisplayLists *lists;
|
|
TabStateFlags *flags;
|
|
TabStateLighting *lighting;
|
|
TabStateTexture *textureState;
|
|
TabStateSettings *settings;
|
|
TabVertices *vertices;
|
|
TabMatrices *matrices;
|
|
SimpleGLWindow *primaryWindow;
|
|
SimpleGLWindow *secondWindow;
|
|
TabStateWatch *watch;
|
|
TabControl *tabs;
|
|
TabControl *fbTabs;
|
|
int textureLevel_;
|
|
bool showClut_;
|
|
bool forceOpaque_;
|
|
// The most recent primary/framebuffer and texture buffers.
|
|
const GPUDebugBuffer *primaryBuffer_;
|
|
const GPUDebugBuffer *secondBuffer_;
|
|
|
|
int minWidth_;
|
|
int minHeight_;
|
|
};
|