summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-02-20 05:37:01 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-02-20 05:42:22 -0600
commit6e6d8af6ddaddeeaf89be2f8b6920b913488f0c6 (patch)
tree1a1ef008b0036fdec44c34cfc34d7d48376b2e2f /Source/Core/VideoCommon/Src/TextureCacheBase.cpp
parent294cb165ba3449cc4fd96eabb5272e2984a58eb8 (diff)
Revert "Don't load level 0 twice for 1-level textures in DX11." and fix it properly.
All backend TextureCaches now load level 0 in CreateTexture. This reverts commit 294cb165ba3449cc4fd96eabb5272e2984a58eb8.
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureCacheBase.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
index fd935de342..fda4f21a7e 100644
--- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp
@@ -481,15 +481,20 @@ 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->SetDimensions(nativeW, nativeH, width, height);
entry->hash = tex_hash;
- if (entry->IsEfbCopy() && !g_ActiveConfig.bCopyEFBToTexture) entry->type = TCET_EC_DYNAMIC;
- else entry->type = TCET_NORMAL;
-
- // load texture
- entry->Load(width, height, expandedWidth, 0);
+
+ if (entry->IsEfbCopy() && !g_ActiveConfig.bCopyEFBToTexture)
+ entry->type = TCET_EC_DYNAMIC;
+ else
+ entry->type = TCET_NORMAL;
if (g_ActiveConfig.bDumpTextures && !using_custom_texture)
DumpTexture(entry, 0);