From: Keith Whitwell Date: Sun, 23 Aug 2009 11:07:36 +0000 (+0100) Subject: llvmpipe: keep texture stride 16byte aligned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=04de13b9cd0bd43c5cdcb3afab8e2c1c5a42aa33;p=mesa.git llvmpipe: keep texture stride 16byte aligned Fixes crash when resizing gears window. --- diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 18c2362e98d..169fe87b78e 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -76,7 +76,7 @@ llvmpipe_texture_layout(struct pipe_screen *screen, pt->depth[level] = depth; pt->nblocksx[level] = pf_get_nblocksx(&pt->block, width); pt->nblocksy[level] = pf_get_nblocksy(&pt->block, height); - lpt->stride[level] = pt->nblocksx[level]*pt->block.size; + lpt->stride[level] = align(pt->nblocksx[level]*pt->block.size, 16); lpt->level_offset[level] = buffer_size;