From 0df911269234badb814460e23079274c3198b356 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 12 Aug 2021 11:50:12 +0200 Subject: [PATCH] v3dv: add API entry points for sampler Ycbcr conversions While this feature is optional in Vulkan 1.1 and we don't currently expose it, the CTS still requires that the entry points exist. From the Vulkan 1.1 spec: "If the VK_KHR_sampler_ycbcr_conversion extension is not supported, support for the samplerYcbcrConversion feature is optional." (...) "samplerYcbcrConversion specifies whether the implementation supports sampler YCBCR conversion. If samplerYcbcrConversion is VK_FALSE, sampler YCBCR conversion is not supported, and samplers using sampler YCBCR conversion must not be used." Fixes (with Vulkan 1.1 exposed): dEQP-VK.api.version_check.entry_points Reviewed-by: Juan A. Suarez Part-of: --- src/broadcom/vulkan/v3dv_descriptor_set.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_descriptor_set.c b/src/broadcom/vulkan/v3dv_descriptor_set.c index 3b9c2ffc749..c1f9a7a815b 100644 --- a/src/broadcom/vulkan/v3dv_descriptor_set.c +++ b/src/broadcom/vulkan/v3dv_descriptor_set.c @@ -1253,3 +1253,23 @@ v3dv_UpdateDescriptorSetWithTemplate( } } } + +VKAPI_ATTR VkResult VKAPI_CALL +v3dv_CreateSamplerYcbcrConversion( + VkDevice _device, + const VkSamplerYcbcrConversionCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkSamplerYcbcrConversion *pYcbcrConversion) +{ + unreachable("Ycbcr sampler conversion is not supported"); + return VK_SUCCESS; +} + +VKAPI_ATTR void VKAPI_CALL +v3dv_DestroySamplerYcbcrConversion( + VkDevice _device, + VkSamplerYcbcrConversion YcbcrConversion, + const VkAllocationCallbacks *pAllocator) +{ + unreachable("Ycbcr sampler conversion is not supported"); +}