Mesa (master): radeon: fix fbo size calculation to after pitch
Dave Airlie
airlied at kemper.freedesktop.org
Mon Aug 24 21:21:26 UTC 2009
Module: Mesa
Branch: master
Commit: dea10381864269bd6251a8b0af7a88de88296b32
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dea10381864269bd6251a8b0af7a88de88296b32
Author: Dave Airlie <airlied at linux.ie>
Date: Tue Aug 25 07:20:37 2009 +1000
radeon: fix fbo size calculation to after pitch
---
src/mesa/drivers/dri/radeon/radeon_fbo.c | 3 ++-
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 3d7c970..6f0cc08 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,
More information about the mesa-commit
mailing list