aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/glx')
-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 dfdc723a705..ab4f6753e11 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);