Partial updates for paletted textures

This pr fixes another regression that happened after pr #3165 was merged. The shadows in mario baseball should now work again.
This commit is contained in:
mimimi085181
2016-03-26 03:43:32 +01:00
parent e98fb0af84
commit 9f625417c0
2 changed files with 77 additions and 41 deletions

View File

@ -109,6 +109,8 @@ public:
bool OverlapsMemoryRange(u32 range_address, u32 range_size) const;
TextureCacheBase::TCacheEntryBase* ApplyPalette(u8* palette, u32 tlutfmt);
bool IsEfbCopy() const { return is_efb_copy; }
u32 NumBlocksY() const;
@ -156,11 +158,12 @@ private:
typedef std::multimap<u64, TCacheEntryBase*> TexCache;
typedef std::unordered_multimap<TCacheEntryConfig, TCacheEntryBase*, TCacheEntryConfig::Hasher> TexPool;
static void ScaleTextureCacheEntryTo(TCacheEntryBase** entry, u32 new_width, u32 new_height);
static TCacheEntryBase* DoPartialTextureUpdates(TexCache::iterator iter);
static TCacheEntryBase* DoPartialTextureUpdates(TexCache::iterator iter, u8* palette, u32 tlutfmt);
static void DumpTexture(TCacheEntryBase* entry, std::string basename, unsigned int level);
static void CheckTempSize(size_t required_size);
static TCacheEntryBase* AllocateTexture(const TCacheEntryConfig& config);
static TexCache::iterator GetTexCacheIter(TCacheEntryBase* entry);
static TexCache::iterator FreeTexture(TexCache::iterator t_iter);
static TCacheEntryBase* ReturnEntry(unsigned int stage, TCacheEntryBase* entry);