diff options
author | Kristian Høgsberg <[email protected]> | 2008-02-28 10:32:28 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-02-29 15:05:39 -0500 |
commit | 6cb3f5c4d8618a14bb7ad1d9df10ed7e648a7b2b (patch) | |
tree | b4fa3dcaf590e54c455aeaa8c68d2dc7897b234d /src/mesa/drivers/dri/intel | |
parent | 16242a8007f41ab63f9a28bb9a750857c8cdb8af (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/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_buffers.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 13 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index 8f59eb5c2bf..5199f833e2c 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -812,6 +812,8 @@ intelScheduleSwap(__DRIdrawablePrivate * dPriv, GLboolean *missed_target) void intelSwapBuffers(__DRIdrawablePrivate * dPriv) { + __DRIscreenPrivate *psp = dPriv->driScreenPriv; + if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) { GET_CURRENT_CONTEXT(ctx); struct intel_context *intel; @@ -837,7 +839,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) } intel_fb->swap_count++; - (*dri_interface->getUST) (&ust); + (*psp->systemTime->getUST) (&ust); if (missed_target) { intel_fb->swap_missed_count++; intel_fb->swap_missed_ust = ust - intel_fb->swap_ust; diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index e3622db5966..d3f0681807e 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -746,6 +746,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, __DRIdrawablePrivate * driDrawPriv, __DRIdrawablePrivate * driReadPriv) { + __DRIscreenPrivate *psp = driDrawPriv->driScreenPriv; if (driContextPriv) { struct intel_context *intel = @@ -809,7 +810,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, ? driGetDefaultVBlankFlags(&intel->optionCache) : VBLANK_FLAG_NO_IRQ; - (*dri_interface->getUST) (&intel_fb->swap_ust); + (*psp->systemTime->getUST) (&intel_fb->swap_ust); driDrawableInitVBlank(driDrawPriv); intel_fb->vbl_waited = driDrawPriv->vblSeq; diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 7ac7240b56a..8b8eeb77aa3 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -676,7 +676,8 @@ static const struct __DriverAPIRec intelAPI = { static __GLcontextModes * -intelFillInModes(unsigned pixel_bits, unsigned depth_bits, +intelFillInModes(__DRIscreenPrivate *psp, + unsigned pixel_bits, unsigned depth_bits, unsigned stencil_bits, GLboolean have_back_buffer) { __GLcontextModes *modes; @@ -728,8 +729,8 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits, } modes = - (*dri_interface->createContextModes) (num_modes, - sizeof(__GLcontextModes)); + (*psp->contextModes->createContextModes) (num_modes, + sizeof(__GLcontextModes)); m = modes; if (!driFillInModes(&m, fb_format, fb_type, depth_bits_array, stencil_bits_array, @@ -802,7 +803,7 @@ PUBLIC __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp) if (!intelInitDriver(psp)) return NULL; - return intelFillInModes(dri_priv->cpp * 8, + return intelFillInModes(psp, dri_priv->cpp * 8, (dri_priv->cpp == 2) ? 16 : 24, (dri_priv->cpp == 2) ? 0 : 8, 1); } @@ -883,10 +884,10 @@ PUBLIC __GLcontextModes *__dri2DriverInitScreen(__DRIscreenPrivate *psp) psp->extensions = intelExtensions; - modes = intelFillInModes(16, 16, 0, 1); + modes = intelFillInModes(psp, 16, 16, 0, 1); for (m = modes; m->next != NULL; m = m->next) ; - m->next = intelFillInModes(32, 24, 8, 1); + m->next = intelFillInModes(psp, 32, 24, 8, 1); return modes; } |