summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-10 21:25:28 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-10 21:25:28 +0000
commitb4ae6dbaedd774f250b610b1e7323897c4abe23a (patch)
treeb881de2477420ad9e78da65c17fa8e10f8357853 /src
parent46f6c6917effbc43305367581cc1bbaa962c0251 (diff)
sna: Align the small upload buffers to 2 texels, and the pitch to dwords
References: https://bugs.freedesktop.org/show_bug.cgi?id=44150 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/kgem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 1700bdbc..27d271d4 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3036,7 +3036,7 @@ struct kgem_bo *kgem_create_buffer_2d(struct kgem *kgem,
struct kgem_bo *bo;
int stride;
- stride = width * bpp >> 3;
+ stride = ALIGN(width, 2) * bpp >> 3;
stride = ALIGN(stride, 4);
bo = kgem_create_buffer(kgem, stride * ALIGN(height, 2), flags, ret);