mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon: Rename s_pCurBufferPointer
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
// Thoughts on the implementation of a vertex loader compiler.
|
||||
// s_pCurBufferPointer should definitely be in a register.
|
||||
// g_vertex_manager_write_ptr should definitely be in a register.
|
||||
// Could load the position scale factor in XMM7, for example.
|
||||
|
||||
// The pointer inside DataReadU8 in another.
|
||||
@ -75,13 +75,13 @@ void LOADERDECL Pos_ReadDirect()
|
||||
{
|
||||
static_assert(N <= 3, "N > 3 is not sane!");
|
||||
auto const scale = posScale[0];
|
||||
DataReader dst(VertexManager::s_pCurBufferPointer, nullptr);
|
||||
DataReader dst(g_vertex_manager_write_ptr, nullptr);
|
||||
DataReader src(g_video_buffer_read_ptr, nullptr);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
dst.Write(i<N ? PosScale(src.Read<T>(), scale) : 0.f);
|
||||
|
||||
dst.WritePointer(&VertexManager::s_pCurBufferPointer);
|
||||
dst.WritePointer(&g_vertex_manager_write_ptr);
|
||||
src.WritePointer(&g_video_buffer_read_ptr);
|
||||
LOG_VTX();
|
||||
}
|
||||
@ -95,12 +95,12 @@ void LOADERDECL Pos_ReadIndex()
|
||||
auto const index = DataRead<I>();
|
||||
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_POSITION] + (index * g_main_cp_state.array_strides[ARRAY_POSITION]));
|
||||
auto const scale = posScale[0];
|
||||
DataReader dst(VertexManager::s_pCurBufferPointer, nullptr);
|
||||
DataReader dst(g_vertex_manager_write_ptr, nullptr);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
dst.Write(i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
|
||||
|
||||
dst.WritePointer(&VertexManager::s_pCurBufferPointer);
|
||||
dst.WritePointer(&g_vertex_manager_write_ptr);
|
||||
LOG_VTX();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user