# HG changeset patch # User John Tsiombikas # Date 1482045316 -7200 # Node ID 5b2ae06283aa250f6d442b8424fbd232e5cdc4e9 # Parent 8cb584143df33e6754deb874ed1e47ee15e8cc98 more queries diff -r 8cb584143df3 -r 5b2ae06283aa main.c --- a/main.c Fri Apr 01 07:14:47 2016 +0300 +++ b/main.c Sun Dec 18 09:15:16 2016 +0200 @@ -5,10 +5,12 @@ #include const char *get_device_name(VkPhysicalDeviceType type); +const char *get_mem_prop_flag_string(VkMemoryPropertyFlags flags); const char *get_queue_flag_string(VkQueueFlagBits flags); int ver_major(uint32_t ver); int ver_minor(uint32_t ver); int ver_patch(uint32_t ver); +const char *mem_size_str(long sz); int main(void) { @@ -46,6 +48,7 @@ for(i=0; i<(int)num_devices; i++) { VkPhysicalDeviceProperties dev_prop; + VkPhysicalDeviceMemoryProperties mem_prop; VkQueueFamilyProperties *qprop; uint32_t qprop_count; @@ -59,6 +62,21 @@ ver_patch(dev_prop.driverVersion)); printf(" vendor id: %x device id: %x\n", dev_prop.vendorID, dev_prop.deviceID); + + vkGetPhysicalDeviceMemoryProperties(devices[i], &mem_prop); + printf(" %d memory heaps:\n", mem_prop.memoryHeapCount); + for(j=0; j= 10240 && unitstr[uidx + 1]) { + sz /= 1024; + ++uidx; + } + sprintf(str, "%ld.%ld %s", sz / 10, sz % 10, unitstr[uidx]); + return str; +}