mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06: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:
@ -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
|
||||
|
Reference in New Issue
Block a user