VK_ERROR_INCOMPATIBLE_DRIVER when setting apiVersion to 0

I am trying to create a volcano instance. Here is my code:

vk::ApplicationInfo appInfo("Test", 1, nullptr, 0, 0);
vk::InstanceCreateInfo info;
info.pApplicationInfo(&appInfo);
vk::Instance instance;
const auto result = vk::createInstance(&info, nullptr, &instance);
std::cout << vkResultToString(result) << std::endl;

However, this returns VK_ERROR_INCOMPATIBLE_DRIVER.

If I don't provide my own ApplicationInfoand use the default built instead, it works.

The specification says

If apiVersionequal to 0, the implementation should ignore it, otherwise, if the implementation does not support the requested apiVersion, it should returnVK_ERROR_INCOMPATIBLE_DRIVER

As you can see, I set it apiVersionto 0. As far as I know, it should not give me an error VK_ERROR_INCOMPATIBLE_DRIVER.

Is this a mistake or am I forgetting something or thinking wrong?

EDIT:

html- apiVersion . pdf ?

EDIT:

apiVersion 1.0.3, :

std::bitset<32> apiVersion;
apiVersion.set(22);
apiVersion.set(1);
apiVersion.set(0);
vk::ApplicationInfo appInfo("Test", 1, nullptr, 0, apiVersion.to_ulong());
+4
3

, . , API , . , , , - .

, API: https://www.khronos.org/registry/vulkan/specs/1.0/apispec.html.

: ", apiVersion - API Vulkan, ".

+3

:

- ?

, , . :

apiVersion - API Vulkan, , , API . apiVersion 0, , , apiVersion, VK_ERROR_INCOMPATIBLE_DRIVER.

apiVersion , ,

, , , <= SDK, , <= , .

+1
source

Source: https://habr.com/ru/post/1629147/


All Articles