TextureCacheBase: fix custom textures not being loaded

Fixes bug #10183 [0] introduced by 3bd184a / PR #4467 [1].

TextureCacheBase was no longer calling `entry->Load` for custom textures
since the compute shader decoding logic was added. This adds it back in.
It also slightly restructures the decoding if-group to match the one
below, which I think makes the logic more obvious.

(recommend viewing with `git diff -b` to ignore the indentation changes)

[0]: https://bugs.dolphin-emu.org/issues/10183
[1]: https://github.com/dolphin-emu/dolphin/pull/4467
This commit is contained in:
Michael Maltese 2017-04-04 14:27:55 -07:00
parent 9d0a78db20
commit e9e3226026
1 changed files with 21 additions and 20 deletions

View File

@ -781,10 +781,12 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::Load(const u32 stage)
if (!entry)
return nullptr;
if (!hires_tex)
{
const u8* tlut = &texMem[tlutaddr];
if (decode_on_gpu)
if (hires_tex)
{
entry->Load(temp, width, height, expandedWidth, 0);
}
else if (decode_on_gpu)
{
u32 row_stride = bytes_per_block * (expandedWidth / bsw);
g_texture_cache->DecodeTextureOnGPU(
@ -807,7 +809,6 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::Load(const u32 stage)
entry->Load(temp, width, height, expandedWidth, 0);
}
}
iter = textures_by_address.emplace(address, entry);
if (g_ActiveConfig.iSafeTextureCache_ColorSamples == 0 ||