yuzu_video_core: add format alternatives for X8_D24_UNORM (#408)

Co-authored-by: Richard Caetano <25829688+Cor3Duo@users.noreply.github.com>
This commit is contained in:
Richard 2026-10-11 08:42:17 -03:00 committed by GitHub
parent 2a29431273
commit 84570b3808
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,12 @@ constexpr std::array DEPTH24_UNORM_STENCIL8_UINT{
VK_FORMAT_UNDEFINED,
};
constexpr std::array DEPTH24_UNORM_DONTCARE8{
VK_FORMAT_D32_SFLOAT,
VK_FORMAT_D16_UNORM,
VK_FORMAT_UNDEFINED,
};
constexpr std::array DEPTH16_UNORM_STENCIL8_UINT{
VK_FORMAT_D24_UNORM_S8_UINT,
VK_FORMAT_D32_SFLOAT_S8_UINT,
@ -102,6 +108,8 @@ constexpr const VkFormat * GetFormatAlternatives(VkFormat format)
return Alternatives::STENCIL8_UINT.data();
case VK_FORMAT_D24_UNORM_S8_UINT:
return Alternatives::DEPTH24_UNORM_STENCIL8_UINT.data();
case VK_FORMAT_X8_D24_UNORM_PACK32:
return Alternatives::DEPTH24_UNORM_DONTCARE8.data();
case VK_FORMAT_D16_UNORM_S8_UINT:
return Alternatives::DEPTH16_UNORM_STENCIL8_UINT.data();
case VK_FORMAT_B5G6R5_UNORM_PACK16: