[Mesa-dev] [PATCH] mesa: fix _mesa_max_texture_levels for GL_TEXTURE_EXTERNAL_OES
Marek Olšák
maraeo at gmail.com
Mon May 13 21:38:22 UTC 2019
From: Marek Olšák <marek.olsak at amd.com>
This helps fix:
piglit/bin/ext_image_dma_buf_import-sample_yuv -fmt=NV12 -auto
Fixes: d88f3392fff7c6342f3840c4bd8195a1296c2372
---
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 36480348943..4b33403bfaa 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -523,21 +523,21 @@ _mesa_max_texture_levels(const struct gl_context *ctx, GLenum target)
return (_mesa_has_ARB_texture_buffer_object(ctx) ||
_mesa_has_OES_texture_buffer(ctx)) ? 1 : 0;
case GL_TEXTURE_2D_MULTISAMPLE:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE:
case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY:
return (_mesa_is_desktop_gl(ctx) || _mesa_is_gles31(ctx))
&& 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 */
}
}
/**
* Return number of dimensions per mipmap level for the given texture target.
*/
GLint
--
2.17.1
More information about the mesa-dev
mailing list