summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-06-04 01:09:14 +0100
committerEmil Velikov <[email protected]>2016-06-07 12:21:45 +0100
commit1816c837c1906382c370d65afe65a691738fd03b (patch)
tree48c8cf9c2c048411b73dfb377072ba853ed5d9df /src/egl
parent095803a37aa67361fc68604e81f858f31ae59b1b (diff)
egl: android: don't add the image loader extension for !render_node
With earlier commit we introduced support for render_node devices, which was couples with the use of the image loader extension. As the work was inspired by egl/wayland we (erroneously) added the extension for the !render_node path as well. That works for wayland, as the implementations of the DRI2 and IMAGE loader extensions converge behind the scenes. As that is not yet the case for Android we shouldn't expose the extension. Fixes: 34ddef39cef ("egl: android: add dma-buf fd support") Cc: <[email protected]> Reported-by: Mauro Rossi <[email protected]> Tested-by: Mauro Rossi <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/platform_android.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 25d02f5f58b..70bbdff33ae 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -814,10 +814,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
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) {
@@ -827,10 +823,13 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
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)) {