1 /* 2 * Copyright © 2022 Collabora Ltd. and Red Hat Inc. 3 * SPDX-License-Identifier: MIT 4 */ 5 #ifndef NVK_SAMPLER_H 6 #define NVK_SAMPLER_H 1 7 8 #include "nvk_private.h" 9 #include "nvk_physical_device.h" 10 11 #include "vk_sampler.h" 12 #include "vk_ycbcr_conversion.h" 13 14 #include "vk_format.h" 15 16 struct nvk_sampler { 17 struct vk_sampler vk; 18 19 uint8_t plane_count; 20 21 struct { 22 uint32_t desc_index; 23 } planes[2]; 24 }; 25 26 VK_DEFINE_NONDISP_HANDLE_CASTS(nvk_sampler, vk.base, VkSampler, 27 VK_OBJECT_TYPE_SAMPLER) 28 29 struct nvk_sampler_capture { 30 struct { 31 uint32_t desc_index; 32 } planes[2]; 33 }; 34 35 static void 36 nvk_sampler_fill_header(const struct nvk_physical_device *pdev, 37 const struct VkSamplerCreateInfo *info, 38 const struct vk_sampler *vk_sampler, 39 uint32_t *samp); 40 41 #endif 42