So, I'm gathering some info about my device in Vulkan during initialization and find a unique (or rather, quite similar) set of memory types returned by vkGetPhysicalDeviceMemoryProperties:
Device Name: GeForce GTX 1060 3GB
Device ID: 7170
Device Type: 2
Device Vendor ID: 4318
Device API Version: 4194369 (1.0.65)
Device Driver Version: 1636843520 (390.65)
Device Heaps:
0 -> Size: 3133145088 Flags: 1
1 -> Size: 8523874304 Flags: 0
Device Memory:
0 -> Index: 1 Flags: 0
1 -> Index: 1 Flags: 0
2 -> Index: 1 Flags: 0
3 -> Index: 1 Flags: 0
4 -> Index: 1 Flags: 0
5 -> Index: 1 Flags: 0
6 -> Index: 1 Flags: 0
7 -> Index: 0 Flags: 1
8 -> Index: 0 Flags: 1
9 -> Index: 1 Flags: 6
10 -> Index: 1 Flags: 14
I sit down and contemplate... which one should I chose? Excluding the seven identical host local memory types, we still have two identical device memory types. There must be some reason for this, so I head out on my adventure through the depths of the internet!
StackOverflow doesn't seem to have anything similar, and Google returns some official documents from Nvidia that don't seem to touch on memory types extensively, so maybe the Vulkan documentation has something juicy? vkGetPhysicalDeviceMemoryProperties, VkPhysicalDeviceMemoryProperties and VkMemoryType don't seem to offer any insightful information on the topic of multiple identical memory types. Maybe the official Vulkan programming guide (whose source code still hasn't been published by the way) can touch on this topic? Unfortunately, it seems my quick glance has lead me to page 10 and beyond which doesn't seem to mention anything about identical memory types (but the queue section right after it does mention about identical queue families).
Why am I getting multiple memory types, and more importantly which one should I chose? Should I alternate the different types if I want to allocate multiple buffers like you would do with queues?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…