anv: correctly use vulkan 1.0 by default
authorEric Engestrom <eric.engestrom@intel.com>
Fri, 23 Nov 2018 17:08:28 +0000 (17:08 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Mon, 26 Nov 2018 22:05:02 +0000 (22:05 +0000)
Per chapter 3.2 "Instances":
> Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing
> an apiVersion of 0 is equivalent to providing an apiVersion of
> VK_MAKE_VERSION(1,0,0).

Reported-by: Niklas Haas <git@haasn.xyz>
Fixes: 8c048af5890d43578ca4 "anv: Copy the appliation info into the instance"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/intel/vulkan/anv_device.c

index 20533cb3cc0736a5d42b2af94b95572179c7e91f..6b5ba25c6bcbf1175eed3ed8a77c37f72747824c 100644 (file)
@@ -636,7 +636,7 @@ VkResult anv_CreateInstance(
    }
 
    if (instance->app_info.api_version == 0)
-      anv_EnumerateInstanceVersion(&instance->app_info.api_version);
+      instance->app_info.api_version = VK_API_VERSION_1_0;
 
    instance->enabled_extensions = enabled_extensions;