mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Render: Implemented simple render target pool
This avoids creating and destroying render targets every frame, which is a significant CPU overhead. Old render targets are destroyed after 3 frames.
This commit is contained in:
parent
830a03c540
commit
d8d9bc8c6c
2 changed files with 64 additions and 3 deletions
|
@ -119,9 +119,14 @@ private:
|
|||
static PC_TexFormat LoadCustomTexture(u64 tex_hash, int texformat, unsigned int level, unsigned int& width, unsigned int& height);
|
||||
static void DumpTexture(TCacheEntryBase* entry, unsigned int level);
|
||||
|
||||
static TCacheEntryBase* AllocateRenderTarget(unsigned int width, unsigned int height);
|
||||
static void FreeRenderTarget(TCacheEntryBase* entry);
|
||||
|
||||
typedef std::map<u32, TCacheEntryBase*> TexCache;
|
||||
typedef std::vector<TCacheEntryBase*> RenderTargetPool;
|
||||
|
||||
static TexCache textures;
|
||||
static RenderTargetPool render_target_pool;
|
||||
|
||||
// Backup configuration values
|
||||
static struct BackupConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue