};
static const __DRIextension *loader_extensions[] = {
- &systemTimeExtension.base,
&swrastLoaderExtension.base,
NULL
};
uint32_t flags;
unsigned api;
int reset;
- uint32_t ctx_attribs[2 * 4];
+ int release;
+ uint32_t ctx_attribs[2 * 5];
unsigned num_ctx_attribs = 0;
if (!psc->base.driScreen)
*/
if (!dri2_convert_glx_attribs(num_attribs, attribs,
&major_ver, &minor_ver, &renderType, &flags,
- &api, &reset, error))
+ &api, &reset, &release, error))
return NULL;
/* Check the renderType value */
if (reset != __DRI_CTX_RESET_NO_NOTIFICATION)
return NULL;
+ if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH &&
+ release != __DRI_CTX_RELEASE_BEHAVIOR_NONE)
+ return NULL;
+
if (shareList) {
pcp_shared = (struct drisw_context *) shareList;
shared = pcp_shared->driContext;
if (pcp == NULL)
return NULL;
- if (!glx_context_init(&pcp->base, &psc->base, &config->base)) {
+ if (!glx_context_init(&pcp->base, &psc->base, config_base)) {
free(pcp);
return NULL;
}
ctx_attribs[num_ctx_attribs++] = major_ver;
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION;
ctx_attribs[num_ctx_attribs++] = minor_ver;
+ if (release != __DRI_CTX_RELEASE_BEHAVIOR_FLUSH) {
+ ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR;
+ ctx_attribs[num_ctx_attribs++] = release;
+ }
if (flags != 0) {
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS;
pcp->driContext =
(*psc->swrast->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig : 0,
shared,
num_ctx_attribs / 2,
ctx_attribs,
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
- /* DRISW version >= 2 implies support for OpenGL ES 2.0.
+ /* DRISW version >= 2 implies support for OpenGL ES.
*/
+ __glXEnableDirectExtension(&psc->base,
+ "GLX_EXT_create_context_es_profile");
__glXEnableDirectExtension(&psc->base,
"GLX_EXT_create_context_es2_profile");
}
psc->rendererQuery = (__DRI2rendererQueryExtension *) extensions[i];
__glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
}
+ if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) {
+ __glXEnableDirectExtension(&psc->base,
+ "GLX_ARB_context_flush_control");
+ }
}
}