From 2ea6b4704682d1f731510d7c27f3b3c50f76a4d4 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 17 Jan 2012 02:37:13 +0200 Subject: [PATCH] gpu-gles: keep ClientState and texcache ptrs consistent --- plugins/gpu-gles/gpuExternals.h | 4 ++++ plugins/gpu-gles/gpuPlugin.c | 2 ++ plugins/gpu-gles/gpuTexture.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/plugins/gpu-gles/gpuExternals.h b/plugins/gpu-gles/gpuExternals.h index f88b37b6..897b4467 100644 --- a/plugins/gpu-gles/gpuExternals.h +++ b/plugins/gpu-gles/gpuExternals.h @@ -364,6 +364,10 @@ extern short sxmax; extern short symin; extern short symax; +extern unsigned int CSVERTEX; +extern unsigned int CSCOLOR; +extern unsigned int CSTEXTURE; + #endif //-----------------------------------------------------// diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c index 45a0b92e..9d749a5d 100644 --- a/plugins/gpu-gles/gpuPlugin.c +++ b/plugins/gpu-gles/gpuPlugin.c @@ -506,6 +506,8 @@ long CALLBACK GPUopen(int hwndGPU) InitializeTextureStore(); // init texture mem + CSTEXTURE = CSVERTEX = CSCOLOR = 0; + // lGPUstatusRet = 0x74000000; // with some emus, we could do the OGL init right here... oh my diff --git a/plugins/gpu-gles/gpuTexture.c b/plugins/gpu-gles/gpuTexture.c index 264458ef..2f96482a 100644 --- a/plugins/gpu-gles/gpuTexture.c +++ b/plugins/gpu-gles/gpuTexture.c @@ -612,6 +612,7 @@ void CleanupTextureStore() for(j=0;j clean mem + pscSubtexStore[i][j]=0; } for(i=0;i delete it } free(pxSsubtexLeft[i]); // -> clean mem + pxSsubtexLeft[i]=0; } //----------------------------------------------------// } -- 2.39.5