Fix gles buffer-texture copy for 2d arrays (#2809)

This commit is contained in:
tuchs 2022-06-26 02:21:38 +02:00 committed by GitHub
parent de5fe90f20
commit 1af3b9096c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -428,7 +428,7 @@ impl super::Queue {
}
};
match dst_target {
glow::TEXTURE_3D | glow::TEXTURE_2D_ARRAY => {
glow::TEXTURE_3D => {
gl.tex_sub_image_3d(
dst_target,
copy.texture_base.mip_level as i32,
@ -443,6 +443,21 @@ impl super::Queue {
unpack_data,
);
}
glow::TEXTURE_2D_ARRAY => {
gl.tex_sub_image_3d(
dst_target,
copy.texture_base.mip_level as i32,
copy.texture_base.origin.x as i32,
copy.texture_base.origin.y as i32,
copy.texture_base.array_layer as i32,
copy.size.width as i32,
copy.size.height as i32,
copy.size.depth as i32,
format_desc.external,
format_desc.data_type,
unpack_data,
);
}
glow::TEXTURE_2D => {
gl.tex_sub_image_2d(
dst_target,