attribs.flags |= ST_CONTEXT_FLAG_DEBUG;
if (ctx_config->flags & __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS)
- attribs.flags |= ST_CONTEXT_FLAG_ROBUST_ACCESS;
+ attribs.context_flags |= PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
if (ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_RESET_STRATEGY)
if (ctx_config->reset_strategy != __DRI_CTX_RESET_NO_NOTIFICATION)
- attribs.flags |= ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED;
+ attribs.context_flags |= PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET;
if (ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_NO_ERROR)
attribs.flags |= ctx_config->no_error ? ST_CONTEXT_FLAG_NO_ERROR : 0;
if (ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_PRIORITY) {
switch (ctx_config->priority) {
case __DRI_CTX_PRIORITY_LOW:
- attribs.flags |= ST_CONTEXT_FLAG_LOW_PRIORITY;
+ attribs.context_flags |= PIPE_CONTEXT_LOW_PRIORITY;
break;
case __DRI_CTX_PRIORITY_HIGH:
- attribs.flags |= ST_CONTEXT_FLAG_HIGH_PRIORITY;
+ attribs.context_flags |= PIPE_CONTEXT_HIGH_PRIORITY;
break;
default:
break;
attribs.flags |= ST_CONTEXT_FLAG_RELEASE_NONE;
if (ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_PROTECTED)
- attribs.flags |= ST_CONTEXT_FLAG_PROTECTED;
+ attribs.context_flags |= PIPE_CONTEXT_PROTECTED;
struct dri_context *share_ctx = NULL;
if (sharedContextPrivate) {
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;
+ attribs.context_flags |= PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
switch (profileMask) {
case GLX_CONTEXT_CORE_PROFILE_BIT_ARB:
if (contextFlags & WGL_CONTEXT_DEBUG_BIT_ARB)
attribs.flags |= ST_CONTEXT_FLAG_DEBUG;
if (contextFlags & WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB)
- attribs.flags |= ST_CONTEXT_FLAG_ROBUST_ACCESS;
+ attribs.context_flags |= PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
if (resetStrategy != WGL_NO_RESET_NOTIFICATION_ARB)
- attribs.flags |= ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED;
+ attribs.context_flags |= PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET;
switch (profileMask) {
case WGL_CONTEXT_CORE_PROFILE_BIT_ARB:
*/
#define ST_CONTEXT_FLAG_DEBUG (1 << 0)
#define ST_CONTEXT_FLAG_FORWARD_COMPATIBLE (1 << 1)
-#define ST_CONTEXT_FLAG_ROBUST_ACCESS (1 << 2)
-#define ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED (1 << 3)
-#define ST_CONTEXT_FLAG_NO_ERROR (1 << 4)
-#define ST_CONTEXT_FLAG_RELEASE_NONE (1 << 5)
-#define ST_CONTEXT_FLAG_HIGH_PRIORITY (1 << 6)
-#define ST_CONTEXT_FLAG_LOW_PRIORITY (1 << 7)
-#define ST_CONTEXT_FLAG_PROTECTED (1 << 8)
+#define ST_CONTEXT_FLAG_NO_ERROR (1 << 2)
+#define ST_CONTEXT_FLAG_RELEASE_NONE (1 << 3)
+
/**
* Reasons that context creation might fail.
/** Mask of ST_CONTEXT_FLAG_x bits */
unsigned flags;
+ /** Mask of PIPE_CONTEXT_x bits */
+ unsigned context_flags;
+
/**
* The visual of the framebuffers the context will be bound to.
*/
struct gl_config mode, *mode_ptr = &mode;
gl_api api;
bool no_error = false;
- unsigned ctx_flags = PIPE_CONTEXT_PREFER_THREADED;
if (!(ST_PROFILE_ALL_MASK & (1 << attribs->profile)))
return NULL;
fscreen->destroy = st_manager_destroy;
}
- if (attribs->flags & ST_CONTEXT_FLAG_ROBUST_ACCESS)
- ctx_flags |= PIPE_CONTEXT_ROBUST_BUFFER_ACCESS;
-
if (attribs->flags & ST_CONTEXT_FLAG_NO_ERROR)
no_error = true;
- if (attribs->flags & ST_CONTEXT_FLAG_LOW_PRIORITY)
- ctx_flags |= PIPE_CONTEXT_LOW_PRIORITY;
- else if (attribs->flags & ST_CONTEXT_FLAG_HIGH_PRIORITY)
- ctx_flags |= PIPE_CONTEXT_HIGH_PRIORITY;
-
- if (attribs->flags & ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED)
- ctx_flags |= PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET;
-
- if (attribs->flags & ST_CONTEXT_FLAG_PROTECTED)
- ctx_flags |= PIPE_CONTEXT_PROTECTED;
-
- pipe = fscreen->screen->context_create(fscreen->screen, NULL, ctx_flags);
+ pipe = fscreen->screen->context_create(fscreen->screen, NULL,
+ PIPE_CONTEXT_PREFER_THREADED |
+ attribs->context_flags);
if (!pipe) {
*error = ST_CONTEXT_ERROR_NO_MEMORY;
return NULL;
if (attribs->flags & ST_CONTEXT_FLAG_FORWARD_COMPATIBLE)
st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
- if (attribs->flags & ST_CONTEXT_FLAG_ROBUST_ACCESS) {
+
+ if (attribs->context_flags & PIPE_CONTEXT_ROBUST_BUFFER_ACCESS) {
st->ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB;
st->ctx->Const.RobustAccess = GL_TRUE;
}
- if (attribs->flags & ST_CONTEXT_FLAG_RESET_NOTIFICATION_ENABLED) {
+
+ if (attribs->context_flags & PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET) {
st->ctx->Const.ResetStrategy = GL_LOSE_CONTEXT_ON_RESET_ARB;
st_install_device_reset_callback(st);
}