nvk: bind aliased wsi image at memory offset zero

This aligns with common wsi, and also obeys dedicated alloc requirement.

Fixes: 273df23a21 ("nvk: adopt wsi_common_get_memory")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37152>
(cherry picked from commit 611749a7f9)
This commit is contained in:
Yiwei Zhang 2025-09-02 22:39:35 +00:00 committed by Eric Engestrom
parent 8dc2746a84
commit 8f7563444c
2 changed files with 3 additions and 2 deletions

View file

@ -9924,7 +9924,7 @@
"description": "nvk: bind aliased wsi image at memory offset zero",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "273df23a21947949b78960a573db09a33dd6be54",
"notes": null

View file

@ -1509,6 +1509,7 @@ nvk_bind_image_memory(struct nvk_device *dev,
{
VK_FROM_HANDLE(nvk_device_memory, mem, info->memory);
VK_FROM_HANDLE(nvk_image, image, info->image);
uint64_t offset_B = info->memoryOffset;
VkResult result;
#if DETECT_OS_ANDROID
@ -1529,11 +1530,11 @@ nvk_bind_image_memory(struct nvk_device *dev,
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
mem = nvk_device_memory_from_handle(
wsi_common_get_memory(swapchain_info->swapchain, swapchain_info->imageIndex));
offset_B = 0;
}
#endif
assert(mem != NULL);
uint64_t offset_B = info->memoryOffset;
if (image->disjoint) {
const VkBindImagePlaneMemoryInfo *plane_info =
vk_find_struct_const(info->pNext, BIND_IMAGE_PLANE_MEMORY_INFO);