diff options
| author | JMC47 <JMC4789@gmail.com> | 2022-09-18 22:38:06 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-18 22:38:06 -0400 |
| commit | 6f4f5b0b7b62b3a1eb9d0e069b38de1bbedde6c6 (patch) | |
| tree | 8d9035d5a97d113131d630bbe4311d4748a4d681 /Source/Core/VideoCommon/OpcodeDecoding.cpp | |
| parent | d19994b4bd9f18b5d917105ab6bac4131be8d2e5 (diff) | |
| parent | 2db74e7f21cdad4abc7f5148ffcdd9e801093b42 (diff) | |
Merge pull request #11067 from K0bin/cache-vertex-size
OpcodeDecoding: Cache vertex sizes
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/OpcodeDecoding.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp index 3f90a2b6e3..bc19a1c2de 100644 --- a/Source/Core/VideoCommon/OpcodeDecoding.cpp +++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp @@ -122,7 +122,7 @@ public: // HACK DataReader src{const_cast<u8*>(vertex_data), const_cast<u8*>(vertex_data) + size}; const u32 bytes = - VertexLoaderManager::RunVertices(vat, primitive, num_vertices, src, is_preprocess); + VertexLoaderManager::RunVertices<is_preprocess>(vat, primitive, num_vertices, src); ASSERT(bytes == size); @@ -228,6 +228,12 @@ public: return g_main_cp_state; } + OPCODE_CALLBACK(u32 GetVertexSize(u8 vat)) + { + VertexLoaderBase* loader = VertexLoaderManager::RefreshLoader<is_preprocess>(vat); + return loader->m_vertex_size; + } + u32 m_cycles = 0; bool m_in_display_list = false; }; |
