From 68c24b09c22b600d1e54fe116ee74fbddf4f0fc5 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 23 May 2018 17:19:52 +0200 Subject: [PATCH] etnaviv: remember data offset into BO Imported resources might not start at offset 0 into the buffer object. Make sure to remember the offset that is provided with the handle on import. Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Reviewed-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 34d4d2449a9..b03681cc5c0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -556,6 +556,7 @@ etna_resource_from_handle(struct pipe_screen *pscreen, level->width = tmpl->width0; level->height = tmpl->height0; level->depth = tmpl->depth0; + level->offset = handle->offset; /* Determine padding of the imported resource. */ unsigned paddingX = 0, paddingY = 0; -- 2.30.2