diff options
| author | Mai <mathew1800@gmail.com> | 2022-11-23 04:40:53 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 04:40:53 +0000 |
| commit | cb232155d9160aad82a1cb4a9a13fda22d079293 (patch) | |
| tree | 59e78d80bd168ccc04849a4a9686239db384c4f6 /Source/Core/VideoCommon/VertexLoader_Position.cpp | |
| parent | 31458259b67fe67d4feb0b2d425f629e3792fdf7 (diff) | |
| parent | e13094766d51c970deb2a00800e4dd033af25665 (diff) | |
Merge pull request #11298 from Pokechu22/vertexloader-no-DataReader
VertexLoader: Eliminate use of DataReader
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Position.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index 92583e0726..42ebf4985f 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -10,7 +10,6 @@ #include "Common/EnumMap.h" #include "Common/Swap.h" -#include "VideoCommon/DataReader.h" #include "VideoCommon/VertexLoader.h" #include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VertexLoaderUtils.h" @@ -35,19 +34,15 @@ void Pos_ReadDirect(VertexLoader* loader) { static_assert(N <= 3, "N > 3 is not sane!"); const auto scale = loader->m_posScale; - DataReader dst(g_vertex_manager_write_ptr, nullptr); - DataReader src(g_video_buffer_read_ptr, nullptr); for (int i = 0; i < N; ++i) { - const float value = PosScale(src.Read<T>(), scale); + const float value = PosScale(DataRead<T>(), scale); if (loader->m_remaining < 3) VertexLoaderManager::position_cache[loader->m_remaining][i] = value; - dst.Write(value); + DataWrite(value); } - g_vertex_manager_write_ptr = dst.GetPointer(); - g_video_buffer_read_ptr = src.GetPointer(); LOG_VTX(); } @@ -63,17 +58,15 @@ void Pos_ReadIndex(VertexLoader* loader) reinterpret_cast<const T*>(VertexLoaderManager::cached_arraybases[CPArray::Position] + (index * g_main_cp_state.array_strides[CPArray::Position])); const auto scale = loader->m_posScale; - DataReader dst(g_vertex_manager_write_ptr, nullptr); for (int i = 0; i < N; ++i) { const float value = PosScale(Common::FromBigEndian(data[i]), scale); if (loader->m_remaining < 3) VertexLoaderManager::position_cache[loader->m_remaining][i] = value; - dst.Write(value); + DataWrite(value); } - g_vertex_manager_write_ptr = dst.GetPointer(); LOG_VTX(); } |
