dri2_dpy->is_render_node = drmGetNodeTypeFromFd(dri2_dpy->fd) == DRM_NODE_RENDER;
- dri2_dpy->extensions[0] = &droid_image_loader_extension.base;
- dri2_dpy->extensions[1] = &use_invalidate.base;
- dri2_dpy->extensions[2] = &image_lookup_extension.base;
-
/* render nodes cannot use Gem names, and thus do not support
* the __DRI_DRI2_LOADER extension */
if (!dri2_dpy->is_render_node) {
dri2_dpy->dri2_loader_extension.flushFrontBuffer = droid_flush_front_buffer;
dri2_dpy->dri2_loader_extension.getBuffersWithFormat =
droid_get_buffers_with_format;
- dri2_dpy->extensions[3] = &dri2_dpy->dri2_loader_extension.base;
- dri2_dpy->extensions[4] = NULL;
- } else
- dri2_dpy->extensions[3] = NULL;
+ dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
+ } else {
+ dri2_dpy->extensions[0] = &droid_image_loader_extension.base;
+ }
+ dri2_dpy->extensions[1] = &use_invalidate.base;
+ dri2_dpy->extensions[2] = &image_lookup_extension.base;
+ dri2_dpy->extensions[3] = NULL;
if (!dri2_create_screen(dpy)) {