[Mesa-dev] [PATCH] Fix glXChooseFBConfig with GLX_DRAWABLE_TYPE GLX_DONT_CARE
Alexander Monakov
amonakov at gmail.com
Mon Apr 1 14:42:45 PDT 2013
On Mon, Apr 1, 2013 at 11:05 PM, Alexander Monakov <amonakov at gmail.com> wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=47478
> https://bugs.freedesktop.org/show_bug.cgi?id=62999 (dup of the above)
>
> I don't have commit access so please push if OK.
Hm, now I see that MATCH_EXACT is used only in special cases, and my
attempt was too eager. Only MATCH_MASK needs fixing. Attaching
adjusted patch.
-------------- next part --------------
From 117cf9951c6b67aa4500a9e8f70afac8fcdafeed Mon Sep 17 00:00:00 2001
From: Alexander Monakov <amonakov at ispras.ru>
Date: Tue, 2 Apr 2013 01:38:27 +0400
Subject: [PATCH] Honor GLX_DONT_CARE in MATCH_MASK
---
src/glx/glxcmds.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 7b62be3..5c79073 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -912,8 +912,10 @@ init_fbconfig_for_chooser(struct glx_config * config,
/* Test that all bits from a are contained in b */
#define MATCH_MASK(param) \
do { \
- if ((a->param & ~b->param) != 0) \
+ if ( ((int) a-> param != (int) GLX_DONT_CARE) \
+ && ((a->param & ~b->param) != 0) ) { \
return False; \
+ } \
} while (0);
/**
--
1.7.11.5
More information about the mesa-dev
mailing list