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-l...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to