From 5109742e7be2ba8c53fafd14e895cc9f0a8dd10c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 15 Nov 2018 18:40:26 +0100 Subject: mesa/main: clean up ES2_compatibility check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the logic a little bit easier to follow; this is *either* about ES2 compatibility *or* about gles. GL_RGB565 was added already in OpenGL ES 1.0. Signed-off-by: Erik Faye-Lund Reviewed-by: Marek Olšák --- src/mesa/main/glformats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index c5ade2dc0e0..4bd2f9d7e23 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2325,7 +2325,7 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) } } - if (ctx->Extensions.ARB_ES2_compatibility) { + if (_mesa_has_ARB_ES2_compatibility(ctx) || _mesa_is_gles(ctx)) { switch (internalFormat) { case GL_RGB565: return GL_RGB; -- cgit v1.2.3