From 7037793f6b565cbb03a46a63058b1d9a7a4b4bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= 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/gallium/state_trackers/dri/dri_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium') diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c index fe3240a..84b8807 100644 --- a/src/gallium/state_trackers/dri/dri_context.c +++ b/src/gallium/state_trackers/dri/dri_context.c @@ -72,9 +72,6 @@ dri_create_context(gl_api api, const struct gl_config * visual, attribs.major = major_version; attribs.minor = minor_version; - if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) - attribs.flags |= ST_CONTEXT_FLAG_DEBUG; - if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) attribs.flags |= ST_CONTEXT_FLAG_FORWARD_COMPATIBLE; break; @@ -83,6 +80,9 @@ dri_create_context(gl_api api, const struct gl_config * visual, goto fail; } + if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) + attribs.flags |= ST_CONTEXT_FLAG_DEBUG; + if (flags & ~(__DRI_CTX_FLAG_DEBUG | __DRI_CTX_FLAG_FORWARD_COMPATIBLE)) { *error = __DRI_CTX_ERROR_UNKNOWN_FLAG; goto fail; -- cgit v1.1