mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 20:58:54 +00:00
VertexLoader: inline destionation buffer
This commit is contained in:
parent
c613868f57
commit
0b97b33ceb
4 changed files with 29 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue