summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-05-01 19:08:37 +0200
committerAxel Davy <[email protected]>2015-05-11 19:31:44 +0200
commit13fa84e1bcf1e07c69bb678508f8cdb0912b57c5 (patch)
tree14a57b6992fa405637a0608fb2e7cd29bd9e4cb1 /src/egl/drivers/dri2/egl_dri2.c
parentcdcfe48fb0431184fabb40aa5a244d086f551df5 (diff)
egl/swrast: Enable config extension for swrast
Enables to use dri config for swrast, like vblank_mode. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.c')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 467b81c6e8d..fe5cbc8815d 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -576,6 +576,7 @@ dri2_create_screen(_EGLDisplay *disp)
{
const __DRIextension **extensions;
struct dri2_egl_display *dri2_dpy;
+ unsigned i;
dri2_dpy = disp->DriverData;
@@ -616,28 +617,26 @@ dri2_create_screen(_EGLDisplay *disp)
extensions = dri2_dpy->core->getExtensions(dri2_dpy->dri_screen);
if (dri2_dpy->dri2) {
- unsigned i;
-
if (!dri2_bind_extensions(dri2_dpy, dri2_core_extensions, extensions))
goto cleanup_dri_screen;
-
- for (i = 0; extensions[i]; i++) {
- if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0) {
- dri2_dpy->robustness = (__DRIrobustnessExtension *) extensions[i];
- }
- if (strcmp(extensions[i]->name, __DRI2_CONFIG_QUERY) == 0) {
- dri2_dpy->config = (__DRI2configQueryExtension *) extensions[i];
- }
- if (strcmp(extensions[i]->name, __DRI2_FENCE) == 0) {
- dri2_dpy->fence = (__DRI2fenceExtension *) extensions[i];
- }
- }
} else {
assert(dri2_dpy->swrast);
if (!dri2_bind_extensions(dri2_dpy, swrast_core_extensions, extensions))
goto cleanup_dri_screen;
}
+ for (i = 0; extensions[i]; i++) {
+ if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0) {
+ dri2_dpy->robustness = (__DRIrobustnessExtension *) extensions[i];
+ }
+ if (strcmp(extensions[i]->name, __DRI2_CONFIG_QUERY) == 0) {
+ dri2_dpy->config = (__DRI2configQueryExtension *) extensions[i];
+ }
+ if (strcmp(extensions[i]->name, __DRI2_FENCE) == 0) {
+ dri2_dpy->fence = (__DRI2fenceExtension *) extensions[i];
+ }
+ }
+
dri2_setup_screen(disp);
return EGL_TRUE;