aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 84e88ec2efd..3b333120cba 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1117,12 +1117,23 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
&& strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0)
__glXEnableDirectExtension(&psc->base,
"GLX_ARB_create_context_robustness");
+
+ /* DRI2 version 3 is also required because GLX_MESA_query_renderer
+ * requires GLX_ARB_create_context_profile.
+ */
+ if (psc->dri2->base.version >= 3
+ && strcmp(extensions[i]->name, __DRI2_RENDERER_QUERY) == 0) {
+ psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i];
+ __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
+ }
}
}
static const struct glx_screen_vtable dri2_screen_vtable = {
dri2_create_context,
- dri2_create_context_attribs
+ dri2_create_context_attribs,
+ dri2_query_renderer_integer,
+ dri2_query_renderer_string,
};
static struct glx_screen *