summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/glx/xlib/xm_api.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-05-19 19:40:32 -0600
committerBrian Paul <brianp@vmware.com>2011-05-19 21:18:33 -0600
commit38f89c7008b5ed9a70439f4e6590f00a4e220b10 (patch)
treef68ed44c12ca9f84267f869473711018587abf5e /src/gallium/state_trackers/glx/xlib/xm_api.c
parent1929d52fd907b4e42e31ad459dd50a1de53df26c (diff)
downloadexternal_mesa3d-38f89c7008b5ed9a70439f4e6590f00a4e220b10.zip
external_mesa3d-38f89c7008b5ed9a70439f4e6590f00a4e220b10.tar.gz
external_mesa3d-38f89c7008b5ed9a70439f4e6590f00a4e220b10.tar.bz2
st/glx: define/set new ST_CONTEXT_FLAG_bits
Diffstat (limited to 'src/gallium/state_trackers/glx/xlib/xm_api.c')
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index dfdc723..ab4f675 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -876,6 +876,18 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
memset(&attribs, 0, sizeof(attribs));
attribs.profile = ST_PROFILE_DEFAULT;
attribs.visual = v->stvis;
+ attribs.major = major;
+ attribs.minor = minor;
+ if (contextFlags & GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB)
+ attribs.flags |= ST_CONTEXT_FLAG_FORWARD_COMPATIBLE;
+ if (contextFlags & GLX_CONTEXT_DEBUG_BIT_ARB)
+ attribs.flags |= ST_CONTEXT_FLAG_DEBUG;
+ if (contextFlags & GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB)
+ attribs.flags |= ST_CONTEXT_FLAG_ROBUST_ACCESS;
+ if (profileMask & GLX_CONTEXT_CORE_PROFILE_BIT_ARB)
+ attribs.flags |= ST_CONTEXT_FLAG_CORE_PROFILE;
+ if (profileMask & GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB)
+ attribs.flags |= ST_CONTEXT_FLAG_COMPATIBLE_PROFILE;
c->st = stapi->create_context(stapi, xmdpy->smapi,
&attribs, (share_list) ? share_list->st : NULL);