Public bug reported:

egl-platform-mir.patch: Incorrect (backwards) pixel formats are
accepted.

I noticed this recently. GBM reports some pixel formats as supported but
if you use them the colours come out backwards. Turns out it's just our
patch reporting incorrect format support ...

--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c

@@ -528,9 +528,11 @@ gbm_dri_is_format_supported(struct gbm_d
    switch (format) {
    case GBM_BO_FORMAT_XRGB8888:
    case GBM_FORMAT_XRGB8888:
+   case GBM_FORMAT_XBGR8888:            <-------- Wrong. Delete this.
       break;
    case GBM_BO_FORMAT_ARGB8888:
    case GBM_FORMAT_ARGB8888:
+   case GBM_FORMAT_ABGR8888:            <--------- Wrong. Delete this
       if (usage & GBM_BO_USE_SCANOUT)
          return 0;
       break;

** Affects: mesa (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  egl-platform-mir.patch: Incorrect (backwards) pixel formats are
  accepted.
  
  I noticed this recently. GBM reports some pixel formats as supported but
  if you use them the colours come out backwards. Turns out it's just our
  patch reporting incorrect format support ...
  
  --- a/src/gbm/backends/dri/gbm_dri.c
  +++ b/src/gbm/backends/dri/gbm_dri.c
  
  @@ -528,9 +528,11 @@ gbm_dri_is_format_supported(struct gbm_d
-     switch (format) {
-     case GBM_BO_FORMAT_XRGB8888:
-     case GBM_FORMAT_XRGB8888:
- +   case GBM_FORMAT_XBGR8888:                       <-------- Wong. Delete 
this.
-        break;
-     case GBM_BO_FORMAT_ARGB8888:
-     case GBM_FORMAT_ARGB8888:
- +   case GBM_FORMAT_ABGR8888:                   <--------- Wrong. Delete this
-        if (usage & GBM_BO_USE_SCANOUT)
-           return 0;
-        break;
+     switch (format) {
+     case GBM_BO_FORMAT_XRGB8888:
+     case GBM_FORMAT_XRGB8888:
+ +   case GBM_FORMAT_XBGR8888:            <-------- Wrong. Delete this.
+        break;
+     case GBM_BO_FORMAT_ARGB8888:
+     case GBM_FORMAT_ARGB8888:
+ +   case GBM_FORMAT_ABGR8888:            <--------- Wrong. Delete this
+        if (usage & GBM_BO_USE_SCANOUT)
+           return 0;
+        break;

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1473901

Title:
  egl-platform-mir.patch: Incorrect (backwards) pixel formats are
  accepted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1473901/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to