Hi;

On 10/20/2016 05:41 PM, Eric Engestrom wrote:
On Thursday, 2016-10-20 15:34:52 +0100, Eric Engestrom wrote:
On Thursday, 2016-10-20 14:55:25 +0300, Tapani Pälli wrote:
Fixes following dEQP test:

    dEQP-EGL.functional.negative_api.create_context

Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
---
  src/egl/main/eglapi.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d8bd76d..e96999c 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -733,6 +733,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, 
EGLContext share_list,
     _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_CONTEXT);
_EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv);
+   _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv);
I'm pretty sure that prevents the use of EGL_KHR_no_config_context :)

Argh that is true, thanks for spotting this.


if (!config && !disp->Extensions.KHR_no_config_context)
        RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
Move the line to this `if` (ie. instead of the RETURN_EGL_ERROR here),
and you can have my:
Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>
Sorry, forgot to mention the `!config` bit needs to be removed...
To be clear, I believe this is the correct fix:

Yes, this looks proper. I'll make v2 with these changes.

----8<----
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index d8bd76d..eaaa8a2 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -734,8 +734,8 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, 
EGLContext share_list,
_EGL_CHECK_DISPLAY(disp, EGL_NO_CONTEXT, drv); - if (!config && !disp->Extensions.KHR_no_config_context)
-      RETURN_EGL_ERROR(disp, EGL_BAD_CONFIG, EGL_NO_CONTEXT);
+   if (!disp->Extensions.KHR_no_config_context)
+      _EGL_CHECK_CONFIG(disp, conf, EGL_NO_CONTEXT, drv);
if (!share && share_list != EGL_NO_CONTEXT)
        RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
---->8----


--
2.7.4


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to