diff options
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 3f7161b8f7..f293564e85 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -45,6 +45,10 @@ int colElements[2]; GC_ALIGNED128(float posScale[4]); GC_ALIGNED64(float tcScale[8][2]); +// This pointer is used as the source/dst for all fixed function loader calls +u8* g_video_buffer_read_ptr; +u8* g_vertex_manager_write_ptr; + static const float fractionTable[32] = { 1.0f / (1U << 0), 1.0f / (1U << 1), 1.0f / (1U << 2), 1.0f / (1U << 3), 1.0f / (1U << 4), 1.0f / (1U << 5), 1.0f / (1U << 6), 1.0f / (1U << 7), @@ -93,8 +97,8 @@ static void LOADERDECL TexMtx_Write_Float4() { #if _M_SSE >= 0x200 __m128 output = _mm_cvtsi32_ss(_mm_castsi128_ps(_mm_setzero_si128()), s_curtexmtx[s_texmtxwrite++]); - _mm_storeu_ps((float*)VertexManager::s_pCurBufferPointer, _mm_shuffle_ps(output, output, 0x45 /* 1, 1, 0, 1 */)); - VertexManager::s_pCurBufferPointer += sizeof(float) * 4; + _mm_storeu_ps((float*)g_vertex_manager_write_ptr, _mm_shuffle_ps(output, output, 0x45 /* 1, 1, 0, 1 */)); + g_vertex_manager_write_ptr += sizeof(float) * 4; #else DataWrite(0.f); DataWrite(0.f); @@ -487,10 +491,13 @@ void VertexLoader::ConvertVertices ( int count ) #endif } -void VertexLoader::RunVertices(const VAT& vat, int primitive, int const count) +int VertexLoader::RunVertices(const VAT& vat, int primitive, int count, DataReader src, DataReader dst) { + dst.WritePointer(&g_vertex_manager_write_ptr); + src.WritePointer(&g_video_buffer_read_ptr); SetupRunVertices(vat, primitive, count); ConvertVertices(count); + return count; } void VertexLoader::SetVAT(const VAT& vat) |
