Honor GLX_DONT_CARE in MATCH_MASK
authorAlexander Monakov <amonakov@ispras.ru>
Mon, 1 Apr 2013 21:38:27 +0000 (01:38 +0400)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 5 Apr 2013 21:32:45 +0000 (14:32 -0700)
NOTE: This is a candidate for stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47478
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62999
Bugzilla: http://bugs.winehq.org/show_bug.cgi?id=26763

src/glx/glxcmds.c

index 7b62be344157c168b1083825dacb5bcbd4eeb97d..5c79073a9ccfd4e0725ecd10b74ee1024b748955 100644 (file)
@@ -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);
 
 /**