thefox1009
thefox1009

Reputation: 41

VK_ERROR_INCOMPATIBLE_DRIVER when setting apiVersion to VK_VERSION_1_0

Trying to set up a Vulkan application but when I set the apiVersion to VK_VERSION_1_0 I get VK_ERROR_INCOMPATIBLE_DRIVER from vkCreateInstance. It works normally if I set the apiVersion = 0.

Am I missing something or is this behavior unintended (I think I am missing something)?

    VkApplicationInfo appInfo;
    appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
    appInfo.pNext = NULL;
    appInfo.pApplicationName = "Vulkan Tutorial";
    appInfo.applicationVersion = VK_MAKE_VERSION(0, 0, 0);
    appInfo.pEngineName = "LUL";
    appInfo.engineVersion = VK_MAKE_VERSION(0, 0, 0);
    appInfo.apiVersion = VK_VERSION_1_0;

  VkResult result = vkCreateInstance(&instanceInfo, NULL, &instance);

    if (result != VK_SUCCESS){
        __debugbreak();
    }

Upvotes: 3

Views: 755

Answers (1)

krOoze
krOoze

Reputation: 13246

You are using the wrong macro!
Use VK_API_VERSION_1_0 instead.

(VK_VERSION_1_0 is just to detect you included 1.0 header of Vulkan. It does have only True as the value. )

(BTW It is optional to use VkApplicationInfo. If you do use it it is optional to provide app and/or engine name. App and Engine does not necessarily use Vulkan's versioning scheme, so it does not necessarily make sense to use VK_MAKE_VERSION there)

Upvotes: 3

Related Questions