int x1 = mmesa->driDrawable->x + ctx->Scissor.X;
int y1 = mmesa->driDrawable->y + mmesa->driDrawable->h
- (ctx->Scissor.Y + ctx->Scissor.Height);
- int x2 = x1 + ctx->Scissor.Width - 1;
- int y2 = y1 + ctx->Scissor.Height - 1;
+ int x2 = x1 + ctx->Scissor.Width;
+ int y2 = y1 + ctx->Scissor.Height;
if (x1 < 0) x1 = 0;
if (y1 < 0) y1 = 0;
*/
-static void mgaDDStencilFunc(GLcontext *ctx, GLenum func, GLint ref,
- GLuint mask)
+static void
+mgaDDStencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func, GLint ref,
+ GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint stencil;
mmesa->hw.stencilctl |= stencilctl;
}
-static void mgaDDStencilMask(GLcontext *ctx, GLuint mask)
+static void
+mgaDDStencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
mmesa->hw.stencil |= MGA_FIELD( S_swtmsk, mask );
}
-static void mgaDDStencilOp(GLcontext *ctx, GLenum fail, GLenum zfail,
- GLenum zpass)
+static void
+mgaDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail, GLenum zfail,
+ GLenum zpass)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
GLuint stencilctl;
else
mgaXMesaSetBackClipRects( mmesa );
-#ifndef _SOLO
sarea->req_drawable = driDrawable->draw;
sarea->req_draw_buffer = mmesa->draw_buffer;
-#endif
+
mgaUpdateClipping( mmesa->glCtx );
mgaCalcViewport( mmesa->glCtx );
/*
* _DrawDestMask is easier to cope with than <mode>.
*/
- switch ( ctx->Color._DrawDestMask ) {
- case FRONT_LEFT_BIT:
+ switch ( ctx->DrawBuffer->_ColorDrawBufferMask[0] ) {
+ case BUFFER_BIT_FRONT_LEFT:
mmesa->setup.dstorg = mmesa->mgaScreen->frontOffset;
mmesa->dirty |= MGA_UPLOAD_CONTEXT;
mmesa->draw_buffer = MGA_FRONT;
mgaXMesaSetFrontClipRects( mmesa );
FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_FALSE );
break;
- case BACK_LEFT_BIT:
+ case BUFFER_BIT_BACK_LEFT:
mmesa->setup.dstorg = mmesa->mgaScreen->backOffset;
mmesa->draw_buffer = MGA_BACK;
mmesa->dirty |= MGA_UPLOAD_CONTEXT;
FALLBACK( ctx, MGA_FALLBACK_DRAW_BUFFER, GL_TRUE );
return;
}
-
- /* We want to update the s/w rast state too so that r200SetBuffer()
- * gets called.
- */
- _swrast_DrawBuffer(ctx, mode);
}
ctx->Driver.PolygonStipple = mgaDDPolygonStipple;
- ctx->Driver.StencilFunc = mgaDDStencilFunc;
- ctx->Driver.StencilMask = mgaDDStencilMask;
- ctx->Driver.StencilOp = mgaDDStencilOp;
+ ctx->Driver.StencilFuncSeparate = mgaDDStencilFuncSeparate;
+ ctx->Driver.StencilMaskSeparate = mgaDDStencilMaskSeparate;
+ ctx->Driver.StencilOpSeparate = mgaDDStencilOpSeparate;
ctx->Driver.DepthRange = mgaDepthRange;
ctx->Driver.Viewport = mgaViewport;