[waffle] [PATCH] gbm: Don't use a config that mesa's gbm doesn't support

Tom Stellard thomas.stellard at amd.com
Wed Feb 11 09:53:24 PST 2015


Using GBM_FORMAT_ABGR8888 was causing the B and G components to
be swapped for some piglit tests.
---

I have no idea if this fix is correct, but based on an IRC discussion:
http://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&date=2015-02-05

Using the wrong format here is the reason that B and G outputs were swapped.
I'm not sure what format we should be using instead.

 src/waffle/gbm/wgbm_config.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/waffle/gbm/wgbm_config.c b/src/waffle/gbm/wgbm_config.c
index 480c2bf..5229210 100644
--- a/src/waffle/gbm/wgbm_config.c
+++ b/src/waffle/gbm/wgbm_config.c
@@ -50,10 +50,8 @@ wgbm_config_get_gbm_format(const struct wcore_config_attrs *attrs)
         return 0;
     }
 
-    if (attrs->alpha_size <= 0)
+    if (attrs->alpha_size <= 8)
         return GBM_FORMAT_XRGB8888;
-    else if (attrs->alpha_size <= 8)
-        return GBM_FORMAT_ABGR8888;
 
     return 0;
 }
-- 
1.8.5.5



More information about the waffle mailing list