|
@@ -1365,9 +1365,11 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
let dstX = 0;
|
|
|
let dstY = 0;
|
|
|
+ let dstLayer = 0;
|
|
|
|
|
|
let srcX = 0;
|
|
|
let srcY = 0;
|
|
|
+ let srcLayer = 0;
|
|
|
|
|
|
let srcWidth = srcTexture.image.width;
|
|
|
let srcHeight = srcTexture.image.height;
|
|
@@ -1376,6 +1378,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
srcX = srcRegion.x;
|
|
|
srcY = srcRegion.y;
|
|
|
+ srcLayer = srcRegion.z || 0;
|
|
|
srcWidth = srcRegion.width;
|
|
|
srcHeight = srcRegion.height;
|
|
|
|
|
@@ -1385,6 +1388,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
dstX = dstPosition.x;
|
|
|
dstY = dstPosition.y;
|
|
|
+ dstLayer = dstPosition.z || 0;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1397,16 +1401,17 @@ class WebGPUBackend extends Backend {
|
|
|
{
|
|
|
texture: sourceGPU,
|
|
|
mipLevel: level,
|
|
|
- origin: { x: srcX, y: srcY, z: 0 }
|
|
|
+ origin: { x: srcX, y: srcY, z: srcLayer }
|
|
|
},
|
|
|
{
|
|
|
texture: destinationGPU,
|
|
|
mipLevel: level,
|
|
|
- origin: { x: dstX, y: dstY, z: 0 }
|
|
|
+ origin: { x: dstX, y: dstY, z: dstLayer }
|
|
|
},
|
|
|
[
|
|
|
srcWidth,
|
|
|
- srcHeight
|
|
|
+ srcHeight,
|
|
|
+ 1
|
|
|
]
|
|
|
);
|
|
|
|