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