This should be safe as these backends already support the EGL version of
this extension. DRI1 is not affected because it does not support
GLX_ARB_create_context anyway. DRI-Windows is not prepared to implement
this as there's no equivalent WGL extension, and wglCreateContextAttribs
seems to really want the HDC's pixel format to be set.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
goto error_exit;
}
- if (!glx_context_init(&pcp->base, &psc->base, &config->base))
+ if (!glx_context_init(&pcp->base, &psc->base, config_base))
goto error_exit;
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
pcp->driContext =
(*psc->dri2->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig : NULL,
shared,
num_ctx_attribs / 2,
ctx_attribs,
goto error_exit;
}
- if (!glx_context_init(&pcp->base, &psc->base, &config->base))
+ if (!glx_context_init(&pcp->base, &psc->base, config_base))
goto error_exit;
ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION;
pcp->driContext =
(*psc->image_driver->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig
+ : NULL,
shared,
num_ctx_attribs / 2,
ctx_attribs,
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;
}
pcp->driContext =
(*psc->swrast->createContextAttribs) (psc->driScreen,
api,
- config->driConfig,
+ config ? config->driConfig : 0,
shared,
num_ctx_attribs / 2,
ctx_attribs,