Browse Source

mesa: remove _mesa_create_context_for_api()

Just add the gl_api parameter to _mesa_create_context().
tags/android-x86-2.2-r2
Brian Paul 14 years ago
parent
commit
6f2f449414

+ 2
- 1
src/mesa/drivers/beos/GLView.cpp View File

@@ -319,7 +319,8 @@ BGLView::BGLView(BRect rect, char *name,
functions.Viewport = md->Viewport;

// create core context
struct gl_context *ctx = _mesa_create_context(visual, NULL, &functions, md);
struct gl_context *ctx = _mesa_create_context(API_OPENGL, visual,
NULL, &functions, md);
if (! ctx) {
_mesa_destroy_visual(visual);
delete md;

+ 1
- 1
src/mesa/drivers/dri/i810/i810context.c View File

@@ -204,7 +204,7 @@ i810CreateContext( gl_api api,
shareCtx = ((i810ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
imesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
imesa->glCtx = _mesa_create_context(API_OPENGL, mesaVis, shareCtx,
&functions, (void*) imesa);
if (!imesa->glCtx) {
FREE(imesa);

+ 1
- 1
src/mesa/drivers/dri/mach64/mach64_context.c View File

@@ -120,7 +120,7 @@ GLboolean mach64CreateContext( gl_api api,
shareCtx = ((mach64ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
mmesa->glCtx = _mesa_create_context(glVisual, shareCtx,
mmesa->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
&functions, (void *)mmesa);
if (!mmesa->glCtx) {
FREE(mmesa);

+ 1
- 1
src/mesa/drivers/dri/mga/mga_xmesa.c View File

@@ -457,7 +457,7 @@ mgaCreateContext( gl_api api,
shareCtx = ((mgaContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
mmesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
mmesa->glCtx = _mesa_create_context(API_OPENGL, mesaVis, shareCtx,
&functions, (void *) mmesa);
if (!mmesa->glCtx) {
FREE(mmesa);

+ 1
- 1
src/mesa/drivers/dri/r128/r128_context.c View File

@@ -128,7 +128,7 @@ GLboolean r128CreateContext( gl_api api,
shareCtx = ((r128ContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
rmesa->glCtx = _mesa_create_context(glVisual, shareCtx,
rmesa->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
&functions, (void *) rmesa);
if (!rmesa->glCtx) {
FREE(rmesa);

+ 1
- 1
src/mesa/drivers/dri/radeon/radeon_common_context.c View File

@@ -204,7 +204,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
shareCtx = ((radeonContextPtr)sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
radeon->glCtx = _mesa_create_context(glVisual, shareCtx,
radeon->glCtx = _mesa_create_context(API_OPENGL, glVisual, shareCtx,
functions, (void *)radeon);
if (!radeon->glCtx)
return GL_FALSE;

+ 1
- 1
src/mesa/drivers/dri/savage/savage_xmesa.c View File

@@ -314,7 +314,7 @@ savageCreateContext( gl_api api,
shareCtx = ((savageContextPtr) sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
ctx = _mesa_create_context(mesaVis, shareCtx, &functions, imesa);
ctx = _mesa_create_context(api, mesaVis, shareCtx, &functions, imesa);
if (!ctx) {
free(imesa);
return GL_FALSE;

+ 1
- 1
src/mesa/drivers/dri/sis/sis_context.c View File

@@ -186,7 +186,7 @@ sisCreateContext( gl_api api,
shareCtx = ((sisContextPtr)sharedContextPrivate)->glCtx;
else
shareCtx = NULL;
smesa->glCtx = _mesa_create_context( glVisual, shareCtx,
smesa->glCtx = _mesa_create_context( API_OPENGL, glVisual, shareCtx,
&functions, (void *) smesa);
if (!smesa->glCtx) {
FREE(smesa);

+ 1
- 1
src/mesa/drivers/dri/tdfx/tdfx_context.c View File

@@ -194,7 +194,7 @@ GLboolean tdfxCreateContext( gl_api api,
else
shareCtx = NULL;

fxMesa->glCtx = _mesa_create_context(mesaVis, shareCtx,
fxMesa->glCtx = _mesa_create_context(api, mesaVis, shareCtx,
&functions, (void *) fxMesa);
if (!fxMesa->glCtx) {
FREE(fxMesa);

+ 1
- 1
src/mesa/drivers/dri/unichrome/via_context.c View File

@@ -542,7 +542,7 @@ viaCreateContext(gl_api api,
else
shareCtx = NULL;

vmesa->glCtx = _mesa_create_context(visual, shareCtx, &functions,
vmesa->glCtx = _mesa_create_context(API_OPENGL, visual, shareCtx, &functions,
(void*) vmesa);
vmesa->shareCtx = shareCtx;

+ 1
- 1
src/mesa/drivers/windows/gldirect/dglcontext.c View File

@@ -1414,7 +1414,7 @@ SkipPrimaryCreate:
}

#ifdef _USE_GLD3_WGL
lpCtx->glCtx = _mesa_create_context(lpCtx->glVis, NULL, (void *)lpCtx, GL_TRUE);
lpCtx->glCtx = _mesa_create_context(API_OPENGL, lpCtx->glVis, NULL, (void *)lpCtx, GL_TRUE);
#else
// Create the Mesa context
lpCtx->glCtx = (*mesaFuncs.gl_create_context)(

+ 5
- 21
src/mesa/main/context.c View File

@@ -1044,11 +1044,11 @@ _mesa_initialize_context(struct gl_context *ctx,
* \return pointer to a new __struct gl_contextRec or NULL if error.
*/
struct gl_context *
_mesa_create_context_for_api(gl_api api,
const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
_mesa_create_context(gl_api api,
const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
struct gl_context *ctx;

@@ -1070,22 +1070,6 @@ _mesa_create_context_for_api(gl_api api,
}


/**
* Create an OpenGL context.
*/
struct gl_context *
_mesa_create_context(const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext)
{
return _mesa_create_context_for_api(API_OPENGL, visual,
share_list,
driverFunctions,
driverContext);
}


/**
* Free the data associated with the given context.
*

+ 5
- 11
src/mesa/main/context.h View File

@@ -99,12 +99,6 @@ _mesa_destroy_visual( struct gl_config *vis );
/** \name Context-related functions */
/*@{*/

extern struct gl_context *
_mesa_create_context( const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext );

extern GLboolean
_mesa_initialize_context( struct gl_context *ctx,
gl_api api,
@@ -114,11 +108,11 @@ _mesa_initialize_context( struct gl_context *ctx,
void *driverContext );

extern struct gl_context *
_mesa_create_context_for_api(gl_api api,
const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);
_mesa_create_context(gl_api api,
const struct gl_config *visual,
struct gl_context *share_list,
const struct dd_function_table *driverFunctions,
void *driverContext);

extern void
_mesa_free_context_data( struct gl_context *ctx );

+ 1
- 1
src/mesa/state_tracker/st_context.c View File

@@ -178,7 +178,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_for_api(api, visual, shareCtx, &funcs, NULL);
ctx = _mesa_create_context(api, visual, shareCtx, &funcs, NULL);

/* XXX: need a capability bit in gallium to query if the pipe
* driver prefers DP4 or MUL/MAD for vertex transformation.

Loading…
Cancel
Save