mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VertexLoader: inline destionation buffer
This commit is contained in:
@ -77,9 +77,12 @@ void LOADERDECL Pos_ReadDirect()
|
||||
{
|
||||
static_assert(N <= 3, "N > 3 is not sane!");
|
||||
auto const scale = posScale;
|
||||
auto dst = VertexManager::s_pCurBufferPointer;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
DataWrite(i<N ? PosScale(DataRead<T>(), scale) : 0.f);
|
||||
DataWrite(dst, i<N ? PosScale(DataRead<T>(), scale) : 0.f);
|
||||
|
||||
VertexManager::s_pCurBufferPointer = dst;
|
||||
|
||||
LOG_VTX();
|
||||
}
|
||||
@ -93,9 +96,12 @@ void LOADERDECL Pos_ReadIndex()
|
||||
auto const index = DataRead<I>();
|
||||
auto const data = reinterpret_cast<const T*>(cached_arraybases[ARRAY_POSITION] + (index * arraystrides[ARRAY_POSITION]));
|
||||
auto const scale = posScale;
|
||||
auto dst = VertexManager::s_pCurBufferPointer;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
DataWrite(i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
|
||||
DataWrite(dst, i<N ? PosScale(Common::FromBigEndian(data[i]), scale) : 0.f);
|
||||
|
||||
VertexManager::s_pCurBufferPointer = dst;
|
||||
|
||||
LOG_VTX();
|
||||
}
|
||||
|
Reference in New Issue
Block a user