lavapipe: expose a 1.0 vulkan API for now.
authorDave Airlie <airlied@redhat.com>
Mon, 1 Mar 2021 03:08:46 +0000 (13:08 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 2 Mar 2021 00:46:25 +0000 (10:46 +1000)
lavapipe doesn't have all 1.1 features yet, just return
the baseline 1.0 API always.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075>

src/gallium/frontends/lavapipe/lvp_device.c
src/gallium/targets/lavapipe/meson.build

index affab34..4bc91a8 100644 (file)
@@ -119,14 +119,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateInstance(
 
    assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO);
 
-   uint32_t client_version;
-   if (pCreateInfo->pApplicationInfo &&
-       pCreateInfo->pApplicationInfo->apiVersion != 0) {
-      client_version = pCreateInfo->pApplicationInfo->apiVersion;
-   } else {
-      client_version = VK_API_VERSION_1_0;
-   }
-
    if (pAllocator == NULL)
       pAllocator = &default_alloc;
 
@@ -149,7 +141,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateInstance(
       return vk_error(instance, result);
    }
 
-   instance->apiVersion = client_version;
+   instance->apiVersion = LVP_API_VERSION;
    instance->physicalDeviceCount = -1;
 
    //   _mesa_locale_init();
index 1648118..65680dc 100644 (file)
@@ -32,7 +32,7 @@ lvp_icd = custom_target(
   output : 'lvp_icd.@0@.json'.format(host_machine.cpu()),
   command : [
     prog_python, '@INPUT0@',
-    '--api-version', '1.1', '--xml', '@INPUT1@',
+    '--api-version', '1.0', '--xml', '@INPUT1@',
     '--lib-path', join_paths(module_dir, icd_file_name),
     '--out', '@OUTPUT@',
   ],