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
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev