summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/trident/trident_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/trident/trident_context.c')
-rw-r--r--src/mesa/drivers/dri/trident/trident_context.c74
1 files changed, 32 insertions, 42 deletions
diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c
index 8dc7f0dc78..2b6d19c4a5 100644
--- a/src/mesa/drivers/dri/trident/trident_context.c
+++ b/src/mesa/drivers/dri/trident/trident_context.c
@@ -417,56 +417,46 @@ tridentInitDriver(__DRIscreenPrivate *sPriv)
return GL_TRUE;
}
-static struct __DriverAPIRec tridentAPI = {
- tridentInitDriver,
- tridentDestroyScreen,
- tridentCreateContext,
- tridentDestroyContext,
- tridentCreateBuffer,
- tridentDestroyBuffer,
- tridentSwapBuffers,
- tridentMakeCurrent,
- tridentUnbindContext,
-};
-
-
-PUBLIC void *__driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn,
- __DRIscreen *psc,
- const __GLcontextModes * modes,
- const __DRIversion * ddx_version,
- const __DRIversion * dri_version,
- const __DRIversion * drm_version,
- const __DRIframebuffer * frame_buffer,
- drmAddress pSAREA, int fd,
- int internal_api_version,
- const __DRIinterfaceMethods * interface,
- __GLcontextModes ** driver_modes )
+/**
+ * This is the driver specific part of the createNewScreen entry point.
+ *
+ * \todo maybe fold this into intelInitDriver
+ *
+ * \return the __GLcontextModes supported by this driver
+ */
+const __DRIconfig **tridentInitScreen(__DRIscreenPrivate *psp)
{
- __DRIscreenPrivate *psp;
static const __DRIversion ddx_expected = { 4, 0, 0 };
static const __DRIversion dri_expected = { 3, 1, 0 };
static const __DRIversion drm_expected = { 1, 0, 0 };
-
- dri_interface = interface;
-
+
if ( ! driCheckDriDdxDrmVersions2( "Trident",
- dri_version, & dri_expected,
- ddx_version, & ddx_expected,
- drm_version, & drm_expected ) ) {
+ &psp->dri_version, & dri_expected,
+ &psp->ddx_version, & ddx_expected,
+ &psp->drm_version, & drm_expected ) )
return NULL;
- }
- psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
- ddx_version, dri_version, drm_version,
- frame_buffer, pSAREA, fd,
- internal_api_version, &tridentAPI);
+ if (!tridentInitDriver(psp))
+ return NULL;
- if ( psp != NULL ) {
+ /* Wait... what? This driver doesn't report any modes... */
#if 0
- TRIDENTDRIPtr dri_priv = (TRIDENTDRIPtr) psp->pDevPriv;
- *driver_modes = tridentFillInModes( dri_priv->bytesPerPixel * 8,
- GL_TRUE );
+ TRIDENTDRIPtr dri_priv = (TRIDENTDRIPtr) psp->pDevPriv;
+ *driver_modes = tridentFillInModes( dri_priv->bytesPerPixel * 8,
+ GL_TRUE );
#endif
- }
- return (void *) psp;
+
+ return NULL;
}
+
+const struct __DriverAPIRec driDriverAPI = {
+ tridentInitScreen,
+ tridentDestroyScreen,
+ tridentCreateContext,
+ tridentDestroyContext,
+ tridentCreateBuffer,
+ tridentDestroyBuffer,
+ tridentSwapBuffers,
+ tridentMakeCurrent,
+ tridentUnbindContext,
+};