diff options
author | Dave Airlie <airliedfreedesktop.org> | 2004-03-10 03:43:15 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2004-03-10 03:43:15 +0000 |
commit | d4b672425339307d39b31c4733273cf994f51e05 (patch) | |
tree | 49d77581df5ac8d3a079baaf593bb1b4fe9b1366 /src/mesa/drivers/dri/i810 | |
parent | b2dd5095c42a2e1323c5ccf8d657c7b37d3e8c2e (diff) |
back port span changes from i810, these have been in my tree for a while seem
fine ..
Diffstat (limited to 'src/mesa/drivers/dri/i810')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810span.c | 33 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i810/i810span.h | 3 |
2 files changed, 26 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c index dc8f4d1cb95..53bd15162f8 100644 --- a/src/mesa/drivers/dri/i810/i810span.c +++ b/src/mesa/drivers/dri/i810/i810span.c @@ -14,6 +14,7 @@ #define DBG 0 #define LOCAL_VARS \ + i810ContextPtr imesa = I810_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ i810ScreenPrivate *i810Screen = imesa->i810Screen; \ GLuint pitch = i810Screen->backPitch; \ @@ -28,6 +29,7 @@ (void) read_buf; (void) buf; (void) p #define LOCAL_DEPTH_VARS \ + i810ContextPtr imesa = I810_CONTEXT(ctx); \ __DRIdrawablePrivate *dPriv = imesa->driDrawable; \ i810ScreenPrivate *i810Screen = imesa->i810Screen; \ GLuint pitch = i810Screen->backPitch; \ @@ -55,11 +57,7 @@ #define Y_FLIP(_y) (height - _y - 1) -#define HW_LOCK() \ - i810ContextPtr imesa = I810_CONTEXT(ctx); \ - I810_FIREVERTICES(imesa); \ - i810DmaFinish(imesa); \ - LOCK_HARDWARE_QUIESCENT(imesa); +#define HW_LOCK() #define HW_CLIPLOOP() \ do { \ @@ -76,11 +74,7 @@ } \ } while (0) -#define HW_UNLOCK() \ - UNLOCK_HARDWARE(imesa); - - - +#define HW_UNLOCK() /* 16 bit, 565 rgb color spanline and pixel functions */ @@ -148,6 +142,22 @@ static void i810SetBuffer(GLcontext *ctx, GLframebuffer *buffer, imesa->drawMap = imesa->readMap; } +/* Move locking out to get reasonable span performance. + */ +void i810SpanRenderStart( GLcontext *ctx ) +{ + i810ContextPtr imesa = I810_CONTEXT(ctx); + I810_FIREVERTICES(imesa); + LOCK_HARDWARE(imesa); + i810RegetLockQuiescent( imesa ); +} + +void i810SpanRenderFinish( GLcontext *ctx ) +{ + i810ContextPtr imesa = I810_CONTEXT( ctx ); + _swrast_flush( ctx ); + UNLOCK_HARDWARE( imesa ); +} void i810InitSpanFuncs( GLcontext *ctx ) { @@ -167,4 +177,7 @@ void i810InitSpanFuncs( GLcontext *ctx ) swdd->WriteDepthSpan = i810WriteDepthSpan_16; swdd->ReadDepthPixels = i810ReadDepthPixels_16; swdd->WriteDepthPixels = i810WriteDepthPixels_16; + + swdd->SpanRenderStart = i810SpanRenderStart; + swdd->SpanRenderFinish = i810SpanRenderFinish; } diff --git a/src/mesa/drivers/dri/i810/i810span.h b/src/mesa/drivers/dri/i810/i810span.h index a7b809bf18b..545bce46a63 100644 --- a/src/mesa/drivers/dri/i810/i810span.h +++ b/src/mesa/drivers/dri/i810/i810span.h @@ -3,4 +3,7 @@ extern void i810InitSpanFuncs( GLcontext *ctx ); +extern void i810SpanRenderFinish( GLcontext *ctx ); +extern void i810SpanRenderStart( GLcontext *ctx ); + #endif |