Add missing readbacks

This commit is contained in:
rcaridade145 2024-11-18 22:15:30 +00:00
parent 269d5b9aab
commit 952fd0d2ee

View file

@ -22,7 +22,7 @@ uint32 LatteTextureReadbackInfoVk::GetImageSize(LatteTextureView* textureView)
cemu_assert(textureFormat == VK_FORMAT_R8G8B8A8_UNORM); cemu_assert(textureFormat == VK_FORMAT_R8G8B8A8_UNORM);
return baseTexture->width * baseTexture->height * 4; return baseTexture->width * baseTexture->height * 4;
} }
else if (textureView->format == Latte::E_GX2SURFFMT::R8_UNORM) else if (textureView->format == Latte::E_GX2SURFFMT::R8_UNORM )
{ {
cemu_assert(textureFormat == VK_FORMAT_R8_UNORM); cemu_assert(textureFormat == VK_FORMAT_R8_UNORM);
return baseTexture->width * baseTexture->height * 1; return baseTexture->width * baseTexture->height * 1;
@ -79,6 +79,16 @@ uint32 LatteTextureReadbackInfoVk::GetImageSize(LatteTextureView* textureView)
// todo - if driver does not support VK_FORMAT_D24_UNORM_S8_UINT this is represented as VK_FORMAT_D32_SFLOAT_S8_UINT which is 8 bytes // todo - if driver does not support VK_FORMAT_D24_UNORM_S8_UINT this is represented as VK_FORMAT_D32_SFLOAT_S8_UINT which is 8 bytes
return baseTexture->width * baseTexture->height * 4; return baseTexture->width * baseTexture->height * 4;
} }
else if (textureView->format == Latte::E_GX2SURFFMT::R5_G6_B5_UNORM )
{
cemu_assert(textureFormat == VK_FORMAT_R8G8B8A8_UNORM);
return baseTexture->width * baseTexture->height * 4;
}
else if (textureView->format == Latte::E_GX2SURFFMT::R5_G5_B5_A1_UNORM )
{
cemu_assert(textureFormat == VK_FORMAT_R8G8B8A8_UNORM);
return baseTexture->width * baseTexture->height * 4;
}
else else
{ {
cemuLog_log(LogType::Force, "Unsupported texture readback format {:04x}", (uint32)textureView->format); cemuLog_log(LogType::Force, "Unsupported texture readback format {:04x}", (uint32)textureView->format);