panfrost: Remove HAS_SWIZZLES quirk
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 25 Jan 2022 22:46:40 +0000 (17:46 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 26 Jan 2022 01:45:09 +0000 (01:45 +0000)
It's a function of the major arch.

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

src/panfrost/include/panfrost-quirks.h
src/panfrost/lib/pan_props.c

index e1c12b3..def79e1 100644 (file)
 
 #define MIDGARD_BROKEN_FP16 (1 << 2)
 
-/* What it says on the tin */
-#define HAS_SWIZZLES (1 << 4)
-
-/* bit 5 unused */
+/* bits 4 and 5 unused */
 
 /* Whether this GPU lacks support for any typed stores in blend shader,
  * requiring packing instead */
@@ -71,7 +68,7 @@
 
 /* Quirk collections common to particular uarchs */
 
-#define MIDGARD_QUIRKS (MIDGARD_BROKEN_FP16 | HAS_SWIZZLES \
+#define MIDGARD_QUIRKS (MIDGARD_BROKEN_FP16 \
                 | MIDGARD_NO_TYPED_BLEND_STORES \
                 | MIDGARD_MISSING_LOADS)
 
@@ -103,11 +100,11 @@ panfrost_get_quirks(unsigned gpu_id, unsigned gpu_revision)
                 return MIDGARD_QUIRKS;
 
         case 0x6000: /* G71 */
-                return BIFROST_QUIRKS | HAS_SWIZZLES;
+                return BIFROST_QUIRKS;
 
         case 0x6221: /* G72 */
                 /* Anisotropic filtering is supported from r0p3 onwards */
-                return BIFROST_QUIRKS | HAS_SWIZZLES
+                return BIFROST_QUIRKS
                         | (gpu_revision >= 0x30 ? HAS_ANISOTROPIC : 0);
 
         case 0x7093: /* G31 */
index a7ef43e..de723f4 100644 (file)
@@ -244,7 +244,7 @@ panfrost_open_device(void *memctx, int fd, struct panfrost_device *dev)
         dev->tiler_features = panfrost_query_tiler_features(fd);
         dev->has_afbc = panfrost_query_afbc(fd, dev->arch);
 
-        if (dev->quirks & HAS_SWIZZLES)
+        if (dev->arch <= 6)
                 dev->formats = panfrost_pipe_format_v6;
         else
                 dev->formats = panfrost_pipe_format_v7;