intel-virtual-output: Third time lucky for computing the correct stride?

Aligning a 16-bpp image to a 32-byte boundary is tricky, apparently. Or
at least I make it look so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-31 20:58:48 +01:00
parent 8ecb758697
commit 028412faa7
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ static int stride_for_depth(int width, int depth)
{
if (depth == 24)
depth = 32;
return (width * depth + 31) / 8;
return ((width * depth + 7) / 8 + 3) & ~3;
}
static void init_image(struct clone *clone)