summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/sis
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-10-18 20:02:42 +0000
committerBrian Paul <[email protected]>2006-10-18 20:02:42 +0000
commit446972bc2756cf9770a82f51aa0dc4f529c6cae5 (patch)
treedde17acb61b36206619a1cb617f3cb29df1c1107 /src/mesa/drivers/dri/sis
parentccb64bbb2a32761efa076ebafa7ccdaf2d412b0e (diff)
Want to stop passing x/y/width/height to Clear() function.
The coordinates need to be computed after we've got the hw lock. Code updated to: 1. Ignore all/x/y/width/height/ params passed to Clear func. 2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed.
Diffstat (limited to 'src/mesa/drivers/dri/sis')
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_clear.c26
-rw-r--r--src/mesa/drivers/dri/sis/sis_clear.c30
2 files changed, 21 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/sis/sis6326_clear.c b/src/mesa/drivers/dri/sis/sis6326_clear.c
index be5addb7cf2..d8f39b31c7d 100644
--- a/src/mesa/drivers/dri/sis/sis6326_clear.c
+++ b/src/mesa/drivers/dri/sis/sis6326_clear.c
@@ -69,25 +69,19 @@ sis6326UpdateZPattern(sisContextPtr smesa, GLclampd z)
}
void
-sis6326DDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height)
+sis6326DDClear(GLcontext *ctx, GLbitfield mask, GLboolean allFoo,
+ GLint xFoo, GLint yFoo, GLint widthFoo, GLint heightFoo)
{
sisContextPtr smesa = SIS_CONTEXT(ctx);
GLint x1, y1, width1, height1;
- if (all) {
- GLframebuffer *buffer = ctx->DrawBuffer;
-
- x1 = 0;
- y1 = 0;
- width1 = buffer->Width;
- height1 = buffer->Height;
- } else {
- x1 = x;
- y1 = Y_FLIP(y+height-1);
- width1 = width;
- height1 = height;
- }
+ /* get region after locking: */
+ x1 = ctx->DrawBuffer->_Xmin;
+ y1 = ctx->DrawBuffer->_Ymin;
+ width1 = ctx->DrawBuffer->_Xmax - x1;
+ height1 = ctx->DrawBuffer->_Ymax - y1;
+ y1 = Y_FLIP(y1 + height1 - 1);
+
/* XXX: Scissoring */
fprintf(stderr, "Clear\n");
@@ -116,7 +110,7 @@ sis6326DDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
UNLOCK_HARDWARE();
if (mask != 0)
- _swrast_Clear(ctx, mask, all, x1, y1, width, height);
+ _swrast_Clear(ctx, mask, 0, 0, 0, 0, 0);
}
diff --git a/src/mesa/drivers/dri/sis/sis_clear.c b/src/mesa/drivers/dri/sis/sis_clear.c
index 637d502381e..64b68708717 100644
--- a/src/mesa/drivers/dri/sis/sis_clear.c
+++ b/src/mesa/drivers/dri/sis/sis_clear.c
@@ -95,27 +95,19 @@ sisUpdateZStencilPattern( sisContextPtr smesa, GLclampd z, GLint stencil )
}
void
-sisDDClear( GLcontext * ctx, GLbitfield mask, GLboolean all,
- GLint x, GLint y, GLint width, GLint height )
+sisDDClear( GLcontext * ctx, GLbitfield mask, GLboolean allFoo,
+ GLint xFoo, GLint yFoo, GLint widthFoo, GLint heightFoo )
{
- sisContextPtr smesa = SIS_CONTEXT(ctx);
-
- GLint x1, y1, width1, height1;
+ sisContextPtr smesa = SIS_CONTEXT(ctx);
- if (all) {
- GLframebuffer *buffer = ctx->DrawBuffer;
+ GLint x1, y1, width1, height1;
- x1 = 0;
- y1 = 0;
- width1 = buffer->Width;
- height1 = buffer->Height;
- } else {
- x1 = x;
- y1 = Y_FLIP(y+height-1);
- width1 = width;
- height1 = height;
- }
- /* XXX: Scissoring */
+ /* get region after locking: */
+ x1 = ctx->DrawBuffer->_Xmin;
+ y1 = ctx->DrawBuffer->_Ymin;
+ width1 = ctx->DrawBuffer->_Xmax - x1;
+ height1 = ctx->DrawBuffer->_Ymax - y1;
+ y1 = Y_FLIP(y1 + height1 - 1);
/* Mask out any non-existent buffers */
if (ctx->Visual.depthBits == 0 || !ctx->Depth.Mask)
@@ -153,7 +145,7 @@ sisDDClear( GLcontext * ctx, GLbitfield mask, GLboolean all,
UNLOCK_HARDWARE();
if (mask != 0)
- _swrast_Clear( ctx, mask, all, x1, y1, width, height );
+ _swrast_Clear( ctx, mask, 0, 0, 0, 0, 0);
}