Immediately load the clut on LOADCLUT.

This commit is contained in:
Unknown W. Brackets 2013-05-12 01:44:57 -07:00
parent 518394cca8
commit 7e23299c36
4 changed files with 2 additions and 8 deletions

View File

@ -582,8 +582,8 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
break;
case GE_CMD_LOADCLUT:
gstate_c.clutChanged = true;
gstate_c.textureChanged = true;
textureCache_.UpdateCurrentClut();
// This could be used to "dirty" textures with clut.
break;

View File

@ -817,11 +817,6 @@ void TextureCache::SetTexture() {
u32 clutformat, cluthash;
if (hasClut) {
if (gstate_c.clutChanged) {
UpdateCurrentClut();
gstate_c.clutChanged = false;
}
clutformat = gstate.clutformat & 3;
cluthash = GetCurrentClutHash();
cachekey |= (u64)cluthash << 32;

View File

@ -38,6 +38,7 @@ public:
void Invalidate(u32 addr, int size, GPUInvalidationType type);
void InvalidateAll(GPUInvalidationType type);
void ClearNextFrame();
void UpdateCurrentClut();
// FramebufferManager keeps TextureCache updated about what regions of memory
// are being rendered to. This is barebones so far.
@ -107,7 +108,6 @@ private:
void LoadTextureLevel(TexCacheEntry &entry, int level);
void *DecodeTextureLevel(u8 format, u8 clutformat, int level, u32 &texByteAlign, GLenum &dstFmt);
void CheckAlpha(TexCacheEntry &entry, u32 *pixelData, GLenum dstFmt, int w, int h);
void UpdateCurrentClut();
template <typename T>
const T *GetCurrentClut();
u32 GetCurrentClutHash();

View File

@ -254,7 +254,6 @@ struct GPUStateCache
bool textureChanged;
bool textureFullAlpha;
bool framebufChanged;
bool clutChanged;
int skipDrawReason;