Mesa (master): broadcom/vc5: Stop trying to swizzle around RGBA4 clear color.

Eric Anholt anholt at kemper.freedesktop.org
Thu Mar 29 00:49:05 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 27 21:52:35 2018 -0700

broadcom/vc5: Stop trying to swizzle around RGBA4 clear color.

We always want A in the A slot in the tile buffer, and any other swapping
should happen elsewhere.

Fixes RGBA4-using cases in fbo-clear-formats and
GTF-GLES3.gtf.GL3Tests.color_buffer_float.color_buffer_float_clamp_fixed.

---

 src/gallium/drivers/vc5/vc5_draw.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/vc5/vc5_draw.c b/src/gallium/drivers/vc5/vc5_draw.c
index 25f4883be2..841c991d20 100644
--- a/src/gallium/drivers/vc5/vc5_draw.c
+++ b/src/gallium/drivers/vc5/vc5_draw.c
@@ -627,18 +627,8 @@ vc5_clear(struct pipe_context *pctx, unsigned buffers,
 
                 switch (surf->internal_type) {
                 case V3D_INTERNAL_TYPE_8:
-                        if (surf->format == PIPE_FORMAT_B4G4R4A4_UNORM ||
-                            surf->format == PIPE_FORMAT_B4G4R4A4_UNORM) {
-                                /* Our actual hardware layout is ABGR4444, but
-                                 * we apply a swizzle when texturing to flip
-                                 * things back around.
-                                 */
-                                util_pack_color(color->f, PIPE_FORMAT_A8R8G8B8_UNORM,
-                                                &uc);
-                        } else {
-                                util_pack_color(color->f, PIPE_FORMAT_R8G8B8A8_UNORM,
-                                                &uc);
-                        }
+                        util_pack_color(color->f, PIPE_FORMAT_R8G8B8A8_UNORM,
+                                        &uc);
                         memcpy(job->clear_color[i], uc.ui, internal_size);
                         break;
                 case V3D_INTERNAL_TYPE_8I:




More information about the mesa-commit mailing list