Skip to content

Commit

Permalink
Added a section for Feature descriptions (gpuweb#1144)
Browse files Browse the repository at this point in the history
* Added a section for Feature descriptions

* Moved feature definitions back into main doc from separate files

* Better formatting

* Addressing Kai's feedback
  • Loading branch information
toji authored Oct 22, 2020
1 parent dd6cb91 commit cafeb4f
Showing 1 changed file with 108 additions and 19 deletions.
127 changes: 108 additions & 19 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,8 @@ Each {{GPUAdapter}} exposes a set of available features.
Only those features may be requested in {{GPUAdapter/requestDevice()}}.

Functionality that is part of an feature may only be used if the feature
was requested at device creation.
was requested at device creation. See the [[#feature-index|Feature Index]]
for a description of the functionality each feature enables.

### Limits ### {#limits}

Expand Down Expand Up @@ -1350,24 +1351,6 @@ enum GPUFeatureName {
};
</script>

<dl dfn-type=enum-value dfn-for=GPUFeatureName>
: <dfn>"texture-compression-bc"</dfn>
::
Issue: Write a spec section for this, and link to it.
</dl>

<dl dfn-type=enum-value dfn-for=GPUFeatureName>
: <dfn>"depth24unorm-stencil8"</dfn>
::
Allows for explicit creation of textures of format {{GPUTextureFormat/"depth24unorm-stencil8"}}.
</dl>

<dl dfn-type=enum-value dfn-for=GPUFeatureName>
: <dfn>"depth32float-stencil8"</dfn>
::
Allows for explicit creation of textures of format {{GPUTextureFormat/"depth32float-stencil8"}}.
</dl>

## <dfn interface>GPUDevice</dfn> ## {#gpu-device}

A {{GPUDevice}} encapsulates a [=device=] and exposes
Expand Down Expand Up @@ -7030,6 +7013,112 @@ An <dfn dfn>Extent3D</dfn> is a {{GPUExtent3D}}.
or the third item of the sequence or 1 if it isn't present.
</div>

# Feature Index # {#feature-index}

## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>depth-clamping</dfn> ## {#depth-clamping}

Issue: Define functionality when the {{GPUFeatureName/"depth-clamping"}} [=feature=] is enabled.

**Feature Dictionary Values**

The following dictionary values are supported if and only if the {{GPUFeatureName/"depth-clamping"}}
[=feature=] is enabled, otherwise they must be set to their default values:

<dl>
: {{GPURasterizationStateDescriptor}}
::
* {{GPURasterizationStateDescriptor/clampDepth}}
</dl>

## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>depth24unorm-stencil8</dfn> ## {#depth24unorm-stencil8}

Allows for explicit creation of textures of format {{GPUTextureFormat/"depth24unorm-stencil8"}}.

**Feature Enums**

The following enums are supported if and only if the {{GPUFeatureName/"depth24unorm-stencil8"}}
[=feature=] is enabled:

<dl>
: {{GPUTextureFormat}}
::
* {{GPUTextureFormat/"depth24unorm-stencil8"}}
</dl>

## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>depth32float-stencil8</dfn> ## {#depth32float-stencil8}

Allows for explicit creation of textures of format {{GPUTextureFormat/"depth32float-stencil8"}}.

**Feature Enums**

The following enums are supported if and only if the {{GPUFeatureName/"depth32float-stencil8"}}
[=feature=] is enabled:

<dl>
: {{GPUTextureFormat}}
::
* {{GPUTextureFormat/"depth32float-stencil8"}}
</dl>

## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>pipeline-statistics-query</dfn> ## {#pipeline-statistics-query}

Issue: Define functionality when the {{GPUFeatureName/"pipeline-statistics-query"}} [=feature=] is enabled.

**Feature Enums**

The following enums are supported if and only if the {{GPUFeatureName/"pipeline-statistics-query"}}
[=feature=] is enabled:

<dl>
: {{GPUQueryType}}
::
* {{GPUQueryType/"pipeline-statistics"}}
</dl>


## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>texture-compression-bc</dfn> ## {#texture-compression-bc}

Allows for explicit creation of textures of BC compressed formats.

**Feature Enums**

The following enums are supported if and only if the {{GPUFeatureName/"texture-compression-bc"}}
[=feature=] is enabled:

<dl>
: {{GPUTextureFormat}}
::
* {{GPUTextureFormat/"bc1-rgba-unorm"}}
* {{GPUTextureFormat/"bc1-rgba-unorm-srgb"}}
* {{GPUTextureFormat/"bc2-rgba-unorm"}}
* {{GPUTextureFormat/"bc2-rgba-unorm-srgb"}}
* {{GPUTextureFormat/"bc3-rgba-unorm"}}
* {{GPUTextureFormat/"bc3-rgba-unorm-srgb"}}
* {{GPUTextureFormat/"bc4-r-unorm"}}
* {{GPUTextureFormat/"bc4-r-snorm"}}
* {{GPUTextureFormat/"bc5-rg-unorm"}}
* {{GPUTextureFormat/"bc5-rg-snorm"}}
* {{GPUTextureFormat/"bc6h-rgb-ufloat"}}
* {{GPUTextureFormat/"bc6h-rgb-float"}}
* {{GPUTextureFormat/"bc7-rgba-unorm"}}
* {{GPUTextureFormat/"bc7-rgba-unorm-srgb"}}
</dl>

## <dfn dfn-type=enum-value dfn-for=GPUFeatureName>timestamp-query</dfn> ## {#timestamp-query}

Issue: Define functionality when the {{GPUFeatureName/"timestamp-query"}} [=feature=] is enabled.

**Feature Enums**

The following enums are supported if and only if the {{GPUFeatureName/"timestamp-query"}}
[=feature=] is enabled:

<dl>
: {{GPUQueryType}}
::
* {{GPUQueryType/"timestamp"}}
</dl>

# Appendices # {#appendices}

## Texture Format Capabilities ## {#texture-format-caps}
Expand Down

0 comments on commit cafeb4f

Please sign in to comment.