From 446972bc2756cf9770a82f51aa0dc4f529c6cae5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Oct 2006 20:02:42 +0000 Subject: Want to stop passing x/y/width/height to Clear() function. The coordinates need to be computed after we've got the hw lock. Code updated to: 1. Ignore all/x/y/width/height/ params passed to Clear func. 2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed. --- src/mesa/drivers/dri/trident/trident_state.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/trident') diff --git a/src/mesa/drivers/dri/trident/trident_state.c b/src/mesa/drivers/dri/trident/trident_state.c index 3f9ad79732f..a9be50688b3 100644 --- a/src/mesa/drivers/dri/trident/trident_state.c +++ b/src/mesa/drivers/dri/trident/trident_state.c @@ -151,13 +151,14 @@ void tridentCopyBuffer( const __DRIdrawablePrivate *dPriv ) static void tridentDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch ) + GLint cxFoo, GLint cyFoo, GLint cwFoo, GLint chFoo) { tridentContextPtr tmesa = TRIDENT_CONTEXT(ctx); unsigned char *MMIO = tmesa->tridentScreen->mmio.map; int busy; GLuint flags = 0; GLint i; + GLint cx, cy, cw, ch; #define DRM_TRIDENT_FRONT 0x01 #define DRM_TRIDENT_BACK 0x02 @@ -183,6 +184,12 @@ static void tridentDDClear( GLcontext *ctx, GLbitfield mask, GLboolean all, LOCK_HARDWARE(tmesa); + /* get region after locking: */ + cx = ctx->DrawBuffer->_Xmin; + cy = ctx->DrawBuffer->_Ymin; + cw = ctx->DrawBuffer->_Xmax - cx; + ch = ctx->DrawBuffer->_Ymax - cy; + if ( flags ) { cx += tmesa->drawX; @@ -290,7 +297,7 @@ if (flags & DRM_TRIDENT_FRONT) { UNLOCK_HARDWARE(tmesa); if ( mask ) - _swrast_Clear( ctx, mask, all, cx, cy, cw, ch ); + _swrast_Clear( ctx, mask, 0, 0, 0, 0, 0); } static void tridentDDShadeModel( GLcontext *ctx, GLenum mode ) -- cgit v1.2.3