summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-06-02 22:48:03 +0000
committerIan Romanick <idr@us.ibm.com>2004-06-02 22:48:03 +0000
commit5b98ada88071a752b6000756949a1951183cdd0b (patch)
tree99e88ed38d4fe16e62fdb1ee3e964dfe8891daf8 /src/mesa/drivers/dri/tdfx
parentffb36d57a5f6359b5b91b73af60482a0016dd431 (diff)
driCheckDriDdxDrmVersion uses a function that is not available to
drivers when DRI_NEW_INTERFACE_ONLY is defined. #ifndef it away in that situation. Add a new function, driCheckDriDdxDrmVersion2, that is passed in the version information that is already supplied to __driCreateNewScreen. Part of the reason that information is supplied to __driCreateNewScreen is so that the driver doesn't have to make those calls to get it! Modify all drivers that support the new interface to use the new function instead of the old. As soon as all drivers support the new interface, driCheckDriDdxDrmVersion can be removed.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index b78da2ca8f..370f3283c8 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -121,34 +121,6 @@ tdfxInitDriver( __DRIscreenPrivate *sPriv )
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
}
- /* Check the DRI externsion version */
- if ( sPriv->driMajor != 4 || sPriv->driMinor < 0 ) {
- __driUtilMessage( "tdfx DRI driver expected DRI version 4.0.x "
- "but got version %d.%d.%d",
- sPriv->driMajor, sPriv->driMinor, sPriv->driPatch );
- return GL_FALSE;
- }
-
- /* Check that the DDX driver version is compatible */
- if ( sPriv->ddxMajor != 1 ||
- sPriv->ddxMinor < 0 ) {
- __driUtilMessage(
- "3dfx DRI driver expected DDX driver version 1.0.x "
- "but got version %d.%d.%d",
- sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch );
- return GL_FALSE;
- }
-
- /* Check that the DRM driver version is compatible */
- if ( sPriv->drmMajor != 1 ||
- sPriv->drmMinor < 0 ) {
- __driUtilMessage(
- "3dfx DRI driver expected DRM driver version 1.0.x "
- "but got version %d.%d.%d",
- sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch );
- return GL_FALSE;
- }
-
if ( !tdfxCreateScreen( sPriv ) ) {
tdfxDestroyScreen( sPriv );
return GL_FALSE;
@@ -413,6 +385,16 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
__GLcontextModes ** driver_modes )
{
__DRIscreenPrivate *psp;
+ static const __DRIversion ddx_expected = { 4, 0, 0 };
+ static const __DRIversion dri_expected = { 1, 0, 0 };
+ static const __DRIversion drm_expected = { 1, 0, 0 };
+
+ if ( ! driCheckDriDdxDrmVersions2( "tdfx",
+ dri_version, & dri_expected,
+ ddx_version, & ddx_expected,
+ drm_version, & drm_expected ) ) {
+ return NULL;
+ }
psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
ddx_version, dri_version, drm_version,