panfrost: Mark 64-bit formats as unsupported
authorIcecream95 <ixn@keemail.me>
Mon, 23 Mar 2020 23:42:42 +0000 (12:42 +1300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 00:48:58 +0000 (00:48 +0000)
There is no hardware support for these formats, but some games use
them for vertex data.

This fixes a crash in Aleph One.

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

src/gallium/drivers/panfrost/pan_screen.c

index 58a4e6d06cc890791adf00fbec125d3728ebb048..72156cb1b6774c948eabcca167c5bf7bb82a863a 100644 (file)
@@ -488,6 +488,9 @@ panfrost_is_format_supported( struct pipe_screen *screen,
                         return false;
         }
 
+        if (format_desc->channel[0].size > 32)
+            return false;
+
         /* Internally, formats that are depth/stencil renderable are limited.
          *
          * In particular: Z16, Z24, Z24S8, S8 are all identical from the GPU