summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-08-25 07:20:37 +1000
committerDave Airlie <airlied@linux.ie>2009-08-25 07:21:03 +1000
commitdea10381864269bd6251a8b0af7a88de88296b32 (patch)
tree7c2d90a03c758b628f6b687e426042ee0773cab7 /src/mesa/drivers
parentcd5c7bfd93bf207d28610a484b732b8d3eca6059 (diff)
radeon: fix fbo size calculation to after pitch
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 3d7c9708e1..6f0cc08770 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -178,12 +178,13 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
width, height);
}
else {
- uint32_t size = width * height * cpp;
+ uint32_t size;
uint32_t pitch = ((cpp * width + 63) & ~63) / cpp;
fprintf(stderr,"Allocating %d x %d radeon RBO (pitch %d)\n", width,
height, pitch);
+ size = pitch * height * cpp;
rrb->pitch = pitch * cpp;
rrb->cpp = cpp;
rrb->bo = radeon_bo_open(radeon->radeonScreen->bom,