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

Skip to content

Commit 7531dda

Browse files
authored
Merge arrayLayerCount into size.depth (gpuweb#613)
1 parent 7f4b88a commit 7531dda

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

spec/index.bs

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,6 @@ GPUTexture includes GPUObjectBase;
13221322
<script type=idl>
13231323
dictionary GPUTextureDescriptor : GPUObjectDescriptorBase {
13241324
required GPUExtent3D size;
1325-
GPUIntegerCoordinate arrayLayerCount = 1;
13261325
GPUIntegerCoordinate mipLevelCount = 1;
13271326
GPUSize32 sampleCount = 1;
13281327
GPUTextureDimension dimension = "2d";
@@ -1386,7 +1385,7 @@ internal slots of a texture internal object once we have one. -->
13861385
- If |texture|.{{GPUTextureDescriptor/dimension}} is {{GPUTextureDimension/"1d"}},
13871386
defaults to {{GPUTextureViewDimension/"1d"}}.
13881387
- If |texture|.{{GPUTextureDescriptor/dimension}} is {{GPUTextureDimension/"2d"}}:
1389-
- If |texture|.{{GPUTextureDescriptor/arrayLayerCount}} is greater than 1
1388+
- If |texture|.{{GPUTextureDescriptor/size}}.[=Extent3D/depth=] is greater than 1
13901389
and {{GPUTextureViewDescriptor/arrayLayerCount}} is 0,
13911390
defaults to {{GPUTextureViewDimension/"2d-array"}}.
13921391
- Otherwise, defaults to {{GPUTextureViewDimension/"2d"}}.
@@ -1397,7 +1396,7 @@ internal slots of a texture internal object once we have one. -->
13971396
If 0, defaults to |texture|.{{GPUTextureDescriptor/mipLevelCount}} &minus; {{GPUTextureViewDescriptor/baseMipLevel}}.
13981397

13991398
* {{GPUTextureViewDescriptor/arrayLayerCount}}:
1400-
If 0, defaults to |texture|.{{GPUTextureDescriptor/arrayLayerCount}} &minus; {{GPUTextureViewDescriptor/baseArrayLayer}}.
1399+
If 0, defaults to |texture|.{{GPUTextureDescriptor/size}}.[=Extent3D/depth=] &minus; {{GPUTextureViewDescriptor/baseArrayLayer}}.
14011400

14021401
</div>
14031402

@@ -2646,7 +2645,7 @@ GPUQueue includes GPUObjectBase;
26462645
</script>
26472646

26482647
- {{GPUQueue/copyImageBitmapToTexture()}}:
2649-
- For now, `copySize.z` must be `1`.
2648+
- For now, {{GPUQueue/copyImageBitmapToTexture(source, destination, copySize)/copySize}}.[=Extent3D/depth=] must be `1`.
26502649

26512650
{{GPUQueue/submit(commandBuffers)}} does nothing and produces an error if any of the following is true:
26522651

@@ -2839,15 +2838,35 @@ dictionary GPUExtent3DDict {
28392838
typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
28402839
</script>
28412840

2841+
An <dfn dfn>Extent3D</dfn> is a {{GPUExtent3D}}.
2842+
[=Extent3D=] is a spec namespace for the following definitions:
2843+
<!-- This is silly, but provides convenient syntax for the spec. -->
2844+
2845+
<div algorithm="GPUExtent3D accessors" dfn-for=Extent3D>
2846+
For a given {{GPUExtent3D}} value |extent|, depending on its type, the syntax:
2847+
2848+
* |extent|.<dfn dfn>width</dfn> refers to
2849+
either {{GPUExtent3DDict}}.{{GPUExtent3DDict/width}}
2850+
or the first item of the sequence.
2851+
* |extent|.<dfn dfn>height</dfn> refers to
2852+
either {{GPUExtent3DDict}}.{{GPUExtent3DDict/height}}
2853+
or the second item of the sequence.
2854+
* |extent|.<dfn dfn>depth</dfn> refers to
2855+
either {{GPUExtent3DDict}}.{{GPUExtent3DDict/depth}}
2856+
or the third item of the sequence.
2857+
</div>
2858+
28422859
<script type=idl>
28432860
typedef sequence<(GPUBuffer or ArrayBuffer)> GPUMappedBuffer;
28442861
</script>
28452862

28462863
{{GPUMappedBuffer}} is always a sequence of 2 elements, of types {{GPUBuffer}}
28472864
and {{ArrayBuffer}}, respectively.
28482865

2849-
# Temporary usages of non-exported dfns ## {#temp-dfn-usages}
2866+
# Temporary usages of non-exported dfns # {#temp-dfn-usages}
28502867

28512868
Eventually all of these should disappear but they are useful to avoid warning while building the specification.
28522869

28532870
[=vertex buffer=]
2871+
[=Extent3D/width=]
2872+
[=Extent3D/height=]

0 commit comments

Comments
 (0)