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.
This commit is contained in:
Pokechu22 committed 2022-11-22 17:17:11 -08:00
1 parent 8ac8d5afb6
commit 0bcd3c79bb
16 files changed
+36 -69

No files matched your search

@@ -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 <typename T, u32 N>
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();
}