From 5c384721522d6a2f9a500e26f0805dda77a31126 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Nov 2006 18:57:30 +0000 Subject: Refactor savageXMesaSet{Back,Front}ClipRects. Refactor savageXMesaSetBackClipRects and savageXMesaSetFrontClipRects into a single new routine called savageXMesaSetClipRects. This allows a few cleanups in the code. --- src/mesa/drivers/dri/savage/savagestate.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/mesa/drivers/dri/savage/savagestate.c') diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index e554afdbb7e..2f20dc23b6e 100644 --- a/src/mesa/drivers/dri/savage/savagestate.c +++ b/src/mesa/drivers/dri/savage/savagestate.c @@ -647,23 +647,20 @@ static void savageDDDrawBuffer(GLcontext *ctx, GLenum mode ) case BUFFER_BIT_FRONT_LEFT: imesa->IsDouble = GL_FALSE; imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->frontOffset>>11; - - imesa->NotFirstFrame = GL_FALSE; - savageXMesaSetFrontClipRects( imesa ); - FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; case BUFFER_BIT_BACK_LEFT: imesa->IsDouble = GL_TRUE; imesa->regs.s4.destCtrl.ni.offset = imesa->savageScreen->backOffset>>11; - imesa->NotFirstFrame = GL_FALSE; - savageXMesaSetBackClipRects( imesa ); - FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE ); break; default: FALLBACK( ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_TRUE ); return; } + imesa->NotFirstFrame = GL_FALSE; + savageXMesaSetClipRects(imesa); + FALLBACK(ctx, SAVAGE_FALLBACK_DRAW_BUFFER, GL_FALSE); + if (destCtrl != imesa->regs.s4.destCtrl.ui) imesa->dirty |= SAVAGE_UPLOAD_GLOBAL; } -- cgit v1.2.3