[Mesa-dev] [PATCH 06/13] st/xlib: Convert to bytewise formats
Adam Jackson
ajax at redhat.com
Thu May 16 06:06:09 PDT 2013
From: Richard Sandiford <r.sandiford at uk.ibm.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
---
src/gallium/state_trackers/glx/xlib/xm_api.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index e426192..6792ef2 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -329,10 +329,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return PIPE_FORMAT_R8G8B8A8_UNORM;
+ return PIPE_FORMAT_ABGR8888_UNORM;
}
else {
- return PIPE_FORMAT_A8B8G8R8_UNORM;
+ return PIPE_FORMAT_RGBA8888_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xff0000
@@ -341,10 +341,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return PIPE_FORMAT_ARGB8888_UNORM;
}
else {
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_BGRA8888_UNORM;
}
}
else if ( GET_REDMASK(v) == 0x0000ff00
@@ -353,10 +353,10 @@ choose_pixel_format(XMesaVisual v)
&& v->BitsPerPixel == 32) {
if (native_byte_order) {
/* no byteswapping needed */
- return PIPE_FORMAT_A8R8G8B8_UNORM;
+ return PIPE_FORMAT_BGRA8888_UNORM;
}
else {
- return PIPE_FORMAT_B8G8R8A8_UNORM;
+ return PIPE_FORMAT_ARGB8888_UNORM;
}
}
else if ( GET_REDMASK(v) == 0xf800
--
1.8.2.1
More information about the mesa-dev
mailing list