[Mesa-dev] [PATCH v2 05/29] mesa/main: clean up ES2_compatibility check

Erik Faye-Lund erik.faye-lund at collabora.com
Fri Nov 23 10:54:01 UTC 2018


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 <erik.faye-lund at collabora.com>
---
 src/mesa/main/glformats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index a47263a6525..d837bfc1aca 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;
-- 
2.19.1



More information about the mesa-dev mailing list