Mesa (10.1): glx: Fix the GLXFBConfig attrib sort priorities

Ian Romanick idr at kemper.freedesktop.org
Wed Feb 26 18:39:46 UTC 2014


Module: Mesa
Branch: 10.1
Commit: 3d2979f83b9589d6bd013e42f6f5d160100fb5de
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d2979f83b9589d6bd013e42f6f5d160100fb5de

Author: Fredrik Höglund <fredrik at kde.org>
Date:   Sat Feb 15 18:48:40 2014 +0100

glx: Fix the GLXFBConfig attrib sort priorities

The sort priorites for GLX_SAMPLES and GLX_SAMPLE_BUFFERS are
not defined in GL_ARB_multisample, but they are defined in
the GLX 1.4 specification.

Cc: "9.2 10.0 10.1" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
(cherry picked from commit 3616e862f29838d73fcb05134b1dc628da499fc2)

---

 src/glx/glxcmds.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index f64d723..8164cd9 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -1097,7 +1097,7 @@ static int
 fbconfig_compare(struct glx_config **a, struct glx_config **b)
 {
    /* The order of these comparisons must NOT change.  It is defined by
-    * the GLX 1.3 spec and ARB_multisample.
+    * the GLX 1.4 specification.
     */
 
    PREFER_SMALLER(visualSelectGroup);
@@ -1126,6 +1126,9 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
 
    PREFER_SMALLER(numAuxBuffers);
 
+   PREFER_SMALLER(sampleBuffers);
+   PREFER_SMALLER(samples);
+
    PREFER_LARGER_OR_ZERO(depthBits);
    PREFER_SMALLER(stencilBits);
 
@@ -1139,12 +1142,6 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
 
    PREFER_SMALLER(visualType);
 
-   /* None of the multisample specs say where this comparison should happen,
-    * so I put it near the end.
-    */
-   PREFER_SMALLER(sampleBuffers);
-   PREFER_SMALLER(samples);
-
    /* None of the pbuffer or fbconfig specs say that this comparison needs
     * to happen at all, but it seems like it should.
     */




More information about the mesa-commit mailing list