mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Texture Cache performance improvements
This commit is contained in:
parent
a118a2e3dc
commit
6c32d5cd8f
|
@ -551,11 +551,7 @@ void TextureCache::destroy()
|
|||
|
||||
void TextureCache::_checkCacheSize()
|
||||
{
|
||||
#ifdef VC
|
||||
const size_t maxCacheSize = 15000;
|
||||
#else
|
||||
const size_t maxCacheSize = 16384;
|
||||
#endif
|
||||
const size_t maxCacheSize = 8000;
|
||||
if (m_textures.size() >= maxCacheSize) {
|
||||
CachedTexture& clsTex = m_textures.back();
|
||||
m_cachedBytes -= clsTex.textureBytes;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define TEXTURES_H
|
||||
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <list>
|
||||
|
||||
#include "CRC.h"
|
||||
|
@ -84,7 +85,7 @@ private:
|
|||
void _getTextureDestData(CachedTexture& tmptex, u32* pDest, graphics::Parameter glInternalFormat, GetTexelFunc GetTexel, u16* pLine);
|
||||
|
||||
typedef std::list<CachedTexture> Textures;
|
||||
typedef std::map<u32, Textures::iterator> Texture_Locations;
|
||||
typedef std::unordered_map<u32, Textures::iterator> Texture_Locations;
|
||||
typedef std::map<graphics::ObjectHandle, CachedTexture> FBTextures;
|
||||
Textures m_textures;
|
||||
Texture_Locations m_lruTextureLocations;
|
||||
|
|
Loading…
Reference in New Issue
Block a user