summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2014-06-05 07:48:09 +0300
committerTapani Pälli <[email protected]>2014-06-05 09:00:17 +0300
commitcf29913aa156accbe60cb35f9a0bd2c21726cfa3 (patch)
tree22ddeace767dd20e88f2cffd5a216d391c1fdd7d /src/mesa
parent3c77d2a113171bf18879664884a9fa0976d02f29 (diff)
i965: use _mesa_align_malloc in intel_miptree_map_movntdqa
This fixes case where we have 1x1 size buffer and misalignment is 0. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79616
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b7d86a30ed4..dd7e57aea84 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1874,7 +1874,7 @@ intel_miptree_map_movntdqa(struct brw_context *brw,
map->stride = ALIGN(misalignment + width_bytes, 16);
- map->buffer = malloc(map->stride * map->h);
+ map->buffer = _mesa_align_malloc(map->stride * map->h, 16);
/* Offset the destination so it has the same misalignment as src. */
map->ptr = map->buffer + misalignment;
@@ -1897,7 +1897,7 @@ intel_miptree_unmap_movntdqa(struct brw_context *brw,
unsigned int level,
unsigned int slice)
{
- free(map->buffer);
+ _mesa_align_free(map->buffer);
map->buffer = NULL;
map->ptr = NULL;
}