+ 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;
+
+ if (ctx_config->flags & __DRI_CTX_FLAG_NO_ERROR)
+ attribs.flags |= ST_CONTEXT_FLAG_NO_ERROR;
+
+ 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;
+ break;
+ case __DRI_CTX_PRIORITY_HIGH:
+ attribs.flags |= ST_CONTEXT_FLAG_HIGH_PRIORITY;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ((ctx_config->attribute_mask & __DRIVER_CONTEXT_ATTRIB_RELEASE_BEHAVIOR)
+ && (ctx_config->release_behavior == __DRI_CTX_RELEASE_BEHAVIOR_NONE))
+ attribs.flags |= ST_CONTEXT_FLAG_RELEASE_NONE;