Skip to contentSkip to conversation

testdisplay: for tiled mode test, the height should be aligned

PATCH New Hai Lan 1 participant 1 message Aug 4, 2011

lore
Share & tools
lore

Hai Lan

author
#0 lore raw

PATCH 1/1 testdisplay: for tiled mode test, the height should be aligned

---
 tests/testdisplay.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tests/testdisplay.c +1 -1
index dae52ca..1d85acd 100644
@@ -414,7 +414,7 @@ allocate_surface(int fd, int width, int height, uint32_t depth, uint32_t bpp,
 
 	if (tiled) {
 		stride = (width * (bpp / 8) + 511) & ~511;
-		size = stride * height;
+		size = stride * (height + 7) & ~7;
 	} else {
 		/* Scan-out has a 64 byte alignment restriction */
 		stride = (width * (bpp / 8) + 63) & ~63;
Signature · 1 line
1.7.3.4