summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-06-28 16:41:30 +0100
committerEmil Velikov <[email protected]>2017-07-12 15:45:27 +0100
commit4506a74cc69d7b76c8df0152daa55e9a2315e196 (patch)
tree3752bd59acb9123e058556f35392086359e07c83 /src/egl
parent962110fa57a5876b523491b701ebe68aa6eb731b (diff)
egl: set KHR_gl_texture_3D_image only when the requirements are met.
DRI_IMAGE's createImageFromTexture is used to implement the extension, so we should check for it prior to advertising. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f8cadfaf8c8..2392bfbb2a5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -702,10 +702,11 @@ dri2_setup_screen(_EGLDisplay *disp)
dri2_dpy->image->createImageFromTexture) {
disp->Extensions.KHR_gl_texture_2D_image = EGL_TRUE;
disp->Extensions.KHR_gl_texture_cubemap_image = EGL_TRUE;
+
+ if (dri2_renderer_query_integer(dri2_dpy,
+ __DRI2_RENDERER_HAS_TEXTURE_3D))
+ disp->Extensions.KHR_gl_texture_3D_image = EGL_TRUE;
}
- if (dri2_renderer_query_integer(dri2_dpy,
- __DRI2_RENDERER_HAS_TEXTURE_3D))
- disp->Extensions.KHR_gl_texture_3D_image = EGL_TRUE;
#ifdef HAVE_LIBDRM
if (dri2_dpy->image->base.version >= 8 &&
dri2_dpy->image->createImageFromDmaBufs) {