summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-04-13 08:39:43 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2010-04-13 08:39:43 +0200
commit324a2810da3fbae35637ba9080f31f9383db0868 (patch)
tree540c50beff1978fdb35a393358b585e574c2c05e
parent804263c10df2fedb2f0debab6cdfaa6a89184a42 (diff)
i830 render: check aperture space requirements
No point not doing this. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--src/i830_render.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_render.c b/src/i830_render.c
index 5e524b3b..8e559c99 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -438,6 +438,12 @@ i830_prepare_composite(int op, PicturePtr source_picture,
{
ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum];
intel_screen_private *intel = intel_get_screen_private(scrn);
+ drm_intel_bo *bo_table[] = {
+ NULL, /* batch_bo */
+ i830_get_pixmap_bo(source),
+ mask ? i830_get_pixmap_bo(mask) : NULL,
+ i830_get_pixmap_bo(dest),
+ };
intel->render_source_picture = source_picture;
intel->render_source = source;
@@ -458,6 +464,9 @@ i830_prepare_composite(int op, PicturePtr source_picture,
if (!i830_get_dest_format(dest_picture, &intel->render_dest_format))
return FALSE;
+ if (!i830_get_aperture_space(scrn, bo_table, ARRAY_SIZE(bo_table)))
+ return FALSE;
+
if (mask) {
intel->transform[1] = NULL;
intel->scale_units[1][0] = -1;