intel: fix batch flushing problem with cliprects handling.

pointed out and debugged by stringfellow on #dri-devel
This commit is contained in:
Dave Airlie
2008-07-11 07:28:55 +10:00
parent ac05da56ec
commit b52398571b
2 changed files with 7 additions and 2 deletions
@@ -118,8 +118,10 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
if (batch->cliprect_mode == IGNORE_CLIPRECTS) {
batch->cliprect_mode = cliprect_mode;
} else {
if (batch->cliprect_mode != cliprect_mode)
if (batch->cliprect_mode != cliprect_mode) {
intel_batchbuffer_flush(batch);
batch->cliprect_mode = cliprect_mode;
}
}
}
}
+4 -1
View File
@@ -123,7 +123,8 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
dst_pitch /= 4;
}
#endif
/* do space/cliprects check before going any further */
intel_batchbuffer_require_space(intel->batch, 8 * 4, REFERENCES_CLIPRECTS);
again:
ret = dri_bufmgr_check_aperture_space(dst->buffer);
ret |= dri_bufmgr_check_aperture_space(src->buffer);
@@ -278,6 +279,8 @@ intelEmitCopyBlit(struct intel_context *intel,
int ret;
BATCH_LOCALS;
/* do space/cliprects check before going any further */
intel_batchbuffer_require_space(intel->batch, 8 * 4, NO_LOOP_CLIPRECTS);
again:
ret = dri_bufmgr_check_aperture_space(dst_buffer);
ret |= dri_bufmgr_check_aperture_space(src_buffer);