summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp
index 897e387207..88b1ec18b7 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoaderManager.cpp
@@ -17,6 +17,7 @@
#include <map>
+#include "VideoCommon.h"
#include "Statistics.h"
#include "VertexShaderManager.h"
@@ -145,7 +146,8 @@ void LoadCPReg(u32 sub_cmd, u32 value)
// Pointers to vertex arrays in GC RAM
case 0xA0:
- arraybases[sub_cmd & 0xF] = value & 0xFFFFFFFF; // huh, why the mask?
+ arraybases[sub_cmd & 0xF] = value;
+ cached_arraybases[sub_cmd & 0xF] = Memory_GetPtr(value);
break;
case 0xB0:
@@ -153,3 +155,11 @@ void LoadCPReg(u32 sub_cmd, u32 value)
break;
}
}
+
+void RecomputeCachedArraybases()
+{
+ for (int i = 0; i < 16; i++)
+ {
+ cached_arraybases[i] = Memory_GetPtr(arraybases[i]);
+ }
+}