From 81788d723e9dd2fc18e8b652e86198cb28546f80 Mon Sep 17 00:00:00 2001 From: David Pinedo Date: Mon, 19 Oct 2015 15:15:34 -0600 Subject: Demos: output api version in vulkaninfo --- demos/vulkaninfo.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/demos/vulkaninfo.c b/demos/vulkaninfo.c index 3e69e3f0..9e907d60 100644 --- a/demos/vulkaninfo.c +++ b/demos/vulkaninfo.c @@ -1058,12 +1058,21 @@ static void app_gpu_dump(const struct app_gpu *gpu) int main(int argc, char **argv) { - struct app_gpu gpus[MAX_GPUS]; + unsigned int major, minor, patch; + struct app_gpu gpus[MAX_GPUS]; VkPhysicalDevice objs[MAX_GPUS]; uint32_t gpu_count, i; VkResult err; struct app_instance inst; + major = VK_API_VERSION >> 22; + minor = (VK_API_VERSION >> 12) & 0x4ff; + patch = VK_API_VERSION & 0xfff; + printf("===========\n"); + printf("VULKAN INFO\n"); + printf("===========\n\n"); + printf("Vulkan API Version: %d %d %d\n\n", major, minor, patch); + app_create_instance(&inst); printf("Instance Extensions and layers:\n"); -- cgit v1.2.3