diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2006-06-06 11:35:17 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2006-06-06 11:35:17 +0000 |
commit | bcc480441060b067a5fc4d46f3339a7e778dd091 (patch) | |
tree | 818e92ed90c35c8d905f29e54cf510c03e24b769 /src/mesa/drivers/dri/i915/intel_buffers.c | |
parent | a03b23904119ae6436410b4cbd27fe99a4d2dad6 (diff) |
When clearing, refresh the cx/y/w/h values as they may have beentexman_0_1_20060621
invalidated by a new window position or size picked up when we did
LOCK_HARDWARE above. The values passed by mesa are not reliable.
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_buffers.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_buffers.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_buffers.c b/src/mesa/drivers/dri/i915/intel_buffers.c index 85ac4180790..d0347a543e6 100644 --- a/src/mesa/drivers/dri/i915/intel_buffers.c +++ b/src/mesa/drivers/dri/i915/intel_buffers.c @@ -282,7 +282,20 @@ static void intelClearWithTris(struct intel_context *intel, intel->vtbl.install_meta_state(intel); - /* note: regardless of 'all', cx, cy, cw, ch are correct */ + + /* 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; + } + + /* note: regardless of 'all', cx, cy, cw, ch are now correct */ clear.x1 = cx; clear.y1 = cy; clear.x2 = cx + cw; |