diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-11-22 16:54:05 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-11-22 17:17:11 -0800 |
| commit | 0bcd3c79bb4bbd90fb1f8d02adb26198690709fb (patch) | |
| tree | 22ec9e15aca405a0b4621ff51d1ff51f9c179f3e /Source/Core/VideoCommon/VertexLoader.cpp | |
| parent | 8ac8d5afb63f65a1bed1a5d089d9fbbd5b8553b4 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 8176027b45..bc97ac041d 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -6,7 +6,6 @@ #include "Common/Assert.h" #include "Common/CommonTypes.h" -#include "VideoCommon/DataReader.h" #include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VertexLoaderUtils.h" #include "VideoCommon/VertexLoader_Color.h" @@ -16,7 +15,7 @@ #include "VideoCommon/VideoCommon.h" // This pointer is used as the source/dst for all fixed function loader calls -u8* g_video_buffer_read_ptr; +const u8* g_video_buffer_read_ptr; u8* g_vertex_manager_write_ptr; static void PosMtx_ReadDirect_UByte(VertexLoader* loader) @@ -249,10 +248,10 @@ void VertexLoader::WriteCall(TPipelineFunction func) m_PipelineStages[m_numPipelineStages++] = func; } -int VertexLoader::RunVertices(DataReader src, DataReader dst, int count) +int VertexLoader::RunVertices(const u8* src, u8* dst, int count) { - g_vertex_manager_write_ptr = dst.GetPointer(); - g_video_buffer_read_ptr = src.GetPointer(); + g_vertex_manager_write_ptr = dst; + g_video_buffer_read_ptr = src; m_numLoadedVertices += count; m_skippedVertices = 0; |
