[Mesa-dev] [PATCH 1/3] panfrost: Add RGB555, RGB5A1 texture formats

Alyssa Rosenzweig alyssa at rosenzweig.io
Sun Feb 24 06:35:56 UTC 2019


Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
---
 src/gallium/drivers/panfrost/include/panfrost-job.h | 2 ++
 src/gallium/drivers/panfrost/pan_pretty_print.c     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/gallium/drivers/panfrost/include/panfrost-job.h b/src/gallium/drivers/panfrost/include/panfrost-job.h
index 82b3cfb2a4f..072f0258bea 100644
--- a/src/gallium/drivers/panfrost/include/panfrost-job.h
+++ b/src/gallium/drivers/panfrost/include/panfrost-job.h
@@ -306,6 +306,8 @@ struct mali_channel_swizzle {
 #define MALI_CHANNEL_FLOAT 7
 
 enum mali_format {
+	MALI_RGB555         = MALI_FORMAT_SPECIAL | 0x0,
+	MALI_RGB5_A1_UNORM  = MALI_FORMAT_SPECIAL | 0x2,
 	MALI_RGB10_A2_UNORM = MALI_FORMAT_SPECIAL | 0x3,
 	MALI_RGB10_A2_SNORM = MALI_FORMAT_SPECIAL | 0x5,
 	MALI_RGB10_A2UI     = MALI_FORMAT_SPECIAL | 0x7,
diff --git a/src/gallium/drivers/panfrost/pan_pretty_print.c b/src/gallium/drivers/panfrost/pan_pretty_print.c
index f9fd2c0e6da..e2a8d9e1461 100644
--- a/src/gallium/drivers/panfrost/pan_pretty_print.c
+++ b/src/gallium/drivers/panfrost/pan_pretty_print.c
@@ -36,6 +36,8 @@ char *pandecode_format_name(enum mali_format format)
 	static char unk_format_str[5];
 
 	switch (format) {
+	DEFINE_CASE(RGB555);
+	DEFINE_CASE(RGB5_A1_UNORM);
 	DEFINE_CASE(RGB10_A2_UNORM);
 	DEFINE_CASE(RGB10_A2_SNORM);
 	DEFINE_CASE(RGB10_A2UI);
-- 
2.20.1



More information about the mesa-dev mailing list