diff options
| author | David Pinedo <david@lunarg.com> | 2015-10-19 15:15:34 -0600 |
|---|---|---|
| committer | David Pinedo <david@lunarg.com> | 2015-10-19 15:28:44 -0600 |
| commit | 81788d723e9dd2fc18e8b652e86198cb28546f80 (patch) | |
| tree | de4ab9c6df6cf0ea6a69041ed623be1189ab2b4b | |
| parent | 8a9f62a2d83874a66b1b6c7a0b75ad5db459f5af (diff) | |
| download | usermoji-81788d723e9dd2fc18e8b652e86198cb28546f80.tar.xz | |
Demos: output api version in vulkaninfo
| -rw-r--r-- | demos/vulkaninfo.c | 11 |
1 files changed, 10 insertions, 1 deletions
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"); |
