diff options
author | Brian Paul <[email protected]> | 2006-10-18 20:02:42 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-10-18 20:02:42 +0000 |
commit | 446972bc2756cf9770a82f51aa0dc4f529c6cae5 (patch) | |
tree | dde17acb61b36206619a1cb617f3cb29df1c1107 /src/mesa/drivers/dri/unichrome | |
parent | ccb64bbb2a32761efa076ebafa7ccdaf2d412b0e (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/unichrome')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_ioctl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index c8c6dc01933..86077bc4d4e 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -203,7 +203,7 @@ static void viaFillBuffer(struct via_context *vmesa, static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch) + GLint cxFoo, GLint cyFoo, GLint cwFoo, GLint chFoo) { struct via_context *vmesa = VIA_CONTEXT(ctx); __DRIdrawablePrivate *dPriv = vmesa->driDrawable; @@ -261,9 +261,16 @@ static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all, if (flag) { drm_clip_rect_t *boxes, *tmp_boxes = 0; int nr = 0; + GLint cx, cy, cw, ch; LOCK_HARDWARE(vmesa); + /* get region after locking: */ + cx = ctx->DrawBuffer->_Xmin; + cy = ctx->DrawBuffer->_Ymin; + cw = ctx->DrawBuffer->_Xmax - cx; + ch = ctx->DrawBuffer->_Ymax - cy; + /* flip top to bottom */ cy = dPriv->h - cy - ch; cx += vmesa->drawX + vmesa->drawXoff; @@ -328,7 +335,7 @@ static void viaClear(GLcontext *ctx, GLbitfield mask, GLboolean all, } if (mask) - _swrast_Clear(ctx, mask, all, cx, cy, cw, ch); + _swrast_Clear(ctx, mask, 0, 0, 0, 0, 0); } |