Module: Mesa Branch: mesa_7_7_branch Commit: a1cac0732b53df8b08aa0ef1b440ea4398a467cc URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1cac0732b53df8b08aa0ef1b440ea4398a467cc
Author: Eric Anholt <[email protected]> Date: Sat Feb 6 17:20:24 2010 +0100 intel: Check aperture size when doing a blit glClear. Fixes failure in cairo-gl firefox-planet-gnome. (cherry picked from commit 67e5fd73973eaedf5ec6e0b5139b61f6196fb35c) Conflicts: src/mesa/drivers/dri/intel/intel_blit.c --- src/mesa/drivers/dri/intel/intel_blit.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 5b94d05..94bf1ce 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -376,6 +376,7 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask) GLint cx, cy, cw, ch; drm_clip_rect_t clear; int i; + drm_intel_bo *aper_array[2]; /* Get clear bounds after locking */ cx = fb->_Xmin; @@ -526,6 +527,15 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask) assert(x1 < x2); assert(y1 < y2); + /* do space check before going any further */ + aper_array[0] = intel->batch->buf; + aper_array[1] = write_buffer; + + if (drm_intel_bufmgr_check_aperture_space(aper_array, + ARRAY_SIZE(aper_array)) != 0) { + intel_batchbuffer_flush(intel->batch); + } + BEGIN_BATCH(6, REFERENCES_CLIPRECTS); OUT_BATCH(CMD); OUT_BATCH(BR13); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
