diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp index 752cea9a5b..d824893243 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp @@ -174,9 +174,9 @@ void SWVertexLoader::LoadVertex() // convert the vertex from the gc format to the videocommon (hardware optimized) format u8* old = g_video_buffer_read_ptr; int converted_vertices = m_CurrentLoader->RunVertices( - m_primitiveType, 1, DataReader(g_video_buffer_read_ptr, nullptr), // src - DataReader(m_LoadedVertices.data(), m_LoadedVertices.data() + m_LoadedVertices.size()) // dst + DataReader(m_LoadedVertices.data(), m_LoadedVertices.data() + m_LoadedVertices.size()), // dst + 1, m_primitiveType ); g_video_buffer_read_ptr = old + m_CurrentLoader->m_VertexSize; diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 9538b1b11d..881424052c 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -316,7 +316,7 @@ void VertexLoader::WriteCall(TPipelineFunction func) m_PipelineStages[m_numPipelineStages++] = func; } -int VertexLoader::RunVertices(int primitive, int count, DataReader src, DataReader dst) +int VertexLoader::RunVertices(DataReader src, DataReader dst, int count, int primitive) { g_vertex_manager_write_ptr = dst.GetPointer(); g_video_buffer_read_ptr = src.GetPointer(); diff --git a/Source/Core/VideoCommon/VertexLoader.h b/Source/Core/VideoCommon/VertexLoader.h index 009c1ae006..3bae14a2d0 100644 --- a/Source/Core/VideoCommon/VertexLoader.h +++ b/Source/Core/VideoCommon/VertexLoader.h @@ -32,7 +32,7 @@ class VertexLoader : public VertexLoaderBase public: VertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr); - int RunVertices(int primitive, int count, DataReader src, DataReader dst) override; + int RunVertices(DataReader src, DataReader dst, int count, int primitive) override; std::string GetName() const override { return "OldLoader"; } bool IsInitialized() override { return true; } // This vertex loader supports all formats diff --git a/Source/Core/VideoCommon/VertexLoaderBase.cpp b/Source/Core/VideoCommon/VertexLoaderBase.cpp index b17731509d..c8ab14fb3b 100644 --- a/Source/Core/VideoCommon/VertexLoaderBase.cpp +++ b/Source/Core/VideoCommon/VertexLoaderBase.cpp @@ -159,13 +159,13 @@ public: delete b; } - int RunVertices(int primitive, int count, DataReader src, DataReader dst) override + int RunVertices(DataReader src, DataReader dst, int count, int primitive) override { buffer_a.resize(count * a->m_native_vtx_decl.stride + 4); buffer_b.resize(count * b->m_native_vtx_decl.stride + 4); - int count_a = a->RunVertices(primitive, count, src, DataReader(buffer_a.data(), buffer_a.data()+buffer_a.size())); - int count_b = b->RunVertices(primitive, count, src, DataReader(buffer_b.data(), buffer_b.data()+buffer_b.size())); + int count_a = a->RunVertices(src, DataReader(buffer_a.data(), buffer_a.data()+buffer_a.size()), count, primitive); + int count_b = b->RunVertices(src, DataReader(buffer_b.data(), buffer_b.data()+buffer_b.size()), count, primitive); if (count_a != count_b) ERROR_LOG(VIDEO, "The two vertex loaders have loaded a different amount of vertices (a: %d, b: %d).", count_a, count_b); diff --git a/Source/Core/VideoCommon/VertexLoaderBase.h b/Source/Core/VideoCommon/VertexLoaderBase.h index c5a11d2e63..fc3737ae69 100644 --- a/Source/Core/VideoCommon/VertexLoaderBase.h +++ b/Source/Core/VideoCommon/VertexLoaderBase.h @@ -74,7 +74,7 @@ public: static VertexLoaderBase* CreateVertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr); virtual ~VertexLoaderBase() {} - virtual int RunVertices(int primitive, int count, DataReader src, DataReader dst) = 0; + virtual int RunVertices(DataReader src, DataReader dst, int count, int primitive) = 0; virtual bool IsInitialized() = 0; diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index c15cadd267..506e3d92d1 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -164,7 +164,7 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo DataReader dst = VertexManager::PrepareForAdditionalData(primitive, count, loader->m_native_vtx_decl.stride, cullall); - count = loader->RunVertices(primitive, count, src, dst); + count = loader->RunVertices(src, dst, count, primitive); IndexGenerator::AddIndices(primitive, count); diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index de4ab58cc6..5c962095bd 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -457,7 +457,7 @@ bool VertexLoaderX64::IsInitialized() return cpu_info.bSSSE3; } -int VertexLoaderX64::RunVertices(int primitive, int count, DataReader src, DataReader dst) +int VertexLoaderX64::RunVertices(DataReader src, DataReader dst, int count, int primitive) { m_numLoadedVertices += count; return ((int (*)(u8* src, u8* dst, int count))region)(src.GetPointer(), dst.GetPointer(), count); diff --git a/Source/Core/VideoCommon/VertexLoaderX64.h b/Source/Core/VideoCommon/VertexLoaderX64.h index da65fb2e34..0139d392b7 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.h +++ b/Source/Core/VideoCommon/VertexLoaderX64.h @@ -9,7 +9,7 @@ public: protected: std::string GetName() const override { return "VertexLoaderX64"; } bool IsInitialized() override; - int RunVertices(int primitive, int count, DataReader src, DataReader dst) override; + int RunVertices(DataReader src, DataReader dst, int count, int primitive) override; private: u32 m_src_ofs = 0;