Mesa (gallium-llvmpipe): llvmpipe: keep texture stride 16byte aligned

Keith Whitwell keithw at kemper.freedesktop.org
Sun Aug 23 11:07:55 UTC 2009


Module: Mesa
Branch: gallium-llvmpipe
Commit: 5fecc57e4c2738015664c64699b7774d1dd5970b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fecc57e4c2738015664c64699b7774d1dd5970b

Author: Keith Whitwell <keithw at vmware.com>
Date:   Sun Aug 23 12:07:36 2009 +0100

llvmpipe: keep texture stride 16byte aligned

Fixes crash when resizing gears window.

---

 src/gallium/drivers/llvmpipe/lp_texture.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 18c2362..169fe87 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;
 




More information about the mesa-commit mailing list