summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2016-01-13 23:10:18 +0100
committerJules Blok <jules.blok@gmail.com>2016-01-13 23:10:18 +0100
commitd54291f2e8f99d1796ceff24b1c56a73cd2a6d2c (patch)
tree3883234cd3c6ba4459d6a080ffe5ca7cf9306dce /Source/Core/VideoCommon/TextureCacheBase.cpp
parent185d4dbc76593cc19332dff5dcbd5ff135104a65 (diff)
parent1f3b90d70a43dfffe63b5c2dca0e9a1218c40f94 (diff)
Merge pull request #3506 from stenzek/odd-mips
TextureCacheBase: Change CalculateLevelSize to match D3D/OGL sizes
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 5805eb3d8b..f47dab338c 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -328,7 +328,7 @@ void TextureCacheBase::DumpTexture(TCacheEntryBase* entry, std::string basename,
static u32 CalculateLevelSize(u32 level_0_size, u32 level)
{
- return (level_0_size + ((1 << level) - 1)) >> level;
+ return std::max(level_0_size >> level, 1u);
}
// Used by TextureCacheBase::Load