9 Replies Latest reply on Aug 24, 2018 1:31 AM by xhuang

    Vulkan Copying to directx 11 shared texture

    pjaholkowski

      Hi

       

      I'm trying to copy swapchain image to shared directX 11 texture.

       

      I tested my code on other vendor gpus and it works except AMD where it crashes while calling vkCmdPipelineBarrier on shared VkImage.

       

      I ran it with validation layers and only message I got is:

       

      Validation(WARN): msg_code: 207733773:  [ VUID-VkMemoryAllocateInfo-pNext-pNext ] Object: VK_NULL_HANDLE (Type = 0) | vkAllocateMemory: pAllocateInfo->pNext chain includes a structure with unexpected VkStructureType VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO; Allowed structures are [VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfo, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportAndroidHardwareBufferInfoANDROID, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfo, VkMemoryDedicatedAllocateInfo]. This warning is based on the Valid Usage documentation for version 77 of the Vulkan header.  It is possible that you are using a struct from a private extension or an extension that was added to a later version of the Vulkan header, in which case your use of pAllocateInfo->pNext is perfectly valid but is not guaranteed to work correctly with validation enabled The spec valid usage text states 'Each pNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkDedicatedAllocationMemoryAllocateInfoNV, VkExportMemoryAllocateInfo, VkExportMemoryAllocateInfoNV, VkExportMemoryWin32HandleInfoKHR, VkExportMemoryWin32HandleInfoNV, VkImportAndroidHardwareBufferInfoANDROID, VkImportMemoryFdInfoKHR, VkImportMemoryHostPointerInfoEXT, VkImportMemoryWin32HandleInfoKHR, VkImportMemoryWin32HandleInfoNV, VkMemoryAllocateFlagsInfo, or VkMemoryDedicatedAllocateInfo' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-VkMemoryAllocateInfo-pNext-pNext)

      (null)

       

      It crashes in amdvlk32.dll. It would be nice if someone with access to its symbols could look at it

      and give me a clue what is wrong.

       

      I attached crash dump, executable and source code of working example based on cubepp from VulkanSDK