Mesa (master): panfrost: Fix sRGB clear colour packing

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 16 20:16:42 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Thu Jul  9 15:21:32 2020 -0400

panfrost: Fix sRGB clear colour packing

It should be sRGB transformed first, which the generic path handles but
the RGBA8 special path does not.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>

---

 .gitlab-ci/deqp-panfrost-t860-fails.txt | 3 ---
 src/gallium/drivers/panfrost/pan_job.c  | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/.gitlab-ci/deqp-panfrost-t860-fails.txt b/.gitlab-ci/deqp-panfrost-t860-fails.txt
index 26dda2d4439..93de93424e6 100644
--- a/.gitlab-ci/deqp-panfrost-t860-fails.txt
+++ b/.gitlab-ci/deqp-panfrost-t860-fails.txt
@@ -15,9 +15,6 @@ dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_x
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_dst_y
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_x
 dEQP-GLES3.functional.fbo.blit.rect.nearest_consistency_min_reverse_src_y
-dEQP-GLES3.functional.fbo.color.repeated_clear.blit.rbo.srgb8_alpha8
-dEQP-GLES3.functional.fbo.color.repeated_clear.blit.tex2d.srgb8_alpha8
-dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.srgb8_alpha8
 dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_color
 dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_depth
 dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_stencil
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 365b4ccdb3a..c495d6133e6 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -1324,7 +1324,7 @@ pan_pack_color(uint32_t *packed, const union pipe_color_union *color, enum pipe_
         const struct util_format_description *desc =
                 util_format_description(format);
 
-        if (util_format_is_rgba8_variant(desc)) {
+        if (util_format_is_rgba8_variant(desc) && desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) {
                 pan_pack_color_32(packed,
                                   ((uint32_t) float_to_ubyte(clear_alpha) << 24) |
                                   ((uint32_t) float_to_ubyte(color->f[2]) << 16) |



More information about the mesa-commit mailing list