diff options
author | Dave Airlie <airlied@linux.ie> | 2009-03-21 18:16:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-03-21 18:16:21 +1000 |
commit | 8ab7c77dc2a29ad3edc1fab4e0c9fb01a15665fa (patch) | |
tree | e4180e8b83cac2a8242c3b22b657b459c6b40186 | |
parent | 56c5df33de1e34b606bb771db27742af78be30f3 (diff) |
radeon: align FBO pitch
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_fbo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 110afb7450..2125a65183 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -179,10 +179,13 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb, width, height); } else { - /* TODO Alloc a BO */ uint32_t size = width * height * cpp; + uint32_t pitch = ((cpp * width + 63) & ~63) / cpp; - rrb->pitch = width * cpp; + fprintf(stderr,"Allocating %d x %d radeon RBO (pitch %d)\n", width, + height, pitch); + + rrb->pitch = pitch * cpp; rrb->cpp = cpp; rrb->bo = radeon_bo_open(radeon->radeonScreen->bom, 0, @@ -190,7 +193,6 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb, 0, RADEON_GEM_DOMAIN_VRAM, 0); - // rrb->bo = radeon_bo_open(); rb->Width = width; rb->Height = height; return GL_TRUE; |