From: Marek Olšák Date: Mon, 13 May 2019 21:03:58 +0000 (-0400) Subject: mesa: fix _mesa_max_texture_levels for GL_TEXTURE_EXTERNAL_OES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67b47859588e19601a2fa9358749551301812ba4;p=mesa.git 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 --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 36480348943..4b33403bfaa 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 */ }