MoltenVk: Add missing texture decoders (#332)

This commit is contained in:
Tillsunset 2022-10-08 08:07:54 -05:00 committed by GitHub
parent 551f821109
commit b724a657e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 104 additions and 2 deletions

View file

@ -2653,7 +2653,7 @@ void VulkanRenderer::GetTextureFormatInfoVK(Latte::E_GX2SURFFMT format, bool isD
case Latte::E_GX2SURFFMT::R5_G5_B5_A1_UNORM:
if (m_supportedFormatInfo.fmt_a1r5g5b5_unorm_pack == false) {
formatInfoOut->vkImageFormat = VK_FORMAT_R8G8B8A8_UNORM;
formatInfoOut->decoder = nullptr;
formatInfoOut->decoder = TextureDecoder_R5_G5_B5_A1_UNORM_swappedRB_To_RGBA8::getInstance();
}
else {
// used in Super Mario 3D World for the hidden Luigi sprites
@ -2665,7 +2665,7 @@ void VulkanRenderer::GetTextureFormatInfoVK(Latte::E_GX2SURFFMT format, bool isD
case Latte::E_GX2SURFFMT::A1_B5_G5_R5_UNORM:
if (m_supportedFormatInfo.fmt_a1r5g5b5_unorm_pack == false) {
formatInfoOut->vkImageFormat = VK_FORMAT_R8G8B8A8_UNORM;
formatInfoOut->decoder = nullptr;
formatInfoOut->decoder = TextureDecoder_A1_B5_G5_R5_UNORM_vulkan_To_RGBA8::getInstance();
}
else {
// used by VC64 (e.g. Ocarina of Time)