Mesa (master): panfrost: Specify sRGB in the render target

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 18 17:00:05 UTC 2019


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jun 17 16:19:33 2019 -0700

panfrost: Specify sRGB in the render target

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

---

 src/gallium/drivers/panfrost/pan_mfbd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index f9a69e47e45..c082d0b91a3 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -36,7 +36,7 @@ panfrost_mfbd_format(struct pipe_surface *surf)
         const struct util_format_description *desc =
                 util_format_description(surf->texture->format);
 
-        /* Fill in accordingly, defaulting to RGBA8888 (UNORM) */
+        /* Fill in accordingly, defaulting to 8-bit UNORM */
 
         struct mali_rt_format fmt = {
                 .unk1 = 0x4000000,
@@ -48,6 +48,9 @@ panfrost_mfbd_format(struct pipe_surface *surf)
                 .unk4 = 0x8
         };
 
+        if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
+                fmt.flags |= MALI_MFBD_FORMAT_SRGB;
+
         /* Set flags for alternative formats */
 
         if (surf->texture->format == PIPE_FORMAT_B5G6R5_UNORM) {




More information about the mesa-commit mailing list