summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome/via_state.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2004-12-29 20:46:27 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2004-12-29 20:46:27 +0000
commit490e764d7affc093feff80192ed3f3d4642fcb8f (patch)
treea35f7ee56cdc3b36953b362d28654aa0df7f8920 /src/mesa/drivers/dri/unichrome/via_state.c
parentef494c06b6e4dc720f32700f899ddad7cadb0a95 (diff)
Simplfy clear() and swapbuffers() code.
Fix various mishandling of cliprects. Allow multiple primitives to be emitted to a single dma buffer, which was largely impossible previously. Re-enable the fast unclipped render stage.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_state.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index e9f0d6682f..ef3846106d 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -642,21 +642,13 @@ static void viaDrawBuffer(GLcontext *ctx, GLenum mode)
if (VIA_DEBUG) fprintf(stderr, "%s in\n", __FUNCTION__);
if (mode == GL_FRONT) {
VIA_FLUSH_DMA(vmesa);
- vmesa->drawMap = (char *)vmesa->driScreen->pFB;
- vmesa->readMap = (char *)vmesa->driScreen->pFB;
- vmesa->drawPitch = vmesa->front.pitch;
- vmesa->readPitch = vmesa->front.pitch;
- viaXMesaSetFrontClipRects(vmesa);
+ vmesa->drawBuffer = vmesa->readBuffer = &vmesa->front;
FALLBACK(vmesa, VIA_FALLBACK_DRAW_BUFFER, GL_FALSE);
return;
}
else if (mode == GL_BACK) {
VIA_FLUSH_DMA(vmesa);
- vmesa->drawMap = vmesa->back.map;
- vmesa->readMap = vmesa->back.map;
- vmesa->drawPitch = vmesa->back.pitch;
- vmesa->readPitch = vmesa->back.pitch;
- viaXMesaSetBackClipRects(vmesa);
+ vmesa->drawBuffer = vmesa->readBuffer = &vmesa->back;
FALLBACK(vmesa, VIA_FALLBACK_DRAW_BUFFER, GL_FALSE);
return;
}
@@ -665,6 +657,8 @@ static void viaDrawBuffer(GLcontext *ctx, GLenum mode)
return;
}
+ viaXMesaWindowMoved(vmesa);
+
/* We want to update the s/w rast state too so that r200SetBuffer()
* gets called.
*/
@@ -693,6 +687,10 @@ static void viaClearColor(GLcontext *ctx, const GLfloat color[4])
*/
+/* Using drawXoff like this is incorrect outside of locked regions.
+ * This hardware just isn't capable of private back buffers without
+ * glitches and/or a hefty locking scheme.
+ */
void viaCalcViewport(GLcontext *ctx)
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
@@ -1550,6 +1548,8 @@ void viaValidateState( GLcontext *ctx )
viaChooseStencilState(ctx);
if (!vmesa->Fallback) {
+ viaChooseVertexState(ctx);
+ viaChooseRenderState(ctx);
via_emit_state(vmesa);
vmesa->newState = 0;
}