Summary: | piglit spec/egl_khr_create_context/valid debug flag gles* fail | ||
---|---|---|---|
Product: | Mesa | Reporter: | Boyan Ding <stu_dby> |
Component: | EGL | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Boyan Ding
2015-06-21 14:27:21 UTC
Based of the patch date (17 July 2012) and the extension revision history I'd say that things were changed/nuked in Version 12 or later. With Version 15 being the prime suspect. As Intel is a Khronos member, you should have access to the SVN repo/history for the exact details. I'd assume that it would be the better option. (In reply to Emil Velikov from comment #1) > As Intel is a Khronos member, you should have access to the SVN repo/history > for the exact details. I'd assume that it would be the better option. Sorry if I caused confusion, but I'm not affiliated with Intel (or any other Khronos member). So I seem not able to access the spec history. I tried simply removing the non-OpenGL check, but it breaks another piglit test, namely spec/egl_khr_create_context/invalid flag gles, giving EGL_BAD_MATCH instead of EGL_BAD_ATTRIBUTE in some cases (I guess when the flag given is valid for OpenGL but not ES). And I saw that test was updated against version 15 of EGL_KHR_create_context_spec (commit 5f668b1 [1]). The comment there is explains /* According to the EGL_KHR_create_context spec, version 15, there * exists exactly one valid flag for OpenGL ES contexts: the debug * flag. * If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in * EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created. * [...] This bit is supported for OpenGL and OpenGL ES contexts. */ So it seems allowing EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR in OpenGL ES is more reasonable. If so, I'll work out a patch and send it to the ML. [1] http://cgit.freedesktop.org/piglit/commit/?id=5f668b118fed374a16d21ea1c0b2e82c0b658cc5 Found the exact reason why EGL_BAD_MATCH instead of EGL_BAD_ATTRIBUTE is given for unknown flags in OpenGL ES context. src/mesa/drivers/dri/common/dri_util.c gives __DRI_CTX_ERROR_BAD_FLAG when hitting unknown flag in OpenGL ES but gives __DRI_CTX_ERROR_UNKNOWN_FLAG in OpenGL instead. Looking into the history, some old comment seems to suggest that the error value has something to do with GLX_EXT_create_context_es2_profile. I don't know exactly what error should be given in that case. Got confused there thinking that you're with Intel, sorry about that Boyan. As expected we're missing the v15 update of the spec in our libEGL. I will try to find some time and dig through the spec history late this week. This way we'll clearly see if there are other missing pieces ;-) And yes, allowing EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR for GLES seems like the correct thing to do here (as per the spec quote below) If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in EGL_CONTEXT_FLAGS_KHR, then a <debug context> will be created... ... This bit is supported for OpenGL and OpenGL ES contexts. Fixed with commit 11cabc45b7124e51d5ead42db6dceb5a3755266b Author: Matthew Waters <ystreet00@gmail.com> Date: Mon Sep 14 18:35:45 2015 +0100 egl: rework handling EGL_CONTEXT_FLAGS As of version 15 of the EGL_KHR_create_context spec, debug contexts are allowed for ES contexts. We should allow creation instead of erroring. While we're here provide a more comprehensive checking for the other two flags - ROBUST_ACCESS_BIT_KHR and FORWARD_COMPATIBLE_BIT_KHR |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.