From d3fd7ba8af15bead2f770d68a893449adeb11397 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 20 Jan 2004 02:49:27 +0000 Subject: Before calling _mesa_create_context(), initialize a dd_function_table struct by calling _mesa_init_driver_functions() and then plugging in the driver- specific functions. In particular, make sure ctx->Driver.NewTextureObject points to the appropriate driver function so that _all_ texture objects are augmented with the driver-specific data. Put in a bunch of assertions in the texture-related driver functions that texObj->DriverData is valid. Remove old dead code in near future. --- src/mesa/drivers/dri/sis/sis_dd.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/mesa/drivers/dri/sis/sis_dd.c') diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c index aecc20e53d..2c97d270fd 100644 --- a/src/mesa/drivers/dri/sis/sis_dd.c +++ b/src/mesa/drivers/dri/sis/sis_dd.c @@ -48,7 +48,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* Return the width and height of the given buffer. */ static void -sisDDGetBufferSize( GLframebuffer *buffer, +sisGetBufferSize( GLframebuffer *buffer, GLuint *width, GLuint *height ) { GET_CURRENT_CONTEXT(ctx); @@ -63,7 +63,7 @@ sisDDGetBufferSize( GLframebuffer *buffer, /* Return various strings for glGetString(). */ static const GLubyte * -sisDDGetString( GLcontext *ctx, GLenum name ) +sisGetString( GLcontext *ctx, GLenum name ) { sisContextPtr smesa = SIS_CONTEXT(ctx); static char buffer[128]; @@ -88,7 +88,7 @@ sisDDGetString( GLcontext *ctx, GLenum name ) /* Send all commands to the hardware. No-op, due to mmio. */ static void -sisDDFlush( GLcontext *ctx ) +sisFlush( GLcontext *ctx ) { /* Do nothing */ } @@ -97,11 +97,11 @@ sisDDFlush( GLcontext *ctx ) * completed processing. */ static void -sisDDFinish( GLcontext *ctx ) +sisFinish( GLcontext *ctx ) { sisContextPtr smesa = SIS_CONTEXT(ctx); - sisDDFlush( ctx ); + sisFlush( ctx ); WaitEngIdle( smesa ); } @@ -165,12 +165,11 @@ sisUpdateBufferSize( sisContextPtr smesa ) /* Initialize the driver's misc functions. */ void -sisDDInitDriverFuncs( GLcontext *ctx ) +sisInitDriverFuncs( struct dd_function_table *functions ) { - ctx->Driver.GetBufferSize = sisDDGetBufferSize; - ctx->Driver.ResizeBuffers = _swrast_alloc_buffers; - ctx->Driver.GetString = sisDDGetString; - ctx->Driver.Finish = sisDDFinish; - ctx->Driver.Flush = sisDDFlush; - ctx->Driver.Error = NULL; + functions->GetBufferSize = sisGetBufferSize; + functions->ResizeBuffers = _swrast_alloc_buffers; + functions->GetString = sisGetString; + functions->Finish = sisFinish; + functions->Flush = sisFlush; } -- cgit v1.2.3