diff options
author | Dave Airlie <airlied@redhat.com> | 2009-02-03 09:48:27 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-02-03 09:48:27 +1000 |
commit | dbf72bdd3dda73384381a9ae8a94b522b7f786c2 (patch) | |
tree | dcf5a6d68a0f26a4c7b56a81cfdcb62ac5fc3777 /src/mesa/drivers/dri/radeon | |
parent | 75762a8219d7db0f7990eab73f953a6a4f9ee130 (diff) |
radeon_bo: align size of bo to page size.
This is really required for the VRAM allocator upload function.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index f782d96900..07af01fc40 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -260,6 +260,9 @@ static struct bo_legacy *bo_allocate(struct bo_manager_legacy *boml, uint32_t flags) { struct bo_legacy *bo_legacy; + uint32_t pgsize = getpagesize() - 1; + + size = (size + pgsize) & ~pgsize; bo_legacy = (struct bo_legacy*)calloc(1, sizeof(struct bo_legacy)); if (bo_legacy == NULL) { |