diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-18 20:54:33 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-18 23:09:42 +0000 |
commit | bfd96b092db5e4e0fc2446752deafd1156cf37b3 (patch) | |
tree | 34fcedded5bc533529faa838eba874d32df66d7a /src/sna/sna_video_overlay.c | |
parent | 2df1b1abf0728f28d2803a096f945779cbe7c70b (diff) |
sna/video: Fix presentation of cropped sprites
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_video_overlay.c')
-rw-r--r-- | src/sna/sna_video_overlay.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index a1a905a6..3655b876 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -702,6 +702,18 @@ XF86VideoAdaptorPtr sna_video_overlay_setup(struct sna *sna, adaptor->PutImage = sna_video_overlay_put_image; adaptor->QueryImageAttributes = sna_video_overlay_query_video_attributes; + if (sna->kgem.gen >= 040) + /* Actually the alignment is 64 bytes, too. But the + * stride must be at least 512 bytes. Take the easy fix + * and align on 512 bytes unconditionally. */ + video->alignment = 512; + else if (sna->kgem.gen < 021) + /* Harsh, errata on these chipsets limit the stride + * to be a multiple of 256 bytes. + */ + video->alignment = 256; + else + video->alignment = 64; video->textured = false; video->color_key = sna_video_overlay_color_key(sna); video->brightness = -19; /* (255/219) * -16 */ |