mesa: remove _mesa_create_context_for_api()
Just add the gl_api parameter to _mesa_create_context().
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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
@@ -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 );
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user