diff --git a/projects/hip-tests/catch/unit/vulkan_interop/vulkan_test.hh b/projects/hip-tests/catch/unit/vulkan_interop/vulkan_test.hh index a1fef6a694..df5bfa9d50 100644 --- a/projects/hip-tests/catch/unit/vulkan_interop/vulkan_test.hh +++ b/projects/hip-tests/catch/unit/vulkan_interop/vulkan_test.hh @@ -300,14 +300,16 @@ VulkanTest::MappedBuffer VulkanTest::CreateMappedStorage(uint32_t count, } VkExportMemoryAllocateInfoKHR vulkan_export_memory_allocate_info = {}; +#ifdef _WIN64 + WindowsSecurityAttributes winSecurityAttributes; + VkExportMemoryWin32HandleInfoKHR vulkanExportMemoryWin32HandleInfoKHR = {}; +#endif + if (external) { vulkan_export_memory_allocate_info.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR; vulkan_export_memory_allocate_info.handleTypes = _mem_handle_type; #ifdef _WIN64 - WindowsSecurityAttributes winSecurityAttributes; - - VkExportMemoryWin32HandleInfoKHR vulkanExportMemoryWin32HandleInfoKHR = {}; vulkanExportMemoryWin32HandleInfoKHR.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; vulkanExportMemoryWin32HandleInfoKHR.pNext = NULL; @@ -321,6 +323,7 @@ VulkanTest::MappedBuffer VulkanTest::CreateMappedStorage(uint32_t count, ? &vulkanExportMemoryWin32HandleInfoKHR : NULL; #endif + allocate_info.pNext = &vulkan_export_memory_allocate_info; } @@ -338,4 +341,4 @@ VulkanTest::MappedBuffer VulkanTest::CreateMappedStorage(uint32_t count, // Sometimes in CUDA the stream is not immediately ready after a semaphore has been signaled void PollStream(hipStream_t stream, hipError_t expected, uint32_t num_iterations = 5); -hipExternalSemaphore_t ImportBinarySemaphore(VulkanTest& vkt); \ No newline at end of file +hipExternalSemaphore_t ImportBinarySemaphore(VulkanTest& vkt);