panfrost: Fix sRGB clear colour packing
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 9 Jul 2020 19:21:32 +0000 (15:21 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 19:59:43 +0000 (19:59 +0000)
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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>

.gitlab-ci/deqp-panfrost-t860-fails.txt
src/gallium/drivers/panfrost/pan_job.c

index 26dda2d4439c0c0a22c3d82fc496f99c471ceac8..93de93424e691af3e079d6dbe301c99edd5cc8a5 100644 (file)
@@ -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
index 365b4ccdb3a69ee9dc67891797eb122d595370d6..c495d6133e6a606ee707e433cff5e079e28ac2b9 100644 (file)
@@ -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) |