File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ By @cwfitzgerald in [#8609](https://github.com/gfx-rs/wgpu/pull/8609).
226226
227227- Fix race when downloading texture from compute shader pass. By @SpeedCrash100 in [ #8527 ] ( https://github.com/gfx-rs/wgpu/pull/8527 )
228228- Fix double window class registration when dynamic libraries are used. By @Azorlogh in [ #8548 ] ( https://github.com/gfx-rs/wgpu/pull/8548 )
229+ - Fix Firefox error in WebGL when using Queue::write_texture with a 2D texture. By @tgecho in [ #8668 ] ( https://github.com/gfx-rs/wgpu/pull/8673 )
229230
230231#### hal
231232
Original file line number Diff line number Diff line change @@ -905,6 +905,13 @@ impl Queue {
905905
906906 let staging_buffer = staging_buffer. flush ( ) ;
907907
908+ let copy_rows_per_image =
909+ if array_layer_count > 1 || dst. desc . dimension == wgt:: TextureDimension :: D3 {
910+ Some ( rows_per_image)
911+ } else {
912+ None
913+ } ;
914+
908915 let regions = ( 0 ..array_layer_count)
909916 . map ( |array_layer_offset| {
910917 let mut texture_base = dst_base. clone ( ) ;
@@ -915,7 +922,7 @@ impl Queue {
915922 * rows_per_image as u64
916923 * stage_bytes_per_row as u64 ,
917924 bytes_per_row : Some ( stage_bytes_per_row) ,
918- rows_per_image : Some ( rows_per_image ) ,
925+ rows_per_image : copy_rows_per_image ,
919926 } ,
920927 texture_base,
921928 size : hal_copy_size,
You can’t perform that action at this time.
0 commit comments