summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/intel/intel_context.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-10-19 17:46:41 -0700
committerEric Anholt <eric@anholt.net>2008-10-28 13:23:33 -0700
commit0cade4de4f74f6b0e86fb6622e2fc370c73fd840 (patch)
treeae6c62ddbda5c3139c7e08e0d7682d949d53ab0c /src/mesa/drivers/dri/intel/intel_context.h
parente92a457ac0030e48f5260dc2ac00ca283be7d7ad (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_context.h')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h18
1 files changed, 11 insertions, 7 deletions
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;