Closed triggerhuang-gpu closed 2 months ago
I don't get such a validation layer error (on Win10, using Nvidia GPU). Is that a Linux thing? Nevertheless, your change looks correct. But you should resolve the failing Quality Check.
I don't get such a validation layer error (on Win10, using Nvidia GPU). Is that a Linux thing? Nevertheless, your change looks correct. But you should resolve the failing Quality Check.
Thanks for the comments. Yes, I am running this case on Linux Ubuntu22.04 + AMDGPU. Let me check how to resolve the failing Quality Check
Hello @asuessenbach , I have resolved all the failing Quality Checks, would you please help to continuing the review procedure
Hello @SaschaWillems , @gary-sweet , would you please help review this patch?
On Vulkan side, the memory behind an interop image should be a dedicated allocation. And on the OpenGL side, we also need to explicitly set the memory object with GL_DEDICATED_MEMORY_OBJECT_EXT falg.
Without this modification, there should be validation errors like:
Validation Error: [ VUID-VkMemoryAllocateInfo-pNext-00639 ] Object 0: handle = 0x603cd90000000044, type = VK_OBJECT_TYPE_IMAGE; Object 1: handle = 0x8cc1d80000000045, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID = 0xfd0fdaf4 | vkBindImageMemory(): memory (VkDeviceMemory 0x8cc1d80000000045[]) has VkExportMemoryAllocateInfo::handleTypes with the VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT flag set, which requires dedicated allocation for the image created with format (VK_FORMAT_R8G8B8A8_UNORM), type (VK_IMAGE_TYPE_2D), tiling (VK_IMAGE_TILING_OPTIMAL), usage (VK_IMAGE_USAGE_SAMPLED_BIT|VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT), flags (VkImageCreateFlags(0)), but the memory is allocated without dedicated allocation support. The Vulkan spec states: If the pNext chain includes a VkExportMemoryAllocateInfo structure, and any of the handle types specified in VkExportMemoryAllocateInfo::handleTypes require a dedicated allocation, as reported by vkGetPhysicalDeviceImageFormatProperties2 in VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures, or by vkGetPhysicalDeviceExternalBufferProperties in VkExternalBufferProperties::externalMemoryProperties.externalMemoryFeatures, the pNext chain must include a VkMemoryDedicatedAllocateInfo or VkDedicatedAllocationMemoryAllocateInfoNV structure with either its image or buffer member set to a value other than VK_NULL_HANDLE (https://vulkan.lunarg.com/doc/view/1.3.283.0/linux/1.3-extensions/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-00639)
Description
Please include a summary of the change, new sample or fixed issue. Please also include relevant motivation and context. Please read the contribution guidelines
Fixes #
General Checklist:
Please ensure the following points are checked:
[x] This PR describes the scope and expected impact of the changes I am making
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batch
command line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: