mesa/src/egl
Frank Binns d9603be038 egl: improve attribute checking for eglCreateContext
The EGL 1.4 spec states for eglCreateContext:

	"attribute EGL_CONTEXT_CLIENT_VERSION is only valid when the current
	 rendering API is EGL_OPENGL_ES_API"

Additionally, if the EGL_KHR_create_context EGL extension is supported
(this is mandatory in EGL 1.5) then the EGL_CONTEXT_MAJOR_VERSION_KHR,
which is an alias for EGL_CONTEXT_CLIENT_VERSION, and
EGL_CONTEXT_MINOR_VERSION_KHR attributes are also accepted by
eglCreateContext with the extension spec stating:

	"The values for attributes EGL_CONTEXT_MAJOR_VERSION_KHR and
	 EGL_CONTEXT_MINOR_VERSION_KHR specify the requested client API
	 version. They are only meaningful for OpenGL and OpenGL ES
	 contexts, and specifying them for other types of contexts will
	 generate an error."

Add the necessary checks against the extension and rendering APIs when
validating these attributes as part of eglCreateContext.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
[Emil Velikov: Add newline before the spec quote (Matt)]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-08-13 17:36:06 +01:00
..
docs egl: Mark EGL_MESA_screen_surface as obsolete. 2010-08-31 15:25:22 +08:00
drivers egl/x11: don't abort when creating a DRI2 drawable fails 2015-08-13 17:36:06 +01:00
main egl: improve attribute checking for eglCreateContext 2015-08-13 17:36:06 +01:00
wayland egl: remove support for GCC older than 4.1.0 2014-12-17 08:37:17 +11:00
Android.mk egl: android: remove DRM_GRALLOC_TOP hack 2015-07-22 16:35:27 +01:00
Makefile.am egl/dri2: Fix include path of u_atomic.h introduced e7e29189 2015-08-07 14:31:25 -05:00
Makefile.sources automake: rework the EGL build 2015-07-22 16:35:27 +01:00
SConscript egl/dri2: Fix include path of u_atomic.h introduced e7e29189 2015-08-07 14:31:25 -05:00