Mesa (master): panfrost: Add some special formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 28 22:10:48 UTC 2019


Module: Mesa
Branch: master
Commit: 601d4d315727c40348cb1c5682d0fec769c219fb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=601d4d315727c40348cb1c5682d0fec769c219fb

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Jun 26 16:24:28 2019 -0700

panfrost: Add some special formats

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/include/panfrost-job.h | 1 +
 src/gallium/drivers/panfrost/pan_format.c           | 5 +++++
 src/gallium/drivers/panfrost/pan_pretty_print.c     | 1 +
 3 files changed, 7 insertions(+)

diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h
index d3885f01046..4abff22f33c 100644
--- a/src/gallium/drivers/panfrost/include/panfrost-job.h
+++ b/src/gallium/drivers/panfrost/include/panfrost-job.h
@@ -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
diff --git a/src/gallium/drivers/panfrost/pan_format.c b/src/gallium/drivers/panfrost/pan_format.c
index 5f75a065861..3ab39ed3069 100644
--- a/src/gallium/drivers/panfrost/pan_format.c
+++ b/src/gallium/drivers/panfrost/pan_format.c
@@ -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;
diff --git a/src/gallium/drivers/panfrost/pan_pretty_print.c b/src/gallium/drivers/panfrost/pan_pretty_print.c
index 504bd9af744..13dbdd093fa 100644
--- a/src/gallium/drivers/panfrost/pan_pretty_print.c
+++ b/src/gallium/drivers/panfrost/pan_pretty_print.c
@@ -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);
 




More information about the mesa-commit mailing list