diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2005-03-22 14:25:55 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2005-03-22 14:25:55 +0000 |
commit | 050b77a9ac45afc5c3acb4d018f1d4858c2f4cc7 (patch) | |
tree | 9c8a33e48be56fe1218b6e6beee8bb8136ebc29f /src/mesa/drivers/dri/unichrome/via_span.c | |
parent | 59b4b7e07e1374d63eede85c93665e4630a359b1 (diff) |
merge unichrome changes from branch
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_span.c')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_span.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c index 4773f51627..e5e25f08c1 100644 --- a/src/mesa/drivers/dri/unichrome/via_span.c +++ b/src/mesa/drivers/dri/unichrome/via_span.c @@ -51,15 +51,15 @@ #define Y_FLIP(_y) (height - _y - 1) #define HW_LOCK() -#define HW_CLIPLOOP() \ - do { \ - __DRIdrawablePrivate *dPriv = vmesa->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_CLIPLOOP() \ + do { \ + __DRIdrawablePrivate *dPriv = vmesa->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() \ @@ -70,7 +70,7 @@ #undef LOCAL_VARS #define LOCAL_VARS \ - viaContextPtr vmesa = VIA_CONTEXT(ctx); \ + struct via_context *vmesa = VIA_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ GLuint draw_pitch = vmesa->drawBuffer->pitch; \ GLuint read_pitch = vmesa->readBuffer->pitch; \ @@ -111,7 +111,7 @@ /* 16 bit depthbuffer functions. */ #define LOCAL_DEPTH_VARS \ - viaContextPtr vmesa = VIA_CONTEXT(ctx); \ + struct via_context *vmesa = VIA_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = vmesa->driDrawable; \ GLuint depth_pitch = vmesa->depth.pitch; \ GLuint height = dPriv->h; \ @@ -176,7 +176,7 @@ static void viaSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, GLuint bufferBit) { - viaContextPtr vmesa = VIA_CONTEXT(ctx); + struct via_context *vmesa = VIA_CONTEXT(ctx); if (bufferBit == DD_FRONT_LEFT_BIT) { vmesa->drawBuffer = vmesa->readBuffer = &vmesa->front; @@ -193,23 +193,21 @@ static void viaSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer, */ void viaSpanRenderStart( GLcontext *ctx ) { - viaContextPtr vmesa = VIA_CONTEXT(ctx); - VIA_FINISH_PRIM(vmesa); + struct via_context *vmesa = VIA_CONTEXT(ctx); + viaWaitIdle(vmesa); LOCK_HARDWARE(vmesa); - viaFlushDmaLocked(vmesa, 0); - WAIT_IDLE(vmesa); } void viaSpanRenderFinish( GLcontext *ctx ) { - viaContextPtr vmesa = VIA_CONTEXT(ctx); + struct via_context *vmesa = VIA_CONTEXT(ctx); _swrast_flush( ctx ); UNLOCK_HARDWARE( vmesa ); } void viaInitSpanFuncs(GLcontext *ctx) { - viaContextPtr vmesa = VIA_CONTEXT(ctx); + struct via_context *vmesa = VIA_CONTEXT(ctx); struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx); swdd->SetBuffer = viaSetBuffer; |