Mesa (main): v3dv: add API entry points for sampler Ycbcr conversions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 12 10:36:16 UTC 2021


Module: Mesa
Branch: main
Commit: 0df911269234badb814460e23079274c3198b356
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0df911269234badb814460e23079274c3198b356

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Thu Aug 12 11:50:12 2021 +0200

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 <jasuarez at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12338>

---

 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");
+}



More information about the mesa-commit mailing list