From 0bcd3c79bb4bbd90fb1f8d02adb26198690709fb Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Tue, 22 Nov 2022 16:54:05 -0800 Subject: VertexLoader: Eliminate use of DataReader DataReader is generally jank - it has a start and end pointer, but the end pointer is generally not used, and all of the vertex loaders mostly bypassed it anyways. Wrapper code (the vertex loaer test, as well as Fifo.cpp and OpcodeDecoding.cpp) still uses it, as does the software vertex loader (which is not a subclass of VertexLoader). These can probably be eliminated later. --- Source/Core/VideoCommon/VertexLoader_Normal.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/VertexLoader_Normal.cpp') diff --git a/Source/Core/VideoCommon/VertexLoader_Normal.cpp b/Source/Core/VideoCommon/VertexLoader_Normal.cpp index 3b685e0ca4..c713e4c9c6 100644 --- a/Source/Core/VideoCommon/VertexLoader_Normal.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Normal.cpp @@ -9,7 +9,6 @@ #include "Common/CommonTypes.h" #include "Common/EnumMap.h" -#include "VideoCommon/DataReader.h" #include "VideoCommon/VertexLoader.h" #include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VertexLoaderUtils.h" @@ -43,7 +42,6 @@ template void ReadIndirect(VertexLoader* loader, const T* data) { static_assert(3 == N || 9 == N, "N is only sane as 3 or 9!"); - DataReader dst(g_vertex_manager_write_ptr, nullptr); for (u32 i = 0; i < N; ++i) { @@ -55,10 +53,9 @@ void ReadIndirect(VertexLoader* loader, const T* data) else if (i >= 6 && i < 9) VertexLoaderManager::binormal_cache[i - 6] = value; } - dst.Write(value); + DataWrite(value); } - g_vertex_manager_write_ptr = dst.GetPointer(); LOG_NORM(); } -- cgit v1.2.3