diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-07-24 06:29:14 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-07-24 06:29:14 +0000 |
commit | c39bf5e273a4995a279ae2af59fc29e06ab47e29 (patch) | |
tree | 7b2edd0c9b039d75da7b95c8c97142c31494a03e /src/mesa/drivers/dri/common/utils.c | |
parent | 7d40d230fa26abeb9f92bdcf8012eddbc585b118 (diff) |
All elements of pre-DRI_NEW_INTERFACE_ONLY are removed. This allows
1,402 lines of code to be removed from Mesa (drivers and libGL). The
big winner is dri_util.c.
Primary changes are:
1. Remove all "deprecated" entry-points from the various structures in
dri_interface.h.
2. Rename the remaining fields to removed "version numbers." So,
bindContext3 becomes bindContext. Functions with "New" in the name
(e.g., CreateNewContext) were *not* changed, but that is an option.
Having "New" in the name is less annoying to me than having "3" in the name.
3. Remove all compatibility code that handles cases where the driver or
the loader is too old to support the latest interfaces.
4. Append the API version to the __driCreateNewScreen function name.
This is currently done by hand. In the future (i.e., the next time we
make an incompatible change to the interface) we'll want to come up with
a better way to do this. This prevents old loaders from being able to load
new (incompatible) drivers.
5. Bump the API version to 20050722. All drivers (by way of dri_util.c)
require this version.
6. All drivers are *required* to expose GLX_SGIX_fbconfig and
GLX_OML_swap_method (or the moral equivalents). Support for these
functions in implicit in the use of the "new" interface.
7. Some cases still exist that need to be compiled differently in a loader
or core Mesa versus in a driver. These are identified by the define
IN_DRI_DRIVER.
Diffstat (limited to 'src/mesa/drivers/dri/common/utils.c')
-rw-r--r-- | src/mesa/drivers/dri/common/utils.c | 61 |
1 files changed, 5 insertions, 56 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index fcdb9956b7..41367b85d8 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -35,10 +35,6 @@ #include "extensions.h" #include "utils.h" -#if !defined( DRI_NEW_INTERFACE_ONLY ) -#include "xf86dri.h" /* For XF86DRIQueryVersion prototype. */ -#endif - #if defined(USE_X86_ASM) #include "x86/common_x86_asm.h" #endif @@ -275,57 +271,6 @@ void driInitSingleExtension( GLcontext * ctx, } - - -#ifndef DRI_NEW_INTERFACE_ONLY -/** - * Utility function used by drivers to test the verions of other components. - * - * \deprecated - * All drivers using the new interface should use \c driCheckDriDdxVersions2 - * instead. This function is implemented using a call that is not available - * to drivers using the new interface. Furthermore, the information gained - * by this call (the DRI and DDX version information) is already provided to - * the driver via the new interface. - */ -GLboolean -driCheckDriDdxDrmVersions(__DRIscreenPrivate *sPriv, - const char * driver_name, - int dri_major, int dri_minor, - int ddx_major, int ddx_minor, - int drm_major, int drm_minor) -{ - static const char format[] = "%s DRI driver expected %s version %d.%d.x " - "but got version %d.%d.%d"; - int major, minor, patch; - - /* Check the DRI version */ - if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) { - if (major != dri_major || minor < dri_minor) { - __driUtilMessage(format, driver_name, "DRI", dri_major, dri_minor, - major, minor, patch); - return GL_FALSE; - } - } - - /* Check that the DDX driver version is compatible */ - if (sPriv->ddxMajor != ddx_major || sPriv->ddxMinor < ddx_minor) { - __driUtilMessage(format, driver_name, "DDX", ddx_major, ddx_minor, - sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != drm_major || sPriv->drmMinor < drm_minor) { - __driUtilMessage(format, driver_name, "DRM", drm_major, drm_minor, - sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); - return GL_FALSE; - } - - return GL_TRUE; -} -#endif /* DRI_NEW_INTERFACE_ONLY */ - /** * Utility function used by drivers to test the verions of other components. * @@ -343,7 +288,11 @@ driCheckDriDdxDrmVersions(__DRIscreenPrivate *sPriv, * \returns \c GL_TRUE if all version requirements are met. Otherwise, * \c GL_FALSE is returned. * - * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions, __driUtilMessage + * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2, __driUtilMessage + * + * \todo + * Now that the old \c driCheckDriDdxDrmVersions function is gone, this + * function and \c driCheckDriDdxDrmVersions2 should be renamed. */ GLboolean driCheckDriDdxDrmVersions3(const char * driver_name, |