lavapipe: fill buffer address

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34026>
This commit is contained in:
Lionel Landwerlin 2025-03-13 12:18:20 +02:00 committed by Marge Bot
parent 085cfc98cc
commit cbb0211c1e
2 changed files with 3 additions and 0 deletions

View file

@ -2279,6 +2279,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_BindBufferMemory2(VkDevice _device,
mem->pmem,
0, 0,
pBindInfos[i].memoryOffset);
buffer->vk.device_address = (VkDeviceAddress)(uintptr_t)buffer->map;
if (status)
*status->pResult = VK_SUCCESS;
}

View file

@ -596,6 +596,8 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateBuffer(
buffer->map = device->queue.ctx->buffer_map(device->queue.ctx, buffer->bo, 0,
PIPE_MAP_READ | PIPE_MAP_WRITE | PIPE_MAP_PERSISTENT,
&(struct pipe_box){ 0 }, &buffer->transfer);
buffer->vk.device_address = (VkDeviceAddress)(uintptr_t)buffer->map;
}
}
*pBuffer = lvp_buffer_to_handle(buffer);