summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-08-17 09:32:59 -0700
committerIan Romanick <[email protected]>2012-08-29 15:09:37 -0700
commitbf8644e64daa4e1d59d1e399355b349406438d7a (patch)
tree374f8fd769ddc25df58712a4ebe25e1e1984f106 /src/mesa/drivers
parentca2b1fcb30bb1bec2eab520626c58727949f7cd6 (diff)
i965: Set context flags
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c5
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) {