projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75762a8
)
radeon_bo: align size of bo to page size.
author
Dave Airlie
<airlied@redhat.com>
Mon, 2 Feb 2009 23:48:27 +0000
(09:48 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Mon, 2 Feb 2009 23:48:27 +0000
(09:48 +1000)
This is really required for the VRAM allocator upload function.
src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index f782d96900c3c2d1c37c7ce934cd5725297fe94a..07af01fc4028c523fb11374abaca3753d286f113 100644
(file)
--- 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) {