panfrost: Set the layer stride
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 19 Nov 2020 09:38:09 +0000 (10:38 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 25 Nov 2020 15:22:19 +0000 (16:22 +0100)
Needed for 3D textures.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7653>

src/panfrost/lib/pan_texture.c

index 2734f0e..64ad00f 100644 (file)
@@ -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