mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Small simplification
This commit is contained in:
parent
95b7db99ed
commit
51ae6ce898
4 changed files with 14 additions and 5 deletions
|
@ -200,6 +200,7 @@ class GPUDebugInterface {
|
|||
public:
|
||||
virtual ~GPUDebugInterface() {}
|
||||
virtual bool GetCurrentDisplayList(DisplayList &list) = 0;
|
||||
virtual bool GetCurrentCommand(u32 *cmd) = 0;
|
||||
virtual std::vector<DisplayList> ActiveDisplayLists() = 0;
|
||||
virtual void ResetListPC(int listID, u32 pc) = 0;
|
||||
virtual void ResetListStall(int listID, u32 stall) = 0;
|
||||
|
|
|
@ -1581,6 +1581,16 @@ bool GPUCommon::GetCurrentDisplayList(DisplayList &list) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool GPUCommon::GetCurrentCommand(u32 *cmd) {
|
||||
DisplayList list;
|
||||
if (GetCurrentDisplayList(list)) {
|
||||
*cmd = Memory::Read_U32(list.pc);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<DisplayList> GPUCommon::ActiveDisplayLists() {
|
||||
std::vector<DisplayList> result;
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ public:
|
|||
// From GPUDebugInterface.
|
||||
bool GetCurrentDisplayList(DisplayList &list) override;
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices) override;
|
||||
|
||||
bool GetCurrentCommand(u32 *cmd) override;
|
||||
FramebufferManagerCommon *GetFramebufferManagerCommon() override {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -171,9 +171,8 @@ int CtrlVertexList::GetRowCount() {
|
|||
rowCount_ = state.prim & 0xFFFF;
|
||||
|
||||
// Override if we're on a prim command.
|
||||
DisplayList list;
|
||||
if (gpuDebug->GetCurrentDisplayList(list)) {
|
||||
u32 cmd = Memory::Read_U32(list.pc);
|
||||
u32 cmd;
|
||||
if (gpuDebug->GetCurrentCommand(&cmd)) {
|
||||
if ((cmd >> 24) == GE_CMD_PRIM || (cmd >> 24) == GE_CMD_BOUNDINGBOX) {
|
||||
rowCount_ = cmd & 0xFFFF;
|
||||
} else if ((cmd >> 24) == GE_CMD_BEZIER || (cmd >> 24) == GE_CMD_SPLINE) {
|
||||
|
@ -182,7 +181,6 @@ int CtrlVertexList::GetRowCount() {
|
|||
rowCount_ = u * v;
|
||||
}
|
||||
}
|
||||
|
||||
if (!gpuDebug->GetCurrentSimpleVertices(rowCount_, vertices, indices)) {
|
||||
rowCount_ = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue