From 17ccc80920773a0b9bd3d2d9ad89b22c27c0e2e6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sat, 22 Oct 2022 12:47:16 -0400 Subject: [PATCH] lavapipe: store binding offset for buffers cc: mesa-stable Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/lvp_device.c | 1 + src/gallium/frontends/lavapipe/lvp_private.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index bdc9911b587..6b77ad16e61 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -2040,6 +2040,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_BindBufferMemory2(VkDevice _device, LVP_FROM_HANDLE(lvp_buffer, buffer, pBindInfos[i].buffer); buffer->pmem = mem->pmem; + buffer->offset = pBindInfos[i].memoryOffset; device->pscreen->resource_bind_backing(device->pscreen, buffer->bo, mem->pmem, diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h index d928d74eb11..b6904df915f 100644 --- a/src/gallium/frontends/lavapipe/lvp_private.h +++ b/src/gallium/frontends/lavapipe/lvp_private.h @@ -450,6 +450,7 @@ struct lvp_buffer { struct pipe_memory_allocation *pmem; struct pipe_resource *bo; uint64_t total_size; + uint64_t offset; }; struct lvp_buffer_view {