VulkanHostDisplay: Support 16-bit scanout

This commit is contained in:
Connor McLaughlin 2020-11-21 21:12:38 +10:00
parent 131dc923ed
commit 497759b4d6
2 changed files with 3 additions and 1 deletions

View File

@ -83,6 +83,8 @@ u32 GetTexelSize(VkFormat format)
case VK_FORMAT_R5G5B5A1_UNORM_PACK16: case VK_FORMAT_R5G5B5A1_UNORM_PACK16:
case VK_FORMAT_A1R5G5B5_UNORM_PACK16: case VK_FORMAT_A1R5G5B5_UNORM_PACK16:
case VK_FORMAT_R5G6B5_UNORM_PACK16:
case VK_FORMAT_B5G6R5_UNORM_PACK16:
return 2; return 2;
case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:

View File

@ -248,7 +248,7 @@ bool VulkanHostDisplay::DownloadTexture(const void* texture_handle, u32 x, u32 y
} }
static constexpr std::array<VkFormat, static_cast<u32>(HostDisplayPixelFormat::Count)> s_display_pixel_format_mapping = static constexpr std::array<VkFormat, static_cast<u32>(HostDisplayPixelFormat::Count)> s_display_pixel_format_mapping =
{{VK_FORMAT_UNDEFINED, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B5G6R5_UNORM_PACK16, {{VK_FORMAT_UNDEFINED, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16,
VK_FORMAT_A1R5G5B5_UNORM_PACK16}}; VK_FORMAT_A1R5G5B5_UNORM_PACK16}};
bool VulkanHostDisplay::SupportsDisplayPixelFormat(HostDisplayPixelFormat format) const bool VulkanHostDisplay::SupportsDisplayPixelFormat(HostDisplayPixelFormat format) const