diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index a5db110c7a..8bca9e36d9 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -93,7 +93,7 @@ void TextureCache::Cleanup() tcend = textures.end(); while (iter != tcend) { - if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount) + if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount) // TODO: Deleting EFB copies might not be a good idea here... { delete iter->second; textures.erase(iter++); @@ -340,7 +340,6 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int stage, entry->SetGeneralParameters(address, texture_size, full_format, entry->num_mipmaps); entry->SetDimensions(nativeW, nativeH, width, height); entry->SetEFBCopyParameters(false, texture_is_dynamic); - entry->isNonPow2 = false; entry->oldpixel = *(u32*)ptr; @@ -653,7 +652,6 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat entry->SetDimensions(tex_w, tex_h, scaled_tex_w, scaled_tex_h); entry->SetEFBCopyParameters(true, false); entry->SetHashes(TEXHASH_INVALID); - entry->isNonPow2 = true; } entry->frameCount = frameCount; diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.h b/Source/Core/VideoCommon/Src/TextureCacheBase.h index 5ef0c3c464..5625958b76 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.h +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.h @@ -31,6 +31,17 @@ public: unsigned int native_width, native_height; // Texture dimensions from the GameCube's point of view unsigned int virtual_width, virtual_height; // Texture dimensions from OUR point of view - for hires textures or scaled EFB copies + // EFB copies + bool isRenderTarget; // copied from EFB + bool isDynamic; // Used for hybrid EFB copies to enable checks for CPU modifications + + // used to delete textures which haven't been used for TEXTURE_KILL_THRESHOLD frames + int frameCount; + + // deprecated members + u32 oldpixel; + + void SetGeneralParameters(u32 addr, u32 size, u32 format, unsigned int num_mipmaps) { this->addr = addr; @@ -59,33 +70,6 @@ public: isDynamic = is_dynamic; } - // EFB copies - bool isRenderTarget; // copied from EFB - bool isDynamic; // Used for hybrid EFB copies to enable checks for CPU modifications - - // deprecated members - u32 oldpixel; - int frameCount; - bool isNonPow2; // doesn't seem to be used anywhere - - - - //TCacheEntryBase() - //{ - // // TODO: remove these - // isRenderTarget = 0; - // hash = 0; - // //paletteHash = 0; - // oldpixel = 0; - // addr = 0; - // size_in_bytes = 0; - // frameCount = 0; - // isNonPow2 = true; - // w = 0; - // h = 0; - // scaledW = 0; - // scaledH = 0; - //} virtual ~TCacheEntryBase();