From 7037793f6b565cbb03a46a63058b1d9a7a4b4bdf Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 12 Nov 2014 12:13:42 +0000 Subject: st/dri: Support EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR/GLX_CONTEXT_DEBUG_BIT_ARB on ES contexts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The latest version of the specs explicitly allow it, and given that Mesa universally supports KHR_debug we should definitely support it. Totally untested. (Just happened to noticed this while implementing GLX_EXT_create_context_es2_profile for st/xlib.) Reviewed-by: Brian Paul Reviewed-by: Marek Olšák --- src/mesa/drivers/dri/common/dri_util.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/mesa/drivers/dri/common') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 02499f2daec..d6e875fcfeb 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -376,19 +376,17 @@ driCreateContextAttribs(__DRIscreen *screen, int api, return NULL; } - /* The EGL_KHR_create_context spec says: + /* The latest version of EGL_KHR_create_context spec says: * - * "Flags are only defined for OpenGL context creation, and specifying - * a flags value other than zero for other types of contexts, - * including OpenGL ES contexts, will generate an error." + * "If the EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR flag bit is set in + * EGL_CONTEXT_FLAGS_KHR, then a will be created. + * [...] This bit is supported for OpenGL and OpenGL ES contexts. * - * The GLX_EXT_create_context_es2_profile specification doesn't say - * anything specific about this case. However, none of the known flags - * have any meaning in an ES context, so this seems safe. + * None of the other flags have any meaning in an ES context, so this seems safe. */ if (mesa_api != API_OPENGL_COMPAT && mesa_api != API_OPENGL_CORE - && flags != 0) { + && (flags & ~__DRI_CTX_FLAG_DEBUG)) { *error = __DRI_CTX_ERROR_BAD_FLAG; return NULL; } -- cgit v1.2.3