I have used the Vulkan function vkGetPhysicalDeviceMemoryProperties
to obtain the memory properties of a specific physical device, i.e. GPU.
I have printed out the returned values from this function (1st column from the left is their enumerated values. Based on this output, I can see there are 2 memory heaps and 11 memoryTypes.
Memory:
-memoryTypeCount: 11
-memoryTypes[VK_MAX_MEMORY_TYPES]:
-0, propertyFlags: 0, heapIndex: 1
-1, propertyFlags: 0, heapIndex: 1
-2, propertyFlags: 0, heapIndex: 1
-3, propertyFlags: 0, heapIndex: 1
-4, propertyFlags: 0, heapIndex: 1
-5, propertyFlags: 0, heapIndex: 1
-6, propertyFlags: 0, heapIndex: 1
-7, propertyFlags: 1, heapIndex: 0
-8, propertyFlags: 1, heapIndex: 0
-9, propertyFlags: 6, heapIndex: 1
-10, propertyFlags: 14, heapIndex: 1
-memoryHeapCount: 2
-memoryHeaps[VK_MAX_MEMORY_HEAPS]:
-0, size: 6442450944, flags: 1
-1, size: 25186016256, flags: 0
Questions:
- What does propertyFlags=0 mean ? I can't find it in Vulkan specification.
- Does heapIndex=0 and 1 refer to the 1st or 2nd element of memoryHeaps?
- What is the advantage of having multiple memoryTypes element? How do I use them in a Vulkan application?