Commit 4753d60d authored by Brian Paul's avatar Brian Paul
Browse files

Added ctx parameter to _mesa_debug()

Added _mesa_printf()
Updated SetDrawBuffer() function in all drivers (ala 4.0.3)
Import 4.0.3/DRI changes.
parent 5e54ddc3
/* $Id: t_dd_dmatmp.h,v 1.12 2002/02/13 00:53:20 keithw Exp $ */
/* $Id: t_dd_dmatmp.h,v 1.13 2002/06/15 02:38:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -49,6 +49,7 @@
#define ELTS_VARS
#define ALLOC_ELTS( nr )
#define EMIT_ELT( offset, elt )
#define EMIT_TWO_ELTS( offset, elt0, elt1 )
#define INCR_ELTS( nr )
#define ELT_INIT(prim)
#define GET_CURRENT_VB_MAX_ELTS() 0
......@@ -480,7 +481,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
for ( i = 0 ; i < quads*2 ; i+=2 ) {
for ( i = j-start ; i < j-start+quads*2 ; i+=2 ) {
EMIT_TWO_ELTS( 0, (i+0), (i+1) );
EMIT_TWO_ELTS( 2, (i+2), (i+1) );
EMIT_TWO_ELTS( 4, (i+3), (i+2) );
......@@ -601,7 +602,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
for ( i = 0 ; i < quads*4 ; i+=4 ) {
for ( i = j-start ; i < j-start+quads*4 ; i+=4 ) {
EMIT_TWO_ELTS( 0, (i+0), (i+1) );
EMIT_TWO_ELTS( 2, (i+3), (i+1) );
EMIT_TWO_ELTS( 4, (i+2), (i+3) );
......@@ -996,7 +997,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
for ( i = 0 ; i < quads ; i++, elts += 2 ) {
for ( i = j-start ; i < j-start+quads ; i++, elts += 2 ) {
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
EMIT_TWO_ELTS( 2, elts[2], elts[1] );
EMIT_TWO_ELTS( 4, elts[3], elts[2] );
......@@ -1064,7 +1065,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads * 6 );
for ( i = 0 ; i < quads ; i++, elts += 4 ) {
for ( i = j-start ; i < j-start+quads ; i++, elts += 4 ) {
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
EMIT_TWO_ELTS( 2, elts[3], elts[1] );
EMIT_TWO_ELTS( 4, elts[2], elts[3] );
......
/* $Id: t_dd_vbtmp.h,v 1.17 2002/06/03 16:06:35 brianp Exp $ */
/* $Id: t_dd_vbtmp.h,v 1.18 2002/06/15 02:38:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -189,15 +189,28 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_SPEC) {
if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE)
IMPORT_FLOAT_SPEC_COLORS( ctx );
spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr;
spec_stride = VB->SecondaryColorPtr[0]->StrideB;
if (VB->SecondaryColorPtr[0]) {
if (VB->SecondaryColorPtr[0]->Type != GL_UNSIGNED_BYTE)
IMPORT_FLOAT_SPEC_COLORS( ctx );
spec = (GLubyte (*)[4])VB->SecondaryColorPtr[0]->Ptr;
spec_stride = VB->SecondaryColorPtr[0]->StrideB;
} else {
GLubyte tmp[4];
spec = &tmp;
spec_stride = 0;
}
}
if (DO_FOG) {
fog = VB->FogCoordPtr->data;
fog_stride = VB->FogCoordPtr->stride;
if (VB->FogCoordPtr) {
fog = VB->FogCoordPtr->data;
fog_stride = VB->FogCoordPtr->stride;
}
else {
GLfloat tmp = 0;
fog = &tmp;
fog_stride = 0;
}
}
if (VB->importable_data) {
......
/* $Id: t_dd_vertex.h,v 1.11 2002/06/05 16:48:54 brianp Exp $ */
/* $Id: t_dd_vertex.h,v 1.12 2002/06/15 02:38:18 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -77,9 +77,3 @@ typedef union {
GLubyte ub4[24][4];
} TAG(Vertex), *TAG(VertexPtr);
typedef struct {
GLfloat clip[4];
GLuint mask;
GLuint pad; /* alignment */
TAG(Vertex) v;
} TAG(TnlVertex), *TAG(TnlVertexPtr);
......@@ -526,13 +526,11 @@ static void set_read_buffer (GLcontext *ctx, GLframebuffer *buffer,
/*
* Set the destination/draw buffer.
*/
static GLboolean set_draw_buffer (GLcontext *ctx, GLenum mode)
static void set_draw_buffer (GLcontext *ctx, GLenum mode)
{
if (mode==GL_BACK_LEFT) {
return GL_TRUE;
} else {
return GL_FALSE;
}
/*
XXX this has to be fixed
*/
}
......
......@@ -144,7 +144,7 @@ static void gl_ggiClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
}
/* Set the buffer used for drawing */
static GLboolean gl_ggiSetDrawBuffer(GLcontext *ctx, GLenum mode)
static void gl_ggiSetDrawBuffer(GLcontext *ctx, GLenum mode)
{
ggi_mesa_context_t ggi_ctx = (ggi_mesa_context_t)ctx->DriverCtx;
......@@ -155,17 +155,15 @@ static GLboolean gl_ggiSetDrawBuffer(GLcontext *ctx, GLenum mode)
{
ggiSetWriteFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual));
return GL_TRUE;
}
else if (mode == GL_BACK_LEFT)
{
ggiSetWriteFrame(ggi_ctx->ggi_visual,
ggiGetDisplayFrame(ggi_ctx->ggi_visual)?0 : 1);
return GL_TRUE;
}
else
{
return GL_FALSE;
/* nothing since we don't have any point/line/triangle functions. */
}
}
......
/* $Id: fxapi.c,v 1.32 2001/09/23 16:50:01 brianp Exp $ */
/* $Id: fxapi.c,v 1.33 2002/06/15 02:38:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -283,6 +283,7 @@ fxMesaCreateContext(GLuint win,
char *errorstr;
GLboolean useBGR;
char *system = NULL;
__GLimports imports;
if (MESA_VERBOSE & VERBOSE_DRIVER) {
fprintf(stderr, "fxmesa: fxMesaCreateContext() Start\n");
......@@ -508,8 +509,10 @@ fxMesaCreateContext(GLuint win,
goto errorhandler;
}
ctx = fxMesa->glCtx = _mesa_create_context(fxMesa->glVis, shareCtx, /* share list context */
(void *) fxMesa, GL_TRUE);
_mesa_init_default_imports( &imports, (void *) fxMesa);
ctx = fxMesa->glCtx = _mesa_create_context(fxMesa->glVis,
shareCtx,
&imports);
if (!ctx) {
errorstr = "_mesa_create_context";
goto errorhandler;
......
/* $Id: fxdd.c,v 1.86 2002/06/13 04:28:30 brianp Exp $ */
/* $Id: fxdd.c,v 1.87 2002/06/15 02:38:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -264,7 +264,7 @@ fxDDClear(GLcontext * ctx, GLbitfield mask, GLboolean all,
/* Set the buffer used for drawing */
/* XXX support for separate read/draw buffers hasn't been tested */
static GLboolean
static void
fxDDSetDrawBuffer(GLcontext * ctx, GLenum mode)
{
fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx;
......@@ -276,19 +276,17 @@ fxDDSetDrawBuffer(GLcontext * ctx, GLenum mode)
if (mode == GL_FRONT_LEFT) {
fxMesa->currentFB = GR_BUFFER_FRONTBUFFER;
FX_grRenderBuffer(fxMesa->currentFB);
return GL_TRUE;
}
else if (mode == GL_BACK_LEFT) {
fxMesa->currentFB = GR_BUFFER_BACKBUFFER;
FX_grRenderBuffer(fxMesa->currentFB);
return GL_TRUE;
}
else if (mode == GL_NONE) {
FX_grColorMask(FXFALSE, FXFALSE);
return GL_TRUE;
}
else {
return GL_FALSE;
/* we'll need a software fallback */
/* XXX not implemented */
}
}
......
/* $Id: fxvb.c,v 1.12 2002/06/06 16:19:25 brianp Exp $ */
/* $Id: fxvb.c,v 1.13 2002/06/15 02:38:16 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -352,7 +352,7 @@ void fxChooseVertexState( GLcontext *ctx )
ind |= SETUP_TMU0;
}
}
else if (ctx->Texture._ReallyEnabled & TETURE0_ANY) {
else if (ctx->Texture._ReallyEnabled & TEXTURE0_ANY) {
ind |= SETUP_TMU0;
}
......
/* $Id: osmesa.c,v 1.80 2002/06/13 04:28:30 brianp Exp $ */
/* $Id: osmesa.c,v 1.81 2002/06/15 02:38:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -707,15 +707,10 @@ do { \
static GLboolean set_draw_buffer( GLcontext *ctx, GLenum mode )
static void set_draw_buffer( GLcontext *ctx, GLenum mode )
{
(void) ctx;
if (mode==GL_FRONT_LEFT) {
return GL_TRUE;
}
else {
return GL_FALSE;
}
(void) mode;
}
......
/* $Id: svgamesa.c,v 1.18 2002/06/13 04:28:30 brianp Exp $ */
/* $Id: svgamesa.c,v 1.19 2002/06/15 02:38:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -217,7 +217,7 @@ static void get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *heigh
*height = SVGAMesa->height = vga_getydim();
}
static GLboolean set_draw_buffer( GLcontext *ctx, GLenum buffer )
static void set_draw_buffer( GLcontext *ctx, GLenum buffer )
{
if (buffer == GL_FRONT_LEFT) {
SVGABuffer.DrawBuffer = SVGABuffer.FrontBuffer;
......@@ -229,7 +229,6 @@ static GLboolean set_draw_buffer( GLcontext *ctx, GLenum buffer )
SVGABuffer.BackBuffer=SVGABuffer.FrontBuffer;
SVGABuffer.FrontBuffer=tmpptr;
#endif
return GL_TRUE;
}
else if (buffer == GL_BACK_LEFT) {
SVGABuffer.DrawBuffer = SVGABuffer.BackBuffer;
......@@ -237,10 +236,10 @@ static GLboolean set_draw_buffer( GLcontext *ctx, GLenum buffer )
/* vga_waitretrace(); */
copy_buffer(SVGABuffer.BackBuffer);
#endif
return GL_TRUE;
}
else
return GL_FALSE;
else {
/* nothing since we don't have any point/line/triangle functions. */
}
}
......
/* $Id: wmesa.c,v 1.29 2002/06/13 04:28:30 brianp Exp $ */
/* $Id: wmesa.c,v 1.30 2002/06/15 02:38:17 brianp Exp $ */
/*
* Windows (Win32) device driver for Mesa 3.4
......@@ -569,15 +569,13 @@ static void enable( GLcontext* ctx, GLenum pname, GLboolean enable )
}
}
static GLboolean set_draw_buffer( GLcontext* ctx, GLenum mode )
static void set_draw_buffer( GLcontext* ctx, GLenum mode )
{
/* TODO: this could be better */
if (mode==GL_FRONT_LEFT || mode==GL_BACK_LEFT) {
return GL_TRUE;
}
else {
return GL_FALSE;
}
/* XXX doing nothing for now */
/* if front buffer, fine */
/* if back buffer, fine */
/* else, check swrast->_RasterMask & MULTI_DRAW_BIT, if true, */
/* use a swrast fallback function */
}
......@@ -3205,6 +3203,8 @@ static triangle_func choose_triangle_function( GLcontext *ctx )
if (ctx->Polygon.SmoothFlag) return NULL;
if (ctx->Texture._ReallyEnabled) return NULL;
if (!wmesa->db_flag) return NULL;
if (ctx->swrast->_RasterMask & MULTI_DRAW_BIT) return NULL;
/*if (wmesa->xm_buffer->buffer==XIMAGE)*/ {
if ( ctx->Light.ShadeModel==GL_SMOOTH
&& ctx->_RasterMask==DEPTH_BIT
......
/* $Id: xm_dd.c,v 1.31 2002/03/19 16:48:06 brianp Exp $ */
/* $Id: xm_dd.c,v 1.32 2002/06/15 02:38:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 4.0.2
* Version: 4.0.3
*
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
......@@ -115,9 +115,7 @@ flush( GLcontext *ctx )
}
static GLboolean
static void
set_draw_buffer( GLcontext *ctx, GLenum mode )
{
const XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;
......@@ -125,7 +123,6 @@ set_draw_buffer( GLcontext *ctx, GLenum mode )
/* write to front buffer */
xmesa->xm_buffer->buffer = xmesa->xm_buffer->frontbuffer;
xmesa_update_span_funcs(ctx);
return GL_TRUE;
}
else if (mode==GL_BACK_LEFT && xmesa->xm_buffer->db_state) {
/* write to back buffer */
......@@ -141,10 +138,11 @@ set_draw_buffer( GLcontext *ctx, GLenum mode )
xmesa->xm_buffer->buffer = xmesa->xm_buffer->frontbuffer;
}
xmesa_update_span_funcs(ctx);
return GL_TRUE;
}
else {
return GL_FALSE;
/* the swrast->_RasterMask MULTI_DRAW_BIT will be set and
* we'll fall back to swrast to draw points/lines/triangles.
*/
}
}
......
/* $Id: xm_line.c,v 1.18 2001/09/12 03:32:29 brianp Exp $ */
/* $Id: xm_line.c,v 1.19 2002/06/15 02:38:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -560,6 +560,7 @@ static swrast_line_func get_line_func( GLcontext *ctx )
if (ctx->Texture._ReallyEnabled) return (swrast_line_func) NULL;
if (ctx->Light.ShadeModel != GL_FLAT) return (swrast_line_func) NULL;
if (ctx->Line.StippleFlag) return (swrast_line_func) NULL;
if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_line_func) NULL;
if (xmesa->xm_buffer->buffer==XIMAGE
&& swrast->_RasterMask==DEPTH_BIT
......
/* $Id: xm_tri.c,v 1.22 2002/04/19 14:05:51 brianp Exp $ */
/* $Id: xm_tri.c,v 1.23 2002/06/15 02:38:17 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -1505,7 +1505,6 @@ static const char *triFuncName = NULL;
#define USE(triFunc) \
do { \
triFuncName = #triFunc; \
/*printf("%s\n", triFuncName);*/ \
return triFunc; \
} while (0)
......@@ -1531,6 +1530,7 @@ static swrast_tri_func get_triangle_func( GLcontext *ctx )
if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL;
if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL;
if (ctx->Texture._ReallyEnabled) return (swrast_tri_func) NULL;
if (swrast->_RasterMask & MULTI_DRAW_BIT) return (swrast_tri_func) NULL;
if (xmesa->xm_buffer->buffer==XIMAGE) {
if ( ctx->Light.ShadeModel==GL_SMOOTH
......
/* $Id: api_arrayelt.c,v 1.8 2002/04/19 00:23:08 brianp Exp $ */
/* $Id: api_arrayelt.c,v 1.9 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -347,7 +347,7 @@ void _ae_loopback_array_elt( GLint elt )
_ae_update_state( ctx );
for (ta = actx->texarrays ; ta->func ; ta++) {
ta->func( ta->unit, (char *)ta->array->Ptr + elt * ta->array->StrideB );
ta->func( ta->unit + GL_TEXTURE0_ARB, (char *)ta->array->Ptr + elt * ta->array->StrideB );
}
/* Must be last
......
/* $Id: attrib.c,v 1.66 2002/06/13 04:28:29 brianp Exp $ */
/* $Id: attrib.c,v 1.67 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -120,7 +120,7 @@ _mesa_PushAttrib(GLbitfield mask)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glPushAttrib %x\n", (int) mask);
_mesa_debug(ctx, "glPushAttrib %x\n", (int) mask);
if (ctx->AttribStackDepth >= MAX_ATTRIB_STACK_DEPTH) {
_mesa_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" );
......@@ -802,7 +802,8 @@ _mesa_PopAttrib(void)
while (attr) {
if (MESA_VERBOSE & VERBOSE_API) {
_mesa_debug("glPopAttrib %s\n", _mesa_lookup_enum_by_nr(attr->kind));
_mesa_debug(ctx, "glPopAttrib %s\n",
_mesa_lookup_enum_by_nr(attr->kind));
}
switch (attr->kind) {
......@@ -1078,7 +1079,7 @@ _mesa_PopAttrib(void)
_mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE);
}
if (ctx->Driver.ClipPlane)
ctx->Driver.ClipPlane( ctx, i, eyePlane );
ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, eyePlane );
}
/* normalize/rescale */
......
/* $Id: blend.c,v 1.35 2002/06/13 04:28:29 brianp Exp $ */
/* $Id: blend.c,v 1.36 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -46,9 +46,9 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug("glBlendFunc %s %s\n",
_mesa_lookup_enum_by_nr(sfactor),
_mesa_lookup_enum_by_nr(dfactor));
_mesa_debug(ctx, "glBlendFunc %s %s\n",
_mesa_lookup_enum_by_nr(sfactor),
_mesa_lookup_enum_by_nr(dfactor));
switch (sfactor) {
case GL_SRC_COLOR:
......@@ -127,11 +127,11 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB,
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug("glBlendFuncSeparate %s %s %s %s\n",
_mesa_lookup_enum_by_nr(sfactorRGB),
_mesa_lookup_enum_by_nr(dfactorRGB),
_mesa_lookup_enum_by_nr(sfactorA),
_mesa_lookup_enum_by_nr(dfactorA));
_mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",
_mesa_lookup_enum_by_nr(sfactorRGB),
_mesa_lookup_enum_by_nr(dfactorRGB),
_mesa_lookup_enum_by_nr(sfactorA),
_mesa_lookup_enum_by_nr(dfactorA));
switch (sfactorRGB) {
case GL_SRC_COLOR:
......@@ -268,8 +268,8 @@ _mesa_BlendEquation( GLenum mode )
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug("glBlendEquation %s\n",
_mesa_lookup_enum_by_nr(mode));
_mesa_debug(ctx, "glBlendEquation %s\n",
_mesa_lookup_enum_by_nr(mode));
switch (mode) {
case GL_FUNC_ADD_EXT:
......@@ -445,7 +445,7 @@ _mesa_ColorMask( GLboolean red, GLboolean green,
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glColorMask %d %d %d %d\n", red, green, blue, alpha);
_mesa_debug(ctx, "glColorMask %d %d %d %d\n", red, green, blue, alpha);
/* Shouldn't have any information about channel depth in core mesa
* -- should probably store these as the native booleans:
......
/* $Id: buffers.c,v 1.35 2002/06/13 04:28:29 brianp Exp $ */
/* $Id: buffers.c,v 1.36 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -97,7 +97,7 @@ _mesa_Clear( GLbitfield mask )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glClear 0x%x\n", mask);
_mesa_debug(ctx, "glClear 0x%x\n", mask);
if (mask & ~(GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT |
......@@ -146,7 +146,7 @@ _mesa_DrawBuffer( GLenum mode )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
_mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
switch (mode) {
case GL_AUX0:
......@@ -267,23 +267,11 @@ _mesa_DrawBuffer( GLenum mode )
}
/*
* If we get here there can't have been an error.
* Now see if device driver can implement the drawing to the target
* buffer(s). The driver may not be able to do GL_FRONT_AND_BACK mode
* for example. We'll take care of that in the core code by looping
* over the individual buffers.
* If we get here there can't have been an error. Now tell the
* device driver about it.
*/
ASSERT(ctx->Driver.SetDrawBuffer);
if ( (*ctx->Driver.SetDrawBuffer)(ctx, ctx->Color.DriverDrawBuffer) ) {
/* All OK, the driver will do all buffer writes */
ctx->Color.MultiDrawBuffer = GL_FALSE;
}
else {
/* We'll have to loop over the multiple draw buffer targets */
ctx->Color.MultiDrawBuffer = GL_TRUE;
/* Set drawing buffer to front for now */
(void) (*ctx->Driver.SetDrawBuffer)(ctx, GL_FRONT_LEFT);
}
(*ctx->Driver.SetDrawBuffer)(ctx, ctx->Color.DriverDrawBuffer);
ctx->Color.DrawBuffer = mode;
ctx->NewState |= _NEW_COLOR;
......@@ -298,7 +286,7 @@ _mesa_ReadBuffer( GLenum mode )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
_mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
switch (mode) {
case GL_AUX0:
......@@ -360,7 +348,7 @@ _mesa_ResizeBuffersMESA( void )
GLcontext *ctx = _mesa_get_current_context();
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glResizeBuffersMESA\n");
_mesa_debug(ctx, "glResizeBuffersMESA\n");
if (ctx) {
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
......@@ -416,7 +404,7 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
}
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug("glScissor %d %d %d %d\n", x, y, width, height);
_mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height);
if (x == ctx->Scissor.X &&
y == ctx->Scissor.Y &&
......
/* $Id: config.h,v 1.38 2002/05/27 17:04:52 brianp Exp $ */
/* $Id: config.h,v 1.39 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -151,7 +151,7 @@
/*
* Bits per accumulation buffer color component: 8, 16 or 32
*/
#define ACCUM_BITS 16
#define ACCUM_BITS 32
/*
......
/* $Id: context.c,v 1.166 2002/06/13 04:49:17 brianp Exp $ */
/* $Id: context.c,v 1.167 2002/06/15 02:38:15 brianp Exp $ */
/*
* Mesa 3-D graphics library
......@@ -232,12 +232,13 @@ __glCoreCreateContext(__GLimports *imports, __GLcontextModes *modes)
{
GLcontext *ctx;
ctx = (GLcontext *) (*imports->calloc)(0, 1, sizeof(GLcontext));
ctx = (GLcontext *) (*imports->calloc)(NULL, 1, sizeof(GLcontext));
if (ctx == NULL) {
return NULL;
}
ctx->Driver.CurrentExecPrimitive=0; /* XXX why is this here??? */
ctx->imports = *imports;
_mesa_init_default_exports(&(ctx->exports));
_mesa_initialize_visual(&ctx->Visual,
modes->rgbMode,
......@@ -552,7 +553,7 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock);