diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-11-01 18:51:43 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-11-01 18:51:43 +0000 |
commit | 9669804fe476f3497ac7e76e1e7b3e62d547fb6e (patch) | |
tree | 638d095038ec9b51891dd756b694a2456f2d1d8d /src/mesa/drivers/dri/i915tex/intel_buffers.c | |
parent | 26b5904d7080618718f9ac112bf3d9135366c4e5 (diff) | |
download | external_mesa3d-9669804fe476f3497ac7e76e1e7b3e62d547fb6e.zip external_mesa3d-9669804fe476f3497ac7e76e1e7b3e62d547fb6e.tar.gz external_mesa3d-9669804fe476f3497ac7e76e1e7b3e62d547fb6e.tar.bz2 |
Don't use the x/y/width/height params passed to Clear(). Get them
after locking. Next: remove the params altogether.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_buffers.c')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_buffers.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c index fe7ef7e..3da1420 100644 --- a/src/mesa/drivers/dri/i915tex/intel_buffers.c +++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c @@ -281,7 +281,7 @@ intelWindowMoved(struct intel_context *intel) static void intelClearWithTris(struct intel_context *intel, GLbitfield mask, - GLboolean all, GLint cx, GLint cy, GLint cw, GLint ch) + GLboolean allFoo, GLint cxFoo, GLint cyFoo, GLint cwFoo, GLint chFoo) { GLcontext *ctx = &intel->ctx; drm_clip_rect_t clear; @@ -293,22 +293,16 @@ intelClearWithTris(struct intel_context *intel, /* XXX FBO: was: intel->driDrawable->numClipRects */ if (intel->numClipRects) { + GLint cx, cy, cw, ch; GLuint buf; intel->vtbl.install_meta_state(intel); - - /* Refresh the cx/y/w/h values as they may have been invalidated - * by a new window position or size picked up when we did - * LOCK_HARDWARE above. The values passed by mesa are not - * reliable. - */ - { - cx = ctx->DrawBuffer->_Xmin; - cy = ctx->DrawBuffer->_Ymin; - ch = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; - cw = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; - } + /* Get clear bounds after locking */ + cx = ctx->DrawBuffer->_Xmin; + cy = ctx->DrawBuffer->_Ymin; + ch = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; + cw = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; /* note: regardless of 'all', cx, cy, cw, ch are now correct */ clear.x1 = cx; @@ -542,7 +536,7 @@ intelRotateWindow(struct intel_context *intel, static void intelClear(GLcontext * ctx, GLbitfield mask, - GLboolean all, GLint cx, GLint cy, GLint cw, GLint ch) + GLboolean allFoo, GLint cxFoo, GLint cyFoo, GLint cwFoo, GLint chFoo) { struct intel_context *intel = intel_context(ctx); const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask); @@ -609,13 +603,13 @@ intelClear(GLcontext * ctx, intelFlush(ctx); /* XXX intelClearWithBlit also does this */ if (blit_mask) - intelClearWithBlit(ctx, blit_mask, all, cx, cy, cw, ch); + intelClearWithBlit(ctx, blit_mask, 0, 0, 0, 0, 0); if (tri_mask) - intelClearWithTris(intel, tri_mask, all, cx, cy, cw, ch); + intelClearWithTris(intel, tri_mask, 0, 0, 0, 0, 0); if (swrast_mask) - _swrast_Clear(ctx, swrast_mask, all, cx, cy, cw, ch); + _swrast_Clear(ctx, swrast_mask, 0, 0, 0, 0, 0); } |