anv: avoid VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS warnings
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

When running "./deqp-vk -n dEQP-VK.memory.binding.maintenance6*", we
get tons of:

    MESA-INTEL: debug: anv_bind_image_memory: ignored VkStructureType
    VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS(1000545002)

The function does not ignore VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS: it
looks for it before the main pNext loop. The pNext loop we have there
calls vk_debug_ignored_stype(), which complains about the fact that
we, allegedly, ignore VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS. Move the
code where we find bind_status to the loop so it doesn't complain
anymore.

Reviewed-by: Iván Briano <ivan.briano@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40351>
This commit is contained in:
Paulo Zanoni 2026-03-10 17:04:36 -07:00 committed by Marge Bot
parent a4cabc1334
commit b97a1e6870

View file

@ -2982,9 +2982,7 @@ anv_bind_image_memory(struct anv_device *device,
ANV_FROM_HANDLE(anv_image, image, bind_info->image);
bool did_bind = false;
VkResult result = VK_SUCCESS;
const VkBindMemoryStatusKHR *bind_status =
vk_find_struct_const(bind_info->pNext, BIND_MEMORY_STATUS_KHR);
const VkBindMemoryStatusKHR *bind_status = NULL;
assert(!anv_image_is_sparse(image));
@ -3085,6 +3083,10 @@ anv_bind_image_memory(struct anv_device *device,
break;
}
#pragma GCC diagnostic pop
case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR: {
bind_status = (const VkBindMemoryStatusKHR *)s;
break;
}
default:
vk_debug_ignored_stype(s->sType);
break;