mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
Use the right pitch when rendering to a texture
We need to get the pitch from the texture level we are rendering to, rather than just using the base texel width.
This commit is contained in:
parent
16c6a3b71e
commit
3f30b0709b
1 changed files with 3 additions and 2 deletions
|
|
@ -445,7 +445,6 @@ restart:
|
|||
goto restart;
|
||||
}
|
||||
|
||||
rrb->pitch = texImage->Width * rrb->cpp;
|
||||
rrb->base.InternalFormat = rrb->base._ActualFormat;
|
||||
rrb->base.Width = texImage->Width;
|
||||
rrb->base.Height = texImage->Height;
|
||||
|
|
@ -555,8 +554,10 @@ radeon_render_texture(GLcontext * ctx,
|
|||
imageOffset += offsets[att->Zoffset];
|
||||
}
|
||||
|
||||
/* store that offset in the region */
|
||||
/* store that offset in the region, along with the correct pitch for
|
||||
* the image we are rendering to */
|
||||
rrb->draw_offset = imageOffset;
|
||||
rrb->pitch = radeon_image->mt->levels[att->TextureLevel].rowstride;
|
||||
|
||||
/* update drawing region, etc */
|
||||
radeon_draw_buffer(ctx, fb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue