From b35121d54df4bb8700c4135203162c1d79ca637d Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 20 Sep 2006 14:44:40 +0000 Subject: 1) Add a new flag in the sarea (coopting the unused texAge value) to identify context switches between members of a share group - ie. multiple contexts in a single application, possibly on different threads. In this case the contexts share a bufmgr instance and there is no need to evict textures - so don't. 2) Use a new flag 'need_flush' to ensure hardware rendering is flushed prior to starting a software fallback. --- src/mesa/drivers/dri/i965/intel_span.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa/drivers/dri/i965/intel_span.c') diff --git a/src/mesa/drivers/dri/i965/intel_span.c b/src/mesa/drivers/dri/i965/intel_span.c index c68def5a9f..a202491101 100644 --- a/src/mesa/drivers/dri/i965/intel_span.c +++ b/src/mesa/drivers/dri/i965/intel_span.c @@ -207,6 +207,16 @@ void intelSpanRenderStart( GLcontext *ctx ) { struct intel_context *intel = intel_context(ctx); + if (intel->need_flush) { + LOCK_HARDWARE(intel); + intel->vtbl.emit_flush(intel, 0); + intel_batchbuffer_flush(intel->batch); + intel->need_flush = 0; + UNLOCK_HARDWARE(intel); + intelFinish(intel); + } + + LOCK_HARDWARE(intel); /* Just map the framebuffer and all textures. Bufmgr code will -- cgit v1.2.3