From 6781dcc56561237df5322109a3983c32c5146da1 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Fri, 6 Jun 2025 13:30:28 -0700 Subject: [PATCH] lvp: fix wsi platform swapchain image bind The prior incomplete ANB support broke it. Fixes: 0dce939e6d8 ("lavapipe: Add android platform integration") Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index 2daf5cb5f61..86cf4a2ac26 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -2359,10 +2359,6 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_BindImageMemory2(VkDevice _device, VkBindMemoryStatusKHR *status = (void*)vk_find_struct_const(&pBindInfos[i], BIND_MEMORY_STATUS_KHR); bool did_bind = false; - if (!mem) { - continue; - } - #ifdef LVP_USE_WSI_PLATFORM vk_foreach_struct_const(s, bind_info->pNext) { switch (s->sType) { @@ -2392,6 +2388,10 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_BindImageMemory2(VkDevice _device, #endif if (!did_bind) { + if (!mem) { + continue; + } + uint64_t offset_B = 0; VkResult result; if (image->disjoint) {