From abd4478f3f37b47a79892d4e11cc94babae982c6 Mon Sep 17 00:00:00 2001 From: dzhdan Date: Fri, 20 Sep 2024 16:06:21 +0800 Subject: [PATCH] Fixed build --- Source/Creation/Creation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Creation/Creation.cpp b/Source/Creation/Creation.cpp index f844635..ccc0194 100644 --- a/Source/Creation/Creation.cpp +++ b/Source/Creation/Creation.cpp @@ -431,11 +431,11 @@ NRI_API Result NRI_CALL nriEnumerateAdapters(AdapterDesc* adapterDescs, uint32_t if (result == VK_SUCCESS && deviceGroupNum) { if (adapterDescs) { // Query device groups - VkPhysicalDeviceGroupProperties* deviceGroupProperties = AllocateScratch(m_Device, VkPhysicalDeviceGroupProperties, deviceGroupNum); + VkPhysicalDeviceGroupProperties* deviceGroupProperties = (VkPhysicalDeviceGroupProperties*)_alloca(sizeof(VkPhysicalDeviceGroupProperties) * deviceGroupNum); vkEnumeratePhysicalDeviceGroups(instance, &deviceGroupNum, deviceGroupProperties); // Query device groups properties - AdapterDesc* adapterDescsSorted = AllocateScratch(m_Device, AdapterDesc, deviceGroupNum); + AdapterDesc* adapterDescsSorted = (AdapterDesc*)_alloca(sizeof(AdapterDesc) * deviceGroupNum); for (uint32_t i = 0; i < deviceGroupNum; i++) { VkPhysicalDeviceIDProperties deviceIDProperties = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES}; VkPhysicalDeviceProperties2 properties2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2};