Mesa (main): anv/android: fix build error due refactoring

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 11 05:06:25 UTC 2021


Module: Mesa
Branch: main
Commit: ff669ea93bc5e7d3065d876c8514667f5e740d96
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff669ea93bc5e7d3065d876c8514667f5e740d96

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Tue Aug 10 11:08:35 2021 +0300

anv/android: fix build error due refactoring

Fixes: e08370dc37e ("anv: disable aux for exportable images without modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5208
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12300>

---

 src/intel/vulkan/anv_image.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 2a30821470b..12e123e2186 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -1022,13 +1022,14 @@ add_all_surfaces_implicit_layout(
    isl_tiling_flags_t isl_tiling_flags,
    const struct anv_image_create_info *create_info)
 {
+   assert(create_info);
    const struct intel_device_info *devinfo = &device->info;
    isl_surf_usage_flags_t isl_extra_usage_flags =
       create_info->isl_extra_usage_flags;
    VkResult result;
 
    const VkExternalMemoryImageCreateInfo *ext_mem_info =
-      vk_find_struct_const(create_info->vk_info->pNext,
+      vk_find_struct_const(create_info->vk_info,
                            EXTERNAL_MEMORY_IMAGE_CREATE_INFO);
 
    u_foreach_bit(b, image->aspects) {
@@ -1602,9 +1603,13 @@ resolve_ahw_image(struct anv_device *device,
    uint32_t stride = desc.stride *
                      (isl_format_get_layout(isl_fmt)->bpb / 8);
 
+   struct anv_image_create_info create_info = {
+      .isl_extra_usage_flags = ISL_SURF_USAGE_DISABLE_AUX_BIT,
+   };
+
    result = add_all_surfaces_implicit_layout(device, image, NULL, stride,
                                              isl_tiling_flags,
-                                             ISL_SURF_USAGE_DISABLE_AUX_BIT);
+                                             &create_info);
    assert(result == VK_SUCCESS);
 #endif
 }



More information about the mesa-commit mailing list