[Mesa-dev] [PATCH 1/2] st/glx: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values
Brian Paul
brianp at vmware.com
Thu Jan 3 16:35:21 PST 2013
Fixes piglit glx-dont-care-mask test.
Note: This is a candidate for the stable branches.
---
src/gallium/state_trackers/glx/xlib/glx_api.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 8e3c6b8..e0e12c8 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -687,6 +687,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, 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