diff options
author | Felix Kuehling <[email protected]> | 2005-01-05 23:56:16 +0000 |
---|---|---|
committer | Felix Kuehling <[email protected]> | 2005-01-05 23:56:16 +0000 |
commit | 3e4d4aca77479f7c9cef8fdc218c20d1f2876433 (patch) | |
tree | a05120785e2742612ca6099d586a3f5ea5448223 /src/mesa/drivers/dri/savage/savagestate.c | |
parent | 1e21673ea14ad1368fcebbc4d5dde8746497d782 (diff) |
* Fixed handling of scissors
* Only set scissor regs directly if drmMinor < 1
* Don't set texaddr to 0 when a texture unit is disabled. That would trigger
the tightened texture state check in the DRM if the texaddr and texdesc
registers were not emitted atomically.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savagestate.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savagestate.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index ec3b5c4adc0..107344c703b 100644 --- a/src/mesa/drivers/dri/savage/savagestate.c +++ b/src/mesa/drivers/dri/savage/savagestate.c @@ -1202,6 +1202,8 @@ static void savageDDEnable_s4(GLcontext *ctx, GLenum cap, GLboolean state) case GL_SCISSOR_TEST: imesa->scissor = state; imesa->dirty |= SAVAGE_UPLOAD_CLIPRECTS; + savageDDScissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); break; case GL_STENCIL_TEST: if (!imesa->hw_stencil) @@ -1292,6 +1294,8 @@ static void savageDDEnable_s3d(GLcontext *ctx, GLenum cap, GLboolean state) case GL_SCISSOR_TEST: imesa->scissor = state; imesa->dirty |= SAVAGE_UPLOAD_CLIPRECTS; + savageDDScissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, + ctx->Scissor.Width, ctx->Scissor.Height); break; case GL_STENCIL_TEST: FALLBACK (ctx, SAVAGE_FALLBACK_STENCIL, state); @@ -1505,7 +1509,7 @@ static void savageUpdateRegister_s4(savageContextPtr imesa) /* * Scissors updates drawctrl0 and drawctrl 1 */ - if (imesa->scissorChanged) + if (imesa->scissorChanged && imesa->savageScreen->driScrnPriv->drmMinor < 1) { if(imesa->scissor) { @@ -1521,6 +1525,7 @@ static void savageUpdateRegister_s4(savageContextPtr imesa) imesa->regs.s4.drawCtrl1.ni.scissorXEnd = imesa->draw_rect.x2-1; imesa->regs.s4.drawCtrl1.ni.scissorYEnd = imesa->draw_rect.y2-1; } + imesa->scissorChanged = GL_FALSE; } /* the savage4 uses the contiguous range of BCI registers 0x1e-0x39 @@ -1531,7 +1536,7 @@ static void savageUpdateRegister_s4(savageContextPtr imesa) } static void savageUpdateRegister_s3d(savageContextPtr imesa) { - if (imesa->scissorChanged) + if (imesa->scissorChanged && imesa->savageScreen->driScrnPriv->drmMinor < 1) { if(imesa->scissor) { @@ -1555,6 +1560,7 @@ static void savageUpdateRegister_s3d(savageContextPtr imesa) imesa->regs.s3d.scissorsEnd.ni.scissorYEnd = imesa->draw_rect.y2-1; } + imesa->scissorChanged = GL_FALSE; } /* Some temporary hacks to workaround lockups. Not sure if they are @@ -1845,37 +1851,6 @@ void savageDDInitState( savageContextPtr imesa ) { NEW_TEXTURE_MATRIX|\ NEW_USER_CLIP|NEW_CLIENT_STATE)) -void savageDDRenderStart(GLcontext *ctx) -{ - savageContextPtr imesa = SAVAGE_CONTEXT( ctx ); - __DRIdrawablePrivate *dPriv = imesa->driDrawable; - drm_clip_rect_t *pbox; - GLint nbox; - - /* if the screen is overrided by other application. set the scissor. - * In MulitPass, re-render the screen. - */ - pbox = dPriv->pClipRects; - nbox = dPriv->numClipRects; - if (nbox) - { - imesa->currentClip = nbox; - /* set scissor to the first clip box*/ - savageDDScissor(ctx,pbox->x1,pbox->y1,pbox->x2,pbox->y2); - - /*savageDDUpdateHwState(ctx);*/ /* update to hardware register*/ - } - else /* need not render at all*/ - { - /*ctx->VB->CopyStart = ctx->VB->Count;*/ - } -} - - -void savageDDRenderEnd(GLcontext *ctx) -{ -} - static void savageDDInvalidateState( GLcontext *ctx, GLuint new_state ) { _swrast_InvalidateState( ctx, new_state ); |