summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/egl/main/eglcontext.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 58740c31f9f..7eac79ac952 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -538,9 +538,14 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *c,
switch (attribute) {
case EGL_CONFIG_ID:
- if (!c->Config)
- return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
- *value = c->Config->ConfigID;
+ /*
+ * From EGL_KHR_no_config_context:
+ *
+ * "Querying EGL_CONFIG_ID returns the ID of the EGLConfig with
+ * respect to which the context was created, or zero if created
+ * without respect to an EGLConfig."
+ */
+ *value = c->Config ? c->Config->ConfigID : 0;
break;
case EGL_CONTEXT_CLIENT_VERSION:
*value = c->ClientMajorVersion;