summaryrefslogtreecommitdiffstats
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.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 7e22906318d..cfa5856484f 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -1223,15 +1223,20 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
-
- /* If the server does not support the protocol for
- * DRI2GetBuffersWithFormat, don't supply that interface to the driver.
- */
- psc->driScreen =
- psc->dri2->createNewScreen(screen, psc->fd,
- (const __DRIextension **)
- &pdp->loader_extensions[0],
- &driver_configs, psc);
+ if (psc->dri2->base.version >= 4) {
+ psc->driScreen =
+ psc->dri2->createNewScreen2(screen, psc->fd,
+ (const __DRIextension **)
+ &pdp->loader_extensions[0],
+ extensions,
+ &driver_configs, psc);
+ } else {
+ psc->driScreen =
+ psc->dri2->createNewScreen(screen, psc->fd,
+ (const __DRIextension **)
+ &pdp->loader_extensions[0],
+ &driver_configs, psc);
+ }
if (psc->driScreen == NULL) {
ErrorMessageF("failed to create dri screen\n");