summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c6
-rw-r--r--src/gallium/drivers/nouveau/nouveau_mm.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_buffer.c b/src/gallium/drivers/nouveau/nouveau_buffer.c
index fb929d68231..0ecd53af67c 100644
--- a/src/gallium/drivers/nouveau/nouveau_buffer.c
+++ b/src/gallium/drivers/nouveau/nouveau_buffer.c
@@ -43,7 +43,7 @@ nouveau_buffer_allocate(struct nouveau_screen *screen,
}
if (domain != NOUVEAU_BO_GART) {
if (!buf->data) {
- buf->data = MALLOC(buf->base.width0);
+ buf->data = align_malloc(buf->base.width0, 64);
if (!buf->data)
return FALSE;
}
@@ -92,7 +92,7 @@ nouveau_buffer_destroy(struct pipe_screen *pscreen,
nouveau_buffer_release_gpu_storage(res);
if (res->data && !(res->status & NOUVEAU_BUFFER_STATUS_USER_MEMORY))
- FREE(res->data);
+ align_free(res->data);
nouveau_fence_ref(NULL, &res->fence);
nouveau_fence_ref(NULL, &res->fence_wr);
@@ -457,7 +457,7 @@ nouveau_buffer_migrate(struct nouveau_context *nv,
if (ret)
return ret;
memcpy((uint8_t *)buf->bo->map + buf->offset, buf->data, size);
- FREE(buf->data);
+ align_free(buf->data);
} else
if (old_domain != 0 && new_domain != 0) {
struct nouveau_mm_allocation *mm = buf->mm;
diff --git a/src/gallium/drivers/nouveau/nouveau_mm.c b/src/gallium/drivers/nouveau/nouveau_mm.c
index 4207084aecf..6045af6ee00 100644
--- a/src/gallium/drivers/nouveau/nouveau_mm.c
+++ b/src/gallium/drivers/nouveau/nouveau_mm.c
@@ -9,7 +9,7 @@
#include "nouveau_screen.h"
#include "nouveau_mm.h"
-#define MM_MIN_ORDER 7
+#define MM_MIN_ORDER 7 /* >= 6 to not violate ARB_map_buffer_alignment */
#define MM_MAX_ORDER 20
#define MM_NUM_BUCKETS (MM_MAX_ORDER - MM_MIN_ORDER + 1)