From: Ian Romanick Date: Fri, 17 Aug 2012 16:32:59 +0000 (-0700) Subject: i965: Set context flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bf8644e64daa4e1d59d1e399355b349406438d7a;p=mesa.git i965: Set context flags Signed-off-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index f83f89f0481..8d2e5c99e08 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -77,6 +77,7 @@ brwCreateContext(int api, __DRIcontext *driContextPriv, unsigned major_version, unsigned minor_version, + uint32_t flags, unsigned *error, void *sharedContextPrivate) { @@ -359,6 +360,13 @@ brwCreateContext(int api, ctx->Const.ForceGLSLExtensionsWarn = driQueryOptionb(&intel->optionCache, "force_glsl_extensions_warn"); + ctx->Const.ContextFlags = 0; + if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0) + ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT; + + if ((flags & __DRI_CTX_FLAG_DEBUG) != 0) + ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; + return true; } diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 15ef0a35d4f..71cd0f4ed87 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1101,6 +1101,7 @@ bool brwCreateContext(int api, __DRIcontext *driContextPriv, unsigned major_version, unsigned minor_version, + uint32_t flags, unsigned *error, void *sharedContextPrivate); diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index ef5a87a9458..26df77f469b 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -645,6 +645,7 @@ brwCreateContext(int api, __DRIcontext *driContextPriv, unsigned major_version, unsigned minor_version, + uint32_t flags, unsigned *error, void *sharedContextPrivate); @@ -710,8 +711,8 @@ intelCreateContext(gl_api api, #else success = brwCreateContext(api, mesaVis, driContextPriv, - major_version, minor_version, error, - sharedContextPrivate); + major_version, minor_version, flags, + error, sharedContextPrivate); #endif if (success) {