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/intel_screen.c | |
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/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 13 |
1 files changed, 7 insertions, 6 deletions
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; } |