From af8fcfe6202ee92d40b20a2fc954661316166559 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 6 Jul 2020 18:45:16 -0400 Subject: [PATCH] pan/decode: Identify layered MSAA flag Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/include/panfrost-job.h | 6 +++++- src/panfrost/pandecode/decode.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index f7b864e0d64..f58776a709e 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -1673,8 +1673,12 @@ struct mali_single_framebuffer { /* More below this, maybe */ } __attribute__((packed)); -/* Format bits for the render target flags */ +/* Format bits for the render target flags. Setting MSAA alone works for on + * chip MSAA. Setting MSAA with the LAYERED flag works for MSAA where each + * sample is its own image (implements the ES3 spec directly but inefficient on + * mobile). */ +#define MALI_MFBD_FORMAT_LAYERED (1 << 0) #define MALI_MFBD_FORMAT_MSAA (1 << 1) #define MALI_MFBD_FORMAT_SRGB (1 << 2) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 5e582a2b3fc..ea50020c021 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -244,6 +244,7 @@ static const struct pandecode_flag_info u4_flag_info[] = { #define FLAG_INFO(flag) { MALI_MFBD_FORMAT_##flag, "MALI_MFBD_FORMAT_" #flag } static const struct pandecode_flag_info mfbd_fmt_flag_info[] = { + FLAG_INFO(LAYERED), FLAG_INFO(MSAA), FLAG_INFO(SRGB), {} -- 2.30.2