summaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorPlamena Manolova <[email protected]>2016-05-12 18:21:38 +0100
committerBen Widawsky <[email protected]>2016-05-23 13:46:01 -0700
commit21edd24c0de903a12a92e969b78d3a928b9ed50c (patch)
tree95a12eebb41f506b4f47fc6eae3117da06001b0e /src/egl/main
parent46ff17559b1369f0fe7dca000f51f077ffd1dae5 (diff)
egl: Add OpenGL_ES to API string regardless of GLES version
According to the EGL specifications eglQueryString(EGL_CLIENT_APIS) should return a string containing a combination of "OpenGL", "OpenGL_ES" and "OpenVG", any other values would be considered invalid. Due to this when the API string is constructed, the version of GLES should be disregarded and "OpenGL_ES" should be attached once instead of "OpenGL_ES2" and "OpenGL_ES3". Fixes: dEQP-EGL.functional.negative_api* and dEQP-EGL.functional.query_context.simple.query_api Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index eb612c00f64..be2c90f6bdc 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -431,14 +431,11 @@ _eglCreateAPIsString(_EGLDisplay *dpy)
if (dpy->ClientAPIs & EGL_OPENGL_BIT)
strcat(dpy->ClientAPIsString, "OpenGL ");
- if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT)
+ if (dpy->ClientAPIs & EGL_OPENGL_ES_BIT ||
+ dpy->ClientAPIs & EGL_OPENGL_ES2_BIT ||
+ dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR) {
strcat(dpy->ClientAPIsString, "OpenGL_ES ");
-
- if (dpy->ClientAPIs & EGL_OPENGL_ES2_BIT)
- strcat(dpy->ClientAPIsString, "OpenGL_ES2 ");
-
- if (dpy->ClientAPIs & EGL_OPENGL_ES3_BIT_KHR)
- strcat(dpy->ClientAPIsString, "OpenGL_ES3 ");
+ }
if (dpy->ClientAPIs & EGL_OPENVG_BIT)
strcat(dpy->ClientAPIsString, "OpenVG ");