glx: use glx_driver to determine drisw extension enablement

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 14:20:33 -04:00
committed by Marge Bot
parent 6a553a9cac
commit 7ab02fdff5

View File

@@ -787,9 +787,6 @@ driswBindExtensions(struct drisw_screen *psc)
__glXEnableDirectExtension(&psc->base,
"GLX_EXT_create_context_es2_profile");
if (!(psc->base.display->driver & (GLX_DRIVER_ZINK_INFER | GLX_DRIVER_ZINK_YES)))
__glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
if (dri_get_screen_param(psc->driScreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY))
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
@@ -798,13 +795,15 @@ driswBindExtensions(struct drisw_screen *psc)
__glXEnableDirectExtension(&psc->base, "GLX_ARB_context_flush_control");
__glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
if (psc->kopper) {
if (psc->base.display->driver == GLX_DRIVER_ZINK_YES) {
__glXEnableDirectExtension(&psc->base, "GLX_EXT_buffer_age");
__glXEnableDirectExtension(&psc->base, "GLX_EXT_swap_control");
__glXEnableDirectExtension(&psc->base, "GLX_SGI_swap_control");
__glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
// This needs to check whether RELAXED is available
// __glXEnableDirectExtension(&psc->base, "GLX_EXT_swap_control_tear");
} else {
__glXEnableDirectExtension(&psc->base, "GLX_MESA_copy_sub_buffer");
}
__glXEnableDirectExtension(&psc->base, "GLX_MESA_gl_interop");
}