From 02f377d5e2dd18537d0807ad63675a0970b5a37d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 4 Nov 2011 08:57:20 +0100 Subject: xserver pixman mesa git update 4 nov 2011 --- mesalib/src/mesa/drivers/dri/common/utils.c | 118 ---------------------------- 1 file changed, 118 deletions(-) (limited to 'mesalib/src/mesa/drivers/dri/common/utils.c') diff --git a/mesalib/src/mesa/drivers/dri/common/utils.c b/mesalib/src/mesa/drivers/dri/common/utils.c index 54156d34a..d8656a784 100644 --- a/mesalib/src/mesa/drivers/dri/common/utils.c +++ b/mesalib/src/mesa/drivers/dri/common/utils.c @@ -137,124 +137,6 @@ driGetRendererString( char * buffer, const char * hardware_name, } -/** - * Utility function used by drivers to test the verions of other components. - * - * \param driver_name Name of the driver. Used in error messages. - * \param driActual Actual DRI version supplied __driCreateNewScreen. - * \param driExpected Minimum DRI version required by the driver. - * \param ddxActual Actual DDX version supplied __driCreateNewScreen. - * \param ddxExpected Minimum DDX minor and range of DDX major version required by the driver. - * \param drmActual Actual DRM version supplied __driCreateNewScreen. - * \param drmExpected Minimum DRM version required by the driver. - * - * \returns \c GL_TRUE if all version requirements are met. Otherwise, - * \c GL_FALSE is returned. - * - * \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2 - * - * \todo - * Now that the old \c driCheckDriDdxDrmVersions function is gone, this - * function and \c driCheckDriDdxDrmVersions2 should be renamed. - */ -GLboolean -driCheckDriDdxDrmVersions3(const char * driver_name, - const __DRIversion * driActual, - const __DRIversion * driExpected, - const __DRIversion * ddxActual, - const __DRIutilversion2 * ddxExpected, - const __DRIversion * drmActual, - const __DRIversion * drmExpected) -{ - static const char format[] = "%s DRI driver expected %s version %d.%d.x " - "but got version %d.%d.%d\n"; - static const char format2[] = "%s DRI driver expected %s version %d-%d.%d.x " - "but got version %d.%d.%d\n"; - - - /* Check the DRI version */ - if ( (driActual->major != driExpected->major) - || (driActual->minor < driExpected->minor) ) { - fprintf(stderr, format, driver_name, "DRI", - driExpected->major, driExpected->minor, - driActual->major, driActual->minor, driActual->patch); - return GL_FALSE; - } - - /* Check that the DDX driver version is compatible */ - if ( (ddxActual->major < ddxExpected->major_min) - || (ddxActual->major > ddxExpected->major_max) - || (ddxActual->minor < ddxExpected->minor) ) { - fprintf(stderr, format2, driver_name, "DDX", - ddxExpected->major_min, ddxExpected->major_max, ddxExpected->minor, - ddxActual->major, ddxActual->minor, ddxActual->patch); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if ( (drmActual->major != drmExpected->major) - || (drmActual->minor < drmExpected->minor) ) { - fprintf(stderr, format, driver_name, "DRM", - drmExpected->major, drmExpected->minor, - drmActual->major, drmActual->minor, drmActual->patch); - return GL_FALSE; - } - - return GL_TRUE; -} - -GLboolean -driCheckDriDdxDrmVersions2(const char * driver_name, - const __DRIversion * driActual, - const __DRIversion * driExpected, - const __DRIversion * ddxActual, - const __DRIversion * ddxExpected, - const __DRIversion * drmActual, - const __DRIversion * drmExpected) -{ - __DRIutilversion2 ddx_expected; - ddx_expected.major_min = ddxExpected->major; - ddx_expected.major_max = ddxExpected->major; - ddx_expected.minor = ddxExpected->minor; - ddx_expected.patch = ddxExpected->patch; - return driCheckDriDdxDrmVersions3(driver_name, driActual, - driExpected, ddxActual, & ddx_expected, - drmActual, drmExpected); -} - -GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer, - GLint *x, GLint *y, - GLsizei *width, GLsizei *height ) -{ - /* left clipping */ - if (*x < buffer->_Xmin) { - *width -= (buffer->_Xmin - *x); - *x = buffer->_Xmin; - } - - /* right clipping */ - if (*x + *width > buffer->_Xmax) - *width -= (*x + *width - buffer->_Xmax - 1); - - if (*width <= 0) - return GL_FALSE; - - /* bottom clipping */ - if (*y < buffer->_Ymin) { - *height -= (buffer->_Ymin - *y); - *y = buffer->_Ymin; - } - - /* top clipping */ - if (*y + *height > buffer->_Ymax) - *height -= (*y + *height - buffer->_Ymax - 1); - - if (*height <= 0) - return GL_FALSE; - - return GL_TRUE; -} - /** * Creates a set of \c struct gl_config that a driver will expose. * -- cgit v1.2.3