mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-09 15:45:40 +12:00
Map RGB8 to RGBA8
RGB8 is not supported by drivers like RADV. Instead, we map it to RGBA8. RGBA8 is mandated to be supported by the vulkan spec.
This commit is contained in:
parent
9e2781e874
commit
cb8c53e0b8
1 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,11 @@ namespace Vulkan {
|
|||
vk::Format colorFormatToVulkan(PICA::ColorFmt colorFormat) {
|
||||
switch (colorFormat) {
|
||||
case PICA::ColorFmt::RGBA8: return vk::Format::eR8G8B8A8Unorm;
|
||||
case PICA::ColorFmt::RGB8: return vk::Format::eR8G8B8Unorm;
|
||||
// VK_FORMAT_R8G8B8A8_UNORM is mandated by the vulkan specification
|
||||
// VK_FORMAT_R8G8B8_UNORM may not be supported
|
||||
// TODO: Detect this!
|
||||
// case PICA::ColorFmt::RGB8: return vk::Format::eR8G8B8Unorm;
|
||||
case PICA::ColorFmt::RGB8: return vk::Format::eR8G8B8A8Unorm;
|
||||
case PICA::ColorFmt::RGBA5551: return vk::Format::eR5G5B5A1UnormPack16;
|
||||
case PICA::ColorFmt::RGB565: return vk::Format::eR5G6B5UnormPack16;
|
||||
case PICA::ColorFmt::RGBA4: return vk::Format::eR4G4B4A4UnormPack16;
|
||||
|
|
Loading…
Add table
Reference in a new issue