Fix VulkanTest::CreateMappedStorage _WIN64 segfault (#1173)

* Fix VulkanTest::CreateMappedStorage _WIN64 segfault

* Fix Indentation
This commit is contained in:
Jin Jung
2025-09-30 14:52:05 -07:00
committed by GitHub
parent eeeaa06159
commit c6d44b47d4
@@ -300,14 +300,16 @@ VulkanTest::MappedBuffer<T> 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<T> VulkanTest::CreateMappedStorage(uint32_t count,
? &vulkanExportMemoryWin32HandleInfoKHR
: NULL;
#endif
allocate_info.pNext = &vulkan_export_memory_allocate_info;
}
@@ -338,4 +341,4 @@ VulkanTest::MappedBuffer<T> 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);
hipExternalSemaphore_t ImportBinarySemaphore(VulkanTest& vkt);