diff options
author | Brian Paul <[email protected]> | 2012-09-29 08:47:56 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-10-05 17:13:03 -0600 |
commit | 733dba2a08765dddc478a015439ea2a684d5f2a0 (patch) | |
tree | 2308b3cdfa67dc34249c085810af183385801ba4 | |
parent | 917d27392825719146a02acc684fb75f298f59ed (diff) |
mesa: remove the driverCtx parameter to _mesa_create/initialize_context()
No longer used.
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/wmesa.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 2 | ||||
-rw-r--r-- | src/mesa/main/context.c | 12 | ||||
-rw-r--r-- | src/mesa/main/context.h | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 2 |
10 files changed, 13 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 25334da33f7..204609ebb66 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -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; } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index 4409eae49bf..80e93950b2f 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -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); diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 9fbcf74d7c2..566a3728d08 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -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; diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 5ce1eb02942..82dd7abf8dd 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -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; } diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index e594548a630..1b12d8c2d09 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -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; diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index c610202736d..1580e5727bd 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -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); diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index e838e46ebe2..43a97f9eb5d 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -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; } diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index e0be048bbfd..d3fced9460b 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -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 { diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index f0b4471b140..a5f770a6e9d 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -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 ); diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index aa353412576..da361d88795 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -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; } |