diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-12-02 23:58:58 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-04-25 19:56:20 +0000 |
commit | 65c4f612aa21008a7140d3d6399832b58374e6c3 (patch) | |
tree | 10ed1205eb21a10caa54aa991665528a097e69aa /src/amd/vulkan/radv_device.c | |
parent | a83776885705543ef6ecb9cee864f5ac68a89aa9 (diff) |
radv: Add ycbcr conversion structs.
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 7a6735e68a4..2f20c4f46b2 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -4837,6 +4837,10 @@ VkResult radv_CreateSampler( RADV_FROM_HANDLE(radv_device, device, _device); struct radv_sampler *sampler; + const struct VkSamplerYcbcrConversionInfo *ycbcr_conversion = + vk_find_struct_const(pCreateInfo->pNext, + SAMPLER_YCBCR_CONVERSION_INFO); + assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO); sampler = vk_alloc2(&device->alloc, pAllocator, sizeof(*sampler), 8, @@ -4845,6 +4849,8 @@ VkResult radv_CreateSampler( return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY); radv_init_sampler(device, sampler, pCreateInfo); + + sampler->ycbcr_sampler = ycbcr_conversion ? radv_sampler_ycbcr_conversion_from_handle(ycbcr_conversion->conversion): NULL; *pSampler = radv_sampler_to_handle(sampler); return VK_SUCCESS; |