TextureCache: Add a dirty bit for partial updates on overlapping EFB copies.

This commit is contained in:
degasus
2016-12-26 18:41:34 +01:00
parent cd29d565c4
commit d0a73c1d90
2 changed files with 53 additions and 25 deletions

View File

@ -57,9 +57,10 @@ public:
u64 base_hash;
u64 hash; // for paletted textures, hash = base_hash ^ palette_hash
u32 format; // bits 0-3 will contain the in-memory format.
u32 memory_stride;
bool is_efb_copy;
bool is_custom_tex;
u32 memory_stride;
bool may_have_overlapping_textures;
unsigned int native_width,
native_height; // Texture dimensions from the GameCube's point of view
@ -198,6 +199,11 @@ private:
TexPool::iterator FindMatchingTextureFromPool(const TCacheEntryConfig& config);
TexAddrCache::iterator GetTexCacheIter(TCacheEntryBase* entry);
// Return all possible overlapping textures. As addr+size of the textures is not
// indexed, this may return false positives.
std::pair<TexAddrCache::iterator, TexAddrCache::iterator>
FindOverlappingTextures(u32 addr, u32 size_in_bytes);
// Removes and unlinks texture from texture cache and returns it to the pool
TexAddrCache::iterator InvalidateTexture(TexAddrCache::iterator t_iter);