panfrost: Don't advertise MSAA 2x
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 30 Jun 2020 20:53:38 +0000 (16:53 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Jul 2020 01:13:39 +0000 (01:13 +0000)
Let the frontend promote to MSAA 4x if the app requests it. We don't
support MSAA 2x.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>

src/gallium/drivers/panfrost/pan_screen.c

index 6fb169358f058ee27502220a884ad2e84c248121..c199dd71e321a5d2d2897fe93c1cd6bd6319add0 100644 (file)
@@ -466,12 +466,13 @@ panfrost_is_format_supported( struct pipe_screen *screen,
                 return false;
 
         /* MSAA 4x supported, but no more. Technically some revisions of the
-         * hardware can go up to 16x but we don't support higher modes yet. */
+         * hardware can go up to 16x but we don't support higher modes yet.
+         * MSAA 2x is notably not supported and gets rounded up to MSAA 4x. */
 
         if (sample_count > 1 && !(pan_debug & (PAN_DBG_GL3 | PAN_DBG_DEQP)))
                 return false;
 
-        if (sample_count > 4)
+        if (!(sample_count == 0 || sample_count == 1 || sample_count == 4))
                 return false;
 
         if (MAX2(sample_count, 1) != MAX2(storage_sample_count, 1))