diff options
author | Eric Anholt <[email protected]> | 2008-01-09 12:33:39 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-01-09 14:41:40 -0800 |
commit | beddf653a914903156712aa472b5deaddb7bbaed (patch) | |
tree | c6ef9aaa10a92f88b435fb332f6950cfd7c5186c /src/mesa/drivers/dri/intel/intel_buffers.c | |
parent | 7ce12b0863f1cc03bdd7c65c0c0733b2ff903e40 (diff) |
[intel] Clean up cliprect handling in intel drivers.
In particular, batch buffers are no longer flushed when switching from
CLIPRECTS to NO_CLIPRECTS or vice versa, and 965 just uses DRM cliprect
handling for primitives instead of trying to sneak in its own to avoid the
DRM stuff. The disadvantage is that we will re-execute state updates per
cliprect, but the advantage is that we will be able to accumulate larger
batch buffers, which were proving to be a major overhead.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_buffers.c')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_buffers.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index 2ea8d683ebe..73872a97a02 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -135,6 +135,9 @@ intel_readbuf_region(struct intel_context *intel) static void intelSetRenderbufferClipRects(struct intel_context *intel) { + /* flush batch since pClipRects may change */ + intel_batchbuffer_flush(intel->batch); + assert(intel->ctx.DrawBuffer->Width > 0); assert(intel->ctx.DrawBuffer->Height > 0); intel->fboRect.x1 = 0; @@ -160,6 +163,9 @@ intelSetFrontClipRects(struct intel_context *intel) if (!dPriv) return; + /* flush batch since pClipRects may change */ + intel_batchbuffer_flush(intel->batch); + intel->numClipRects = dPriv->numClipRects; intel->pClipRects = dPriv->pClipRects; intel->drawX = dPriv->x; @@ -179,6 +185,9 @@ intelSetBackClipRects(struct intel_context *intel) if (!dPriv) return; + /* flush batch since pClipRects may change */ + intel_batchbuffer_flush(intel->batch); + intel_fb = dPriv->driverPrivate; if (intel_fb->pf_active || dPriv->numBackClipRects == 0) { |