From 37758fa2907b3e844e5f7c4b632016fc816694fe Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 17 Aug 2025 10:30:32 +0100 Subject: [PATCH] OpcodeDecoder: provide default GetVertexSize() implementation --- Source/Core/Core/FifoPlayer/FifoPlayer.cpp | 5 ----- Source/Core/Core/FifoPlayer/FifoRecorder.cpp | 5 ----- Source/Core/DolphinQt/FIFO/FIFOAnalyzer.cpp | 10 ---------- Source/Core/VideoCommon/OpcodeDecoding.h | 6 +++++- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index 4fe908dc8b..7529d406b4 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -57,11 +57,6 @@ public: OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; } - OPCODE_CALLBACK(u32 GetVertexSize(u8 vat)) - { - return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]); - } - bool m_start_of_primitives = false; bool m_end_of_primitives = false; bool m_efb_copy = false; diff --git a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp index 4286a70a81..04236c4651 100644 --- a/Source/Core/Core/FifoPlayer/FifoRecorder.cpp +++ b/Source/Core/Core/FifoPlayer/FifoRecorder.cpp @@ -50,11 +50,6 @@ public: OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; } - OPCODE_CALLBACK(u32 GetVertexSize(u8 vat)) - { - return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]); - } - private: void ProcessVertexComponent(CPArray array_index, VertexComponentFormat array_type, u32 component_offset, u32 component_size, u32 vertex_size, diff --git a/Source/Core/DolphinQt/FIFO/FIFOAnalyzer.cpp b/Source/Core/DolphinQt/FIFO/FIFOAnalyzer.cpp index 62a146c719..396532ef69 100644 --- a/Source/Core/DolphinQt/FIFO/FIFOAnalyzer.cpp +++ b/Source/Core/DolphinQt/FIFO/FIFOAnalyzer.cpp @@ -316,11 +316,6 @@ public: OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; } - OPCODE_CALLBACK(u32 GetVertexSize(const u8 vat)) - { - return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]); - } - QString text; CPState m_cpmem; }; @@ -738,11 +733,6 @@ public: OPCODE_CALLBACK(CPState& GetCPState()) { return m_cpmem; } - OPCODE_CALLBACK(u32 GetVertexSize(const u8 vat)) - { - return VertexLoaderBase::GetVertexSize(GetCPState().vtx_desc, GetCPState().vtx_attr[vat]); - } - QString text; CPState m_cpmem; }; diff --git a/Source/Core/VideoCommon/OpcodeDecoding.h b/Source/Core/VideoCommon/OpcodeDecoding.h index 42991b7715..36a56a0fe2 100644 --- a/Source/Core/VideoCommon/OpcodeDecoding.h +++ b/Source/Core/VideoCommon/OpcodeDecoding.h @@ -111,7 +111,11 @@ public: // Get the current CP state. Needed for vertex decoding; will also be mutated for CP commands. virtual CPState& GetCPState() = 0; - virtual u32 GetVertexSize(u8 vat) = 0; + virtual u32 GetVertexSize(u8 vat) + { + const CPState& cpmem = GetCPState(); + return VertexLoaderBase::GetVertexSize(cpmem.vtx_desc, cpmem.vtx_attr[vat]); + } #endif };