summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-02-28 10:32:28 -0500
committerKristian Høgsberg <[email protected]>2008-02-29 15:05:39 -0500
commit6cb3f5c4d8618a14bb7ad1d9df10ed7e648a7b2b (patch)
treeb4fa3dcaf590e54c455aeaa8c68d2dc7897b234d /src/mesa/drivers/dri/unichrome
parent16242a8007f41ab63f9a28bb9a750857c8cdb8af (diff)
Use __DRIextension mechanism providing loader functionality to the driver.
Instead of passing in a fixed struct, the loader now passes in a list of __DRIextension structs, to advertise the functionality it can provide to the driver. Each extension is individually versioned and can be extended or phased out as the interface develops.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c9
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c7
3 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index a06b65224d1..bbb198bf0e8 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -661,7 +661,7 @@ viaCreateContext(const __GLcontextModes *visual,
if (getenv("VIA_PAGEFLIP"))
vmesa->allowPageFlip = 1;
- (*dri_interface->getUST)( &vmesa->swap_ust );
+ (*sPriv->systemTime->getUST)( &vmesa->swap_ust );
vmesa->regMMIOBase = (GLuint *)((unsigned long)viaScreen->reg);
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index a14a4613d3e..482a1a63d70 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -512,6 +512,7 @@ static void viaWaitIdleVBlank( __DRIdrawablePrivate *dPriv,
GLuint value )
{
GLboolean missed_target;
+ __DRIscreenPrivate *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
@@ -526,7 +527,7 @@ static void viaWaitIdleVBlank( __DRIdrawablePrivate *dPriv,
driWaitForVBlank( dPriv, & missed_target );
if ( missed_target ) {
vmesa->swap_missed_count++;
- (*dri_interface->getUST)( &vmesa->swap_missed_ust );
+ (*psp->systemTime->getUST)( &vmesa->swap_missed_ust );
}
}
while (!viaCheckBreadcrumb(vmesa, value));
@@ -594,6 +595,7 @@ void viaCopyBuffer(__DRIdrawablePrivate *dPriv)
{
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
+ __DRIscreenPrivate *psp = dPriv->driScreenPriv;
if (VIA_DEBUG & DEBUG_IOCTL)
fprintf(stderr,
@@ -629,7 +631,7 @@ void viaCopyBuffer(__DRIdrawablePrivate *dPriv)
viaEmitBreadcrumbLocked(vmesa);
UNLOCK_HARDWARE(vmesa);
- (*dri_interface->getUST)( &vmesa->swap_ust );
+ (*psp->systemTime->getUST)( &vmesa->swap_ust );
}
@@ -638,6 +640,7 @@ void viaPageFlip(__DRIdrawablePrivate *dPriv)
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
struct via_renderbuffer buffer_tmp;
+ __DRIscreenPrivate *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
if (dPriv->vblFlags == VBLANK_FLAG_SYNC &&
@@ -653,7 +656,7 @@ void viaPageFlip(__DRIdrawablePrivate *dPriv)
viaEmitBreadcrumbLocked(vmesa);
UNLOCK_HARDWARE(vmesa);
- (*dri_interface->getUST)( &vmesa->swap_ust );
+ (*psp->systemTime->getUST)( &vmesa->swap_ust );
/* KW: FIXME: When buffers are freed, could free frontbuffer by
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index e6cc99eb86a..faf6505bfd9 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -341,7 +341,8 @@ static struct __DriverAPIRec viaAPI = {
static __GLcontextModes *
-viaFillInModes( unsigned pixel_bits, GLboolean have_back_buffer )
+viaFillInModes( __DRIscreenPrivate *psp,
+ unsigned pixel_bits, GLboolean have_back_buffer )
{
__GLcontextModes * modes;
__GLcontextModes * m;
@@ -378,7 +379,7 @@ viaFillInModes( unsigned pixel_bits, GLboolean have_back_buffer )
fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
}
- modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
+ modes = (*psp->contextModes->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
m = modes;
if ( ! driFillInModes( & m, fb_format, fb_type,
depth_bits_array, stencil_bits_array,
@@ -444,7 +445,7 @@ __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp)
if (!viaInitDriver(psp))
return NULL;
- return viaFillInModes( dri_priv->bytesPerPixel * 8, GL_TRUE );
+ return viaFillInModes( psp, dri_priv->bytesPerPixel * 8, GL_TRUE );
}