s/0/NULL/ (Jeff Muizelaar)

This commit is contained in:
Brian Paul
2005-02-17 14:12:50 +00:00
parent 6e2fd96627
commit 0846e52d46
12 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ void r200FlushElts( r200ContextPtr rmesa )
fprintf(stderr, "%s\n", __FUNCTION__);
assert( rmesa->dma.flush == r200FlushElts );
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
/* Cope with odd number of elts:
*/
+3 -3
View File
@@ -182,7 +182,7 @@ static const struct tnl_pipeline_stage *r200_pipeline[] = {
*/
/* &_r200_render_stage, */ /* FIXME: bugs with ut2003 */
&_tnl_render_stage, /* FALLBACK: */
0,
NULL,
};
@@ -561,7 +561,7 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
if (rmesa->state.scissor.pClipRects) {
FREE(rmesa->state.scissor.pClipRects);
rmesa->state.scissor.pClipRects = 0;
rmesa->state.scissor.pClipRects = NULL;
}
if ( release_texture_heaps ) {
@@ -648,7 +648,7 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
} else {
if (R200_DEBUG & DEBUG_DRI)
fprintf(stderr, "%s ctx is null\n", __FUNCTION__);
_mesa_make_current( 0, 0 );
_mesa_make_current( NULL, NULL );
}
if (R200_DEBUG & DEBUG_DRI)
+1 -1
View File
@@ -288,7 +288,7 @@ void r200ReleaseDmaRegion( r200ContextPtr rmesa,
rmesa->dma.nr_released_bufs++;
}
region->buf = 0;
region->buf = NULL;
region->start = 0;
}
+2 -2
View File
@@ -623,7 +623,7 @@ static struct reg *lookup_reg( struct reg *tab, int reg )
}
fprintf(stderr, "*** unknown reg 0x%x\n", reg);
return 0;
return NULL;
}
@@ -931,7 +931,7 @@ static char *primname[0x10] = {
"TRIANGLE_FAN",
"TRIANGLE_STRIP",
"RECT_LIST",
0,
NULL,
"3VRT_POINTS",
"3VRT_LINES",
"POINT_SPRITES",
+1 -1
View File
@@ -1918,7 +1918,7 @@ static void r200Enable( GLcontext *ctx, GLenum cap, GLboolean state )
R200_STATECHANGE(rmesa, ctx );
if ( state ) {
rmesa->hw.ctx.cmd[CTX_PP_CNTL] |= R200_FOG_ENABLE;
r200Fogfv( ctx, GL_FOG_MODE, 0 );
r200Fogfv( ctx, GL_FOG_MODE, NULL );
} else {
rmesa->hw.ctx.cmd[CTX_PP_CNTL] &= ~R200_FOG_ENABLE;
R200_STATECHANGE(rmesa, tcl);
+4 -4
View File
@@ -742,8 +742,8 @@ void r200InitState( r200ContextPtr rmesa )
ctx->Driver.Lightfv( ctx, p, GL_AMBIENT, l->Ambient );
ctx->Driver.Lightfv( ctx, p, GL_DIFFUSE, l->Diffuse );
ctx->Driver.Lightfv( ctx, p, GL_SPECULAR, l->Specular );
ctx->Driver.Lightfv( ctx, p, GL_POSITION, 0 );
ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, 0 );
ctx->Driver.Lightfv( ctx, p, GL_POSITION, NULL );
ctx->Driver.Lightfv( ctx, p, GL_SPOT_DIRECTION, NULL );
ctx->Driver.Lightfv( ctx, p, GL_SPOT_EXPONENT, &l->SpotExponent );
ctx->Driver.Lightfv( ctx, p, GL_SPOT_CUTOFF, &l->SpotCutoff );
ctx->Driver.Lightfv( ctx, p, GL_CONSTANT_ATTENUATION,
@@ -764,12 +764,12 @@ void r200InitState( r200ContextPtr rmesa )
ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, NULL );
}
ctx->Driver.Fogfv( ctx, GL_FOG_MODE, 0 );
ctx->Driver.Fogfv( ctx, GL_FOG_MODE, NULL );
ctx->Driver.Fogfv( ctx, GL_FOG_DENSITY, &ctx->Fog.Density );
ctx->Driver.Fogfv( ctx, GL_FOG_START, &ctx->Fog.Start );
ctx->Driver.Fogfv( ctx, GL_FOG_END, &ctx->Fog.End );
ctx->Driver.Fogfv( ctx, GL_FOG_COLOR, ctx->Fog.Color );
ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, 0 );
ctx->Driver.Fogfv( ctx, GL_FOG_COORDINATE_SOURCE_EXT, NULL );
rmesa->hw.grd.cmd[GRD_VERT_GUARD_CLIP_ADJ] = IEEE_ONE;
rmesa->hw.grd.cmd[GRD_VERT_GUARD_DISCARD_ADJ] = IEEE_ONE;
+1 -1
View File
@@ -266,7 +266,7 @@ static void flush_last_swtcl_prim( r200ContextPtr rmesa )
if (R200_DEBUG & DEBUG_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
if (rmesa->dma.current.buf) {
struct r200_dma_region *current = &rmesa->dma.current;
+2 -2
View File
@@ -484,7 +484,7 @@ const struct tnl_pipeline_stage _r200_tcl_stage =
0, /* re-run (always runs) */
GL_TRUE, /* active */
0, 0, /* inputs (set in check_render), outputs */
0, 0, /* changed_inputs, private */
0, NULL, /* changed_inputs, private */
dtr, /* destructor */
r200_init_tcl_render, /* check - initially set to alloc data */
r200_run_tcl_render /* run */
@@ -540,7 +540,7 @@ static void transition_to_hwtnl( GLcontext *ctx )
if ( rmesa->dma.flush )
rmesa->dma.flush( rmesa );
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
if (rmesa->swtcl.indexed_verts.buf)
r200ReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts,
+1 -1
View File
@@ -214,7 +214,7 @@ static void flush_prims( r200ContextPtr rmesa )
rmesa->tcl.vertex_format = rmesa->vb.vtxfmt_0;
rmesa->tcl.aos_components[0] = &tmp;
rmesa->tcl.nr_aos_components = 1;
rmesa->dma.flush = 0;
rmesa->dma.flush = NULL;
/* Optimize the primitive list:
*/
+2 -2
View File
@@ -659,7 +659,7 @@ static struct dynfn *lookup( struct dynfn *l, const int *key )
return f;
}
return 0;
return NULL;
}
/* Can't use the loopback template for this:
@@ -947,7 +947,7 @@ void r200VtxfmtInitChoosers( GLvertexformat *vfmt )
static struct dynfn *codegen_noop( GLcontext *ctx, const int *key )
{
(void) ctx; (void) key;
return 0;
return NULL;
}
void r200InitCodegen( struct dfn_generators *gen, GLboolean useCodegen )
+2 -2
View File
@@ -131,7 +131,7 @@ static struct dynfn *r200_makeSSENormal3f( GLcontext *ctx, const int * key )
static struct dynfn *r200_makeSSEColor3fv( GLcontext *ctx, const int * key )
{
if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB)
return 0;
return NULL;
else
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -144,7 +144,7 @@ static struct dynfn *r200_makeSSEColor3fv( GLcontext *ctx, const int * key )
static struct dynfn *r200_makeSSEColor3f( GLcontext *ctx, const int * key )
{
if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB)
return 0;
return NULL;
else
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
+3 -3
View File
@@ -305,14 +305,14 @@ struct dynfn *r200_makeX86Color4ub( GLcontext *ctx, const int *key )
return dfn;
}
else
return 0;
return NULL;
}
struct dynfn *r200_makeX86Color3fv( GLcontext *ctx, const int *key )
{
if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB)
return 0;
return NULL;
else
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -325,7 +325,7 @@ struct dynfn *r200_makeX86Color3fv( GLcontext *ctx, const int *key )
struct dynfn *r200_makeX86Color3f( GLcontext *ctx, const int *key )
{
if (VTX_COLOR(key[0],0) != R200_VTX_FP_RGB)
return 0;
return NULL;
else
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);