summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2009-03-18 01:55:12 +0100
committerRoland Scheidegger <sroland@tungstengraphics.com>2009-03-24 19:57:32 +0100
commitd2c3964fe04be42fe538f36439ed5ffca96e436a (patch)
tree8763e72d69e099bb7f11daf68f526346190efd6e /src
parent18e56eb179fde28477487c63e6f9ebf7579e2cd5 (diff)
fix textured video allocation bug
size needs to be calculated after dstPitch adjustments, got already fixed for earlier than R600 chips by planar textured yuv patches, clean this up.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_textured_video.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 63d56740..79671c07 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -376,11 +376,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
dstPitch = (dstPitch + 63) & ~63;
dstPitch2 = ((dst_width >> 1) + 15) & ~15;
dstPitch2 = (dstPitch2 + 63) & ~63;
- size = dstPitch * dst_height + 2 * dstPitch2 * ((dst_height + 1) >> 1);
} else {
dstPitch = ((dst_width << 1) + 15) & ~15;
dstPitch = (dstPitch + 63) & ~63;
- size = dstPitch * dst_height;
}
break;
case FOURCC_UYVY:
@@ -390,13 +388,13 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
dstPitch = (dstPitch + 63) & ~63;
srcPitch = (width << 1);
srcPitch2 = 0;
- size = dstPitch * dst_height;
break;
}
if (info->ChipFamily >= CHIP_FAMILY_R600)
dstPitch = (dstPitch + 255) & ~255;
- /* FIXME: size calc (adjust dstPitch earlier) */
+
+ size = dstPitch * dst_height + 2 * dstPitch2 * ((dst_height + 1) >> 1);
if (pPriv->video_memory != NULL && size != pPriv->size) {
radeon_legacy_free_memory(pScrn, pPriv->video_memory);