diff options
author | Michel Dänzer <[email protected]> | 2007-07-10 11:02:18 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-07-10 11:14:46 +0200 |
commit | 7c42222111d3697ea8d76e3d94d7455c69c7f2d1 (patch) | |
tree | 1e7a9877fd505f7bf903572f8af60e31d7401c48 /src/mesa | |
parent | f1e1b2ed167b63409a88ba489418e407fce68f21 (diff) |
i915tex: Better procedure for dropping batchbuffer on virtual resolution change.
The previous procedure would often result in a GPU lockup.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_context.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c index 5334efd63d4..40ea7564126 100644 --- a/src/mesa/drivers/dri/i915tex/intel_context.c +++ b/src/mesa/drivers/dri/i915tex/intel_context.c @@ -681,37 +681,27 @@ intelContendedLock(struct intel_context *intel, GLuint flags) if (sarea->width != intel->width || sarea->height != intel->height || sarea->rotation != intel->current_rotation) { - - void *batchMap = intel->batch->map; - + int numClipRects = intel->numClipRects; + /* * FIXME: Really only need to do this when drawing to a * common back- or front buffer. */ /* - * This will drop the outstanding batchbuffer on the floor + * This will essentially drop the outstanding batchbuffer on the floor. */ + intel->numClipRects = 0; - if (batchMap != NULL) { - driBOUnmap(intel->batch->buffer); - intel->batch->map = NULL; - } - - intel_batchbuffer_reset(intel->batch); + if (intel->Fallback) + _swrast_flush(&intel->ctx); - if (batchMap == NULL) { - driBOUnmap(intel->batch->buffer); - intel->batch->map = NULL; - } + INTEL_FIREVERTICES(intel); - /* lose all primitives */ - intel->prim.primitive = ~0; - intel->prim.start_ptr = 0; - intel->prim.flush = 0; + if (intel->batch->map != intel->batch->ptr) + intel_batchbuffer_flush(intel->batch); - /* re-emit all state */ - intel->vtbl.lost_hardware(intel); + intel->numClipRects = numClipRects; /* force window update */ intel->lastStamp = 0; |