Mesa (main): classic/xlib: Fix the build after !9817
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 9 21:07:03 UTC 2021
Module: Mesa
Branch: main
Commit: a4dc2021b89d7f70a5486aea9c3b59d7a05cc458
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4dc2021b89d7f70a5486aea9c3b59d7a05cc458
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jun 9 11:20:59 2021 -0400
classic/xlib: Fix the build after !9817
This commit mostly exists to be backported to 21.1.x, because the
classic binding to xlib is soon to be retired.
Fixes: 4daef7ffe37 mesa: Remove redundant gl_config::sampleBuffers
Closes: mesa/mesa#4900
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11270>
---
src/mesa/drivers/x11/fakeglx.c | 29 ++++-------------------------
src/mesa/drivers/x11/xm_api.c | 9 +--------
2 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 4c136cca4ed..6dc92b8d580 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -287,8 +287,6 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
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
@@ -320,10 +318,6 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
/* add xmvis to the list */
VisualTable[NumVisuals] = xmvis;
NumVisuals++;
- /* XXX minor hack, because XMesaCreateVisual doesn't support an
- * aux buffers parameter.
- */
- xmvis->mesa_visual.numAuxBuffers = numAuxBuffers;
}
return xmvis;
}
@@ -1545,7 +1539,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
*value = xmvis->visinfo->depth;
return 0;
case GLX_LEVEL:
- *value = xmvis->mesa_visual.level;
+ *value = 0;
return 0;
case GLX_RGBA:
if (fbconfig)
@@ -1559,7 +1553,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
*value = (int) xmvis->mesa_visual.stereoMode;
return 0;
case GLX_AUX_BUFFERS:
- *value = xmvis->mesa_visual.numAuxBuffers;
+ *value = 0;
return 0;
case GLX_RED_SIZE:
*value = xmvis->mesa_visual.redBits;
@@ -1606,18 +1600,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
}
return 0;
case GLX_TRANSPARENT_TYPE_EXT:
- if (xmvis->mesa_visual.level==0) {
- /* normal planes */
- *value = GLX_NONE_EXT;
- }
- else if (xmvis->mesa_visual.level>0) {
- /* overlay */
- *value = GLX_TRANSPARENT_RGB_EXT;
- }
- else if (xmvis->mesa_visual.level<0) {
- /* underlay */
- *value = GLX_NONE_EXT;
- }
+ *value = GLX_NONE_EXT;
return 0;
case GLX_TRANSPARENT_INDEX_VALUE_EXT:
{
@@ -1645,11 +1628,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
* GLX_EXT_visual_info extension
*/
case GLX_VISUAL_CAVEAT_EXT:
- /* test for zero, just in case */
- if (xmvis->mesa_visual.visualRating > 0)
- *value = xmvis->mesa_visual.visualRating;
- else
- *value = GLX_NONE_EXT;
+ *value = GLX_NONE_EXT;
return 0;
/*
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index ce2e73f7bd8..2b7ee72720d 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -341,8 +341,7 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type,
vis->mesa_visual.depthBits > 0,
vis->mesa_visual.stencilBits > 0,
vis->mesa_visual.accumRedBits > 0,
- GL_FALSE, /* software alpha buffer */
- vis->mesa_visual.numAuxBuffers > 0 );
+ GL_FALSE /* software alpha buffer */ );
/* GLX_EXT_texture_from_pixmap */
b->TextureTarget = 0;
@@ -597,7 +596,6 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
printf("X/Mesa visual = %p\n", (void *) v);
printf("X/Mesa dithered pf = %u\n", v->dithered_pf);
printf("X/Mesa undithered pf = %u\n", v->undithered_pf);
- printf("X/Mesa level = %d\n", v->mesa_visual.level);
printf("X/Mesa depth = %d\n", GET_VISUAL_DEPTH(v));
printf("X/Mesa bits per pixel = %d\n", v->BitsPerPixel);
}
@@ -818,8 +816,6 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
v->visualType = xmesa_convert_from_x_visual_type(visinfo->c_class);
#endif
- v->mesa_visual.visualRating = visualCaveat;
-
if (alpha_flag)
v->mesa_visual.alphaBits = 8;
@@ -857,8 +853,6 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
accum_blue_size, accum_alpha_size,
0);
- /* XXX minor hack */
- v->mesa_visual.level = level;
return v;
}
@@ -1626,7 +1620,6 @@ xbuffer_to_renderbuffer(int buffer)
case GLX_BACK_RIGHT_EXT:
return BUFFER_BACK_RIGHT;
case GLX_AUX0_EXT:
- return BUFFER_AUX0;
case GLX_AUX1_EXT:
case GLX_AUX2_EXT:
case GLX_AUX3_EXT:
More information about the mesa-commit
mailing list