cube: Print physical device API and driver version
diff --git a/cube/cube.c b/cube/cube.c index beb02a9..a396fd4 100644 --- a/cube/cube.c +++ b/cube/cube.c
@@ -4328,8 +4328,16 @@ { VkPhysicalDeviceProperties physicalDeviceProperties; vkGetPhysicalDeviceProperties(demo->gpu, &physicalDeviceProperties); - fprintf(stderr, "Selected GPU %d: %s, type: %s\n", demo->gpu_number, physicalDeviceProperties.deviceName, - to_string(physicalDeviceProperties.deviceType)); + uint32_t api_major = VK_API_VERSION_MAJOR(physicalDeviceProperties.apiVersion); + uint32_t api_minor = VK_API_VERSION_MINOR(physicalDeviceProperties.apiVersion); + uint32_t api_patch = VK_API_VERSION_PATCH(physicalDeviceProperties.apiVersion); + uint32_t major = VK_API_VERSION_MAJOR(physicalDeviceProperties.driverVersion); + uint32_t minor = VK_API_VERSION_MINOR(physicalDeviceProperties.driverVersion); + uint32_t patch = VK_API_VERSION_PATCH(physicalDeviceProperties.driverVersion); + fprintf(stderr, "Selected GPU %d: %s, type: %s, apiVersion: %d (%d.%d.%d), driverVersion: %d (%d.%d.%d) \n", + demo->gpu_number, physicalDeviceProperties.deviceName, to_string(physicalDeviceProperties.deviceType), + physicalDeviceProperties.apiVersion, api_major, api_minor, api_patch, physicalDeviceProperties.driverVersion, major, + minor, patch); } free(physical_devices);
diff --git a/cube/cube.cpp b/cube/cube.cpp index de411cf..149f3a1 100644 --- a/cube/cube.cpp +++ b/cube/cube.cpp
@@ -1914,8 +1914,17 @@ gpu = physical_devices[gpu_number]; { auto physicalDeviceProperties = gpu.getProperties(); - fprintf(stderr, "Selected GPU %d: %s, type: %s\n", gpu_number, physicalDeviceProperties.deviceName.data(), - to_string(physicalDeviceProperties.deviceType).c_str()); + + uint32_t api_major = VK_API_VERSION_MAJOR(physicalDeviceProperties.apiVersion); + uint32_t api_minor = VK_API_VERSION_MINOR(physicalDeviceProperties.apiVersion); + uint32_t api_patch = VK_API_VERSION_PATCH(physicalDeviceProperties.apiVersion); + uint32_t major = VK_API_VERSION_MAJOR(physicalDeviceProperties.driverVersion); + uint32_t minor = VK_API_VERSION_MINOR(physicalDeviceProperties.driverVersion); + uint32_t patch = VK_API_VERSION_PATCH(physicalDeviceProperties.driverVersion); + fprintf(stderr, "Selected GPU %d: %s, type: %s, apiVersion: %d (%d.%d.%d), driverVersion: %d (%d.%d.%d) \n", gpu_number, + physicalDeviceProperties.deviceName.data(), to_string(physicalDeviceProperties.deviceType).c_str(), + physicalDeviceProperties.apiVersion, api_major, api_minor, api_patch, physicalDeviceProperties.driverVersion, major, + minor, patch); } /* Look for device extensions */