Vulkan VkMemoryAllocateFlagsInfo with VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT crash

System details:

  • Windows 11 Pro OS Build 22621.1992
  • NVIDIA GTX 3090
  • Driver version: 536.40
  • Vulkan Instance Version: 1.3.241
  • Not overclocked

Hi,
I am trying to create a VkBuffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, therefore, I am allocating memory to that buffer that requires enabling the allocation flag VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT.

When I am running with the validation layers enabled all is working as expected. On the other hand, if I disabled them I encounter a crash on the driver nvoglv64.dll when allocating the memory.

The vulkan api is 1.3 and the feature to enable buffer device addresses is active.

VkPhysicalDeviceVulkan12Features Features12 = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES };
Features12.bufferDeviceAddress = true;

The following snippet is a close approximation of the actual code

VkMemoryAllocateInfo AllocInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO };
AllocInfo.allocationSize = Size;
AllocInfo.memoryTypeIndex = SelectedMemoryTypeIndex;
	
VkMemoryAllocateFlagsInfo FlagsInfo = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO };
FlagsInfo.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
AllocInfo.pNext = &FlagsInfo;

VkDeviceMemory Memory;
VkResult Result = vkAllocateMemory(Device, &AllocInfo, 0, &Memory);
Assert(Result == VK_SUCCESS);

Hi there @ataraxicdev and welcome to the NVIDIA developer forums.

Thank you for mentioning this.

Can you share a bit more detail with us? Especially a verbose error message before the crash (try to catch it as an exception maybe) and/or a stack trace would be very helpful.

Thanks!