Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/GPU/Debugger/State.h
3186 views
1
#pragma once
2
3
#include <string_view>
4
5
#include <cstdint>
6
7
#include "Common/CommonTypes.h"
8
9
#include "GPU/Debugger/GECommandTable.h"
10
#include "GPU/Common/SplineCommon.h"
11
#include "GPU/Common/GPUDebugInterface.h"
12
13
enum VertexListCols {
14
VERTEXLIST_COL_X,
15
VERTEXLIST_COL_Y,
16
VERTEXLIST_COL_Z,
17
VERTEXLIST_COL_U,
18
VERTEXLIST_COL_V,
19
VERTEXLIST_COL_COLOR,
20
VERTEXLIST_COL_NX,
21
VERTEXLIST_COL_NY,
22
VERTEXLIST_COL_NZ,
23
VERTEXLIST_COL_COUNT,
24
};
25
26
class GPUDebugInterface;
27
28
extern const GECommand g_stateFlagsRows[];
29
extern const GECommand g_stateLightingRows[];
30
extern const GECommand g_stateTextureRows[];
31
extern const GECommand g_stateSettingsRows[];
32
extern const size_t g_stateFlagsRowsSize;
33
extern const size_t g_stateLightingRowsSize;
34
extern const size_t g_stateTextureRowsSize;
35
extern const size_t g_stateSettingsRowsSize;
36
37
struct GPUDebugVertex;
38
class VertexDecoder;
39
40
void FormatStateRow(GPUDebugInterface *debug, char *dest, size_t destSize, CmdFormatType fmt, u32 value, bool enabled, u32 otherValue, u32 otherValue2);
41
void FormatVertCol(char *dest, size_t destSize, const GPUDebugVertex &vert, int col);
42
void FormatVertColRaw(VertexDecoder *decoder, char *dest, size_t destSize, int row, int col);
43
44
// These are utilities used by the debugger vertex preview.
45
bool GetPrimPreview(u32 op, GEPrimitiveType &prim, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices, int &count);
46
void DescribePixel(u32 pix, GPUDebugBufferFormat fmt, int x, int y, char desc[256]);
47
void DescribePixelRGBA(u32 pix, GPUDebugBufferFormat fmt, int x, int y, char desc[256]);
48
49