radv: correctly use vulkan 1.0 by default
authorNiklas Haas <git@haasn.xyz>
Thu, 22 Nov 2018 23:32:29 +0000 (00:32 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 27 Jan 2019 11:49:28 +0000 (12:49 +0100)
From the vulkan spec 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)."

Fixes: ffa15861ef7c924a33e1f "radv: UseEnumerateInstanceVersion for the default version."
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index c2de61c935d1bd26b7a3ea5c8d31db4248385b9d..8ba04cd2f58109ce8548ff3a103da6c090922810 100644 (file)
@@ -533,7 +533,7 @@ VkResult radv_CreateInstance(
            pCreateInfo->pApplicationInfo->apiVersion != 0) {
                client_version = pCreateInfo->pApplicationInfo->apiVersion;
        } else {
-               radv_EnumerateInstanceVersion(&client_version);
+               client_version = VK_API_VERSION_1_0;
        }
 
        instance = vk_zalloc2(&default_alloc, pAllocator, sizeof(*instance), 8,