Skip to content

Commit

Permalink
Fix gles buffer-texture copy for 2d arrays (#2809)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuchs authored Jun 26, 2022
1 parent de5fe90 commit 1af3b90
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion wgpu-hal/src/gles/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 1af3b90

Please sign in to comment.