turnip: fill VkMemoryDedicatedRequirements
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Tue, 16 Feb 2021 15:04:35 +0000 (17:04 +0200)
committerDanylo Piliaiev <dpiliaiev@igalia.com>
Fri, 12 Mar 2021 09:56:47 +0000 (11:56 +0200)
commit1a2f1e3f472b1abe83e7e872839bd9ed370fd268
tree75950aeb87f04040c971b9020a215afa8f76bb26
parentd7b3454af3af2825e8a2f324f23fc45fbba46283
turnip: fill VkMemoryDedicatedRequirements

We support VK_KHR_dedicated_allocation so we must fill
VkMemoryDedicatedRequirements.

Vulkan spec states:

 "[...] requiresDedicatedAllocation may be VK_TRUE under one of the
 following conditions:

 The pNext chain of VkImageCreateInfo for the call to vkCreateImage used
 to create the image being queried included a VkExternalMemoryImageCreateInfo
 structure, and any of the handle types specified in
 VkExternalMemoryImageCreateInfo::handleTypes requires dedicated allocation,
 as reported by vkGetPhysicalDeviceImageFormatProperties2 in
 VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures,
 the requiresDedicatedAllocation field will be set to VK_TRUE."

All handle types require dedicated allocation at the moment.

Fixes:
 dEQP-VK.api.external.memory.opaque_fd.dedicated.image.info
 dEQP-VK.memory.requirements.dedicated_allocation.buffer.regular
 dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_optimal

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9086>
src/freedreno/ci/deqp-freedreno-a630-fails.txt
src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_image.c
src/freedreno/vulkan/tu_private.h