summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
diff options
context:
space:
mode:
authorMai <mathew1800@gmail.com>2022-11-23 04:40:53 +0000
committerGitHub <noreply@github.com>2022-11-23 04:40:53 +0000
commitcb232155d9160aad82a1cb4a9a13fda22d079293 (patch)
tree59e78d80bd168ccc04849a4a9686239db384c4f6 /Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
parent31458259b67fe67d4feb0b2d425f629e3792fdf7 (diff)
parente13094766d51c970deb2a00800e4dd033af25665 (diff)
Merge pull request #11298 from Pokechu22/vertexloader-no-DataReader
VertexLoader: Eliminate use of DataReader
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_TextCoord.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexLoader_TextCoord.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
index abe8d36fc4..fcb2982e6f 100644
--- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
+++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp
@@ -8,7 +8,6 @@
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
-#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoaderManager.h"
#include "VideoCommon/VertexLoaderUtils.h"
@@ -36,14 +35,9 @@ template <typename T, int N>
void TexCoord_ReadDirect(VertexLoader* loader)
{
const auto scale = loader->m_tcScale[loader->m_tcIndex];
- DataReader dst(g_vertex_manager_write_ptr, nullptr);
- DataReader src(g_video_buffer_read_ptr, nullptr);
for (int i = 0; i != N; ++i)
- dst.Write(TCScale(src.Read<T>(), scale));
-
- g_vertex_manager_write_ptr = dst.GetPointer();
- g_video_buffer_read_ptr = src.GetPointer();
+ DataWrite(TCScale(DataRead<T>(), scale));
++loader->m_tcIndex;
}
@@ -58,12 +52,10 @@ void TexCoord_ReadIndex(VertexLoader* loader)
VertexLoaderManager::cached_arraybases[CPArray::TexCoord0 + loader->m_tcIndex] +
(index * g_main_cp_state.array_strides[CPArray::TexCoord0 + loader->m_tcIndex]));
const auto scale = loader->m_tcScale[loader->m_tcIndex];
- DataReader dst(g_vertex_manager_write_ptr, nullptr);
for (int i = 0; i != N; ++i)
- dst.Write(TCScale(Common::FromBigEndian(data[i]), scale));
+ DataWrite(TCScale(Common::FromBigEndian(data[i]), scale));
- g_vertex_manager_write_ptr = dst.GetPointer();
++loader->m_tcIndex;
}