VideoCommon: Reduce duplicates of non-palette-requiring texture decode shaders

This commit is contained in:
TellowKrinkle 2022-06-11 02:51:24 -05:00
parent 70bf89fa59
commit 23c1721fbd
5 changed files with 34 additions and 20 deletions

View file

@ -2809,7 +2809,8 @@ bool TextureCacheBase::DecodeTextureOnGPU(TCacheEntry* entry, u32 dst_level, con
if (!info)
return false;
const AbstractShader* shader = g_shader_cache->GetTextureDecodingShader(format, palette_format);
const AbstractShader* shader = g_shader_cache->GetTextureDecodingShader(
format, info->palette_size != 0 ? std::make_optional(palette_format) : std::nullopt);
if (!shader)
return false;