[Mesa-dev] [PATCHv2 3/4] st/dri: add support for __DRI_IMAGE_FORMAT_ABGR8888

Chia-I Wu olvaffe at gmail.com
Sun Sep 4 00:02:01 PDT 2011


From: Chia-I Wu <olv at lunarg.com>

It maps to PIPE_FORMAT_R8G8B8A8_UNORM.
---
 src/gallium/state_trackers/dri/drm/dri2.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c
index 6cf2375..2b6919d 100644
--- a/src/gallium/state_trackers/dri/drm/dri2.c
+++ b/src/gallium/state_trackers/dri/drm/dri2.c
@@ -419,6 +419,9 @@ dri2_create_image_from_name(__DRIscreen *_screen,
    case __DRI_IMAGE_FORMAT_ARGB8888:
       pf = PIPE_FORMAT_B8G8R8A8_UNORM;
       break;
+   case __DRI_IMAGE_FORMAT_ABGR8888:
+      pf = PIPE_FORMAT_R8G8B8A8_UNORM;
+      break;
    default:
       pf = PIPE_FORMAT_NONE;
       break;
@@ -503,6 +506,9 @@ dri2_create_image(__DRIscreen *_screen,
    case __DRI_IMAGE_FORMAT_ARGB8888:
       pf = PIPE_FORMAT_B8G8R8A8_UNORM;
       break;
+   case __DRI_IMAGE_FORMAT_ABGR8888:
+      pf = PIPE_FORMAT_R8G8B8A8_UNORM;
+      break;
    default:
       pf = PIPE_FORMAT_NONE;
       break;
-- 
1.7.5.4



More information about the mesa-dev mailing list