summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorEmma Anholt <emma@anholt.net>2023-10-10 11:42:59 -0700
committerMarge Bot <emma+marge@anholt.net>2023-10-20 10:03:43 +0000
commite64ab3e4a94c4e8baee3bec3a5eb4d098b8e7193 (patch)
tree84f132fd401eaad3321962bf669b7b66a7b8d8d4 /src/glx
parentfb95f1d55c70e265dd0a3cf781d2840171983744 (diff)
glx: Delete support for GLX_OML_swap_method.
This was an ill-advised extension. While we advertised SWAP_COPY support, we might implement it with a back-copy from the front buffer. And we never advertised EXCHANGE because we couldn't guarantee it. So, if you actually used this extension to try to reduce app redraws of the back buffer, you might actually increase the bandwidth you used. Whoops. Instead, GLX_EXT_buffer_age and the similar EGL extension give you feedback on what's left in your back buffer, letting you do minimum redraws. This reduces our GLX visual+fbconfig count from 1410 to 940 on an llvmpipe X server. Reducing visual counts will improve test runtime for visual-iterating tests like piglit's glx-visuals-*. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25650>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/dri_common.c14
-rw-r--r--src/glx/glxcmds.c2
-rw-r--r--src/glx/glxconfig.c4
-rw-r--r--src/glx/glxconfig.h3
-rw-r--r--src/glx/glxext.c13
-rw-r--r--src/glx/glxextensions.c1
-rw-r--r--src/glx/glxextensions.h1
7 files changed, 0 insertions, 38 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 3421d654b5a..15b0e0fc328 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -116,7 +116,6 @@ static const struct
__ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode),
__ATTRIB(__DRI_ATTRIB_STEREO, stereoMode),
__ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers),
- __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba),
__ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
@@ -179,19 +178,6 @@ driConfigEqual(const __DRIcoreExtension *core,
return GL_FALSE;
break;
- case __DRI_ATTRIB_SWAP_METHOD:
- if (value == __DRI_ATTRIB_SWAP_EXCHANGE)
- glxValue = GLX_SWAP_EXCHANGE_OML;
- else if (value == __DRI_ATTRIB_SWAP_COPY)
- glxValue = GLX_SWAP_COPY_OML;
- else
- glxValue = GLX_SWAP_UNDEFINED_OML;
-
- if (!scalarEqual(config, attrib, glxValue))
- return GL_FALSE;
-
- break;
-
/* Nerf some attributes we can safely ignore if the server claims to
* support them but the driver does not.
*/
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 295b047779b..7ce8aba22f9 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -773,7 +773,6 @@ init_fbconfig_for_chooser(struct glx_config * config,
config->xRenderable = GLX_DONT_CARE;
config->fbconfigID = (GLXFBConfigID) (GLX_DONT_CARE);
- config->swapMethod = GLX_DONT_CARE;
config->sRGBCapable = GLX_DONT_CARE;
}
@@ -824,7 +823,6 @@ fbconfigs_compatible(const struct glx_config * const a,
MATCH_DONT_CARE(visualRating);
MATCH_DONT_CARE(xRenderable);
MATCH_DONT_CARE(fbconfigID);
- MATCH_DONT_CARE(swapMethod);
MATCH_MINIMUM(rgbBits);
MATCH_MINIMUM(numAuxBuffers);
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 6f9670bb86c..f22d055231a 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -160,9 +160,6 @@ glx_config_get(struct glx_config * mode, int attribute, int *value_return)
case GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX:
*value_return = mode->optimalPbufferHeight;
return 0;
- case GLX_SWAP_METHOD_OML:
- *value_return = mode->swapMethod;
- return 0;
#endif
case GLX_SAMPLE_BUFFERS_SGIS:
*value_return = mode->sampleBuffers;
@@ -245,7 +242,6 @@ glx_config_create_list(unsigned count)
(*next)->transparentIndex = GLX_DONT_CARE;
(*next)->xRenderable = GLX_DONT_CARE;
(*next)->fbconfigID = GLX_DONT_CARE;
- (*next)->swapMethod = GLX_SWAP_UNDEFINED_OML;
(*next)->bindToTextureRgb = GLX_DONT_CARE;
(*next)->bindToTextureRgba = GLX_DONT_CARE;
(*next)->bindToMipmapTexture = GLX_DONT_CARE;
diff --git a/src/glx/glxconfig.h b/src/glx/glxconfig.h
index 009357ce271..49abc4f4ad8 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -85,9 +85,6 @@ struct glx_config {
/* SGIX_visual_select_group */
GLint visualSelectGroup;
- /* OML_swap_method */
- GLint swapMethod;
-
GLint screen;
/* EXT_texture_from_pixmap */
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 42369e4da07..7712e54c1d6 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -556,19 +556,6 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
case GLX_VISUAL_SELECT_GROUP_SGIX:
config->visualSelectGroup = *bp++;
break;
- case GLX_SWAP_METHOD_OML:
- if (*bp == GLX_SWAP_UNDEFINED_OML ||
- *bp == GLX_SWAP_COPY_OML ||
- *bp == GLX_SWAP_EXCHANGE_OML) {
- config->swapMethod = *bp++;
- } else {
- /* X servers with old HW drivers may return any value here, so
- * assume GLX_SWAP_METHOD_UNDEFINED.
- */
- config->swapMethod = GLX_SWAP_UNDEFINED_OML;
- bp++;
- }
- break;
#endif
case GLX_SAMPLE_BUFFERS_SGIS:
config->sampleBuffers = *bp++;
diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c
index 7c443fcb96c..71b2c94d092 100644
--- a/src/glx/glxextensions.c
+++ b/src/glx/glxextensions.c
@@ -109,7 +109,6 @@ static const struct extension_info known_glx_extensions[] = {
{ GLX(MESA_query_renderer), N, Y },
{ GLX(MESA_swap_control), N, Y },
{ GLX(NV_float_buffer), N, N },
- { GLX(OML_swap_method), Y, N },
{ GLX(OML_sync_control), N, Y },
{ GLX(SGIS_multisample), Y, N },
{ GLX(SGIX_fbconfig), Y, N },
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index ebd5def3985..37f60f5cf85 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -65,7 +65,6 @@ enum
MESA_swap_control_bit,
MESA_swap_frame_usage_bit,
NV_float_buffer_bit,
- OML_swap_method_bit,
OML_sync_control_bit,
SGIS_multisample_bit,
SGIX_fbconfig_bit,