summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglconfig.c
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-11-20 13:43:11 -0800
committerIan Romanick <ian.d.romanick@intel.com>2013-01-15 13:45:54 -0800
commiteb09940e55806c36890ae8f5a35ad1b37ed74832 (patch)
tree7880a387e69b81adf77751bb309c9349f8a0a7ae /src/egl/main/eglconfig.c
parent26f9faa04b4e924bc8e1fc35a5d75179063764e6 (diff)
downloadexternal_mesa3d-eb09940e55806c36890ae8f5a35ad1b37ed74832.zip
external_mesa3d-eb09940e55806c36890ae8f5a35ad1b37ed74832.tar.gz
external_mesa3d-eb09940e55806c36890ae8f5a35ad1b37ed74832.tar.bz2
egl/dri2: Add plumbing for EGL_OPENGL_ES3_BIT_KHR
Fixes error EGL_BAD_ATTRIBUTE in the tests below on Intel Sandybridge: * piglit egl-create-context-verify-gl-flavor, testcase OpenGL ES 3.0 * gles3conform, revision 19700, when runnning GL3Tests with -fbo This plumbing is added in order to comply with the EGL_KHR_create_context spec. According to the EGL_KHR_create_context spec, it is illegal to call eglCreateContext(EGL_CONTEXT_MAJOR_VERSION_KHR=3) with a config whose EGL_RENDERABLE_TYPE does not contain the EGL_OPENGL_ES3_BIT_KHR. The pertinent portion of the spec is quoted below; the key word is "respectively". * If <config> is not a valid EGLConfig, or does not support the requested client API, then an EGL_BAD_CONFIG error is generated (this includes requesting creation of an OpenGL ES 1.x, 2.0, or 3.0 context when the EGL_RENDERABLE_TYPE attribute of <config> does not contain EGL_OPENGL_ES_BIT, EGL_OPENGL_ES2_BIT, or EGL_OPENGL_ES3_BIT_KHR respectively). To create this patch, I searched for all the ES2 bit plumbing by calling `git grep "ES2_BIT\|DRI_API_GLES2" src/egl`, and then at each location added a case for ES3. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/egl/main/eglconfig.c')
-rw-r--r--src/egl/main/eglconfig.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index e1d53da..b18f301 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -331,6 +331,7 @@ _eglValidateConfig(const _EGLConfig *conf, EGLBoolean for_matching)
mask = EGL_OPENGL_ES_BIT |
EGL_OPENVG_BIT |
EGL_OPENGL_ES2_BIT |
+ EGL_OPENGL_ES3_BIT_KHR |
EGL_OPENGL_BIT;
break;
default: