From: Erik Faye-Lund Date: Thu, 15 Nov 2018 17:40:26 +0000 (+0100) Subject: mesa/main: clean up ES2_compatibility check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5109742e7be2ba8c53fafd14e895cc9f0a8dd10c;p=mesa.git mesa/main: clean up ES2_compatibility check 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 --- 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;