diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 7f8c5819ca..6c210e4ae6 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -1661,3 +1661,11 @@ bool GLES_GPU::GetCurrentTexture(GPUDebugBuffer &buffer) { bool GLES_GPU::GetCurrentSimpleVertices(int count, std::vector &vertices, std::vector &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; +} diff --git a/GPU/GLES/GLES_GPU.h b/GPU/GLES/GLES_GPU.h index f046f31374..6746e77770 100644 --- a/GPU/GLES/GLES_GPU.h +++ b/GPU/GLES/GLES_GPU.h @@ -73,6 +73,8 @@ public: bool GetCurrentTexture(GPUDebugBuffer &buffer); bool GetCurrentSimpleVertices(int count, std::vector &vertices, std::vector &indices); + virtual bool DescribeCodePtr(const u8 *ptr, std::string &name); + protected: virtual void FastRunLoop(DisplayList &list); virtual void ProcessEvent(GPUEvent ev); diff --git a/GPU/GLES/TransformPipeline.h b/GPU/GLES/TransformPipeline.h index 31be94b66b..7d463237dc 100644 --- a/GPU/GLES/TransformPipeline.h +++ b/GPU/GLES/TransformPipeline.h @@ -128,6 +128,10 @@ public: DoFlush(); } + bool IsCodePtrVertexDecoder(const u8 *ptr) const { + return decJitCache_->IsInSpace(ptr); + } + private: void DecodeVerts(); void DecodeVertsStep(); diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 4aae10035e..769df0c94e 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -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; diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index 4da7b77286..ab1fdd82e4 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -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; diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 0d711dd9df..ab1e87c9d3 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -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;