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_buffers.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/drivers/dri/intel/intel_buffers.h') diff --git a/src/mesa/drivers/dri/intel/intel_buffers.h b/src/mesa/drivers/dri/intel/intel_buffers.h index a669a85431..e5afb37dd1 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.h +++ b/src/mesa/drivers/dri/intel/intel_buffers.h @@ -29,6 +29,8 @@ #ifndef INTEL_BUFFERS_H #define INTEL_BUFFERS_H +#include "dri_util.h" +#include "drm.h" struct intel_context; struct intel_framebuffer; @@ -53,4 +55,9 @@ extern void intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb); extern void intelInitBufferFuncs(struct dd_function_table *functions); +void intel_get_cliprects(struct intel_context *intel, + struct drm_clip_rect **cliprects, + unsigned int *num_cliprects, + int *x_off, int *y_off); + #endif /* INTEL_BUFFERS_H */ -- cgit v1.2.3