Mesa (7.10): r300/compiler: align memory allocations to 8-bytes

Marek Olšák mareko at kemper.freedesktop.org
Thu May 12 23:25:20 UTC 2011


Module: Mesa
Branch: 7.10
Commit: b6bca2811362d36ffcebeb7d7de24f147e74a1ed
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6bca2811362d36ffcebeb7d7de24f147e74a1ed

Author: Matt Turner <mattst88 at gmail.com>
Date:   Mon May  9 00:17:05 2011 -0400

r300/compiler: align memory allocations to 8-bytes

Eliminates unaligned accesses on strict architectures. Spotted by Jay
Estabrook.

Signed-off-by: Matt Turner <mattst88 at gmail.com>

NOTE: This is a candidate for the 7.10 branch.
(cherry picked from commit 86852236a396bd9932a6ab6e73def0c8ef2f23a5)

---

 src/mesa/drivers/dri/r300/compiler/memory_pool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/compiler/memory_pool.c b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
index 76c7c60..ddcdddf 100644
--- a/src/mesa/drivers/dri/r300/compiler/memory_pool.c
+++ b/src/mesa/drivers/dri/r300/compiler/memory_pool.c
@@ -28,7 +28,7 @@
 
 
 #define POOL_LARGE_ALLOC 4096
-#define POOL_ALIGN 4
+#define POOL_ALIGN 8
 
 
 struct memory_block {




More information about the mesa-commit mailing list