Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6867df9

Browse files
authored
Make imageHeight optional (#517)
It's awkward to have to specify an `imageHeight` when you're not doing an array/3d texture copy (i.e. almost always). Make it default to zero. Zero is valid iff `copySize.depth > 1`
1 parent da1d4f8 commit 6867df9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

spec/index.bs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2258,10 +2258,21 @@ dictionary GPUBufferCopyView {
22582258
required GPUBuffer buffer;
22592259
GPUSize64 offset = 0;
22602260
required GPUSize32 rowPitch;
2261-
required GPUSize32 imageHeight;
2261+
GPUSize32 imageHeight = 0;
22622262
};
22632263
</script>
22642264

2265+
<dl dfn-type=dict-member dfn-for=GPUBufferCopyView>
2266+
: <dfn>imageHeight</dfn>
2267+
::
2268+
The pitch (measured as a multiple of {{GPUBufferCopyView/rowPitch}} bytes)
2269+
between different `z` values of the target texture.
2270+
For {{GPUTextureDimension/3d}} textures, `z` refers to the texture's depth.
2271+
For {{GPUTextureDimension/2d}} textures, `z` refers to the texture's array layers.
2272+
2273+
An `imageHeight` of zero is only valid for copies with a `copySize.depth` of 1.
2274+
</dl>
2275+
22652276
<script type=idl>
22662277
dictionary GPUTextureCopyView {
22672278
required GPUTexture texture;

0 commit comments

Comments
 (0)