From 402cabf1ef4db655239768a5159ac3178dbadf10 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 19 Nov 2020 10:38:09 +0100 Subject: [PATCH] panfrost: Set the layer stride Needed for 3D textures. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_texture.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 2734f0e4b90..64ad00fbda4 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -271,7 +271,11 @@ panfrost_get_surface_strides(struct panfrost_slice *slices, u_minify(width, l), u_minify(height, l), false); - return line_stride; + + unsigned layer_stride = + panfrost_get_layer_stride(slices, is_3d, cube_stride, l); + + return ((uint64_t)layer_stride << 32) | line_stride; } static mali_ptr -- 2.34.1