diff --git a/GPU/Common/DrawEngineCommon.h b/GPU/Common/DrawEngineCommon.h index 20b581def7..99023d63f1 100644 --- a/GPU/Common/DrawEngineCommon.h +++ b/GPU/Common/DrawEngineCommon.h @@ -71,6 +71,10 @@ public: void SetupVertexDecoder(u32 vertType); + bool IsCodePtrVertexDecoder(const u8 *ptr) const { + return decJitCache_->IsInSpace(ptr); + } + protected: virtual void ClearTrackedVertexArrays() {} diff --git a/GPU/D3D11/DrawEngineD3D11.cpp b/GPU/D3D11/DrawEngineD3D11.cpp index ecf1ad3206..e8e6ba8580 100644 --- a/GPU/D3D11/DrawEngineD3D11.cpp +++ b/GPU/D3D11/DrawEngineD3D11.cpp @@ -786,10 +786,6 @@ rotateVBO: #endif } -bool DrawEngineD3D11::IsCodePtrVertexDecoder(const u8 *ptr) const { - return decJitCache_->IsInSpace(ptr); -} - void DrawEngineD3D11::TessellationDataTransferD3D11::SendDataToShader(const float * pos, const float * tex, const float * col, int size, bool hasColor, bool hasTexCoords) { // Position if (prevSize < size) { diff --git a/GPU/D3D11/DrawEngineD3D11.h b/GPU/D3D11/DrawEngineD3D11.h index 3a7d347932..7175a78e61 100644 --- a/GPU/D3D11/DrawEngineD3D11.h +++ b/GPU/D3D11/DrawEngineD3D11.h @@ -136,8 +136,6 @@ public: DecodeVerts(); } - bool IsCodePtrVertexDecoder(const u8 *ptr) const; - void DispatchFlush() override { Flush(); } void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) override { SubmitPrim(verts, inds, prim, vertexCount, vertType, bytesRead); diff --git a/GPU/Directx9/DrawEngineDX9.cpp b/GPU/Directx9/DrawEngineDX9.cpp index 1cd8d66f2e..68d5d837fb 100644 --- a/GPU/Directx9/DrawEngineDX9.cpp +++ b/GPU/Directx9/DrawEngineDX9.cpp @@ -707,10 +707,6 @@ rotateVBO: host->GPUNotifyDraw(); } -bool DrawEngineDX9::IsCodePtrVertexDecoder(const u8 *ptr) const { - return decJitCache_->IsInSpace(ptr); -} - void DrawEngineDX9::TessellationDataTransferDX9::SendDataToShader(const float * pos, const float * tex, const float * col, int size, bool hasColor, bool hasTexCoords) { } diff --git a/GPU/Directx9/DrawEngineDX9.h b/GPU/Directx9/DrawEngineDX9.h index 4c4f96acc3..58bbfb3888 100644 --- a/GPU/Directx9/DrawEngineDX9.h +++ b/GPU/Directx9/DrawEngineDX9.h @@ -133,8 +133,6 @@ public: DecodeVerts(); } - bool IsCodePtrVertexDecoder(const u8 *ptr) const; - void DispatchFlush() override { Flush(); } void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) override { SubmitPrim(verts, inds, prim, vertexCount, vertType, bytesRead); diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index a3b0dfd52c..b7d25debd3 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -946,14 +946,6 @@ void GPU_GLES::DoState(PointerWrap &p) { } } -bool GPU_GLES::DescribeCodePtr(const u8 *ptr, std::string &name) { - if (drawEngine_.IsCodePtrVertexDecoder(ptr)) { - name = "VertexDecoderJit"; - return true; - } - return false; -} - std::vector GPU_GLES::DebugGetShaderIDs(DebugShaderType type) { switch (type) { case SHADER_TYPE_VERTEXLOADER: diff --git a/GPU/GLES/GPU_GLES.h b/GPU/GLES/GPU_GLES.h index fd7bff792e..e15a26c4d8 100644 --- a/GPU/GLES/GPU_GLES.h +++ b/GPU/GLES/GPU_GLES.h @@ -64,8 +64,6 @@ public: fullInfo = reportingFullInfo_; } - bool DescribeCodePtr(const u8 *ptr, std::string &name) override; - typedef void (GPU_GLES::*CmdFunc)(u32 op, u32 diff); struct CommandInfo { uint64_t flags; diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 1debe2840c..53b39e6d32 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2521,3 +2521,11 @@ bool GPUCommon::GetCurrentTexture(GPUDebugBuffer &buffer, int level) { } return textureCache_->GetCurrentTextureDebug(buffer, level); } + +bool GPUCommon::DescribeCodePtr(const u8 *ptr, std::string &name) { + if (drawEngineCommon_->IsCodePtrVertexDecoder(ptr)) { + name = "VertexDecoderJit"; + return true; + } + return false; +} diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 80455fe20c..0eceaa0b4c 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -169,10 +169,6 @@ public: #define new DBG_NEW #endif - bool DescribeCodePtr(const u8 *ptr, std::string &name) override { - return false; - } - // From GPUDebugInterface. bool GetCurrentDisplayList(DisplayList &list) override; bool GetCurrentFramebuffer(GPUDebugBuffer &buffer, GPUDebugFramebufferType type, int maxRes) override; @@ -183,6 +179,12 @@ public: bool GetCurrentSimpleVertices(int count, std::vector &vertices, std::vector &indices) override; bool GetOutputFramebuffer(GPUDebugBuffer &buffer) override; + std::vector DebugGetShaderIDs(DebugShaderType shader) override { return std::vector(); }; + std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override { + return "N/A"; + } + bool DescribeCodePtr(const u8 *ptr, std::string &name); + std::vector ActiveDisplayLists() override; void ResetListPC(int listID, u32 pc) override; void ResetListStall(int listID, u32 stall) override; @@ -236,11 +238,6 @@ public: return -1; } - std::vector DebugGetShaderIDs(DebugShaderType shader) override { return std::vector(); }; - std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override { - return "N/A"; - } - typedef void (GPUCommon::*CmdFunc)(u32 op, u32 diff); protected: diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index 0d9a0093a6..07e46aee86 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -1078,10 +1078,6 @@ void DrawEngineVulkan::UpdateUBOs(FrameData *frame) { } } -bool DrawEngineVulkan::IsCodePtrVertexDecoder(const u8 *ptr) const { - return decJitCache_->IsInSpace(ptr); -} - void DrawEngineVulkan::TessellationDataTransferVulkan::PrepareBuffers(float *&pos, float *&tex, float *&col, int size, bool hasColor, bool hasTexCoords) { int rowPitch; diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index aa40ebf98d..1bb2d3295c 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -147,8 +147,6 @@ public: DoFlush(); } - bool IsCodePtrVertexDecoder(const u8 *ptr) const; - void DispatchFlush() override { Flush(); } void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) override { SubmitPrim(verts, inds, prim, vertexCount, vertType, bytesRead); diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index d95a83abfe..f1fb20e9bc 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -856,14 +856,6 @@ void GPU_Vulkan::DoState(PointerWrap &p) { } } -bool GPU_Vulkan::DescribeCodePtr(const u8 *ptr, std::string &name) { - if (drawEngine_.IsCodePtrVertexDecoder(ptr)) { - name = "VertexDecoderJit"; - return true; - } - return false; -} - std::vector GPU_Vulkan::DebugGetShaderIDs(DebugShaderType type) { if (type == SHADER_TYPE_VERTEXLOADER) { return drawEngine_.DebugGetVertexLoaderIDs(); diff --git a/GPU/Vulkan/GPU_Vulkan.h b/GPU/Vulkan/GPU_Vulkan.h index 5131f3fad6..1e7dc06ec2 100644 --- a/GPU/Vulkan/GPU_Vulkan.h +++ b/GPU/Vulkan/GPU_Vulkan.h @@ -84,7 +84,6 @@ public: // Using string because it's generic - makes no assumptions on the size of the shader IDs of this backend. std::vector DebugGetShaderIDs(DebugShaderType shader) override; std::string DebugGetShaderString(std::string id, DebugShaderType shader, DebugShaderStringType stringType) override; - bool DescribeCodePtr(const u8 *ptr, std::string &name) override; protected: void FastRunLoop(DisplayList &list) override;