From 5696710f96f9517d24958208fb90a5a72d145a26 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Fri, 15 Oct 2004 20:52:47 +0000 Subject: Huge dumb drop. State: - Color buffer clear is accelerated, but flickers (possibly caused by a recent DDX or Mesa change or bad merge) - Everything else uses software fallback rendering - There should be no clipping-related artifacts with the sw-clipspan-fixes.patch against Mesa (posted on dri-devel) - Multiple clients should be rock solid with a DDX patch that is soon to come (soon = within the next hour or so) --- src/mesa/drivers/dri/r300/radeon_span.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/mesa/drivers/dri/r300/radeon_span.c') diff --git a/src/mesa/drivers/dri/r300/radeon_span.c b/src/mesa/drivers/dri/r300/radeon_span.c index 9046320cc1..7b548754e6 100644 --- a/src/mesa/drivers/dri/r300/radeon_span.c +++ b/src/mesa/drivers/dri/r300/radeon_span.c @@ -70,8 +70,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. GLuint height = dPriv->h; \ GLuint xo = dPriv->x; \ GLuint yo = dPriv->y; \ - char *buf = (char *)(sPriv->pFB + radeon->radeonScreen->depthOffset); \ - GLuint pitch = radeon->radeonScreen->depthPitch; \ + char *buf = (char *)(sPriv->pFB + radeonScreen->depthOffset); \ + GLuint pitch = radeonScreen->depthPitch; \ (void) buf; (void) pitch #define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS @@ -248,10 +248,10 @@ do { \ /* 16-bit depth buffer functions */ #define WRITE_DEPTH( _x, _y, d ) \ - *(GLushort *)(buf + (_x + xo)*2 + (_y + yo)*pitch ) = d; + *(GLushort *)(buf + (_x + xo + (_y + yo)*pitch)*2 ) = d; #define READ_DEPTH( d, _x, _y ) \ - d = *(GLushort *)(buf + (_x + xo)*2 + (_y + yo)*pitch ); + d = *(GLushort *)(buf + (_x + xo + (_y + yo)*pitch)*2 ); #define TAG(x) radeon##x##_16_LINEAR #include "depthtmp.h" @@ -260,7 +260,7 @@ do { \ */ #define WRITE_DEPTH( _x, _y, d ) \ do { \ - GLuint offset = (_x + xo)*4 + (_y + yo)*pitch; \ + GLuint offset = (_x + xo + (_y + yo)*pitch)*4; \ GLuint tmp = *(GLuint *)(buf + offset); \ tmp &= 0xff000000; \ tmp |= ((d) & 0x00ffffff); \ @@ -268,7 +268,7 @@ do { \ } while (0) #define READ_DEPTH( d, _x, _y ) \ - d = *(GLuint *)(buf + (_x + xo)*4 + (_y + yo)*pitch) & 0x00ffffff; + d = *(GLuint *)(buf + (_x + xo + (_y + yo)*pitch)*4) & 0x00ffffff; #define TAG(x) radeon##x##_24_8_LINEAR #include "depthtmp.h" @@ -426,7 +426,6 @@ static void radeonSpanRenderFinish(GLcontext * ctx) void radeonInitSpanFuncs(GLcontext * ctx) { - r200ContextPtr rmesa = R200_CONTEXT(ctx); radeonContextPtr radeon = RADEON_CONTEXT(ctx); struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); -- cgit v1.2.3