From: Alyssa Rosenzweig Date: Wed, 26 Jun 2019 23:24:28 +0000 (-0700) Subject: panfrost: Add some special formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=601d4d315727c40348cb1c5682d0fec769c219fb;p=mesa.git panfrost: Add some special formats Signed-off-by: Alyssa Rosenzweig --- 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);