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.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_context.h') diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 554159ac44..3938af4c72 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -235,10 +235,18 @@ struct intel_context /* These refer to the current drawing buffer: */ - int drawX, drawY; /**< origin of drawing area within region */ - GLuint numClipRects; /**< cliprects for drawing */ - drm_clip_rect_t *pClipRects; struct gl_texture_object *frame_buffer_texobj; + /** + * Set to true if a single constant cliprect should be used in the + * batchbuffer. Otherwise, cliprects must be calculated at batchbuffer + * flush time while the lock is held. + */ + GLboolean constant_cliprect; + /** + * In !constant_cliprect mode, set to true if the front cliprects should be + * used instead of back. + */ + GLboolean front_cliprects; drm_clip_rect_t fboRect; /**< cliprect for FBO rendering */ int perf_boxes; @@ -271,10 +279,6 @@ struct intel_context */ driOptionCache optionCache; - /* Last seen width/height of the screen */ - int width; - int height; - int64_t swap_ust; int64_t swap_missed_ust; -- cgit v1.2.3