From 5aa7ef25b837bbf59be0da7eddd0712327fb2d20 Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Fri, 1 Apr 2022 02:00:19 +0200 Subject: [PATCH] c/util: Remove old format checking code It's not the compositors job to check the format. --- src/xrt/compositor/util/comp_swapchain.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/xrt/compositor/util/comp_swapchain.c b/src/xrt/compositor/util/comp_swapchain.c index 651e5af9e..a8a177d25 100644 --- a/src/xrt/compositor/util/comp_swapchain.c +++ b/src/xrt/compositor/util/comp_swapchain.c @@ -247,19 +247,6 @@ image_cleanup(struct vk_bundle *vk, struct comp_swapchain_image *image) D(Sampler, image->repeat_sampler); } -static bool -is_format_supported(struct vk_bundle *vk, VkFormat format) -{ - VkFormatProperties prop; - - vk->vkGetPhysicalDeviceFormatProperties(vk->physical_device, format, &prop); - - // This is a fairly crude way of checking support, - // but works well enough. - return prop.optimalTilingFeatures != 0; -} - - /* * * 'Exported' functions. @@ -275,10 +262,6 @@ comp_swapchain_create(struct vk_bundle *vk, uint32_t image_count = 3; VkResult ret; - if (!is_format_supported(vk, info->format)) { - return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED; - } - if ((info->create & XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT) != 0) { VK_WARN(vk, "Swapchain info is valid but this compositor doesn't support creating protected content "