[4/7] panfrost: Add some special formats

Submitted by Alyssa Rosenzweig on June 27, 2019, 1:12 p.m.

Details

Message ID 20190627131227.4641-5-alyssa.rosenzweig@collabora.com
State New
Headers show
Series "panfrost: GLES3 textures (and primitive restart)" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Rosenzweig June 27, 2019, 1:12 p.m.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
---
 src/gallium/drivers/panfrost/include/panfrost-job.h | 1 +
 src/gallium/drivers/panfrost/pan_format.c           | 5 +++++
 2 files changed, 6 insertions(+)

Patch hide | download patch | download mbox

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;