diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 16:44:40 -0400 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-06-07 16:44:40 -0400 |
| commit | 588de63f9cc27ea0398f2d28802b1baf7ebcdb95 (patch) | |
| tree | 6ed98304af2ecf7a923ca5959d03c07a57c4e28c /Source/Core/VideoCommon/VertexLoader.cpp | |
| parent | 82fa01804c37e2a39383730bd72cda47a54a6a61 (diff) | |
| parent | 10bd68936c11ae0ed74861ca2172d41bbac0dc1f (diff) | |
Merge pull request #2141 from Tilka/position_cache
zfreeze: cache vertex positions
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 72aad88d7f..b8c8fab4de 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -14,6 +14,7 @@ #include "VideoCommon/VertexLoader_Normal.h" #include "VideoCommon/VertexLoader_Position.h" #include "VideoCommon/VertexLoader_TextCoord.h" +#include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VideoCommon.h" #include "VideoCommon/VideoConfig.h" @@ -24,6 +25,8 @@ u8* g_vertex_manager_write_ptr; static void LOADERDECL PosMtx_ReadDirect_UByte(VertexLoader* loader) { u32 posmtx = DataReadU8() & 0x3f; + if (loader->m_counter < 3) + VertexLoaderManager::position_matrix_index[loader->m_counter] = posmtx; DataWrite<u32>(posmtx); PRIM_LOG("posmtx: %d, ", posmtx); } @@ -316,7 +319,7 @@ int VertexLoader::RunVertices(DataReader src, DataReader dst, int count) m_numLoadedVertices += count; m_skippedVertices = 0; - for (int s = 0; s < count; s++) + for (m_counter = count - 1; m_counter >= 0; m_counter--) { m_tcIndex = 0; m_colIndex = 0; |
