lima: set offset when export resource
authorQiang Yu <yuq825@gmail.com>
Tue, 31 Mar 2020 05:51:59 +0000 (13:51 +0800)
committerQiang Yu <yuq825@gmail.com>
Sun, 12 Apr 2020 10:02:24 +0000 (10:02 +0000)
We missed set reource offset.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4517>

src/gallium/drivers/lima/lima_resource.c

index 5dd2a472114888f06b994a27d2982e56559ab5cf..4644ea402c9f190238bec4f1c497971cf4bc99a7 100644 (file)
@@ -389,6 +389,7 @@ lima_resource_get_handle(struct pipe_screen *pscreen,
    if (!lima_bo_export(res->bo, handle))
       return false;
 
+   handle->offset = res->levels[0].offset;
    handle->stride = res->levels[0].stride;
    return true;
 }