glx: stop checking dri extensions

this was only used for robustness, which can be determined from the
pipe cap instead

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30524>
This commit is contained in:
Mike Blumenkrantz
2024-07-30 13:48:29 -04:00
committed by Marge Bot
parent 83e53e3136
commit d491ec1bf9
3 changed files with 11 additions and 30 deletions
+3 -10
View File
@@ -827,10 +827,6 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
const char *driverName)
{
const unsigned mask = driGetAPIMask(psc->driScreen);
const __DRIextension **extensions;
int i;
extensions = driGetExtensions(psc->driScreen);
__glXEnableDirectExtension(&psc->base, "GLX_EXT_swap_control");
__glXEnableDirectExtension(&psc->base, "GLX_SGI_swap_control");
@@ -866,12 +862,9 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
"GLX_EXT_create_context_es2_profile");
}
/* Extensions where we don't care about the extension struct */
for (i = 0; extensions[i]; i++) {
if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
}
if (dri_get_screen_param(psc->driScreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY))
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
__glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_context_flush_control");
+3 -9
View File
@@ -664,11 +664,7 @@ static void
dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
const char *driverName)
{
const __DRIextension **extensions;
unsigned mask;
int i;
extensions = driGetExtensions(psc->driScreenRenderGPU);
__glXEnableDirectExtension(&psc->base, "GLX_EXT_swap_control");
__glXEnableDirectExtension(&psc->base, "GLX_EXT_swap_control_tear");
@@ -700,11 +696,9 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
if (psc->fd_render_gpu == psc->fd_display_gpu)
__glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
for (i = 0; extensions[i]; i++) {
if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
}
if (dri_get_screen_param(psc->driScreenRenderGPU, PIPE_CAP_DEVICE_RESET_STATUS_QUERY))
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_context_flush_control");
__glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
+5 -11
View File
@@ -774,10 +774,8 @@ static const struct glx_screen_vtable drisw_screen_vtable = {
};
static void
driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
driswBindExtensions(struct drisw_screen *psc)
{
int i;
__glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
@@ -793,12 +791,9 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
if (!(psc->base.display->driver & (GLX_DRIVER_ZINK_INFER | GLX_DRIVER_ZINK_YES)))
__glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
/* Extensions where we don't care about the extension struct */
for (i = 0; extensions[i]; i++) {
if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
}
if (dri_get_screen_param(psc->driScreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY))
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
__glXEnableDirectExtension(&psc->base, "GLX_EXT_texture_from_pixmap");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_context_flush_control");
@@ -916,8 +911,7 @@ driswCreateScreen(int screen, struct glx_display *priv, enum glx_driver glx_driv
goto handle_error;
}
extensions = driGetExtensions(psc->driScreen);
driswBindExtensions(psc, extensions);
driswBindExtensions(psc);
configs = driConvertConfigs(psc->base.configs, driver_configs);
visuals = driConvertConfigs(psc->base.visuals, driver_configs);