From 0cade4de4f74f6b0e86fb6622e2fc370c73fd840 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 19 Oct 2008 17:46:41 -0700 Subject: intel: Don't keep intel->pClipRects, and instead just calculate it when needed. This avoids issues with dereferencing stale cliprects around intel_draw_buffer time. Additionally, take advantage of cliprects staying constant for FBOs and DRI2, and emit cliprects in the batchbuffer instead of having to flush batch each time they change. --- src/mesa/drivers/dri/intel/intel_context.c | 35 ------------------------------ 1 file changed, 35 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_context.c') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 2b3a9b9d37..9ac18e6960 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -588,9 +588,6 @@ intelInitContext(struct intel_context *intel, intel->driFd = sPriv->fd; intel->driHwLock = sPriv->lock; - intel->width = intelScreen->width; - intel->height = intelScreen->height; - driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache, intel->driScreen->myNum, IS_965(intelScreen->deviceID) ? "i965" : "i915"); @@ -932,38 +929,6 @@ intelContendedLock(struct intel_context *intel, GLuint flags) sarea->ctxOwner, intel->hHWContext); } - if (sarea->width != intel->width || sarea->height != intel->height) { - int numClipRects = intel->numClipRects; - - /* - * FIXME: Really only need to do this when drawing to a - * common back- or front buffer. - */ - - /* - * This will essentially drop the outstanding batchbuffer on - * the floor. - */ - intel->numClipRects = 0; - - if (intel->Fallback) - _swrast_flush(&intel->ctx); - - if (!IS_965(intel->intelScreen->deviceID)) - INTEL_FIREVERTICES(intel); - - if (intel->batch->map != intel->batch->ptr) - intel_batchbuffer_flush(intel->batch); - - intel->numClipRects = numClipRects; - - /* force window update */ - intel->lastStamp = 0; - - intel->width = sarea->width; - intel->height = sarea->height; - } - /* Drawable changed? */ if (dPriv && intel->lastStamp != dPriv->lastStamp) { -- cgit v1.2.3