aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorJohn Sheu <[email protected]>2016-04-01 16:52:22 -0700
committerAlejandro Piñeiro <[email protected]>2016-04-15 07:46:00 +0200
commitf8752e0d95b0b562ca64e8064e98a0b66e5d1591 (patch)
tree1086e5c58bf74514d5dddd0cbb9d27e7109eaed4 /src/mesa/drivers/x11
parent8a9c0f102540f64c4a3523f6b4e11eaa2071e0a3 (diff)
xlib: remove MESA_GLX_VISUAL_HACK
This removes a hack introduced in 1999 in the first version of fakeglx.c, with the comment: /* XXX revisit this after 3.0 is finished. */ Mesa 4.0 was released in 2001. It is now 2016, and Mesa 11.0 was released last year. Reviewed-by: Alejandro Piñeiro <[email protected]>
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 508dc65e785..394800f02ea 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -283,29 +283,25 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
if (getenv("MESA_GLX_FORCE_ALPHA"))
alphaFlag = GL_TRUE;
- /* Comparing IDs uses less memory but sometimes fails. */
- /* XXX revisit this after 3.0 is finished. */
- if (!getenv("MESA_GLX_VISUAL_HACK")) {
- /* First check if a matching visual is already in the list */
- for (i=0; i<NumVisuals; i++) {
- XMesaVisual v = VisualTable[i];
- if (v->display == dpy
- && v->mesa_visual.level == level
- && v->mesa_visual.numAuxBuffers == numAuxBuffers
- && v->ximage_flag == ximageFlag
- && v->mesa_visual.doubleBufferMode == dbFlag
- && v->mesa_visual.stereoMode == stereoFlag
- && (v->mesa_visual.alphaBits > 0) == alphaFlag
- && (v->mesa_visual.depthBits >= depth_size || depth_size == 0)
- && (v->mesa_visual.stencilBits >= stencil_size || stencil_size == 0)
- && (v->mesa_visual.accumRedBits >= accumRedSize || accumRedSize == 0)
- && (v->mesa_visual.accumGreenBits >= accumGreenSize || accumGreenSize == 0)
- && (v->mesa_visual.accumBlueBits >= accumBlueSize || accumBlueSize == 0)
- && (v->mesa_visual.accumAlphaBits >= accumAlphaSize || accumAlphaSize == 0)) {
- /* now compare visual IDs */
- if (v->visinfo->visualid == vinfo->visualid) {
- return v;
- }
+ /* First check if a matching visual is already in the list */
+ for (i=0; i<NumVisuals; i++) {
+ XMesaVisual v = VisualTable[i];
+ if (v->display == dpy
+ && v->mesa_visual.level == level
+ && v->mesa_visual.numAuxBuffers == numAuxBuffers
+ && v->ximage_flag == ximageFlag
+ && v->mesa_visual.doubleBufferMode == dbFlag
+ && v->mesa_visual.stereoMode == stereoFlag
+ && (v->mesa_visual.alphaBits > 0) == alphaFlag
+ && (v->mesa_visual.depthBits >= depth_size || depth_size == 0)
+ && (v->mesa_visual.stencilBits >= stencil_size || stencil_size == 0)
+ && (v->mesa_visual.accumRedBits >= accumRedSize || accumRedSize == 0)
+ && (v->mesa_visual.accumGreenBits >= accumGreenSize || accumGreenSize == 0)
+ && (v->mesa_visual.accumBlueBits >= accumBlueSize || accumBlueSize == 0)
+ && (v->mesa_visual.accumAlphaBits >= accumAlphaSize || accumAlphaSize == 0)) {
+ /* now compare visual IDs */
+ if (v->visinfo->visualid == vinfo->visualid) {
+ return v;
}
}
}