anv: assert that legacy_scanout isn't used with explicit modifiers
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 17 Sep 2021 20:15:00 +0000 (16:15 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 27 Sep 2021 21:36:44 +0000 (17:36 -0400)
these should be mutually exclusive

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12919>

src/intel/vulkan/anv_image.c

index f7c2b88..46ce702 100644 (file)
@@ -1276,6 +1276,7 @@ anv_image_create(VkDevice _device,
       anv_image_create_usage(pCreateInfo, image->vk.stencil_usage);
 
    if (pCreateInfo->tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
+      assert(!image->vk.wsi_legacy_scanout);
       mod_explicit_info =
          vk_find_struct_const(pCreateInfo->pNext,
                               IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT);