projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
711cbf3
)
radeon: call getpagesize once and store in a static
author
Dave Airlie
<airlied@redhat.com>
Wed, 4 Feb 2009 03:16:41 +0000
(13:16 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Wed, 4 Feb 2009 03:16:41 +0000
(13:16 +1000)
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 993bac81243ff66155ff15a50b1213b120a7fd92..a716f1059b93066dfba1d0e1a34dbb225060f32f 100644
(file)
--- a/
src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/
src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@
-260,7
+260,10
@@
static struct bo_legacy *bo_allocate(struct bo_manager_legacy *boml,
uint32_t flags)
{
struct bo_legacy *bo_legacy;
- uint32_t pgsize = getpagesize() - 1;
+ static int pgsize;
+
+ if (pgsize == 0)
+ pgsize = getpagesize() - 1;
size = (size + pgsize) & ~pgsize;