diff --git a/src/i965_render.c b/src/i965_render.c index 62d0035..defbab6 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1417,6 +1417,13 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, dri_bo_unmap (render_state->vb_bo); + /* Need to do this better (or not use dynamically allocated bos) */ + if (dri_bufmgr_check_aperture_space(render_state->vb_bo)) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "out of aperture space!\n"); + dri_bo_unreference(render_state->vb_bo); + return; + } + BEGIN_BATCH(12); OUT_BATCH(MI_FLUSH); /* Set up the pointer to our (single) vertex buffer */