panfrost: Add some special formats
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 26 Jun 2019 23:24:28 +0000 (16:24 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 28 Jun 2019 22:10:05 +0000 (15:10 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/pan_format.c
src/gallium/drivers/panfrost/pan_pretty_print.c

index d3885f01046d4f99acdf5ac49f0a771c7bf0e4dc..4abff22f33cebc74a717996940363f2fbaa8bb78 100644 (file)
@@ -318,6 +318,7 @@ enum mali_format {
        MALI_RGB32_FIXED    = MALI_FORMAT_SPECIAL | 0x13,
        MALI_RGBA32_FIXED   = MALI_FORMAT_SPECIAL | 0x14,
        MALI_R11F_G11F_B10F = MALI_FORMAT_SPECIAL | 0x19,
+        MALI_R9F_G9F_B9F_E5F = MALI_FORMAT_SPECIAL | 0x1b,
        /* Only used for varyings, to indicate the transformed gl_Position */
        MALI_VARYING_POS    = MALI_FORMAT_SPECIAL | 0x1e,
        /* Only used for varyings, to indicate that the write should be
index 5f75a065861b0526e26e7ad2b4dca86524d529a1..3ab39ed30690a5f55f07bd7af97f455b592fc673 100644 (file)
@@ -199,6 +199,11 @@ panfrost_find_format(const struct util_format_description *desc)
                 case PIPE_FORMAT_R32G32B32A32_FIXED:
                         return MALI_RGBA32_FIXED;
 
+                case PIPE_FORMAT_R11G11B10_FLOAT:
+                        return MALI_R11F_G11F_B10F;
+                case PIPE_FORMAT_R9G9B9E5_FLOAT:
+                        return MALI_R9F_G9F_B9F_E5F;
+
                 default:
                         /* Fallthrough to default */
                         break;
index 504bd9af74423a0c01c14b0d0fb985ef49421a11..13dbdd093fa789ca32504a6f74bf243310a21fd6 100644 (file)
@@ -49,6 +49,7 @@ char *pandecode_format_name(enum mali_format format)
        DEFINE_CASE(RGB32_FIXED);
        DEFINE_CASE(RGBA32_FIXED);
        DEFINE_CASE(R11F_G11F_B10F);
+        DEFINE_CASE(R9F_G9F_B9F_E5F);
        DEFINE_CASE(VARYING_POS);
        DEFINE_CASE(VARYING_DISCARD);