summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/allegro/amesa.c20
-rw-r--r--src/mesa/drivers/dos/dmesa.c5
-rw-r--r--src/mesa/drivers/ggi/ggimesa.c7
-rw-r--r--src/mesa/drivers/glide/fxdd.c5
-rw-r--r--src/mesa/drivers/glide/fxdrv.h3
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c7
-rw-r--r--src/mesa/drivers/svga/svgamesa.c8
-rw-r--r--src/mesa/drivers/windows/wmesa.c9
-rw-r--r--src/mesa/drivers/windows/wmesa_stereo.c5
-rw-r--r--src/mesa/drivers/x11/xm_api.c17
10 files changed, 50 insertions, 36 deletions
diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c
index 2585c218d8..41dfcb18f0 100644
--- a/src/mesa/drivers/allegro/amesa.c
+++ b/src/mesa/drivers/allegro/amesa.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <allegro.h>
#include "context.h"
+#include "imports.h"
#include "matrix.h"
#include "mtypes.h"
#include "GL/amesa.h"
@@ -325,11 +326,12 @@ void AMesaDestroyBuffer(AMesaBuffer buffer)
AMesaContext AMesaCreateContext(AMesaVisual visual,
AMesaContext share)
- {
+{
AMesaContext context;
GLboolean direct = GL_FALSE;
+ __GLimports imports;
- context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
+ context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
if (!context)
return NULL;
@@ -337,18 +339,18 @@ AMesaContext AMesaCreateContext(AMesaVisual visual,
context->Buffer = NULL;
context->ClearColor = 0;
context->CurrentColor = 0;
- context->GLContext = _mesa_create_context(visual->GLVisual,
+ _mesa_init_default_imports( &imports, (void *) context);
+ context->GLContext = _mesa_create_context(visual->GLVisual,
share ? share->GLContext : NULL,
- (void*)context,
- direct);
- if (!context->GLContext)
+ &imports );
+ if (!context->GLContext)
{
- free(context);
- return NULL;
+ free(context);
+ return NULL;
}
return context;
- }
+}
void AMesaDestroyContext(AMesaContext context)
diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c
index 559204fc53..5ac7af42a0 100644
--- a/src/mesa/drivers/dos/dmesa.c
+++ b/src/mesa/drivers/dos/dmesa.c
@@ -38,6 +38,7 @@
#include "context.h"
#include "GL/dmesa.h"
#include "extensions.h"
+#inlcude "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mmath.h"
@@ -839,9 +840,11 @@ DMesaContext DMesaCreateContext (DMesaVisual visual,
GLboolean direct = GL_FALSE;
if ((c=(DMesaContext)calloc(1, sizeof(struct dmesa_context)))!=NULL) {
+ __GLimports imports;
+ _mesa_init_default_imports( &imports, (void *) c);
c->gl_ctx = _mesa_create_context(visual->gl_visual,
share ? share->gl_ctx : NULL,
- (void *)c, direct);
+ &imports);
_mesa_enable_sw_extensions(c->gl_ctx);
_mesa_enable_1_3_extensions(c->gl_ctx);
diff --git a/src/mesa/drivers/ggi/ggimesa.c b/src/mesa/drivers/ggi/ggimesa.c
index a4621bb288..339a708590 100644
--- a/src/mesa/drivers/ggi/ggimesa.c
+++ b/src/mesa/drivers/ggi/ggimesa.c
@@ -30,6 +30,7 @@
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/debug.h>
#include "extensions.h"
+#include "imports.h"
#include "matrix.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -470,6 +471,7 @@ ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis)
int err;
ggi_color pal[256];
int i;
+ __GLimports imports;
GGIMESADPRINT_CORE("ggiMesaCreateContext() called\n");
@@ -480,9 +482,10 @@ ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis)
ctx->ggi_visual = vis;
ctx->color = 0;
+ _mesa_init_default_imports( &imports, (void *) ctx);
ctx->gl_ctx =
_mesa_create_context(&(LIBGGI_MESAEXT(vis)->mesa_visual.gl_visual),
- NULL, (void *)ctx, GL_TRUE);
+ NULL, &imports);
if (!ctx->gl_ctx)
goto free_context;
@@ -509,8 +512,6 @@ ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis)
goto free_gl_context;
}
- _mesa_read_config_file(ctx->gl_ctx);
-
return ctx;
free_gl_context:
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 8cdbe35382..a5541eceb1 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -1,4 +1,4 @@
-/* $Id: fxdd.c,v 1.85 2002/03/16 00:53:15 brianp Exp $ */
+/* $Id: fxdd.c,v 1.86 2002/06/13 04:28:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -766,9 +766,6 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
FX_grGlideGetState((GrState *) fxMesa->state);
- /* Run the config file */
- _mesa_read_config_file(fxMesa->glCtx);
-
return 1;
}
diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h
index f3f6fa4c9b..27e4f146b9 100644
--- a/src/mesa/drivers/glide/fxdrv.h
+++ b/src/mesa/drivers/glide/fxdrv.h
@@ -1,4 +1,4 @@
-/* $Id: fxdrv.h,v 1.52 2001/09/23 16:50:01 brianp Exp $ */
+/* $Id: fxdrv.h,v 1.53 2002/06/13 04:28:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -49,6 +49,7 @@
#endif
#include "context.h"
+#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 9dc08b5820..1a5cefea08 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.79 2002/04/19 14:05:51 brianp Exp $ */
+/* $Id: osmesa.c,v 1.80 2002/06/13 04:28:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -42,6 +42,7 @@
#include "colormac.h"
#include "depth.h"
#include "extensions.h"
+#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
@@ -138,6 +139,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
const GLuint i4 = 1;
const GLubyte *i1 = (GLubyte *) &i4;
const GLint little_endian = *i1;
+ __GLimports imports;
rind = gind = bind = aind = 0;
if (format==OSMESA_COLOR_INDEX) {
@@ -290,11 +292,12 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
return NULL;
}
+ _mesa_init_default_imports( &imports, (void *) osmesa );
if (!_mesa_initialize_context(&osmesa->gl_ctx,
osmesa->gl_visual,
sharelist ? &sharelist->gl_ctx
: (GLcontext *) NULL,
- (void *) osmesa, GL_TRUE )) {
+ &imports)) {
_mesa_destroy_visual( osmesa->gl_visual );
FREE(osmesa);
return NULL;
diff --git a/src/mesa/drivers/svga/svgamesa.c b/src/mesa/drivers/svga/svgamesa.c
index c841f46f01..7e8f81083c 100644
--- a/src/mesa/drivers/svga/svgamesa.c
+++ b/src/mesa/drivers/svga/svgamesa.c
@@ -1,4 +1,4 @@
-/* $Id: svgamesa.c,v 1.17 2002/03/16 00:53:15 brianp Exp $ */
+/* $Id: svgamesa.c,v 1.18 2002/06/13 04:28:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -44,6 +44,7 @@
#include "GL/svgamesa.h"
#include "context.h"
#include "extensions.h"
+#include "imports.h"
#include "matrix.h"
#include "mtypes.h"
#include "swrast/swrast.h"
@@ -378,6 +379,8 @@ SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer )
GLfloat redscale, greenscale, bluescale, alphascale;
GLint index_bits;
GLint redbits, greenbits, bluebits, alphabits;
+ __GLimports imports;
+
/* determine if we're in RGB or color index mode */
if ((SVGABuffer.Depth==32) || (SVGABuffer.Depth==24)) {
rgb_flag = GL_TRUE;
@@ -426,9 +429,10 @@ SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer )
1 /* samples */
);
+ _mesa_init_default_imports( &imports, (void *) ctx);
ctx->gl_ctx = _mesa_create_context( ctx->gl_vis,
NULL, /* share list context */
- (void *) ctx, GL_TRUE );
+ &imports );
_mesa_enable_sw_extensions(ctx->gl_ctx);
_mesa_enable_1_3_extensions(ctx->gl_ctx);
diff --git a/src/mesa/drivers/windows/wmesa.c b/src/mesa/drivers/windows/wmesa.c
index f7d47247d6..b973264cfb 100644
--- a/src/mesa/drivers/windows/wmesa.c
+++ b/src/mesa/drivers/windows/wmesa.c
@@ -1,4 +1,4 @@
-/* $Id: wmesa.c,v 1.28 2002/04/23 18:39:09 kschultz Exp $ */
+/* $Id: wmesa.c,v 1.29 2002/06/13 04:28:30 brianp Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
@@ -36,6 +36,7 @@
#include "dd.h"
#include "depth.h"
#include "extensions.h"
+#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
@@ -1253,6 +1254,8 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
RECT CR;
WMesaContext c;
GLboolean true_color_flag;
+ __GLimports imports;
+
c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
if (!c)
return NULL;
@@ -1339,8 +1342,10 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
return NULL;
}
+ _mesa_init_default_imports( &imports, (void *) c );
+
/* allocate a new Mesa context */
- c->gl_ctx = _mesa_create_context( c->gl_visual, NULL, c, GL_TRUE);
+ c->gl_ctx = _mesa_create_context( c->gl_visual, NULL, &imports );
if (!c->gl_ctx) {
_mesa_destroy_visual( c->gl_visual );
diff --git a/src/mesa/drivers/windows/wmesa_stereo.c b/src/mesa/drivers/windows/wmesa_stereo.c
index 385f30b1b1..a4397c41bf 100644
--- a/src/mesa/drivers/windows/wmesa_stereo.c
+++ b/src/mesa/drivers/windows/wmesa_stereo.c
@@ -17,6 +17,7 @@
#include <GL\wmesa.h>
#include "context.h"
#include "dd.h"
+#include "imports.h"
#include "xform.h"
#include "vb.h"
#include "matrix.h"
@@ -1110,6 +1111,7 @@ WMesaContext /*APIENTRY*/ WMesaCreateContext( HWND hWnd, HPALETTE Pal,
//HDC DC;
RECT CR;
WMesaContext c;
+ __GLimports imports;
c = (struct wmesa_context * ) calloc(1,sizeof(struct wmesa_context));
if (!c)
@@ -1196,7 +1198,8 @@ WMesaContext /*APIENTRY*/ WMesaCreateContext( HWND hWnd, HPALETTE Pal,
}
/* allocate a new Mesa context */
- c->gl_ctx = _mesa_create_context( c->gl_visual, NULL,c);
+ _mesa_init_default_imports( &imports, (void *) c );
+ c->gl_ctx = _mesa_create_context( c->gl_visual, &imports );
if (!c->gl_ctx) {
_mesa_destroy_visual( c->gl_visual );
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index d155f145b8..46e7454b97 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1,4 +1,4 @@
-/* $Id: xm_api.c,v 1.36 2002/05/27 17:06:59 brianp Exp $ */
+/* $Id: xm_api.c,v 1.37 2002/06/13 04:28:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -69,6 +69,7 @@
#include "context.h"
#include "extensions.h"
#include "glthread.h"
+#include "imports.h"
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
@@ -1618,11 +1619,10 @@ void XMesaDestroyVisual( XMesaVisual v )
*/
XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
{
+ static GLboolean firstTime = GL_TRUE;
XMesaContext c;
GLcontext *ctx;
- GLboolean direct = GL_TRUE; /* XXXX */
- /* NOT_DONE: should this be GL_FALSE??? */
- static GLboolean firstTime = GL_TRUE;
+ __GLimports imports;
if (firstTime) {
_glthread_INIT_MUTEX(_xmesa_lock);
@@ -1634,9 +1634,10 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
return NULL;
}
+ _mesa_init_default_imports( &imports, (void *) c );
ctx = c->gl_ctx = _mesa_create_context( &v->mesa_visual,
share_list ? share_list->gl_ctx : (GLcontext *) NULL,
- (void *) c, direct );
+ &imports );
if (!c->gl_ctx) {
FREE(c);
return NULL;
@@ -1672,12 +1673,6 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
*/
xmesa_init_pointers( ctx );
-
- /* Run the config file
- */
- _mesa_read_config_file( ctx );
-
-
return c;
}