zink: error if VK_KHR_maintenance1 isn't supported
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 22 Oct 2019 13:29:55 +0000 (15:29 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 17:57:49 +0000 (17:57 +0000)
While we're at it, remove the VK_-prefix from the extension bool; all
extensions have this so it's kinda superfluous.

src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_screen.h

index d0c07024d9e0efbb0b6eb386da401f16bad08e3a..667f242091c7eda11ecc6824790b975b09654f05 100644 (file)
@@ -842,12 +842,17 @@ zink_internal_create_screen(struct sw_winsys *winsys, int fd)
          for (uint32_t  i = 0; i < num_extensions; ++i) {
             if (!strcmp(extensions[i].extensionName,
                 VK_KHR_MAINTENANCE1_EXTENSION_NAME))
-               screen->have_VK_KHR_maintenance1 = true;
+               screen->have_KHR_maintenance1 = true;
          }
          FREE(extensions);
       }
    }
 
+   if (!screen->have_KHR_maintenance1) {
+      debug_printf("ZINK: VK_KHR_maintenance1 required!\n");
+      goto fail;
+   }
+
    VkDeviceQueueCreateInfo qci = {};
    float dummy = 0.0f;
    qci.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
index e91d7849a659155676e2cd5c8c13f68e158f8d88..38ade554cccdfc2d4f817c5b892efe45f715f7b3 100644 (file)
@@ -48,7 +48,7 @@ struct zink_screen {
    VkPhysicalDeviceProperties props;
    VkPhysicalDeviceFeatures feats;
    VkPhysicalDeviceMemoryProperties mem_props;
-   bool have_VK_KHR_maintenance1;
+   bool have_KHR_maintenance1;
 
    uint32_t gfx_queue;
    VkDevice dev;