diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/ffb/ffb_vtxfmt.c | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_vtxfmt.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_vtxfmt.c | 13 |
3 files changed, 9 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c b/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c index d6a61d98e52..9c1b770fbd1 100644 --- a/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c +++ b/src/mesa/drivers/dri/ffb/ffb_vtxfmt.c @@ -341,7 +341,8 @@ void ffbInitTnlModule(GLcontext *ctx) ffb_init_norm_funcs(); ffb_init_vert_funcs(); - MEMSET(vfmt, 0, sizeof(GLvertexformat)); + /* start by initializing to no-op functions */ + _mesa_noop_vtxfmt_init(vfmt); /* Handled fully in supported states: */ vfmt->ArrayElement = NULL; /* FIXME: ... */ @@ -389,18 +390,8 @@ void ffbInitTnlModule(GLcontext *ctx) vfmt->Begin = ffb_Begin; vfmt->End = ffb_End; - vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ - vfmt->DrawArrays = NULL; vfmt->DrawElements = NULL; - vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements; /* discard range */ - - - /* Not active in supported states; just keep ctx->Current uptodate: */ - vfmt->EdgeFlag = _mesa_noop_EdgeFlag; - vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; - vfmt->Indexi = _mesa_noop_Indexi; - vfmt->Indexiv = _mesa_noop_Indexiv; /* Active but unsupported -- fallback if we receive these: * diff --git a/src/mesa/drivers/dri/r200/r200_vtxfmt.c b/src/mesa/drivers/dri/r200/r200_vtxfmt.c index f42a046c00d..673076d0605 100644 --- a/src/mesa/drivers/dri/r200/r200_vtxfmt.c +++ b/src/mesa/drivers/dri/r200/r200_vtxfmt.c @@ -1056,12 +1056,16 @@ static void r200VtxFmtFlushVertices( GLcontext *ctx, GLuint flags ) */ +/** + * Called once during context creation. + */ void r200VtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) { r200ContextPtr rmesa = R200_CONTEXT( ctx ); GLvertexformat *vfmt = &(rmesa->vb.vtxfmt); - MEMSET( vfmt, 0, sizeof(GLvertexformat) ); + /* start by initializing to no-op functions */ + _mesa_noop_vtxfmt_init(vfmt); /* Hook in chooser functions for codegen, etc: */ @@ -1071,7 +1075,6 @@ void r200VtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) */ vfmt->Materialfv = r200_Materialfv; vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ - vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ vfmt->Begin = r200_Begin; vfmt->End = r200_End; @@ -1085,15 +1088,6 @@ void r200VtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) vfmt->DrawElements = r200_fallback_DrawElements; vfmt->DrawRangeElements = r200_fallback_DrawRangeElements; - - /* Not active in supported states; just keep ctx->Current uptodate: - */ - vfmt->EdgeFlag = _mesa_noop_EdgeFlag; - vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; - vfmt->Indexf = _mesa_noop_Indexf; - vfmt->Indexfv = _mesa_noop_Indexfv; - - /* Active but unsupported -- fallback if we receive these: */ vfmt->CallList = r200_fallback_CallList; diff --git a/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c b/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c index 3b3f459dffb..e9a76dc92eb 100644 --- a/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c +++ b/src/mesa/drivers/dri/radeon/radeon_vtxfmt.c @@ -929,7 +929,8 @@ void radeonVtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); GLvertexformat *vfmt = &(rmesa->vb.vtxfmt); - MEMSET( vfmt, 0, sizeof(GLvertexformat) ); + /* start by initializing to no-op functions */ + _mesa_noop_vtxfmt_init(vfmt); /* Hook in chooser functions for codegen, etc: */ @@ -939,7 +940,6 @@ void radeonVtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) */ vfmt->Materialfv = radeon_Materialfv; vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */ - vfmt->Rectf = _mesa_noop_Rectf; /* generic helper */ vfmt->Begin = radeon_Begin; vfmt->End = radeon_End; @@ -953,15 +953,6 @@ void radeonVtxfmtInit( GLcontext *ctx, GLboolean useCodegen ) vfmt->DrawElements = radeon_fallback_DrawElements; vfmt->DrawRangeElements = radeon_fallback_DrawRangeElements; - - /* Not active in supported states; just keep ctx->Current uptodate: - */ - vfmt->EdgeFlag = _mesa_noop_EdgeFlag; - vfmt->EdgeFlagv = _mesa_noop_EdgeFlagv; - vfmt->Indexf = _mesa_noop_Indexf; - vfmt->Indexfv = _mesa_noop_Indexfv; - - /* Active but unsupported -- fallback if we receive these: */ vfmt->CallList = radeon_fallback_CallList; |