aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2017-06-22 16:10:48 +0200
committerLucas Stach <[email protected]>2017-06-29 11:34:24 +0200
commitb2a87ce34f081671c7e4969874de91ac6953d062 (patch)
tree73c9f9d829f803f32eb272a0f387265cc0034d16 /src/gallium/drivers
parentd8bf2861ad4d901a5160b6c703a0e236968f024a (diff)
etnaviv: fill in layer_stride for imported resources
The layer stride information is used in various parts of the driver, so it needs to be present regardless if the driver allocated the buffer itself or merely imported it from an external source. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_resource.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index 1c098445b17..dfd08707119 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -352,6 +352,8 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
level->padded_width = align(level->width, paddingX);
level->padded_height = align(level->height, paddingY);
+ level->layer_stride = level->stride * util_format_get_nblocksy(prsc->format,
+ level->padded_height);
/* The DDX must give us a BO which conforms to our padding size.
* The stride of the BO must be greater or equal to our padded