Merge pull request #9641 from lynlevenick/ash/texture-cache-opt

Remove spurious memory allocations in TextureCacheBase::SerializeTexture and DeserializeTexture
This commit is contained in:
Léo Lam
2021-05-07 15:01:23 +02:00
committed by GitHub
2 changed files with 48 additions and 18 deletions

View File

@ -200,6 +200,16 @@ public:
DoArray(arr, static_cast<u32>(N));
}
// The caller is required to inspect the mode of this PointerWrap
// and deal with the pointer returned from this function themself.
[[nodiscard]] u8* DoExternal(u32& count)
{
Do(count);
u8* current = *ptr;
*ptr += count;
return current;
}
void Do(Common::Flag& flag)
{
bool s = flag.IsSet();