gl_format dst_mesaformat;
unsigned src_width;
unsigned dst_width;
+ unsigned flip_y;
if (!radeon->vtbl.blit) {
return GL_FALSE;
}
if (_mesa_get_format_bits(timg->base.TexFormat, GL_DEPTH_BITS) > 0) {
- rrb = radeon_get_depthbuffer(radeon);
+ rrb = radeon_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
+ flip_y = ctx->ReadBuffer->Attachment[BUFFER_DEPTH].Type == GL_NONE;
} else {
- rrb = radeon_get_colorbuffer(radeon);
+ rrb = radeon_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
+ flip_y = ctx->ReadBuffer->Attachment[BUFFER_COLOR0].Type == GL_NONE;
}
if (!timg->mt) {
timg->mt->bo, dst_offset, dst_mesaformat,
timg->mt->levels[level].rowstride / dst_bpp,
dst_width, timg->base.Height,
- dstx, dsty, width, height, 1);
+ dstx, dsty, width, height, flip_y);
}
void