diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 5 |
3 files changed, 12 insertions, 2 deletions
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) { |