[Mesa-dev] [PATCH 03/17] Modified allocation routines to use alignment of 64 instead of 16.

Siavash Eliasi siavashserver at gmail.com
Sun Nov 24 21:36:33 PST 2013


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

diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 0088b6a..d1ebeda 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -261,7 +261,7 @@ llvmpipe_resource_create(struct pipe_screen *_screen,
        * read/write always LP_RASTER_BLOCK_SIZE pixels, but the element
        * offset doesn't need to be aligned to LP_RASTER_BLOCK_SIZE.
        */
-      lpr->data = align_malloc(bytes + (LP_RASTER_BLOCK_SIZE - 1) * 4 * sizeof(float), 16);
+      lpr->data = align_malloc(bytes + (LP_RASTER_BLOCK_SIZE - 1) * 4 * sizeof(float), 64);
       /*
        * buffers don't really have stride but it's probably safer
        * (for code doing same calculations for buffers and textures)
@@ -746,7 +746,7 @@ llvmpipe_get_texture_image_address(struct llvmpipe_resource *lpr,
 static void
 alloc_image_data(struct llvmpipe_resource *lpr)
 {
-   uint alignment = MAX2(16, util_cpu_caps.cacheline);
+   uint alignment = MAX2(64, util_cpu_caps.cacheline);
    uint level;
    uint offset = 0;
 
-- 
1.8.4.2



More information about the mesa-dev mailing list