projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ea1149
)
Gallium xlib: Add support for BGRA visuals.
author
Michel Dänzer
<daenzer@vmware.com>
Mon, 31 Aug 2009 08:22:19 +0000
(10:22 +0200)
committer
Michel Dänzer
<daenzer@vmware.com>
Mon, 31 Aug 2009 08:22:19 +0000
(10:22 +0200)
src/gallium/state_trackers/glx/xlib/xm_api.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/glx/xlib/xm_api.c
b/src/gallium/state_trackers/glx/xlib/xm_api.c
index f4c5893427d54e42942bc9b4a53149292d3c7c0f..651a9a9fea7d9ed27a87c11c91a97cf36701bf98 100644
(file)
--- a/
src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/
src/gallium/state_trackers/glx/xlib/xm_api.c
@@
-286,6
+286,18
@@
choose_pixel_format(XMesaVisual v)
return PIPE_FORMAT_B8G8R8A8_UNORM;
}
}
+ else if ( GET_REDMASK(v) == 0x0000ff00
+ && GET_GREENMASK(v) == 0x00ff0000
+ && GET_BLUEMASK(v) == 0xff000000
+ && v->BitsPerPixel == 32) {
+ if (native_byte_order) {
+ /* no byteswapping needed */
+ return PIPE_FORMAT_B8G8R8A8_UNORM;
+ }
+ else {
+ return PIPE_FORMAT_A8R8G8B8_UNORM;
+ }
+ }
else if ( GET_REDMASK(v) == 0xf800
&& GET_GREENMASK(v) == 0x07e0
&& GET_BLUEMASK(v) == 0x001f