summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-10-02 07:52:27 -0600
committerBrian Paul <brianp@vmware.com>2009-10-02 07:52:29 -0600
commit85ee0ef9a72e4ffd6ed0a2442b1272a43508d257 (patch)
treeec16988d7d40eed204df01d57051d820b3c9ea79 /src/gallium/state_trackers
parent584b0879ac2ec2420ea6866e47eb90e1a980e758 (diff)
gallium/xlib: use bitwise-and to test GLX_RGBA_BIT in choose_visual()
The parameter is a bitmask.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/glx/xlib/glx_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 7f04db2186..6cd7ede31c 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -850,10 +850,10 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
if (!fbConfig)
return NULL;
parselist++;
- if (*parselist == GLX_RGBA_BIT) {
+ if (*parselist & GLX_RGBA_BIT) {
rgb_flag = GL_TRUE;
}
- else if (*parselist == GLX_COLOR_INDEX_BIT) {
+ else if (*parselist & GLX_COLOR_INDEX_BIT) {
rgb_flag = GL_FALSE;
}
else if (*parselist == 0) {