diff options
Diffstat (limited to 'src/mesa/drivers/dri/i915/i830_metaops.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i830_metaops.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_metaops.c b/src/mesa/drivers/dri/i915/i830_metaops.c index 17fde2f480..dbf5f04349 100644 --- a/src/mesa/drivers/dri/i915/i830_metaops.c +++ b/src/mesa/drivers/dri/i915/i830_metaops.c @@ -395,13 +395,15 @@ static void draw_poly(i830ContextPtr i830, void i830ClearWithTris(intelContextPtr intel, GLbitfield mask, - GLboolean all, - GLint cx, GLint cy, GLint cw, GLint ch) + GLboolean allFoo, + GLint cxFoo, GLint cyFoo, GLint cwFoo, GLint chFoo) { i830ContextPtr i830 = I830_CONTEXT( intel ); __DRIdrawablePrivate *dPriv = intel->driDrawable; intelScreenPrivate *screen = intel->intelScreen; int x0, y0, x1, y1; + GLint cx, cy, cw, ch; + GLboolean all; INTEL_FIREVERTICES(intel); SET_STATE( i830, meta ); @@ -411,6 +413,14 @@ i830ClearWithTris(intelContextPtr intel, GLbitfield mask, LOCK_HARDWARE(intel); + /* get clear bounds after locking */ + cx = intel->ctx.DrawBuffer->_Xmin; + cy = intel->ctx.DrawBuffer->_Ymin; + cw = intel->ctx.DrawBuffer->_Xmax - cx; + ch = intel->ctx.DrawBuffer->_Ymax - cy; + all = (cw == intel->ctx.DrawBuffer->Width && + ch == intel->ctx.DrawBuffer->Height); + if(!all) { x0 = cx; y0 = cy; |