From 67b47859588e19601a2fa9358749551301812ba4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 13 May 2019 17:03:58 -0400 Subject: [PATCH] mesa: fix _mesa_max_texture_levels for GL_TEXTURE_EXTERNAL_OES This helps fix: piglit/bin/ext_image_dma_buf_import-sample_yuv -fmt=NV12 -auto Fixes: d88f3392fff7c6342f3840c4bd8195a1296c2372 Reviewed-by: Eric Anholt --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 3648034..4b33403 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -530,7 +530,7 @@ _mesa_max_texture_levels(const struct gl_context *ctx, GLenum target) && ctx->Extensions.ARB_texture_multisample ? 1 : 0; case GL_TEXTURE_EXTERNAL_OES: - /* fall-through */ + return _mesa_has_OES_EGL_image_external(ctx) ? 1 : 0; default: return 0; /* bad target */ } -- 2.7.4