gl: Fix broken image transfer operations

This commit is contained in:
kd-11 2020-02-05 16:23:17 +03:00 committed by kd-11
parent b6422c9a33
commit 3cc42c1bf8

View File

@ -396,15 +396,15 @@ namespace gl
// Final dimensions are a match
if (xfer_info.src_is_typeless || xfer_info.dst_is_typeless)
{
const coord3i src_region = { { src_rect.x1, src_rect.y1, 0 }, { src_w, src_rect.height(), 1 } };
const coord3i dst_region = { { dst_rect.x1, dst_rect.y1, 0 }, { src_w, src_rect.height(), 1 } };
const coord3i src_region = { { src_rect.x1, src_rect.y1, 0 }, { src_rect.width(), src_rect.height(), 1 } };
const coord3i dst_region = { { dst_rect.x1, dst_rect.y1, 0 }, { dst_rect.width(), dst_rect.height(), 1 } };
gl::copy_typeless(dst, src, dst_region, src_region);
}
else
{
glCopyImageSubData(src->id(), dst->id(), 0, src_rect.x1, src_rect.y1, 0,
glCopyImageSubData(src->id(), GL_TEXTURE_2D, 0, src_rect.x1, src_rect.y1, 0,
dst->id(), GL_TEXTURE_2D, 0, dst_rect.x1, dst_rect.y1, 0,
src_w, src_rect.height(), 1);
src_rect.width(), src_rect.height(), 1);
}
return;