TextureCacheBase: Kill deprecated entry member isNonPow2
TextureCacheBase: Add a TODO about a potential bug
This commit is contained in:
parent
94a8536b8c
commit
9c39952c34
|
@ -93,7 +93,7 @@ void TextureCache::Cleanup()
|
||||||
tcend = textures.end();
|
tcend = textures.end();
|
||||||
while (iter != tcend)
|
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;
|
delete iter->second;
|
||||||
textures.erase(iter++);
|
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->SetGeneralParameters(address, texture_size, full_format, entry->num_mipmaps);
|
||||||
entry->SetDimensions(nativeW, nativeH, width, height);
|
entry->SetDimensions(nativeW, nativeH, width, height);
|
||||||
entry->SetEFBCopyParameters(false, texture_is_dynamic);
|
entry->SetEFBCopyParameters(false, texture_is_dynamic);
|
||||||
entry->isNonPow2 = false;
|
|
||||||
|
|
||||||
entry->oldpixel = *(u32*)ptr;
|
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->SetDimensions(tex_w, tex_h, scaled_tex_w, scaled_tex_h);
|
||||||
entry->SetEFBCopyParameters(true, false);
|
entry->SetEFBCopyParameters(true, false);
|
||||||
entry->SetHashes(TEXHASH_INVALID);
|
entry->SetHashes(TEXHASH_INVALID);
|
||||||
entry->isNonPow2 = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entry->frameCount = frameCount;
|
entry->frameCount = frameCount;
|
||||||
|
|
|
@ -31,6 +31,17 @@ public:
|
||||||
unsigned int native_width, native_height; // Texture dimensions from the GameCube's point of view
|
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
|
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)
|
void SetGeneralParameters(u32 addr, u32 size, u32 format, unsigned int num_mipmaps)
|
||||||
{
|
{
|
||||||
this->addr = addr;
|
this->addr = addr;
|
||||||
|
@ -59,33 +70,6 @@ public:
|
||||||
isDynamic = is_dynamic;
|
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();
|
virtual ~TCacheEntryBase();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue