How to obtain version of installed Vulkan API in Linux?

xsp-server-hater picture xsp-server-hater · Apr 22, 2018 · Viewed 8k times · Source

2018-03-07, the new version of API (Vulkan 1.1) was released.

I want to know:

  1. which console command can display currently installed API version.
$ /usr/bin/vulkaninfo | head -n 5
===========
VULKAN INFO
===========

Vulkan Instance Version: 1.1.70
WARNING: radv is not a conformant vulkan implementation, testing use only.
  1. how to determine the same thing in C# language programmatically.

Answer

Sascha Willems picture Sascha Willems · Apr 22, 2018

The Vulkan version is determined by multiple factors. It depends on what your device supports, the header you're using and the api version you request when creating your application. The "installed" version is either the SDK you're using or (one of) the runtime(s) your driver did install.

Checking via command line can be done using the vksjon_info tool from the LunarG SDK.

Checking via code (no matter what language, as long as you got headers) can be done by querying device properties via vkGetPhysicalDeviceProperties. The apiVersion member of the VkPhysicalDeviceProperties struct contains the maximum supported version for that device. Just shift the bits or use the version macros from the headers to get a humnan readable version (major.minor.patch).