From 614d058db14f4a282e27a8c21402f45cfaa5be88 Mon Sep 17 00:00:00 2001 From: degasus Date: Mon, 19 May 2014 22:35:53 +0200 Subject: TexCache: don't load tex level 0 on creation This reverts an optimization which isn't worth imo. Every texture uploads have to alloc vram and a staging buffer, so there is no need to do both in the same call. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 143a26cbd1..a539f561a3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -481,16 +481,14 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage, GFX_DEBUGGER_PAUSE_AT(NEXT_NEW_TEXTURE, true); } - else - { - // load texture (CreateTexture also loads level 0) - entry->Load(width, height, expandedWidth, 0); - } entry->SetGeneralParameters(address, texture_size, full_format, entry->num_mipmaps, entry->num_layers); entry->SetDimensions(nativeW, nativeH, width, height); entry->hash = tex_hash; + // load texture + entry->Load(width, height, expandedWidth, 0); + if (entry->IsEfbCopy() && !g_ActiveConfig.bCopyEFBToTexture) entry->type = TCET_EC_DYNAMIC; else -- cgit v1.2.3 From 38f42da55aa49d438fda123ccd7c7126e23714f4 Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 5 Nov 2014 22:09:39 +0100 Subject: TexCache: remove expanded_width This variable isn't use any more. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index a539f561a3..ce9b724b8f 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -466,7 +466,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage, // create the entry/texture if (nullptr == entry) { - textures[texID] = entry = g_texture_cache->CreateTexture(width, height, expandedWidth, texLevels, pcfmt); + textures[texID] = entry = g_texture_cache->CreateTexture(width, height, texLevels, pcfmt); // Sometimes, we can get around recreating a texture if only the number of mip levels changes // e.g. if our texture cache entry got too many mipmap levels we can limit the number of used levels by setting the appropriate render states -- cgit v1.2.3