From cf5b2f7419b28cdd533c60e205d5a90d96e85c8e Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 1 Jul 2005 00:08:46 +0000 Subject: remove common macros used in the span functions of most drivers from the individual drivers and put them in common code. It is still possible for a driver to define its own macros if it has special needs. This affects CLIPPIXEL, CLIPSPAN, HW_CLIPLOOP, HW_ENDCLIPLOOP, and for drivers using the spantmp2 template also GET_SRC_PTR and GET_DST_PTR. --- src/mesa/drivers/dri/gamma/gamma_span.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/mesa/drivers/dri/gamma/gamma_span.c') diff --git a/src/mesa/drivers/dri/gamma/gamma_span.c b/src/mesa/drivers/dri/gamma/gamma_span.c index db61f1c777..66cc961c64 100644 --- a/src/mesa/drivers/dri/gamma/gamma_span.c +++ b/src/mesa/drivers/dri/gamma/gamma_span.c @@ -40,21 +40,6 @@ #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS - -#define CLIPPIXEL( _x, _y ) \ - ((_x >= minx) && (_x < maxx) && (_y >= miny) && (_y < maxy)) - - -#define CLIPSPAN( _x, _y, _n, _x1, _n1, _i ) \ - if ( _y < miny || _y >= maxy ) { \ - _n1 = 0, _x1 = x; \ - } else { \ - _n1 = _n; \ - _x1 = _x; \ - if ( _x1 < minx ) _i += (minx-_x1), n1 -= (minx-_x1), _x1 = minx; \ - if ( _x1 + _n1 >= maxx ) n1 -= (_x1 + n1 - maxx); \ - } - #define Y_FLIP( _y ) (height - _y - 1) #define HW_LOCK() \ @@ -63,21 +48,6 @@ gammaGetLock( gmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT ); \ GAMMAHW_LOCK( gmesa ); -#define HW_CLIPLOOP() \ - do { \ - __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \ - int _nc = dPriv->numClipRects; \ - \ - while ( _nc-- ) { \ - int minx = dPriv->pClipRects[_nc].x1 - dPriv->x; \ - int miny = dPriv->pClipRects[_nc].y1 - dPriv->y; \ - int maxx = dPriv->pClipRects[_nc].x2 - dPriv->x; \ - int maxy = dPriv->pClipRects[_nc].y2 - dPriv->y; - -#define HW_ENDCLIPLOOP() \ - } \ - } while (0) - #define HW_UNLOCK() GAMMAHW_UNLOCK( gmesa ) @@ -156,7 +126,6 @@ do { \ #include "depthtmp.h" - #if 0 /* Unused */ /* 32 bit depthbuffer functions. */ -- cgit v1.2.3