panfrost: Allow 2DMS arrays
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 10 Dec 2020 18:48:17 +0000 (19:48 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 11 Dec 2020 08:15:39 +0000 (09:15 +0100)
The midgard compiler has been fixed to handle texture operations on
2DMS arrays, and Bifrost already had this case handled properly. Relax
the assert.

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/8042>

src/gallium/drivers/panfrost/pan_context.c

index 2b752c0..1e033a7 100644 (file)
@@ -1017,10 +1017,11 @@ panfrost_create_sampler_view_bo(struct panfrost_sampler_view *so,
                 array_size /= 6;
         }
 
-        /* MSAA only supported for 2D textures (and 2D texture arrays via an
-         * extension currently unimplemented) */
+        /* MSAA only supported for 2D textures */
 
-        assert(texture->nr_samples <= 1 || so->base.target == PIPE_TEXTURE_2D);
+        assert(texture->nr_samples <= 1 ||
+               so->base.target == PIPE_TEXTURE_2D ||
+               so->base.target == PIPE_TEXTURE_2D_ARRAY);
 
         enum mali_texture_dimension type =
                 panfrost_translate_texture_dimension(so->base.target);