diff options
author | Tapani Pälli <[email protected]> | 2018-07-25 14:26:33 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2018-08-06 09:25:11 +0300 |
commit | 5eb4b384d93d8733004349756ada0060616789ca (patch) | |
tree | 93617753353ed43932c0eca6bdb88a136c7bad22 /src/intel | |
parent | c3325097be93d6374a6b5f9fb5eee0878698ef77 (diff) |
anv: add more swapchain formats
This change helps with some of the dEQP-VK.wsi.android.* tests that
try to create swapchain with using such formats.
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_android.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_android.c b/src/intel/vulkan/anv_android.c index a3bab8087b4..46c41d57861 100644 --- a/src/intel/vulkan/anv_android.c +++ b/src/intel/vulkan/anv_android.c @@ -300,11 +300,17 @@ VkResult anv_GetSwapchainGrallocUsageANDROID( * * FINISHME: Advertise all display-supported formats. */ - if (format == VK_FORMAT_B8G8R8A8_UNORM || - format == VK_FORMAT_B5G6R5_UNORM_PACK16) { - *grallocUsage |= GRALLOC_USAGE_HW_FB | - GRALLOC_USAGE_HW_COMPOSER | - GRALLOC_USAGE_EXTERNAL_DISP; + switch (format) { + case VK_FORMAT_B8G8R8A8_UNORM: + case VK_FORMAT_B5G6R5_UNORM_PACK16: + case VK_FORMAT_R8G8B8A8_UNORM: + case VK_FORMAT_R8G8B8A8_SRGB: + *grallocUsage |= GRALLOC_USAGE_HW_FB | + GRALLOC_USAGE_HW_COMPOSER | + GRALLOC_USAGE_EXTERNAL_DISP; + break; + default: + intel_logw("%s: unsupported format=%d", __func__, format); } if (*grallocUsage == 0) |