From c25346773d339af06e6ea191515c3c03e3106e98 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Fri, 24 Apr 2009 16:40:58 +0000 Subject: [PATCH] revert r3060, instead call RecomputeCachedArraybases() once on init. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3065 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/VertexLoaderManager.cpp | 1 + Source/Core/VideoCommon/Src/VertexLoader_Color.cpp | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp index b77821bc40..9dca94111b 100644 --- a/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoaderManager.cpp @@ -42,6 +42,7 @@ void Init() MarkAllDirty(); for (int i = 0; i < 8; i++) g_VertexLoaders[i] = NULL; + RecomputeCachedArraybases(); } void Shutdown() diff --git a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp index 41fcb4654a..12e3ede5d3 100644 --- a/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp +++ b/Source/Core/VideoCommon/Src/VertexLoader_Color.cpp @@ -22,7 +22,6 @@ #include "VideoCommon.h" #include "LookUpTables.h" #include "VertexLoader.h" -#include "VertexLoaderManager.h" #include "VertexLoader_Color.h" #include "NativeVertexWriter.h" @@ -167,12 +166,7 @@ void LOADERDECL Color_ReadIndex8_24b_6666() void LOADERDECL Color_ReadIndex8_32b_8888() { u8 Index = DataReadU8(); - u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); - if (!iAddress) - { - RecomputeCachedArraybases(); - iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); - } + const u8 *iAddress = cached_arraybases[ARRAY_COLOR+colIndex] + (Index * arraystrides[ARRAY_COLOR+colIndex]); _SetCol(_Read32(iAddress)); } //////////////////////////////////////////////////////////////////////////