diff options
author | Eric Anholt <[email protected]> | 2005-05-30 08:07:03 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2005-05-30 08:07:03 +0000 |
commit | 12eabeb3b9ffe12032ded88959430d36d4ced419 (patch) | |
tree | 33e17c8cfc737ef931b3c5aa37dafef6efc2cdfd /src/mesa | |
parent | c7f8d3645132b704a8cde9053c0a836874174e5f (diff) |
Pull locking out from HW_LOCK/UNLOCK into SpanRenderStart/Finish. Provides a
factor of 5+ improvement in no_rast glxgears and 2.3 in no_rast quake3 (n=1,
320x240, 16bpp, low qualities, 1ghz p3)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/mach64/mach64_span.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c index 1c9d85c74ae..575a3648628 100644 --- a/src/mesa/drivers/dri/mach64/mach64_span.c +++ b/src/mesa/drivers/dri/mach64/mach64_span.c @@ -58,6 +58,7 @@ (void) read_buf; (void) buf; (void) p #define LOCAL_DEPTH_VARS \ + mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ mach64ScreenRec *mach64Screen = mmesa->mach64Screen; \ __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \ __DRIscreenPrivate *driScreen = mmesa->driScreen; \ @@ -87,10 +88,7 @@ #define Y_FLIP( _y ) (height - _y - 1) -#define HW_LOCK() \ - mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ - LOCK_HARDWARE( mmesa ); \ - FINISH_DMA_LOCKED( mmesa ); \ +#define HW_LOCK() #define HW_CLIPLOOP() \ do { \ @@ -106,8 +104,7 @@ } \ } while (0) -#define HW_UNLOCK() \ - UNLOCK_HARDWARE( mmesa ) \ +#define HW_UNLOCK() @@ -184,6 +181,19 @@ static void mach64DDSetBuffer( GLcontext *ctx, } } +static void mach64SpanRenderStart( GLcontext *ctx ) +{ + mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); + LOCK_HARDWARE( mmesa ); + FINISH_DMA_LOCKED( mmesa ); +} + +static void mach64SpanRenderFinish( GLcontext *ctx ) +{ + mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); + _swrast_flush( ctx ); + UNLOCK_HARDWARE( mmesa ); +} void mach64DDInitSpanFuncs( GLcontext *ctx ) { @@ -242,6 +252,8 @@ void mach64DDInitSpanFuncs( GLcontext *ctx ) swdd->WriteMonoCIPixels = NULL; swdd->ReadCI32Span = NULL; swdd->ReadCI32Pixels = NULL; + swdd->SpanRenderStart = mach64SpanRenderStart; + swdd->SpanRenderFinish = mach64SpanRenderFinish; } |