mesa: remove the driverCtx parameter to _mesa_create/initialize_context()
No longer used.
This commit is contained in:
parent
917d273928
commit
733dba2a08
|
@ -608,7 +608,7 @@ intelInitContext(struct intel_context *intel,
|
|||
}
|
||||
|
||||
if (!_mesa_initialize_context(&intel->ctx, api, mesaVis, shareCtx,
|
||||
functions, (void *) intel)) {
|
||||
functions)) {
|
||||
printf("%s: failed to init mesa context\n", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
|
|||
|
||||
/* Initialize the mesa context. */
|
||||
_mesa_initialize_context(ctx, API_OPENGL, visual,
|
||||
share_ctx, &functions, NULL);
|
||||
share_ctx, &functions);
|
||||
|
||||
nouveau_state_init(ctx);
|
||||
nouveau_scratch_init(ctx);
|
||||
|
|
|
@ -149,7 +149,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
|
|||
|
||||
if (!_mesa_initialize_context(&radeon->glCtx, API_OPENGL,
|
||||
glVisual, shareCtx,
|
||||
functions, (void *)radeon))
|
||||
functions))
|
||||
return GL_FALSE;
|
||||
|
||||
ctx = &radeon->glCtx;
|
||||
|
|
|
@ -756,7 +756,7 @@ dri_create_context(gl_api api,
|
|||
mesaCtx = &ctx->Base;
|
||||
|
||||
/* basic context setup */
|
||||
if (!_mesa_initialize_context(mesaCtx, api, visual, sharedCtx, &functions, (void *) cPriv)) {
|
||||
if (!_mesa_initialize_context(mesaCtx, api, visual, sharedCtx, &functions)) {
|
||||
*error = __DRI_CTX_ERROR_NO_MEMORY;
|
||||
goto context_fail;
|
||||
}
|
||||
|
|
|
@ -713,7 +713,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
|
|||
osmesa->gl_visual,
|
||||
sharelist ? &sharelist->mesa
|
||||
: (struct gl_context *) NULL,
|
||||
&functions, (void *) osmesa)) {
|
||||
&functions)) {
|
||||
_mesa_destroy_visual( osmesa->gl_visual );
|
||||
free(osmesa);
|
||||
return NULL;
|
||||
|
|
|
@ -1085,7 +1085,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
|
|||
/* initialize the Mesa context data */
|
||||
ctx = &c->gl_ctx;
|
||||
_mesa_initialize_context(ctx, API_OPENGL, visual,
|
||||
NULL, &functions, (void *)c);
|
||||
NULL, &functions);
|
||||
|
||||
/* visual no longer needed - it was copied by _mesa_initialize_context() */
|
||||
_mesa_destroy_visual(visual);
|
||||
|
|
|
@ -902,7 +902,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||
xmesa_init_driver_functions(v, &functions);
|
||||
if (!_mesa_initialize_context(mesaCtx, API_OPENGL, &v->mesa_visual,
|
||||
share_list ? &(share_list->mesa) : (struct gl_context *) NULL,
|
||||
&functions, (void *) c)) {
|
||||
&functions)) {
|
||||
free(c);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -897,20 +897,17 @@ _mesa_alloc_dispatch_table(int size)
|
|||
* etc with, or NULL
|
||||
* \param driverFunctions table of device driver functions for this context
|
||||
* to use
|
||||
* \param driverContext pointer to driver-specific context data
|
||||
*/
|
||||
GLboolean
|
||||
_mesa_initialize_context(struct gl_context *ctx,
|
||||
gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_list,
|
||||
const struct dd_function_table *driverFunctions,
|
||||
void *driverContext)
|
||||
const struct dd_function_table *driverFunctions)
|
||||
{
|
||||
struct gl_shared_state *shared;
|
||||
int i;
|
||||
|
||||
/*ASSERT(driverContext);*/
|
||||
assert(driverFunctions->NewTextureObject);
|
||||
assert(driverFunctions->FreeTextureImageBuffer);
|
||||
|
||||
|
@ -1048,7 +1045,6 @@ _mesa_initialize_context(struct gl_context *ctx,
|
|||
* \param share_list another context to share display lists with or NULL
|
||||
* \param driverFunctions points to the dd_function_table into which the
|
||||
* driver has plugged in all its special functions.
|
||||
* \param driverContext points to the device driver's private context state
|
||||
*
|
||||
* \return pointer to a new __struct gl_contextRec or NULL if error.
|
||||
*/
|
||||
|
@ -1056,20 +1052,18 @@ struct gl_context *
|
|||
_mesa_create_context(gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_list,
|
||||
const struct dd_function_table *driverFunctions,
|
||||
void *driverContext)
|
||||
const struct dd_function_table *driverFunctions)
|
||||
{
|
||||
struct gl_context *ctx;
|
||||
|
||||
ASSERT(visual);
|
||||
/*ASSERT(driverContext);*/
|
||||
|
||||
ctx = calloc(1, sizeof(struct gl_context));
|
||||
if (!ctx)
|
||||
return NULL;
|
||||
|
||||
if (_mesa_initialize_context(ctx, api, visual, share_list,
|
||||
driverFunctions, driverContext)) {
|
||||
driverFunctions)) {
|
||||
return ctx;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -109,15 +109,13 @@ _mesa_initialize_context( struct gl_context *ctx,
|
|||
gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_list,
|
||||
const struct dd_function_table *driverFunctions,
|
||||
void *driverContext );
|
||||
const struct dd_function_table *driverFunctions);
|
||||
|
||||
extern struct gl_context *
|
||||
_mesa_create_context(gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_list,
|
||||
const struct dd_function_table *driverFunctions,
|
||||
void *driverContext);
|
||||
const struct dd_function_table *driverFunctions);
|
||||
|
||||
extern void
|
||||
_mesa_free_context_data( struct gl_context *ctx );
|
||||
|
|
|
@ -225,7 +225,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,
|
|||
memset(&funcs, 0, sizeof(funcs));
|
||||
st_init_driver_functions(&funcs);
|
||||
|
||||
ctx = _mesa_create_context(api, visual, shareCtx, &funcs, NULL);
|
||||
ctx = _mesa_create_context(api, visual, shareCtx, &funcs);
|
||||
if (!ctx) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue