Header file clean-up:

1. Remove all.h and PC_HEADER junk.
2. Rolled mem.c and mem.h into imports.c and imports.h
3. Include imports.h instead of mem.h
Restore _mesa_create/initialize_context() to be like they were in 4.0.4
New wrappers for a few std C functions: _mesa_atoi(), _mesa_strstr(), etc.
This commit is contained in:
Brian Paul 2002-10-24 23:57:19 +00:00
parent d0add7cf1a
commit 3c63452e64
124 changed files with 809 additions and 770 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.70 2002/10/16 17:57:03 brianp Exp $
# $Id: Makefile.X11,v 1.71 2002/10/24 23:57:19 brianp Exp $
# Mesa 3-D graphics library
# Version: 4.1
@ -55,7 +55,6 @@ CORE_SOURCES = \
light.c \
lines.c \
matrix.c \
mem.c \
mmath.c \
pixel.c \
points.c \

View file

@ -1,4 +1,4 @@
/* $Id: ac_context.c,v 1.7 2002/04/21 19:39:48 brianp Exp $ */
/* $Id: ac_context.c,v 1.8 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -29,7 +29,7 @@
#include "glheader.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "mtypes.h"

View file

@ -1,4 +1,4 @@
/* $Id: ac_import.c,v 1.19 2002/04/21 21:03:02 brianp Exp $ */
/* $Id: ac_import.c,v 1.20 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -29,7 +29,7 @@
#include "glheader.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "mtypes.h"

View file

@ -329,7 +329,6 @@ AMesaContext AMesaCreateContext(AMesaVisual visual,
{
AMesaContext context;
GLboolean direct = GL_FALSE;
__GLimports imports;
context = (AMesaContext)calloc(1, sizeof(struct amesa_context));
if (!context)
@ -339,10 +338,9 @@ AMesaContext AMesaCreateContext(AMesaVisual visual,
context->Buffer = NULL;
context->ClearColor = 0;
context->CurrentColor = 0;
_mesa_init_default_imports( &imports, (void *) context);
context->GLContext = _mesa_create_context(visual->GLVisual,
share ? share->GLContext : NULL,
&imports );
(void *) context, GL_FALSE );
if (!context->GLContext)
{
free(context);

View file

@ -31,9 +31,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "GL/dmesa.h"
@ -54,7 +51,6 @@
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
#endif
#include "video.h"

View file

@ -457,7 +457,6 @@ ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis)
int err;
ggi_color pal[256];
int i;
__GLimports imports;
GGIMESADPRINT_CORE("ggiMesaCreateContext() called\n");
@ -468,10 +467,9 @@ 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, &imports);
NULL, (void *) ctx, GL_FALSE);
if (!ctx->gl_ctx)
goto free_context;

View file

@ -1,4 +1,4 @@
/* $Id: fxapi.c,v 1.34 2002/10/14 17:08:25 brianp Exp $ */
/* $Id: fxapi.c,v 1.35 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -283,7 +283,6 @@ fxMesaCreateContext(GLuint win,
char *errorstr;
GLboolean useBGR;
char *system = NULL;
__GLimports imports;
if (MESA_VERBOSE & VERBOSE_DRIVER) {
fprintf(stderr, "fxmesa: fxMesaCreateContext() Start\n");
@ -509,10 +508,9 @@ fxMesaCreateContext(GLuint win,
goto errorhandler;
}
_mesa_init_default_imports( &imports, (void *) fxMesa);
ctx = fxMesa->glCtx = _mesa_create_context(fxMesa->glVis,
shareCtx,
&imports);
(void *) fxMesa, GL_TRUE);
if (!ctx) {
errorstr = "_mesa_create_context";
goto errorhandler;

View file

@ -1,4 +1,4 @@
/* $Id: fxdrv.h,v 1.53 2002/06/13 04:28:30 brianp Exp $ */
/* $Id: fxdrv.h,v 1.54 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -52,7 +52,6 @@
#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
#include "mtypes.h"
#include "GL/fxmesa.h"

View file

@ -1,4 +1,4 @@
/* $Id: fxtris.c,v 1.19 2002/08/21 02:56:58 brianp Exp $ */
/* $Id: fxtris.c,v 1.20 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,16 +28,10 @@
* Keith Whitwell <keithw@valinux.com>
*/
#ifdef HAVE_CONFIG_H
#include "conf.h"
#endif
#include "glheader.h"
#ifdef FX
#include <stdio.h>
#include <math.h>
#include "glheader.h"
#include "mtypes.h"
#include "macros.h"
#include "colormac.h"

View file

@ -1,4 +1,4 @@
/* $Id: fxvb.c,v 1.14 2002/06/15 03:03:10 brianp Exp $ */
/* $Id: fxvb.c,v 1.15 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -37,7 +37,7 @@
#include "glheader.h"
#include "mtypes.h"
#include "mem.h"
#include "imports.h"
#include "macros.h"
#include "colormac.h"
#include "mmath.h"

View file

@ -1,4 +1,4 @@
/* $Id: fxwgl.c,v 1.15 2002/09/04 14:14:36 brianp Exp $ */
/* $Id: fxwgl.c,v 1.16 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -42,9 +42,9 @@ extern "C"
{
#endif
#include "fxdrv.h"
#include <windows.h>
#include "GL/gl.h"
#include "glheader.h"
#include "fxdrv.h"
#include "glapi.h"
#ifdef __cplusplus

View file

@ -1,4 +1,4 @@
/* $Id: osmesa.c,v 1.92 2002/10/17 15:26:38 brianp Exp $ */
/* $Id: osmesa.c,v 1.93 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -45,7 +45,6 @@
#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
@ -139,7 +138,6 @@ 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) {
@ -292,12 +290,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,
&imports)) {
(void *) osmesa,
GL_FALSE)) {
_mesa_destroy_visual( osmesa->gl_visual );
FREE(osmesa);
return NULL;

View file

@ -1,4 +1,4 @@
/* $Id: svgamesa.c,v 1.21 2002/10/14 17:08:27 brianp Exp $ */
/* $Id: svgamesa.c,v 1.22 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -34,9 +34,6 @@
#ifdef SVGA
#ifdef PC_HEADER
#include "all.h"
#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -48,8 +45,6 @@
#include "matrix.h"
#include "mtypes.h"
#include "swrast/swrast.h"
#endif
#include "svgapix.h"
#include "svgamesa8.h"
#include "svgamesa15.h"
@ -355,7 +350,6 @@ 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)) {
@ -405,10 +399,9 @@ 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 */
&imports );
(void *) ctx, GL_FALSE );
_mesa_enable_sw_extensions(ctx->gl_ctx);
_mesa_enable_1_3_extensions(ctx->gl_ctx);

View file

@ -1,4 +1,4 @@
/* $Id: wmesa.c,v 1.40 2002/10/14 17:08:28 brianp Exp $ */
/* $Id: wmesa.c,v 1.41 2002/10/24 23:57:23 brianp Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
@ -39,7 +39,6 @@
#include "imports.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
@ -1255,7 +1254,6 @@ 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)
@ -1343,10 +1341,8 @@ 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, &imports );
c->gl_ctx = _mesa_create_context( c->gl_visual, NULL, (void *) c, GL_FALSE );
if (!c->gl_ctx) {
_mesa_destroy_visual( c->gl_visual );

View file

@ -1115,7 +1115,6 @@ 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)
@ -1202,8 +1201,7 @@ WMesaContext /*APIENTRY*/ WMesaCreateContext( HWND hWnd, HPALETTE Pal,
}
/* allocate a new Mesa context */
_mesa_init_default_imports( &imports, (void *) c );
c->gl_ctx = _mesa_create_context( c->gl_visual, &imports );
c->gl_ctx = _mesa_create_context( c->gl_visual, NULL, (void *) g, GL_FALSE );
if (!c->gl_ctx) {
_mesa_destroy_visual( c->gl_visual );

View file

@ -1,4 +1,4 @@
/* $Id: fakeglx.c,v 1.69 2002/10/05 18:27:41 brianp Exp $ */
/* $Id: fakeglx.c,v 1.70 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -48,7 +48,7 @@
#include "context.h"
#include "config.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "mtypes.h"
#include "xfonts.h"
@ -1823,7 +1823,7 @@ Fake_glXChooseFBConfig( Display *dpy, int screen,
{
XMesaVisual xmvis = choose_visual(dpy, screen, attribList);
if (xmvis) {
GLXFBConfig *config = malloc(sizeof(XMesaVisual));
GLXFBConfig *config = _mesa_malloc(sizeof(XMesaVisual));
if (!config) {
*nitems = 0;
return NULL;
@ -1866,7 +1866,7 @@ Fake_glXGetFBConfigs( Display *dpy, int screen, int *nelements )
visuals = XGetVisualInfo(dpy, visMask, &visTemplate, nelements);
if (*nelements > 0) {
XMesaVisual *results;
results = malloc(*nelements * sizeof(XMesaVisual));
results = _mesa_malloc(*nelements * sizeof(XMesaVisual));
if (!results) {
*nelements = 0;
return NULL;

View file

@ -1,4 +1,4 @@
/* $Id: xfonts.c,v 1.14 2001/04/26 19:28:02 brianp Exp $ */
/* $Id: xfonts.c,v 1.15 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -33,19 +33,9 @@
#include <GL/vms_x_fix.h>
#endif
#ifdef HAVE_CONFIG_H
#include "conf.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "GL/gl.h"
#include "GL/glx.h"
#include "glxheader.h"
#include "context.h"
#include "mem.h"
#include "imports.h"
#include "xfonts.h"

View file

@ -1,4 +1,4 @@
/* $Id: xm_api.c,v 1.45 2002/10/14 17:08:34 brianp Exp $ */
/* $Id: xm_api.c,v 1.46 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -71,12 +71,8 @@
#include "glthread.h"
#include "imports.h"
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
#ifdef HAVE_CONFIG_H
#include "conf.h"
#endif
#include "macros.h"
#include "texformat.h"
#include "texstore.h"
@ -1619,7 +1615,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
static GLboolean firstTime = GL_TRUE;
XMesaContext c;
GLcontext *ctx;
__GLimports imports;
GLboolean direct = GL_TRUE; /* not really */
if (firstTime) {
_glthread_INIT_MUTEX(_xmesa_lock);
@ -1631,10 +1627,9 @@ 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,
&imports );
(void *) c, direct);
if (!c->gl_ctx) {
FREE(c);
return NULL;

View file

@ -1,4 +1,4 @@
/* $Id: xm_dd.c,v 1.39 2002/10/14 17:08:38 brianp Exp $ */
/* $Id: xm_dd.c,v 1.40 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,7 +32,7 @@
#include "drawpix.h"
#include "extensions.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"
#include "texstore.h"

View file

@ -1,4 +1,4 @@
/* $Id: xm_span.c,v 1.16 2002/10/04 19:10:12 brianp Exp $ */
/* $Id: xm_span.c,v 1.17 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,7 +32,7 @@
#include "drawpix.h"
#include "extensions.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"
#include "xmesaP.h"

View file

@ -1,4 +1,4 @@
/* $Id: xm_tri.c,v 1.27 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: xm_tri.c,v 1.28 2002/10/24 23:57:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -35,7 +35,7 @@
#include "glxheader.h"
#include "depth.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "mtypes.h"
#include "xmesaP.h"

View file

@ -1,10 +1,10 @@
/* $Id: glthread.c,v 1.9 2001/11/12 23:50:12 brianp Exp $ */
/* $Id: glthread.c,v 1.10 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
* Version: 4.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -31,12 +31,8 @@
*/
#ifdef PC_ALL
#include "all.h"
#else
#include "glheader.h"
#include "glthread.h"
#endif
/*

View file

@ -1,4 +1,4 @@
# $Id: Makefile.X11,v 1.70 2002/10/16 17:57:03 brianp Exp $
# $Id: Makefile.X11,v 1.71 2002/10/24 23:57:19 brianp Exp $
# Mesa 3-D graphics library
# Version: 4.1
@ -55,7 +55,6 @@ CORE_SOURCES = \
light.c \
lines.c \
matrix.c \
mem.c \
mmath.c \
pixel.c \
points.c \

View file

@ -1,10 +1,10 @@
/* $Id: accum.c,v 1.38 2001/09/14 21:36:43 brianp Exp $ */
/* $Id: accum.c,v 1.39 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
* Version: 4.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -24,20 +24,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "accum.h"
#include "context.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "state.h"
#include "mtypes.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: api_arrayelt.c,v 1.9 2002/06/15 02:38:15 brianp Exp $ */
/* $Id: api_arrayelt.c,v 1.10 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,7 +32,7 @@
#include "api_arrayelt.h"
#include "context.h"
#include "glapi.h"
#include "mem.h"
#include "imports.h"
#include "macros.h"
#include "mtypes.h"

View file

@ -1,4 +1,4 @@
/* $Id: api_validate.c,v 1.6 2002/04/21 21:04:46 brianp Exp $ */
/* $Id: api_validate.c,v 1.7 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -27,6 +27,7 @@
#include "glheader.h"
#include "api_validate.h"
#include "context.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"

View file

@ -1,4 +1,4 @@
/* $Id: attrib.c,v 1.74 2002/10/17 22:26:06 kschultz Exp $ */
/* $Id: attrib.c,v 1.75 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,11 +24,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "accum.h"
#include "attrib.h"
#include "blend.h"
@ -43,7 +40,6 @@
#include "light.h"
#include "lines.h"
#include "matrix.h"
#include "mem.h"
#include "points.h"
#include "polygon.h"
#include "simple_list.h"
@ -52,9 +48,6 @@
#include "texstate.h"
#include "mtypes.h"
#include "math/m_xform.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: blend.c,v 1.37 2002/10/04 19:10:07 brianp Exp $ */
/* $Id: blend.c,v 1.38 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "blend.h"
#include "colormac.h"
@ -35,7 +32,6 @@
#include "enums.h"
#include "macros.h"
#include "mtypes.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: buffers.c,v 1.41 2002/10/11 17:41:03 brianp Exp $ */
/* $Id: buffers.c,v 1.42 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,10 +25,8 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "accum.h"
#include "buffers.h"
#include "colormac.h"
@ -36,11 +34,9 @@
#include "depth.h"
#include "enums.h"
#include "macros.h"
#include "mem.h"
#include "stencil.h"
#include "state.h"
#include "mtypes.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: clip.c,v 1.25 2002/03/29 17:29:12 brianp Exp $ */
/* $Id: clip.c,v 1.26 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "clip.h"
#include "context.h"
@ -37,7 +34,6 @@
#include "math/m_xform.h"
#include "math/m_matrix.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: colortab.c,v 1.45 2002/07/09 01:22:50 brianp Exp $ */
/* $Id: colortab.c,v 1.46 2002/10/24 23:57:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,19 +25,14 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "colortab.h"
#include "context.h"
#include "image.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "state.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: context.c,v 1.185 2002/10/16 17:57:51 brianp Exp $ */
/* $Id: context.c,v 1.186 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,10 +25,8 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "buffers.h"
#include "clip.h"
#include "colortab.h"
@ -43,7 +41,6 @@
#include "hash.h"
#include "light.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "simple_list.h"
#include "state.h"
@ -58,7 +55,7 @@
#include "math/m_matrix.h"
#include "math/m_xform.h"
#include "math/mathmod.h"
#endif
#if defined(MESA_TRACE)
#include "Trace/tr_context.h"
@ -94,7 +91,7 @@ _mesa_destroyContext(__GLcontext *gc)
{
if (gc) {
_mesa_free_context_data(gc);
(*gc->imports.free)(gc, gc);
_mesa_free(gc);
}
return GL_TRUE;
}
@ -240,9 +237,8 @@ __glCoreCreateContext(__GLimports *imports, __GLcontextModes *modes)
return NULL;
}
_mesa_initialize_context(ctx, modes, NULL, imports, GL_FALSE);
ctx->imports = *imports;
_mesa_init_default_exports(&(ctx->exports));
_mesa_initialize_context(ctx, modes, NULL, imports);
return ctx;
}
@ -561,7 +557,7 @@ one_time_init( GLcontext *ctx )
#ifdef USE_SPARC_ASM
_mesa_init_sparc_glapi_relocs();
#endif
if ((*ctx->imports.getenv)(ctx, "MESA_DEBUG")) {
if (_mesa_getenv("MESA_DEBUG")) {
_glapi_noop_enable_warnings(GL_TRUE);
#ifndef GLX_DIRECT_RENDERING
/* libGL from before 2002/06/28 don't have this function. Someday,
@ -1477,13 +1473,13 @@ init_attrib_groups( GLcontext *ctx )
ctx->_Facing = 0;
/* For debug/development only */
ctx->NoRaster = (*ctx->imports.getenv)(ctx, "MESA_NO_RASTER") ? GL_TRUE : GL_FALSE;
ctx->NoRaster = _mesa_getenv("MESA_NO_RASTER") ? GL_TRUE : GL_FALSE;
ctx->FirstTimeCurrent = GL_TRUE;
/* Dither disable */
ctx->NoDither = (*ctx->imports.getenv)(ctx, "MESA_NO_DITHER") ? GL_TRUE : GL_FALSE;
ctx->NoDither = _mesa_getenv("MESA_NO_DITHER") ? GL_TRUE : GL_FALSE;
if (ctx->NoDither) {
if ((*ctx->imports.getenv)(ctx, "MESA_DEBUG")) {
if (_mesa_getenv("MESA_DEBUG")) {
_mesa_debug(ctx, "MESA_NO_DITHER set - dithering disabled\n");
}
ctx->Color.DitherFlag = GL_FALSE;
@ -1592,36 +1588,36 @@ alloc_proxy_textures( GLcontext *ctx )
static void add_debug_flags( const char *debug )
{
#ifdef MESA_DEBUG
if (strstr(debug, "varray"))
if (_mesa_strstr(debug, "varray"))
MESA_VERBOSE |= VERBOSE_VARRAY;
if (strstr(debug, "tex"))
if (_mesa_strstr(debug, "tex"))
MESA_VERBOSE |= VERBOSE_TEXTURE;
if (strstr(debug, "imm"))
if (_mesa_strstr(debug, "imm"))
MESA_VERBOSE |= VERBOSE_IMMEDIATE;
if (strstr(debug, "pipe"))
if (_mesa_strstr(debug, "pipe"))
MESA_VERBOSE |= VERBOSE_PIPELINE;
if (strstr(debug, "driver"))
if (_mesa_strstr(debug, "driver"))
MESA_VERBOSE |= VERBOSE_DRIVER;
if (strstr(debug, "state"))
if (_mesa_strstr(debug, "state"))
MESA_VERBOSE |= VERBOSE_STATE;
if (strstr(debug, "api"))
if (_mesa_strstr(debug, "api"))
MESA_VERBOSE |= VERBOSE_API;
if (strstr(debug, "list"))
if (_mesa_strstr(debug, "list"))
MESA_VERBOSE |= VERBOSE_DISPLAY_LIST;
if (strstr(debug, "lighting"))
if (_mesa_strstr(debug, "lighting"))
MESA_VERBOSE |= VERBOSE_LIGHTING;
/* Debug flag:
*/
if (strstr(debug, "flush"))
if (_mesa_strstr(debug, "flush"))
MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
#endif
}
@ -1635,16 +1631,18 @@ GLboolean
_mesa_initialize_context( GLcontext *ctx,
const GLvisual *visual,
GLcontext *share_list,
const __GLimports *imports )
void *driver_ctx,
GLboolean direct )
{
GLuint dispatchSize;
const char *c;
ASSERT(imports);
ASSERT(imports->other); /* other points to the device driver's context */
ASSERT(driver_ctx);
/* assing imports */
ctx->imports = *imports;
/* If the driver wants core Mesa to use special imports, it'll have to
* override these defaults.
*/
_mesa_init_default_imports( &(ctx->imports), driver_ctx );
/* initialize the exports (Mesa functions called by the window system) */
_mesa_init_default_exports( &(ctx->exports) );
@ -1652,17 +1650,7 @@ _mesa_initialize_context( GLcontext *ctx,
/* misc one-time initializations */
one_time_init(ctx);
#if 0
/**
** OpenGL SI stuff
**/
if (!ctx->imports.malloc) {
_mesa_init_default_imports(&ctx->imports, driver_ctx);
}
/* exports are setup by the device driver */
#endif
ctx->DriverCtx = imports->other;
ctx->DriverCtx = driver_ctx;
ctx->Visual = *visual;
ctx->DrawBuffer = NULL;
ctx->ReadBuffer = NULL;
@ -1860,11 +1848,11 @@ _mesa_initialize_context( GLcontext *ctx,
}
ctx->MRD = 1.0; /* Minimum resolvable depth value, for polygon offset */
c = (*ctx->imports.getenv)(ctx, "MESA_DEBUG");
c = _mesa_getenv("MESA_DEBUG");
if (c)
add_debug_flags(c);
c = (*ctx->imports.getenv)(ctx, "MESA_VERBOSE");
c = _mesa_getenv("MESA_VERBOSE");
if (c)
add_debug_flags(c);
@ -1877,29 +1865,31 @@ _mesa_initialize_context( GLcontext *ctx,
* Allocate and initialize a GLcontext structure.
* Input: visual - a GLvisual pointer (we copy the struct contents)
* sharelist - another context to share display lists with or NULL
* imports - points to a fully-initialized __GLimports object.
* driver_ctx - pointer to device driver's context state struct
* direct - direct rendering?
* Return: pointer to a new __GLcontextRec or NULL if error.
*/
GLcontext *
_mesa_create_context( const GLvisual *visual,
GLcontext *share_list,
const __GLimports *imports )
void *driver_ctx,
GLboolean direct )
{
GLcontext *ctx;
ASSERT(visual);
ASSERT(imports);
ASSERT(imports->calloc);
ASSERT(driver_ctx);
ctx = (GLcontext *) (*imports->calloc)(NULL, 1, sizeof(GLcontext));
ctx = (GLcontext *) _mesa_calloc(sizeof(GLcontext));
if (!ctx)
return NULL;
if (_mesa_initialize_context(ctx, visual, share_list, imports)) {
if (_mesa_initialize_context(ctx, visual, share_list, driver_ctx, direct)) {
return ctx;
}
else {
(*imports->free)(NULL, ctx);
_mesa_free(ctx);
return NULL;
}
}
@ -2281,7 +2271,7 @@ _mesa_make_current2( GLcontext *newCtx, GLframebuffer *drawBuffer,
* information.
*/
if (newCtx->FirstTimeCurrent) {
if ((*newCtx->imports.getenv)(newCtx, "MESA_INFO")) {
if (_mesa_getenv("MESA_INFO")) {
print_info();
}
newCtx->FirstTimeCurrent = GL_FALSE;

View file

@ -1,4 +1,4 @@
/* $Id: context.h,v 1.34 2002/10/14 17:08:21 brianp Exp $ */
/* $Id: context.h,v 1.35 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,7 +31,6 @@
#include "glapi.h"
#include "mtypes.h"
#include "imports.h"
/*
@ -128,13 +127,15 @@ _mesa_destroy_framebuffer( GLframebuffer *buffer );
extern GLcontext *
_mesa_create_context( const GLvisual *visual,
GLcontext *share_list,
const __GLimports *imports );
void *driver_ctx,
GLboolean direct );
extern GLboolean
_mesa_initialize_context( GLcontext *ctx,
const GLvisual *visual,
GLcontext *share_list,
const __GLimports *imports );
void *driver_ctx,
GLboolean direct );
extern void
_mesa_free_context_data( GLcontext *ctx );

View file

@ -1,8 +1,8 @@
/* $Id: convolve.c,v 1.27 2002/07/09 01:22:50 brianp Exp $ */
/* $Id: convolve.c,v 1.28 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.0.2
* Version: 4.1
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
@ -33,9 +33,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "convolve.h"
@ -43,7 +40,6 @@
#include "image.h"
#include "mtypes.h"
#include "state.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: debug.c,v 1.13 2002/06/29 19:48:15 brianp Exp $ */
/* $Id: debug.c,v 1.14 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -26,9 +26,12 @@
#include "mtypes.h"
#include "context.h"
#include "imports.h"
#include "debug.h"
void _mesa_print_state( const char *msg, GLuint state )
void
_mesa_print_state( const char *msg, GLuint state )
{
_mesa_debug(NULL,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
@ -62,7 +65,8 @@ void _mesa_print_state( const char *msg, GLuint state )
void _mesa_print_tri_caps( const char *name, GLuint flags )
void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",

View file

@ -1,4 +1,4 @@
/* $Id: depth.c,v 1.30 2002/06/15 02:38:15 brianp Exp $ */
/* $Id: depth.c,v 1.31 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,18 +25,13 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "enums.h"
#include "depth.h"
#include "macros.h"
#include "mem.h"
#include "mtypes.h"
#endif
/**********************************************************************/

View file

@ -1,4 +1,4 @@
/* $Id: dispatch.c,v 1.27 2002/06/29 19:48:15 brianp Exp $ */
/* $Id: dispatch.c,v 1.28 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -36,14 +36,11 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "glapi.h"
#include "glapitable.h"
#include "glthread.h"
#endif
#if !(defined(USE_X86_ASM) || defined(USE_SPARC_ASM))

View file

@ -1,4 +1,4 @@
/* $Id: dlist.c,v 1.98 2002/10/16 17:57:51 brianp Exp $ */
/* $Id: dlist.c,v 1.99 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,11 +24,8 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "api_loopback.h"
#include "attrib.h"
#include "blend.h"
@ -55,7 +52,6 @@
#include "dlist.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
#include "pixel.h"
#include "points.h"
#include "polygon.h"
@ -72,8 +68,6 @@
#include "math/m_matrix.h"
#include "math/m_xform.h"
#endif
/*
@ -4880,8 +4874,8 @@ execute_list( GLcontext *ctx, GLuint list )
default:
{
char msg[1000];
_mesa_sprintf( ctx, msg, "Error in execute_list: opcode=%d", (int) opcode);
_mesa_problem( ctx, msg );
_mesa_sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode);
_mesa_problem(ctx, msg);
}
done = GL_TRUE;
}
@ -6275,13 +6269,13 @@ static void print_list( GLcontext *ctx, GLuint list )
GLboolean done;
if (!glIsList(list)) {
_mesa_printf(ctx, "%u is not a display list ID\n", list);
_mesa_printf("%u is not a display list ID\n", list);
return;
}
n = (Node *) _mesa_HashLookup(ctx->Shared->DisplayList, list);
_mesa_printf(ctx, "START-LIST %u, address %p\n", list, (void*)n );
_mesa_printf("START-LIST %u, address %p\n", list, (void*)n );
done = n ? GL_FALSE : GL_TRUE;
while (!done) {
@ -6295,136 +6289,136 @@ static void print_list( GLcontext *ctx, GLuint list )
else {
switch (opcode) {
case OPCODE_ACCUM:
_mesa_printf(ctx, "accum %s %g\n", enum_string(n[1].e), n[2].f );
_mesa_printf("accum %s %g\n", enum_string(n[1].e), n[2].f );
break;
case OPCODE_BITMAP:
_mesa_printf(ctx, "Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i,
_mesa_printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i,
n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data );
break;
case OPCODE_CALL_LIST:
_mesa_printf(ctx, "CallList %d\n", (int) n[1].ui );
_mesa_printf("CallList %d\n", (int) n[1].ui );
break;
case OPCODE_CALL_LIST_OFFSET:
_mesa_printf(ctx, "CallList %d + offset %u = %u\n", (int) n[1].ui,
_mesa_printf("CallList %d + offset %u = %u\n", (int) n[1].ui,
ctx->List.ListBase, ctx->List.ListBase + n[1].ui );
break;
case OPCODE_COLOR_TABLE_PARAMETER_FV:
_mesa_printf(ctx, "ColorTableParameterfv %s %s %f %f %f %f\n",
_mesa_printf("ColorTableParameterfv %s %s %f %f %f %f\n",
enum_string(n[1].e), enum_string(n[2].e),
n[3].f, n[4].f, n[5].f, n[6].f);
break;
case OPCODE_COLOR_TABLE_PARAMETER_IV:
_mesa_printf(ctx, "ColorTableParameteriv %s %s %d %d %d %d\n",
_mesa_printf("ColorTableParameteriv %s %s %d %d %d %d\n",
enum_string(n[1].e), enum_string(n[2].e),
n[3].i, n[4].i, n[5].i, n[6].i);
break;
case OPCODE_DISABLE:
_mesa_printf(ctx, "Disable %s\n", enum_string(n[1].e));
_mesa_printf("Disable %s\n", enum_string(n[1].e));
break;
case OPCODE_ENABLE:
_mesa_printf(ctx, "Enable %s\n", enum_string(n[1].e));
_mesa_printf("Enable %s\n", enum_string(n[1].e));
break;
case OPCODE_FRUSTUM:
_mesa_printf(ctx, "Frustum %g %g %g %g %g %g\n",
_mesa_printf("Frustum %g %g %g %g %g %g\n",
n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f );
break;
case OPCODE_LINE_STIPPLE:
_mesa_printf(ctx, "LineStipple %d %x\n", n[1].i, (int) n[2].us );
_mesa_printf("LineStipple %d %x\n", n[1].i, (int) n[2].us );
break;
case OPCODE_LOAD_IDENTITY:
_mesa_printf(ctx, "LoadIdentity\n");
_mesa_printf("LoadIdentity\n");
break;
case OPCODE_LOAD_MATRIX:
_mesa_printf(ctx, "LoadMatrix\n");
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf("LoadMatrix\n");
_mesa_printf(" %8f %8f %8f %8f\n",
n[1].f, n[5].f, n[9].f, n[13].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[2].f, n[6].f, n[10].f, n[14].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[3].f, n[7].f, n[11].f, n[15].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[4].f, n[8].f, n[12].f, n[16].f);
break;
case OPCODE_MULT_MATRIX:
_mesa_printf(ctx, "MultMatrix (or Rotate)\n");
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf("MultMatrix (or Rotate)\n");
_mesa_printf(" %8f %8f %8f %8f\n",
n[1].f, n[5].f, n[9].f, n[13].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[2].f, n[6].f, n[10].f, n[14].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[3].f, n[7].f, n[11].f, n[15].f);
_mesa_printf(ctx, " %8f %8f %8f %8f\n",
_mesa_printf(" %8f %8f %8f %8f\n",
n[4].f, n[8].f, n[12].f, n[16].f);
break;
case OPCODE_ORTHO:
_mesa_printf(ctx, "Ortho %g %g %g %g %g %g\n",
_mesa_printf("Ortho %g %g %g %g %g %g\n",
n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f );
break;
case OPCODE_POP_ATTRIB:
_mesa_printf(ctx, "PopAttrib\n");
_mesa_printf("PopAttrib\n");
break;
case OPCODE_POP_MATRIX:
_mesa_printf(ctx, "PopMatrix\n");
_mesa_printf("PopMatrix\n");
break;
case OPCODE_POP_NAME:
_mesa_printf(ctx, "PopName\n");
_mesa_printf("PopName\n");
break;
case OPCODE_PUSH_ATTRIB:
_mesa_printf(ctx, "PushAttrib %x\n", n[1].bf );
_mesa_printf("PushAttrib %x\n", n[1].bf );
break;
case OPCODE_PUSH_MATRIX:
_mesa_printf(ctx, "PushMatrix\n");
_mesa_printf("PushMatrix\n");
break;
case OPCODE_PUSH_NAME:
_mesa_printf(ctx, "PushName %d\n", (int) n[1].ui );
_mesa_printf("PushName %d\n", (int) n[1].ui );
break;
case OPCODE_RASTER_POS:
_mesa_printf(ctx, "RasterPos %g %g %g %g\n",
_mesa_printf("RasterPos %g %g %g %g\n",
n[1].f, n[2].f,n[3].f,n[4].f);
break;
case OPCODE_ROTATE:
_mesa_printf(ctx, "Rotate %g %g %g %g\n",
_mesa_printf("Rotate %g %g %g %g\n",
n[1].f, n[2].f, n[3].f, n[4].f );
break;
case OPCODE_SCALE:
_mesa_printf(ctx, "Scale %g %g %g\n", n[1].f, n[2].f, n[3].f );
_mesa_printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f );
break;
case OPCODE_TRANSLATE:
_mesa_printf(ctx, "Translate %g %g %g\n", n[1].f, n[2].f, n[3].f );
_mesa_printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f );
break;
case OPCODE_BIND_TEXTURE:
_mesa_printf(ctx, "BindTexture %s %d\n",
_mesa_printf("BindTexture %s %d\n",
_mesa_lookup_enum_by_nr(n[1].ui), n[2].ui);
break;
case OPCODE_SHADE_MODEL:
_mesa_printf(ctx, "ShadeModel %s\n",
_mesa_printf("ShadeModel %s\n",
_mesa_lookup_enum_by_nr(n[1].ui));
break;
case OPCODE_MAP1:
_mesa_printf(ctx, "Map1 %s %.3f %.3f %d %d\n",
_mesa_printf("Map1 %s %.3f %.3f %d %d\n",
_mesa_lookup_enum_by_nr(n[1].ui),
n[2].f, n[3].f, n[4].i, n[5].i);
break;
case OPCODE_MAP2:
_mesa_printf(ctx, "Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",
_mesa_printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",
_mesa_lookup_enum_by_nr(n[1].ui),
n[2].f, n[3].f, n[4].f, n[5].f,
n[6].i, n[7].i, n[8].i, n[9].i);
break;
case OPCODE_MAPGRID1:
_mesa_printf(ctx, "MapGrid1 %d %.3f %.3f\n",
_mesa_printf("MapGrid1 %d %.3f %.3f\n",
n[1].i, n[2].f, n[3].f);
break;
case OPCODE_MAPGRID2:
_mesa_printf(ctx, "MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n",
_mesa_printf("MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n",
n[1].i, n[2].f, n[3].f,
n[4].i, n[5].f, n[6].f);
break;
case OPCODE_EVALMESH1:
_mesa_printf(ctx, "EvalMesh1 %d %d\n", n[1].i, n[2].i);
_mesa_printf("EvalMesh1 %d %d\n", n[1].i, n[2].i);
break;
case OPCODE_EVALMESH2:
_mesa_printf(ctx, "EvalMesh2 %d %d %d %d\n",
_mesa_printf("EvalMesh2 %d %d %d %d\n",
n[1].i, n[2].i, n[3].i, n[4].i);
break;
@ -6432,27 +6426,25 @@ static void print_list( GLcontext *ctx, GLuint list )
* meta opcodes/commands
*/
case OPCODE_ERROR:
_mesa_printf(ctx, "Error: %s %s\n",
_mesa_printf("Error: %s %s\n",
enum_string(n[1].e), (const char *)n[2].data );
break;
case OPCODE_CONTINUE:
_mesa_printf(ctx, "DISPLAY-LIST-CONTINUE\n");
_mesa_printf("DISPLAY-LIST-CONTINUE\n");
n = (Node *) n[1].next;
break;
case OPCODE_END_OF_LIST:
_mesa_printf(ctx, "END-LIST %u\n", list);
_mesa_printf("END-LIST %u\n", list);
done = GL_TRUE;
break;
default:
if (opcode < 0 || opcode > OPCODE_END_OF_LIST) {
_mesa_printf(ctx,
"ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
opcode, (void*) n);
_mesa_printf("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n",
opcode, (void*) n);
return;
}
else {
_mesa_printf(ctx, "command %d, %u operands\n",
opcode, InstSize[opcode]);
_mesa_printf("command %d, %u operands\n", opcode, InstSize[opcode]);
}
}
/* increment n to point to next compiled command */

View file

@ -1,4 +1,4 @@
/* $Id: drawpix.c,v 1.62 2002/08/21 16:39:39 brianp Exp $ */
/* $Id: drawpix.c,v 1.63 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,22 +24,16 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "drawpix.h"
#include "feedback.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "state.h"
#include "mtypes.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: enable.c,v 1.70 2002/10/16 17:57:51 brianp Exp $ */
/* $Id: enable.c,v 1.71 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "enable.h"
@ -39,7 +36,7 @@
#include "enums.h"
#include "math/m_matrix.h"
#include "math/m_xform.h"
#endif
#define CHECK_EXTENSION(EXTNAME, CAP) \

View file

@ -1,4 +1,4 @@
/* $Id: enums.c,v 1.21 2002/06/29 19:48:15 brianp Exp $ */
/* $Id: enums.c,v 1.22 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,14 +28,9 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "enums.h"
#include "imports.h"
#include "mem.h"
#endif
typedef struct {
@ -929,7 +924,7 @@ const char *_mesa_lookup_enum_by_nr( int nr )
}
else {
/* this isn't re-entrant safe, no big deal here */
_mesa_sprintf(NULL, token_tmp, "0x%x", nr);
_mesa_sprintf(token_tmp, "0x%x", nr);
return token_tmp;
}
}

View file

@ -1,4 +1,4 @@
/* $Id: eval.c,v 1.23 2002/01/05 21:58:42 brianp Exp $ */
/* $Id: eval.c,v 1.24 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -38,18 +38,14 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "eval.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: extensions.c,v 1.83 2002/10/21 15:52:34 brianp Exp $ */
/* $Id: extensions.c,v 1.84 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,17 +24,12 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "extensions.h"
#include "mem.h"
#include "simple_list.h"
#include "mtypes.h"
#endif
#define MAX_EXT_NAMELEN 80

View file

@ -1,4 +1,4 @@
/* $Id: feedback.c,v 1.26 2002/06/15 02:54:01 brianp Exp $ */
/* $Id: feedback.c,v 1.27 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
@ -36,7 +33,6 @@
#include "macros.h"
#include "mmath.h"
#include "mtypes.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: fog.c,v 1.35 2001/05/30 14:43:17 brianp Exp $ */
/* $Id: fog.c,v 1.36 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,15 +25,11 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "fog.h"
#include "mtypes.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: get.c,v 1.96 2002/10/16 17:57:52 brianp Exp $ */
/* $Id: get.c,v 1.97 2002/10/24 23:57:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
@ -40,7 +37,6 @@
#include "mtypes.h"
#include "texcompress.h"
#include "math/m_matrix.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: hash.c,v 1.13 2002/09/16 17:55:36 brianp Exp $ */
/* $Id: hash.c,v 1.14 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,16 +24,11 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "glthread.h"
#include "hash.h"
#include "context.h"
#include "mem.h"
#endif
/**

View file

@ -1,4 +1,4 @@
/* $Id: hint.c,v 1.13 2002/06/15 02:54:02 brianp Exp $ */
/* $Id: hint.c,v 1.14 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,15 +25,11 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "enums.h"
#include "context.h"
#include "hint.h"
#include "state.h"
#endif
#include "imports.h"

View file

@ -1,4 +1,4 @@
/* $Id: histogram.c,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
/* $Id: histogram.c,v 1.11 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,16 +25,12 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "image.h"
#include "histogram.h"
#include "mmath.h"
#endif
/*

View file

@ -1,10 +1,10 @@
/* $Id: histogram.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
/* $Id: histogram.h,v 1.4 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
* Version: 4.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -28,14 +28,8 @@
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "mtypes.h"
#endif
extern void _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values);

View file

@ -1,4 +1,4 @@
/* $Id: image.c,v 1.68 2002/09/21 17:34:56 brianp Exp $ */
/* $Id: image.c,v 1.69 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,22 +24,16 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "image.h"
#include "imports.h"
#include "histogram.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "pixel.h"
#include "mtypes.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: imports.c,v 1.20 2002/10/15 15:36:26 brianp Exp $ */
/* $Id: imports.c,v 1.21 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,12 +32,17 @@
* etc.
*
* Some drivers will want to override/replace this file with something
* specialized, but most Mesa drivers will be able to call
*_mesa_init_default_imports() and go with what's here.
* specialized, but that'll be rare.
*
* Eventually, I'd like to move most of the stuff in glheader.h and mem.[ch]
* into imports.[ch]. Then we'll really have one, single place where
* all OS-related dependencies are isolated.
* Eventually, I want to move roll the glheader.h file into this.
*
* The OpenGL SI's __GLimports structure allows per-context specification of
* replacements for the standard C lib functions. In practice that's probably
* never needed; compile-time replacements are far more likely.
*
* The _mesa_foo() functions defined here don't in general take a context
* parameter. I guess we can change that someday, if need be.
* So for now, the __GLimports stuff really isn't used.
*/
@ -45,7 +50,7 @@
#include "mtypes.h"
#include "context.h"
#include "imports.h"
#include "mem.h"
#define MAXSTRING 4000 /* for vsnprintf() */
@ -53,37 +58,159 @@
#define vsnprintf _vsnprintf
#endif
static void *
_mesa_Malloc(__GLcontext *gc, size_t size)
{
return MALLOC(size);
}
static void *
_mesa_Calloc(__GLcontext *gc, size_t numElem, size_t elemSize)
{
return CALLOC(numElem * elemSize);
}
/**********************************************************************/
/* Wrappers for standard C library functions */
/**********************************************************************/
static void *
_mesa_Realloc(__GLcontext *gc, void *oldAddr, size_t newSize)
{
return realloc(oldAddr, newSize);
}
static void
_mesa_Free(__GLcontext *gc, void *addr)
void *
_mesa_malloc(size_t bytes)
{
FREE(addr);
#ifdef XFree86LOADER
return xf86malloc(bytes);
#else
return malloc(bytes);
#endif
}
/* Must be before '#undef getenv' for inclusion in XFree86.
*/
char * CAPI
_mesa_getenv(__GLcontext *gc, const char *var)
void *
_mesa_calloc(size_t bytes)
{
#ifdef XFree86LOADER
return xf86calloc(1, bytes);
#else
return calloc(1, bytes);
#endif
}
void
_mesa_free(void *ptr)
{
#ifdef XFree86LOADER
xf86free(ptr);
#else
free(ptr);
#endif
}
void *
_mesa_align_malloc(size_t bytes, unsigned long alignment)
{
unsigned long ptr, buf;
ASSERT( alignment > 0 );
ptr = (unsigned long) _mesa_malloc( bytes + alignment );
buf = (ptr + alignment) & ~(unsigned long)(alignment - 1);
*(unsigned long *)(buf - sizeof(void *)) = ptr;
#ifdef DEBUG
/* mark the non-aligned area */
while ( ptr < buf - sizeof(void *) ) {
*(unsigned long *)ptr = 0xcdcdcdcd;
ptr += sizeof(unsigned long);
}
#endif
return (void *)buf;
}
void *
_mesa_align_calloc(size_t bytes, unsigned long alignment)
{
unsigned long ptr, buf;
ASSERT( alignment > 0 );
ptr = (unsigned long) _mesa_calloc( bytes + alignment );
buf = (ptr + alignment) & ~(unsigned long)(alignment - 1);
*(unsigned long *)(buf - sizeof(void *)) = ptr;
#ifdef DEBUG
/* mark the non-aligned area */
while ( ptr < buf - sizeof(void *) ) {
*(unsigned long *)ptr = 0xcdcdcdcd;
ptr += sizeof(unsigned long);
}
#endif
return (void *)buf;
}
void
_mesa_align_free(void *ptr)
{
#if 0
_mesa_free( (void *)(*(unsigned long *)((unsigned long)ptr - sizeof(void *))) );
#else
/* The actuall address to free is stuffed in the word immediately
* before the address the client sees.
*/
void **cubbyHole = (void **) ((char *) ptr - sizeof(void *));
void *realAddr = *cubbyHole;
_mesa_free(realAddr);
#endif
}
void *
_mesa_memcpy(void *dest, const void *src, size_t n)
{
#ifdef XFree86LOADER
return xf86memcpy(dest, src, n);
#elif defined(SUNOS4)
return memcpy((char *) dest, (char *) src, (int) n);
#else
return memcpy(dest, src, n);
#endif
}
void
_mesa_memset( void *dst, int val, size_t n )
{
#ifdef XFree86LOADER
xf86memset( dst, val, n );
#elif defined(SUNOS4)
memset( (char *) dst, (int) val, (int) n );
#else
memset(dst, val, n);
#endif
}
void
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
{
while (n-- > 0)
*dst++ = val;
}
void
_mesa_bzero( void *dst, size_t n )
{
#ifdef XFree86LOADER
xf86memset( dst, 0, n );
#elif defined(__FreeBSD__)
bzero( dst, n );
#else
memset( dst, 0, n );
#endif
}
char *
_mesa_getenv( const char *var )
{
(void) gc;
#ifdef XFree86LOADER
return xf86getenv(var);
#else
@ -92,97 +219,82 @@ _mesa_getenv(__GLcontext *gc, const char *var)
}
static void
warning(__GLcontext *gc, char *str)
char *
_mesa_strstr( const char *haystack, const char *needle )
{
#ifdef XFree86LOADER
return xf86strstr(haystack, needle);
#else
return strstr(haystack, needle);
#endif
}
int
_mesa_atoi(const char *s)
{
#ifdef XFree86LOADER
return xf86atoi(s);
#else
return atoi(s);
#endif
}
int
_mesa_sprintf( char *str, const char *fmt, ... )
{
int r;
va_list args;
va_start( args, fmt );
va_end( args );
#ifdef XFree86LOADER
r = xf86vsprintf( str, fmt, args );
#else
r = vsprintf( str, fmt, args );
#endif
return r;
}
void
_mesa_printf( const char *fmtString, ... )
{
char s[MAXSTRING];
va_list args;
va_start( args, fmtString );
vsnprintf(s, MAXSTRING, fmtString, args);
va_end( args );
#ifdef XFree86LOADER
xf86printf("%s", s);
#else
printf("%s", s);
#endif
}
void
_mesa_warning( GLcontext *ctx, const char *fmtString, ... )
{
GLboolean debug;
#ifdef DEBUG
debug = GL_TRUE;
#else
if (_mesa_getenv(gc , "MESA_DEBUG"))
debug = GL_TRUE;
else
debug = GL_FALSE;
#endif
if (debug) {
fprintf(stderr, "Mesa warning: %s\n", str);
}
}
void
_mesa_fatal(__GLcontext *gc, char *str)
{
(void) gc;
fprintf(stderr, "%s\n", str);
abort();
}
static int CAPI
_mesa_atoi(__GLcontext *gc, const char *str)
{
(void) gc;
return atoi(str);
}
int CAPI
_mesa_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
{
int r;
va_list args;
va_start( args, fmt );
r = vsprintf( str, fmt, args );
va_end( args );
return r;
}
void * CAPI
_mesa_fopen(__GLcontext *gc, const char *path, const char *mode)
{
return fopen(path, mode);
}
int CAPI
_mesa_fclose(__GLcontext *gc, void *stream)
{
return fclose((FILE *) stream);
}
int CAPI
_mesa_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
{
int r;
va_list args;
va_start( args, fmt );
r = vfprintf( (FILE *) stream, fmt, args );
va_end( args );
return r;
}
/* XXX this really is driver-specific and can't be here */
static __GLdrawablePrivate *
_mesa_GetDrawablePrivate(__GLcontext *gc)
{
return NULL;
}
void
_mesa_warning(__GLcontext *gc, const char *fmtString, ...)
{
char str[MAXSTRING];
va_list args;
(void) ctx;
va_start( args, fmtString );
(void) vsnprintf( str, MAXSTRING, fmtString, args );
va_end( args );
warning(gc, str);
#ifdef DEBUG
debug = GL_TRUE; /* always print warning */
#else
debug = _mesa_getenv("MESA_DEBUG") ? GL_TRUE : GL_FALSE;
#endif
if (debug) {
#ifdef XFree86LOADER
xf86fprintf(stderr, "Mesa warning: %s\n", str);
#else
fprintf(stderr, "Mesa warning: %s\n", str);
#endif
}
}
@ -193,23 +305,14 @@ _mesa_warning(__GLcontext *gc, const char *fmtString, ...)
void
_mesa_problem( const GLcontext *ctx, const char *s )
{
if (ctx) {
ctx->imports.fprintf((GLcontext *) ctx, stderr, "Mesa implementation error: %s\n", s);
#ifdef XF86DRI
ctx->imports.fprintf((GLcontext *) ctx, stderr, "Please report to the DRI bug database at dri.sourceforge.net\n");
(void) ctx;
#ifdef XFree86LOADER
xf86fprintf(stderr, "Mesa implementation error: %s\n", s);
xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n");
#else
ctx->imports.fprintf((GLcontext *) ctx, stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
fprintf(stderr, "Mesa implementation error: %s\n", s);
fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
#endif
}
else {
/* what can we do if we don't have a context???? */
fprintf( stderr, "Mesa implementation error: %s\n", s );
#ifdef XF86DRI
fprintf( stderr, "Please report to the DRI bug database at dri.sourceforge.net\n");
#else
fprintf( stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
#endif
}
}
@ -226,10 +329,10 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... )
const char *debugEnv;
GLboolean debug;
debugEnv = _mesa_getenv(ctx, "MESA_DEBUG");
debugEnv = _mesa_getenv("MESA_DEBUG");
#ifdef DEBUG
if (debugEnv && strstr(debugEnv, "silent"))
if (debugEnv && _mesa_strstr(debugEnv, "silent"))
debug = GL_FALSE;
else
debug = GL_TRUE;
@ -295,31 +398,122 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
va_list args;
va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args);
if (ctx)
(void) ctx->imports.fprintf( (__GLcontext *) ctx, stderr, s );
else
fprintf( stderr, s );
va_end(args);
#ifdef XFree86LOADER
xf86fprintf(stderr, "Mesa: %s", s);
#else
fprintf(stderr, "Mesa: %s", s);
#endif
}
/*
* A wrapper for printf. Uses stdout.
*/
void
_mesa_printf( const GLcontext *ctx, const char *fmtString, ... )
/**********************************************************************/
/* Default Imports Wrapper */
/**********************************************************************/
static void *
default_malloc(__GLcontext *gc, size_t size)
{
char s[MAXSTRING];
va_list args;
va_start( args, fmtString );
vsnprintf(s, MAXSTRING, fmtString, args);
if (ctx)
(void) ctx->imports.fprintf( (__GLcontext *) ctx, stdout, s );
else
printf( s );
va_end( args );
(void) gc;
return _mesa_malloc(size);
}
static void *
default_calloc(__GLcontext *gc, size_t numElem, size_t elemSize)
{
(void) gc;
return _mesa_calloc(numElem * elemSize);
}
static void *
default_realloc(__GLcontext *gc, void *oldAddr, size_t newSize)
{
(void) gc;
#ifdef XFree86LOADER
return xf86realloc(oldAddr, newSize);
#else
return realloc(oldAddr, newSize);
#endif
}
static void
default_free(__GLcontext *gc, void *addr)
{
(void) gc;
_mesa_free(addr);
}
static char * CAPI
default_getenv( __GLcontext *gc, const char *var )
{
(void) gc;
return _mesa_getenv(var);
}
static void
default_warning(__GLcontext *gc, char *str)
{
_mesa_warning(gc, str);
}
static void
default_fatal(__GLcontext *gc, char *str)
{
_mesa_problem(gc, str);
abort();
}
static int CAPI
default_atoi(__GLcontext *gc, const char *str)
{
(void) gc;
return atoi(str);
}
static int CAPI
default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
{
int r;
va_list args;
va_start( args, fmt );
r = vsprintf( str, fmt, args );
va_end( args );
return r;
}
static void * CAPI
default_fopen(__GLcontext *gc, const char *path, const char *mode)
{
return fopen(path, mode);
}
static int CAPI
default_fclose(__GLcontext *gc, void *stream)
{
return fclose((FILE *) stream);
}
static int CAPI
default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
{
int r;
va_list args;
va_start( args, fmt );
r = vfprintf( (FILE *) stream, fmt, args );
va_end( args );
return r;
}
/* XXX this really is driver-specific and can't be here */
static __GLdrawablePrivate *
default_GetDrawablePrivate(__GLcontext *gc)
{
return NULL;
}
/*
* Initialize a __GLimports object to point to the functions in
@ -330,18 +524,18 @@ _mesa_printf( const GLcontext *ctx, const char *fmtString, ... )
void
_mesa_init_default_imports(__GLimports *imports, void *driverCtx)
{
imports->malloc = _mesa_Malloc;
imports->calloc = _mesa_Calloc;
imports->realloc = _mesa_Realloc;
imports->free = _mesa_Free;
imports->warning = warning;
imports->fatal = _mesa_fatal;
imports->getenv = _mesa_getenv;
imports->atoi = _mesa_atoi;
imports->sprintf = _mesa_sprintf;
imports->fopen = _mesa_fopen;
imports->fclose = _mesa_fclose;
imports->fprintf = _mesa_fprintf;
imports->getDrawablePrivate = _mesa_GetDrawablePrivate;
imports->malloc = default_malloc;
imports->calloc = default_calloc;
imports->realloc = default_realloc;
imports->free = default_free;
imports->warning = default_warning;
imports->fatal = default_fatal;
imports->getenv = default_getenv; /* not used for now */
imports->atoi = default_atoi;
imports->sprintf = default_sprintf;
imports->fopen = default_fopen;
imports->fclose = default_fclose;
imports->fprintf = default_fprintf;
imports->getDrawablePrivate = default_GetDrawablePrivate;
imports->other = driverCtx;
}

View file

@ -1,4 +1,4 @@
/* $Id: imports.h,v 1.5 2002/10/15 15:36:26 brianp Exp $ */
/* $Id: imports.h,v 1.6 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,21 +25,126 @@
*/
/*
* This file provides wrappers for all the standard C library functions
* like malloc, free, printf, getenv, etc.
*/
#ifndef IMPORTS_H
#define IMPORTS_H
#include "glheader.h"
#define MALLOC(BYTES) _mesa_malloc(BYTES)
#define CALLOC(BYTES) _mesa_calloc(BYTES)
#define MALLOC_STRUCT(T) (struct T *) _mesa_malloc(sizeof(struct T))
#define CALLOC_STRUCT(T) (struct T *) _mesa_calloc(sizeof(struct T))
#define FREE(PTR) _mesa_free(PTR)
#define ALIGN_MALLOC(BYTES, N) _mesa_align_malloc(BYTES, N)
#define ALIGN_CALLOC(BYTES, N) _mesa_align_calloc(BYTES, N)
#define ALIGN_MALLOC_STRUCT(T, N) (struct T *) _mesa_align_malloc(sizeof(struct T), N)
#define ALIGN_CALLOC_STRUCT(T, N) (struct T *) _mesa_align_calloc(sizeof(struct T), N)
#define ALIGN_FREE(PTR) _mesa_align_free(PTR)
#define MEMCPY( DST, SRC, BYTES) _mesa_memcpy(DST, SRC, BYTES)
#define MEMSET( DST, VAL, N ) _mesa_memset(DST, VAL, N)
#define BZERO( ADDR, N ) _mesa_bzero(ADDR, N)
extern int CAPI
_mesa_sprintf(__GLcontext *gc, char *str, const char *fmt, ...);
/* MACs and BeOS don't support static larger than 32kb, so... */
#if defined(macintosh) && !defined(__MRC__)
/*extern char *AGLAlloc(int size);*/
/*extern void AGLFree(char* ptr);*/
# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_alloc(sizeof(TYPE)*(SIZE))
# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2))
# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_alloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3))
# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0)
# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0)
#elif defined(__BEOS__)
# define DEFARRAY(TYPE,NAME,SIZE) TYPE *NAME = (TYPE*)_mesa_malloc(sizeof(TYPE)*(SIZE))
# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2))
# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE (*NAME)[SIZE2][SIZE3] = (TYPE(*)[SIZE2][SIZE3])_mesa_malloc(sizeof(TYPE)*(SIZE1)*(SIZE2)*(SIZE3))
# define CHECKARRAY(NAME,CMD) do {if (!(NAME)) {CMD;}} while (0)
# define UNDEFARRAY(NAME) do {if ((NAME)) {_mesa_free((char*)NAME);} }while (0)
#else
# define DEFARRAY(TYPE,NAME,SIZE) TYPE NAME[SIZE]
# define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2) TYPE NAME[SIZE1][SIZE2]
# define DEFMNARRAY(TYPE,NAME,SIZE1,SIZE2,SIZE3) TYPE NAME[SIZE1][SIZE2][SIZE3]
# define CHECKARRAY(NAME,CMD) do {} while(0)
# define UNDEFARRAY(NAME)
#endif
#ifdef MESA_EXTERNAL_BUFFERALLOC
/*
* If you want Mesa's depth/stencil/accum/etc buffers to be allocated
* with a specialized allocator you can define MESA_EXTERNAL_BUFFERALLOC
* and implement _ext_mesa_alloc/free_pixelbuffer() in your app.
* Contributed by Gerk Huisma (gerk@five-d.demon.nl).
*/
extern void *_ext_mesa_alloc_pixelbuffer( unsigned int size );
extern void _ext_mesa_free_pixelbuffer( void *pb );
#define MESA_PBUFFER_ALLOC(BYTES) (void *) _ext_mesa_alloc_pixelbuffer(BYTES)
#define MESA_PBUFFER_FREE(PTR) _ext_mesa_free_pixelbuffer(PTR)
#else
/* Default buffer allocation uses the aligned allocation routines: */
#define MESA_PBUFFER_ALLOC(BYTES) (void *) _mesa_align_malloc(BYTES, 512)
#define MESA_PBUFFER_FREE(PTR) _mesa_align_free(PTR)
#endif
extern void *
_mesa_malloc( size_t bytes );
extern void *
_mesa_calloc( size_t bytes );
extern void
_mesa_warning(__GLcontext *gc, const char *fmtString, ...);
_mesa_free( void *ptr );
extern void *
_mesa_align_malloc( size_t bytes, unsigned long alignment );
extern void *
_mesa_align_calloc( size_t bytes, unsigned long alignment );
extern void
_mesa_fatal(__GLcontext *gc, char *str);
_mesa_align_free( void *ptr );
extern void *
_mesa_memcpy( void *dest, const void *src, size_t n );
extern void
_mesa_memset( void *dst, int val, size_t n );
extern void
_mesa_memset16( unsigned short *dst, unsigned short val, size_t n );
extern void
_mesa_bzero( void *dst, size_t n );
extern char *
_mesa_getenv( const char *var );
extern char *
_mesa_strstr( const char *haystack, const char *needle );
extern int
_mesa_atoi( const char *s );
extern int
_mesa_sprintf( char *str, const char *fmt, ... );
extern void
_mesa_printf( const char *fmtString, ... );
extern void
_mesa_warning( __GLcontext *gc, const char *fmtString, ... );
extern void
_mesa_problem( const __GLcontext *ctx, const char *s );
@ -50,23 +155,10 @@ _mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
extern void
_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... );
extern void
_mesa_printf( const __GLcontext *ctx, const char *fmtString, ... );
extern int CAPI
_mesa_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...);
extern void * CAPI
_mesa_fopen(__GLcontext *gc, const char *path, const char *mode);
extern int CAPI
_mesa_fclose(__GLcontext *gc, void *stream);
extern char * CAPI
_mesa_getenv(__GLcontext *gc, const char *var);
extern void
_mesa_init_default_imports(__GLimports *imports, void *driverCtx);
_mesa_init_default_imports( __GLimports *imports, void *driverCtx );
#endif
#endif /* IMPORTS_H */

View file

@ -1,4 +1,4 @@
/* $Id: light.c,v 1.52 2002/09/16 17:56:02 brianp Exp $ */
/* $Id: light.c,v 1.53 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,23 +25,18 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "enums.h"
#include "light.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "simple_list.h"
#include "mtypes.h"
#include "math/m_xform.h"
#include "math/m_matrix.h"
#endif
/* XXX this is a bit of a hack needed for compilation within XFree86 */

View file

@ -1,4 +1,4 @@
/* $Id: lines.c,v 1.29 2001/03/12 00:48:38 gareth Exp $ */
/* $Id: lines.c,v 1.30 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "depth.h"
@ -36,8 +33,6 @@
#include "mmath.h"
#include "texstate.h"
#include "mtypes.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: matrix.c,v 1.44 2002/08/21 16:39:39 brianp Exp $ */
/* $Id: matrix.c,v 1.45 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -35,21 +35,17 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "buffers.h"
#include "context.h"
#include "enums.h"
#include "macros.h"
#include "matrix.h"
#include "mem.h"
#include "mmath.h"
#include "mtypes.h"
#include "math/m_matrix.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: pixel.c,v 1.36 2002/09/21 17:34:56 brianp Exp $ */
/* $Id: pixel.c,v 1.37 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,19 +24,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "colormac.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "pixel.h"
#include "mtypes.h"
#endif
/**********************************************************************/

View file

@ -1,4 +1,4 @@
/* $Id: points.c,v 1.33 2002/05/27 17:04:53 brianp Exp $ */
/* $Id: points.c,v 1.34 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "macros.h"
@ -35,7 +32,6 @@
#include "points.h"
#include "texstate.h"
#include "mtypes.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: polygon.c,v 1.24 2002/10/02 22:05:58 brianp Exp $ */
/* $Id: polygon.c,v 1.25 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,19 +25,14 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "image.h"
#include "enums.h"
#include "macros.h"
#include "mem.h"
#include "polygon.h"
#include "mtypes.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: rastpos.c,v 1.38 2002/05/27 17:03:08 brianp Exp $ */
/* $Id: rastpos.c,v 1.39 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "clip.h"
#include "colormac.h"
@ -43,7 +40,6 @@
#include "math/m_matrix.h"
#include "math/m_xform.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: state.c,v 1.95 2002/10/16 17:57:52 brianp Exp $ */
/* $Id: state.c,v 1.96 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,9 +31,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "accum.h"
#include "api_loopback.h"
@ -75,7 +72,6 @@
#include "math/m_matrix.h"
#include "math/m_xform.h"
#endif
static int

View file

@ -1,4 +1,4 @@
/* $Id: stencil.c,v 1.28 2002/09/06 02:56:09 brianp Exp $ */
/* $Id: stencil.c,v 1.29 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,20 +25,14 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "depth.h"
#include "macros.h"
#include "mem.h"
#include "stencil.h"
#include "mtypes.h"
#include "enable.h"
#endif
void

View file

@ -1,4 +1,4 @@
/* $Id: texcompress.c,v 1.2 2002/10/18 17:41:45 brianp Exp $ */
/* $Id: texcompress.c,v 1.3 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -26,9 +26,9 @@
#include "glheader.h"
#include "imports.h"
#include "context.h"
#include "image.h"
#include "mem.h"
#include "texcompress.h"
#include "texformat.h"

View file

@ -1,4 +1,4 @@
/* $Id: texformat.c,v 1.16 2002/09/27 02:45:38 brianp Exp $ */
/* $Id: texformat.c,v 1.17 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -27,20 +27,16 @@
* Gareth Hughes <gareth@valinux.com>
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "image.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "mtypes.h"
#include "texformat.h"
#include "teximage.h"
#include "texstate.h"
#endif
/* Texel fetch routines for all supported formats:

View file

@ -1,4 +1,4 @@
/* $Id: teximage.c,v 1.122 2002/10/18 18:03:04 brianp Exp $ */
/* $Id: teximage.c,v 1.123 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,16 +24,12 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "convolve.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "state.h"
#include "texcompress.h"
@ -42,7 +38,6 @@
#include "texstate.h"
#include "texstore.h"
#include "mtypes.h"
#endif
/*
@ -65,7 +60,7 @@ static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img)
const GLchan *data = (const GLchan *) img->Data;
if (!data) {
_mesa_printf(ctx, "No texture data\n");
_mesa_printf("No texture data\n");
return;
}
@ -93,16 +88,16 @@ static void PrintTexture(GLcontext *ctx, const struct gl_texture_image *img)
for (i = 0; i < img->Height; i++) {
for (j = 0; j < img->Width; j++) {
if (c==1)
_mesa_printf(ctx, "%02x ", data[0]);
_mesa_printf("%02x ", data[0]);
else if (c==2)
_mesa_printf(ctx, "%02x%02x ", data[0], data[1]);
_mesa_printf("%02x%02x ", data[0], data[1]);
else if (c==3)
_mesa_printf(ctx, "%02x%02x%02x ", data[0], data[1], data[2]);
_mesa_printf("%02x%02x%02x ", data[0], data[1], data[2]);
else if (c==4)
_mesa_printf(ctx, "%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
_mesa_printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
data += (img->RowStride - img->Width) * c;
}
_mesa_printf(ctx, "\n");
_mesa_printf("\n");
}
#endif
}

View file

@ -1,4 +1,4 @@
/* $Id: texobj.c,v 1.61 2002/10/22 15:15:41 brianp Exp $ */
/* $Id: texobj.c,v 1.62 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,23 +24,17 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colortab.h"
#include "context.h"
#include "enums.h"
#include "hash.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "teximage.h"
#include "texstate.h"
#include "texobj.h"
#include "mtypes.h"
#endif
/*

View file

@ -1,4 +1,4 @@
/* $Id: texstate.c,v 1.83 2002/10/23 14:53:27 brianp Exp $ */
/* $Id: texstate.c,v 1.84 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -25,9 +25,6 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "colormac.h"
#include "context.h"
@ -40,7 +37,6 @@
#include "mtypes.h"
#include "math/m_xform.h"
#include "math/m_matrix.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: texstore.c,v 1.44 2002/10/18 18:03:08 brianp Exp $ */
/* $Id: texstore.c,v 1.45 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -53,13 +53,13 @@
*/
#include "glheader.h"
#include "colormac.h"
#include "context.h"
#include "convolve.h"
#include "image.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "texcompress.h"
#include "texformat.h"
#include "teximage.h"

View file

@ -1,4 +1,4 @@
/* $Id: texutil.c,v 1.32 2002/09/27 02:45:38 brianp Exp $ */
/* $Id: texutil.c,v 1.33 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -35,19 +35,16 @@
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "enums.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "mtypes.h"
#include "texformat.h"
#include "texutil.h"
#endif
#define DEBUG_TEXUTIL 0

View file

@ -1,4 +1,4 @@
/* $Id: varray.c,v 1.46 2002/06/30 15:47:01 brianp Exp $ */
/* $Id: varray.c,v 1.47 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -24,9 +24,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifdef PC_HEADER
#include "all.h"
#else
#include "glheader.h"
#include "context.h"
#include "enable.h"
@ -40,7 +37,6 @@
#include "mtypes.h"
#include "varray.h"
#include "math/m_translate.h"
#endif

View file

@ -1,4 +1,4 @@
/* $Id: vtxfmt.c,v 1.12 2002/06/29 19:48:16 brianp Exp $ */
/* $Id: vtxfmt.c,v 1.13 2002/10/24 23:57:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,6 +31,7 @@
#include "glheader.h"
#include "api_loopback.h"
#include "context.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"
#include "vtxfmt.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_debug_clip.c,v 1.2 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: m_debug_clip.c,v 1.3 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,7 +30,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "m_matrix.h"
#include "m_xform.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_debug_norm.c,v 1.9 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: m_debug_norm.c,v 1.10 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,7 +30,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "m_matrix.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_debug_xform.c,v 1.9 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: m_debug_xform.c,v 1.10 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,7 +31,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "m_matrix.h"
#include "m_xform.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_matrix.c,v 1.13 2002/09/12 16:26:04 brianp Exp $ */
/* $Id: m_matrix.c,v 1.14 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -34,12 +34,10 @@
* 3. Transformation of a point p by a matrix M is: p' = M * p
*/
#include <math.h>
#include "glheader.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "m_matrix.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_norm_tmp.h,v 1.11 2002/04/09 14:58:04 keithw Exp $ */
/* $Id: m_norm_tmp.h,v 1.12 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,9 +32,6 @@
* the transformation matrix, rescaling and normalization.
*/
#include <math.h>
/*
* mat - the 4x4 transformation matrix
* scale - uniform scale factor of the transformation matrix (not always used)

View file

@ -1,10 +1,10 @@
/* $Id: m_translate.c,v 1.9 2001/09/18 23:06:14 kschultz Exp $ */
/* $Id: m_translate.c,v 1.10 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
* Version: 4.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -32,7 +32,6 @@
#include "glheader.h"
#include "mtypes.h" /* GLchan hack */
#include "colormac.h"
#include "mem.h"
#include "mmath.h"
#include "m_translate.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_vector.c,v 1.7 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: m_vector.c,v 1.8 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,7 +32,7 @@
#include "glheader.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "m_vector.h"

View file

@ -1,4 +1,4 @@
/* $Id: m_xform.c,v 1.17 2002/07/10 01:25:50 brianp Exp $ */
/* $Id: m_xform.c,v 1.18 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -35,8 +35,6 @@
* 3. Transformation of a point p by a matrix M is: p' = M * p
*/
#include <math.h>
#include "glheader.h"
#include "macros.h"
#include "mmath.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_aatriangle.c,v 1.25 2002/10/18 17:02:01 kschultz Exp $ */
/* $Id: s_aatriangle.c,v 1.26 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,8 +30,9 @@
*/
#include "glheader.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "s_aatriangle.h"
#include "s_context.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_accum.c,v 1.18 2002/07/09 01:22:52 brianp Exp $ */
/* $Id: s_accum.c,v 1.19 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -29,7 +29,7 @@
#include "context.h"
#include "macros.h"
#include "mmath.h"
#include "mem.h"
#include "imports.h"
#include "s_accum.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_alphabuf.c,v 1.14 2002/10/18 17:02:01 kschultz Exp $ */
/* $Id: s_alphabuf.c,v 1.15 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -33,7 +33,7 @@
#include "glheader.h"
#include "context.h"
#include "mem.h"
#include "imports.h"
#include "s_context.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_buffers.c,v 1.14 2002/10/11 17:41:06 brianp Exp $ */
/* $Id: s_buffers.c,v 1.15 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,7 +28,7 @@
#include "glheader.h"
#include "colormac.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "s_accum.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_context.c,v 1.40 2002/10/11 17:50:59 brianp Exp $ */
/* $Id: s_context.c,v 1.41 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,7 +30,7 @@
#include "glheader.h"
#include "context.h"
#include "mtypes.h"
#include "mem.h"
#include "imports.h"
#include "swrast.h"
#include "s_blend.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_copypix.c,v 1.40 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: s_copypix.c,v 1.41 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,7 +31,7 @@
#include "convolve.h"
#include "feedback.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "pixel.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_depth.c,v 1.23 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: s_depth.c,v 1.24 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,7 +28,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "s_depth.h"
#include "s_context.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_drawpix.c,v 1.37 2002/10/08 23:59:34 brianp Exp $ */
/* $Id: s_drawpix.c,v 1.38 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,7 +31,7 @@
#include "convolve.h"
#include "image.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "pixel.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_logic.c,v 1.11 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: s_logic.c,v 1.12 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -27,6 +27,7 @@
#include "glheader.h"
#include "context.h"
#include "imports.h"
#include "macros.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_pixeltex.c,v 1.10 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: s_pixeltex.c,v 1.11 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -35,7 +35,7 @@
#include "glheader.h"
#include "colormac.h"
#include "mem.h"
#include "imports.h"
#include "s_context.h"
#include "s_pixeltex.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_readpix.c,v 1.16 2002/09/21 17:34:56 brianp Exp $ */
/* $Id: s_readpix.c,v 1.17 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -32,7 +32,7 @@
#include "feedback.h"
#include "image.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "pixel.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_span.c,v 1.49 2002/10/11 17:41:06 brianp Exp $ */
/* $Id: s_span.c,v 1.50 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -37,7 +37,7 @@
#include "context.h"
#include "macros.h"
#include "mmath.h"
#include "mem.h"
#include "imports.h"
#include "s_alpha.h"
#include "s_alphabuf.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_stencil.c,v 1.27 2002/10/02 23:24:04 brianp Exp $ */
/* $Id: s_stencil.c,v 1.28 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,7 +28,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "s_context.h"
#include "s_depth.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_texstore.c,v 1.8 2002/09/27 02:45:39 brianp Exp $ */
/* $Id: s_texstore.c,v 1.9 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -42,8 +42,8 @@
#include "context.h"
#include "convolve.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "texformat.h"
#include "teximage.h"
#include "texstore.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_texture.c,v 1.72 2002/10/21 15:52:35 brianp Exp $ */
/* $Id: s_texture.c,v 1.73 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,7 +30,7 @@
#include "colormac.h"
#include "macros.h"
#include "mmath.h"
#include "mem.h"
#include "imports.h"
#include "texformat.h"
#include "teximage.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_triangle.c,v 1.62 2002/09/23 16:37:15 brianp Exp $ */
/* $Id: s_triangle.c,v 1.63 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -34,8 +34,8 @@
#include "glheader.h"
#include "context.h"
#include "colormac.h"
#include "imports.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
#include "texformat.h"
#include "teximage.h"

View file

@ -1,4 +1,4 @@
/* $Id: s_zoom.c,v 1.17 2002/08/07 00:45:07 brianp Exp $ */
/* $Id: s_zoom.c,v 1.18 2002/10/24 23:57:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -26,7 +26,7 @@
#include "glheader.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "colormac.h"
#include "s_context.h"

View file

@ -1,4 +1,4 @@
/* $Id: ss_context.c,v 1.18 2002/10/04 17:37:47 brianp Exp $ */
/* $Id: ss_context.c,v 1.19 2002/10/24 23:57:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -28,7 +28,7 @@
*/
#include "glheader.h"
#include "mem.h"
#include "imports.h"
#include "ss_context.h"
#include "ss_triangle.h"
#include "ss_vb.h"

View file

@ -1,4 +1,4 @@
/* $Id: ss_vb.c,v 1.20 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: ss_vb.c,v 1.21 2002/10/24 23:57:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -31,7 +31,7 @@
#include "colormac.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "swrast/swrast.h"
#include "tnl/t_context.h"

View file

@ -1,4 +1,4 @@
/* $Id: t_array_api.c,v 1.27 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: t_array_api.c,v 1.28 2002/10/24 23:57:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -33,11 +33,11 @@
#include "glheader.h"
#include "api_validate.h"
#include "context.h"
#include "imports.h"
#include "macros.h"
#include "mmath.h"
#include "mem.h"
#include "state.h"
#include "mtypes.h"
#include "state.h"
#include "array_cache/acache.h"

View file

@ -1,4 +1,4 @@
/* $Id: t_array_import.c,v 1.25 2002/06/29 19:48:17 brianp Exp $ */
/* $Id: t_array_import.c,v 1.26 2002/10/24 23:57:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -30,7 +30,7 @@
#include "glheader.h"
#include "context.h"
#include "macros.h"
#include "mem.h"
#include "imports.h"
#include "mmath.h"
#include "state.h"
#include "mtypes.h"

Some files were not shown because too many files have changed in this diff Show more