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:
committed by
Alex Deucher
parent
16c6a3b71e
commit
3f30b0709b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user