diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 17:25:46 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-11 17:25:46 +0000 |
commit | e9e6d6f7c8af300716c64b041f96c09d58b3eaa2 (patch) | |
tree | 61249747c4a99c27c7dbd17995cb914371597ed8 | |
parent | 118ef0781c5064aa0696af59a5dac67091b10046 (diff) |
sna/gen3: Move the video dst_bo to make the conditional clearer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen3_render.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 0be78c84..89cd4bd1 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -3409,9 +3409,11 @@ gen3_render_video(struct sna *sna, DBG(("%s: %dx%d -> %dx%d\n", __FUNCTION__, src_w, src_h, drw_w, drw_h)); + dst_bo = sna_pixmap_get_bo(pixmap); + if (pixmap->drawable.width > 2048 || pixmap->drawable.height > 2048 || - !gen3_check_pitch_3d(sna_pixmap_get_bo(pixmap))) { + !gen3_check_pitch_3d(dst_bo)) { int bpp = pixmap->drawable.bitsPerPixel; dst_bo = kgem_create_2d(&sna->kgem, @@ -3427,8 +3429,6 @@ gen3_render_video(struct sna *sna, pix_yoff = -dyo; copy = 1; } else { - dst_bo = sna_pixmap_get_bo(pixmap); - width = pixmap->drawable.width; height = pixmap->drawable.height; |