Mesa (master): llvmpipe: Use alignment of 64 instead of 16 for buffer allocation

Ian Romanick idr at kemper.freedesktop.org
Wed Jan 29 16:17:33 UTC 2014


Module: Mesa
Branch: master
Commit: 6317664de0a31dd5af796fbbd61656f44c1b13ce
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6317664de0a31dd5af796fbbd61656f44c1b13ce

Author: Siavash Eliasi <siavashserver at gmail.com>
Date:   Thu Nov 28 21:32:31 2013 +0330

llvmpipe: Use alignment of 64 instead of 16 for buffer allocation

v2: Changed allocation alignment of llvmpipe_displaytarget_layout.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

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

diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index fe7b9a2..f601181 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -200,7 +200,7 @@ llvmpipe_displaytarget_layout(struct llvmpipe_screen *screen,
                                           lpr->base.bind,
                                           lpr->base.format,
                                           width, height,
-                                          16,
+                                          64,
                                           &lpr->row_stride[0] );
 
    if (lpr->dt == NULL)
@@ -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;
 




More information about the mesa-commit mailing list