summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r128/r128_dd.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-01-20 02:49:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-01-20 02:49:27 +0000
commitd3fd7ba8af15bead2f770d68a893449adeb11397 (patch)
tree2c92f7cb35f2776d6c461378f93b556fc1ca080d /src/mesa/drivers/dri/r128/r128_dd.c
parent988a8862c8379c0312d40353ee4b35537dff59a1 (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/r128/r128_dd.c')
-rw-r--r--src/mesa/drivers/dri/r128/r128_dd.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_dd.c b/src/mesa/drivers/dri/r128/r128_dd.c
index b64c26b4bd..ce2e7f7d70 100644
--- a/src/mesa/drivers/dri/r128/r128_dd.c
+++ b/src/mesa/drivers/dri/r128/r128_dd.c
@@ -48,7 +48,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/* Return the width and height of the current color buffer.
*/
-static void r128DDGetBufferSize( GLframebuffer *buffer,
+static void r128GetBufferSize( GLframebuffer *buffer,
GLuint *width, GLuint *height )
{
GET_CURRENT_CONTEXT(ctx);
@@ -62,7 +62,7 @@ static void r128DDGetBufferSize( GLframebuffer *buffer,
/* Return various strings for glGetString().
*/
-static const GLubyte *r128DDGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *r128GetString( GLcontext *ctx, GLenum name )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
static char buffer[128];
@@ -100,7 +100,7 @@ static const GLubyte *r128DDGetString( GLcontext *ctx, GLenum name )
* hardware. All commands that are normally sent to the ring are
* already considered `flushed'.
*/
-static void r128DDFlush( GLcontext *ctx )
+static void r128Flush( GLcontext *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -121,7 +121,7 @@ static void r128DDFlush( GLcontext *ctx )
/* Make sure all commands have been sent to the hardware and have
* completed processing.
*/
-static void r128DDFinish( GLcontext *ctx )
+static void r128Finish( GLcontext *ctx )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
@@ -130,19 +130,18 @@ static void r128DDFinish( GLcontext *ctx )
rmesa->c_drawWaits++;
#endif
- r128DDFlush( ctx );
+ r128Flush( ctx );
r128WaitForIdle( rmesa );
}
/* Initialize the driver's misc functions.
*/
-void r128DDInitDriverFuncs( GLcontext *ctx )
+void r128InitDriverFuncs( struct dd_function_table *functions )
{
- ctx->Driver.GetBufferSize = r128DDGetBufferSize;
- ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
- ctx->Driver.GetString = r128DDGetString;
- ctx->Driver.Finish = r128DDFinish;
- ctx->Driver.Flush = r128DDFlush;
- ctx->Driver.Error = NULL;
+ functions->GetBufferSize = r128GetBufferSize;
+ functions->ResizeBuffers = _swrast_alloc_buffers;
+ functions->GetString = r128GetString;
+ functions->Finish = r128Finish;
+ functions->Flush = r128Flush;
}