diff options
Diffstat (limited to 'src/mesa/drivers/dri/mach64/mach64_span.c')
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_span.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c index 067ffab8ed..88863471d4 100644 --- a/src/mesa/drivers/dri/mach64/mach64_span.c +++ b/src/mesa/drivers/dri/mach64/mach64_span.c @@ -26,14 +26,13 @@ * Authors: * Gareth Hughes <gareth@valinux.com> * Leif Delgass <ldelgass@retinalburn.net> - * José Fonseca <j_r_fonseca@yahoo.co.uk> + * Jos�Fonseca <j_r_fonseca@yahoo.co.uk> */ #include "mach64_context.h" #include "mach64_ioctl.h" #include "mach64_state.h" #include "mach64_span.h" -#include "mach64_tex.h" #include "swrast/swrast.h" @@ -71,25 +70,11 @@ #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() +/* FIXME could/should we use dPriv->numClipRects like the other drivers? */ #define HW_CLIPLOOP() \ do { \ int _nc = mmesa->numClipRects; \ @@ -114,8 +99,6 @@ /* 16 bit, RGB565 color spanline and pixel functions */ -#define GET_SRC_PTR(_x, _y) (read_buf + _x * 2 + _y * pitch) -#define GET_DST_PTR(_x, _y) ( buf + _x * 2 + _y * pitch) #define SPANTMP_PIXEL_FMT GL_RGB #define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5 @@ -126,8 +109,8 @@ /* 32 bit, ARGB8888 color spanline and pixel functions */ -#define GET_SRC_PTR(_x, _y) (read_buf + _x * 4 + _y * pitch) -#define GET_DST_PTR(_x, _y) ( buf + _x * 4 + _y * pitch) +/* FIXME the old code always read back alpha as 0xff, i.e. fully opaque. + Was there a reason to do so ? If so that'll won't work with that template... */ #define SPANTMP_PIXEL_FMT GL_BGRA #define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV |