diff options
author | Neil Roberts <[email protected]> | 2014-03-07 18:05:46 +0000 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2014-03-12 14:40:47 -0700 |
commit | 4b17dff3e5128bef67ea79d20624e878c3b48729 (patch) | |
tree | eb53d4b23fa4b326d863089febab90495e154204 /src/egl/main | |
parent | 4954518125d6cc61af3302c0db7487025e0e37e6 (diff) |
eglCreateContext: Remove the check for whether config == 0
In eglCreateContext there is a check for whether the config parameter is zero
and in this case it will avoid reporting an error if the
EGL_KHR_surfacless_context extension is supported. However there is nothing in
that extension which says you can create a context without a config and Mesa
breaks if you try this so it is probably better to leave it reporting an
error.
The original check was added in b90a3e7d8b1bc based on the API-specific
extensions EGL_KHR_surfaceless_opengl/gles1/gles2. This was later changed to
refer to EGL_KHR_surfacless_context in b50703aea5. Perhaps the original
extensions specified a configless context but the new one does not.
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglapi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 59e214c43d2..42bcb720f41 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -431,11 +431,8 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list, _EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv); - if (!config) { - /* config may be NULL if surfaceless */ - if (!disp->Extensions.KHR_surfaceless_context) - RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT); - } + if (!config) + RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT); if (!share && share_list != EGL_NO_CONTEXT) RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT); |