projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39038c1
)
If visual is 32bpp, set visual->alphaBits = 8.
author
Brian
<brian.paul@tungstengraphics.com>
Fri, 28 Mar 2008 03:11:45 +0000
(21:11 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Fri, 28 Mar 2008 03:11:45 +0000
(21:11 -0600)
This works since we always use XImages for color buffers. It wouldn't always
work for Windows/Pixmaps.
src/gallium/winsys/xlib/xm_api.c
patch
|
blob
|
history
diff --git
a/src/gallium/winsys/xlib/xm_api.c
b/src/gallium/winsys/xlib/xm_api.c
index 6b46327e21f07e35617ca4ebdaf118e4be55232c..a82d3c990e7f98b40a37d0e4deb36c9f8969ce9b 100644
(file)
--- a/
src/gallium/winsys/xlib/xm_api.c
+++ b/
src/gallium/winsys/xlib/xm_api.c
@@
-511,6
+511,14
@@
initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
return GL_FALSE;
}
v->mesa_visual.indexBits = 0;
+
+ if (v->BitsPerPixel == 32) {
+ /* We use XImages for all front/back buffers. If an X Window or
+ * X Pixmap is 32bpp, there's no guarantee that the alpha channel
+ * will be preserved. For XImages we're in luck.
+ */
+ v->mesa_visual.alphaBits = 8;
+ }
}
/*