From 317d3d007fd7eecf6c345ab5377693a996ccaa4e Mon Sep 17 00:00:00 2001
From: Wujian sun <wujian.sun_1@nxp.com>
Date: Thu, 19 Aug 2021 15:09:32 +0800
Subject: [PATCH] glamor: MGS-6375 ximagesink show wrong color

A workaround fix the wrong format added for gles

Upstream-Status: Inappropriate [workaround]
Signed-off-by: Wujian sun <wujian.sun_1@nxp.com>
---
 glamor/glamor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 3450113e0..b9df95756 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -575,9 +575,9 @@ glamor_setup_formats(ScreenPtr screen)
     if (glamor_priv->is_gles) {
         assert(X_BYTE_ORDER == X_LITTLE_ENDIAN);
         glamor_add_format(screen, 24, PICT_x8b8g8r8,
-                          GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE);
+                          GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE);
         glamor_add_format(screen, 32, PICT_a8b8g8r8,
-                          GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE);
+                          GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE);
     } else {
         glamor_add_format(screen, 24, PICT_x8r8g8b8,
                           GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV);
-- 
2.17.1

