Also report the vertex decoder jit to verysleepy.

Can use the same methods to support other platforms.
This commit is contained in:
Unknown W. Brackets 2013-11-30 18:39:16 -08:00
parent 5d2ff64252
commit d35717f5a8
6 changed files with 28 additions and 0 deletions

View file

@ -1661,3 +1661,11 @@ bool GLES_GPU::GetCurrentTexture(GPUDebugBuffer &buffer) {
bool GLES_GPU::GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices) {
return transformDraw_.GetCurrentSimpleVertices(count, vertices, indices);
}
bool GLES_GPU::DescribeCodePtr(const u8 *ptr, std::string &name) {
if (transformDraw_.IsCodePtrVertexDecoder(ptr)) {
name = "VertexDecoderJit";
return true;
}
return false;
}

View file

@ -73,6 +73,8 @@ public:
bool GetCurrentTexture(GPUDebugBuffer &buffer);
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices);
virtual bool DescribeCodePtr(const u8 *ptr, std::string &name);
protected:
virtual void FastRunLoop(DisplayList &list);
virtual void ProcessEvent(GPUEvent ev);

View file

@ -128,6 +128,10 @@ public:
DoFlush();
}
bool IsCodePtrVertexDecoder(const u8 *ptr) const {
return decJitCache_->IsInSpace(ptr);
}
private:
void DecodeVerts();
void DecodeVertsStep();

View file

@ -73,6 +73,10 @@ public:
FreeAlignedMemory(p);
}
virtual bool DescribeCodePtr(const u8 *ptr, std::string &name) {
return false;
}
protected:
// To avoid virtual calls to PreExecuteOp().
virtual void FastRunLoop(DisplayList &list) = 0;

View file

@ -243,6 +243,9 @@ public:
virtual bool FramebufferReallyDirty() = 0;
virtual bool BusyDrawing() = 0;
// If any jit is being used inside the GPU.
virtual bool DescribeCodePtr(const u8 *ptr, std::string &name) = 0;
// Debugging
virtual void DumpNextFrame() = 0;
virtual void GetReportingInfo(std::string &primaryInfo, std::string &fullInfo) = 0;

View file

@ -1572,6 +1572,13 @@ namespace MainWindow
return TRUE;
}
}
if (gpu) {
std::string name;
if (gpu->DescribeCodePtr(ptr, name)) {
swprintf_s(info->name, L"GPU::%S", name.c_str());
return TRUE;
}
}
}
return FALSE;