File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1365,9 +1365,11 @@ class WebGPUBackend extends Backend {
13651365
13661366 let dstX = 0 ;
13671367 let dstY = 0 ;
1368+ let dstLayer = 0 ;
13681369
13691370 let srcX = 0 ;
13701371 let srcY = 0 ;
1372+ let srcLayer = 0 ;
13711373
13721374 let srcWidth = srcTexture . image . width ;
13731375 let srcHeight = srcTexture . image . height ;
@@ -1376,6 +1378,7 @@ class WebGPUBackend extends Backend {
13761378
13771379 srcX = srcRegion . x ;
13781380 srcY = srcRegion . y ;
1381+ srcLayer = srcRegion . z || 0 ;
13791382 srcWidth = srcRegion . width ;
13801383 srcHeight = srcRegion . height ;
13811384
@@ -1385,6 +1388,7 @@ class WebGPUBackend extends Backend {
13851388
13861389 dstX = dstPosition . x ;
13871390 dstY = dstPosition . y ;
1391+ dstLayer = dstPosition . z || 0 ;
13881392
13891393 }
13901394
@@ -1397,16 +1401,17 @@ class WebGPUBackend extends Backend {
13971401 {
13981402 texture : sourceGPU ,
13991403 mipLevel : level ,
1400- origin : { x : srcX , y : srcY , z : 0 }
1404+ origin : { x : srcX , y : srcY , z : srcLayer }
14011405 } ,
14021406 {
14031407 texture : destinationGPU ,
14041408 mipLevel : level ,
1405- origin : { x : dstX , y : dstY , z : 0 }
1409+ origin : { x : dstX , y : dstY , z : dstLayer }
14061410 } ,
14071411 [
14081412 srcWidth ,
1409- srcHeight
1413+ srcHeight ,
1414+ 1
14101415 ]
14111416 ) ;
14121417
You can’t perform that action at this time.
0 commit comments