[Mesa-dev] [PATCH 2/2] xlib: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values
Brian Paul
brianp at vmware.com
Thu Jan 3 16:35:22 PST 2013
Fixes piglit glx-dont-care-mask test.
Note: This is a candidate for the stable branches.
---
src/mesa/drivers/x11/fakeglx.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 3dca405..5b69a7f 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -911,6 +911,17 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
while (*parselist) {
+ if (fbConfig &&
+ parselist[1] == GLX_DONT_CARE &&
+ parselist[0] != GLX_LEVEL) {
+ /* For glXChooseFBConfig(), skip attributes whose value is
+ * GLX_DONT_CARE (-1), unless it's GLX_LEVEL (which can legitimately be
+ * a negative value).
+ */
+ parselist += 2;
+ continue;
+ }
+
switch (*parselist) {
case GLX_USE_GL:
if (fbConfig) {
--
1.7.3.4
More information about the mesa-dev
mailing list