mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-07 15:46:12 +00:00
c/util: Remove old format checking code
It's not the compositors job to check the format.
This commit is contained in:
parent
322ce27163
commit
5aa7ef25b8
|
@ -247,19 +247,6 @@ image_cleanup(struct vk_bundle *vk, struct comp_swapchain_image *image)
|
||||||
D(Sampler, image->repeat_sampler);
|
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.
|
* 'Exported' functions.
|
||||||
|
@ -275,10 +262,6 @@ comp_swapchain_create(struct vk_bundle *vk,
|
||||||
uint32_t image_count = 3;
|
uint32_t image_count = 3;
|
||||||
VkResult ret;
|
VkResult ret;
|
||||||
|
|
||||||
if (!is_format_supported(vk, info->format)) {
|
|
||||||
return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((info->create & XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT) != 0) {
|
if ((info->create & XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT) != 0) {
|
||||||
VK_WARN(vk,
|
VK_WARN(vk,
|
||||||
"Swapchain info is valid but this compositor doesn't support creating protected content "
|
"Swapchain info is valid but this compositor doesn't support creating protected content "
|
||||||
|
|
Loading…
Reference in a new issue