summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2015-12-29 20:58:24 +0100
committerMarkus Wick <degasus@users.noreply.github.com>2015-12-29 20:58:24 +0100
commit8cf078a1a03de381ba5d8b6dd0dbba7c9baaa74b (patch)
treef74c6496728aa30e6429d845c55f0c8bdb79d88e /Source/Core/VideoCommon/TextureCacheBase.cpp
parentf8d7becba98d2eb89a0203da4b897241520b39e2 (diff)
parentd8e5d8659e6762048e8369eac598cf389109ef70 (diff)
Merge pull request #3407 from phire/fix_assert
TextureCache, fix an incorrect assert.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index b4e15ebdae..5805eb3d8b 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -216,9 +216,9 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::DoPartialTextureUpdates(Tex
|| isPaletteTexture)
return entry_to_update;
- u32 block_width = TexDecoder_GetBlockWidthInTexels(entry_to_update->format);
- u32 block_height = TexDecoder_GetBlockHeightInTexels(entry_to_update->format);
- u32 block_size = block_width * block_height * TexDecoder_GetTexelSizeInNibbles(entry_to_update->format) / 2;
+ u32 block_width = TexDecoder_GetBlockWidthInTexels(entry_to_update->format & 0xf);
+ u32 block_height = TexDecoder_GetBlockHeightInTexels(entry_to_update->format & 0xf);
+ u32 block_size = block_width * block_height * TexDecoder_GetTexelSizeInNibbles(entry_to_update->format & 0xf) / 2;
u32 numBlocksX = (entry_to_update->native_width + block_width - 1) / block_width;