summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_buffer.c
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2012-10-31 16:31:12 +0100
committerChristoph Bumiller <[email protected]>2012-11-04 12:33:38 +0100
commitd8988f048fd963eeddf33c682d64ebdfaa2de9ae (patch)
tree97bb099775cdf50762ddd918cf6483ada47f6500 /src/gallium/drivers/nouveau/nouveau_buffer.c
parent05882b0d3b69ac14e9bc93460c77f9dc203c2ff9 (diff)
nv50,nvc0: expose ARB_map_buffer_alignment
All HW buffers (also suballocated ones) are already aligned. Just make sure that also the initial sysram buffers have proper alignment.
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_buffer.c')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_buffer.c6
1 files changed, 3 insertions, 3 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;