etnaviv: fill missing offset in etna_resource_get_handle
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 3 May 2019 09:39:45 +0000 (11:39 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Wed, 22 May 2019 10:57:40 +0000 (12:57 +0200)
Without this gbm_bo_get_offset() can return 0 where it shouldn't.

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/etnaviv/etnaviv_resource.c

index 83179d3cd0880bf2da6486287aae9fbc958c02a3..ab77a80c72b3d5e0a221dc36de7c831c2c18ea44 100644 (file)
@@ -622,6 +622,7 @@ etna_resource_get_handle(struct pipe_screen *pscreen,
       rsc = etna_resource(rsc->external);
 
    handle->stride = rsc->levels[0].stride;
+   handle->offset = rsc->levels[0].offset;
    handle->modifier = layout_to_modifier(rsc->layout);
 
    if (handle->type == WINSYS_HANDLE_TYPE_SHARED) {