mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radeon: align FBO pitch
This commit is contained in:
parent
56c5df33de
commit
8ab7c77dc2
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue