From cafeb4f32f4ac0d8788505dddebace6d3ba00f72 Mon Sep 17 00:00:00 2001 From: Brandon Jones Date: Thu, 22 Oct 2020 07:55:49 -0700 Subject: [PATCH] Added a section for Feature descriptions (#1144) * Added a section for Feature descriptions * Moved feature definitions back into main doc from separate files * Better formatting * Addressing Kai's feedback --- spec/index.bs | 127 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 108 insertions(+), 19 deletions(-) diff --git a/spec/index.bs b/spec/index.bs index 7292131069..ac7e28ad03 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -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} @@ -1350,24 +1351,6 @@ enum GPUFeatureName { }; -
- : "texture-compression-bc" - :: - Issue: Write a spec section for this, and link to it. -
- -
- : "depth24unorm-stencil8" - :: - Allows for explicit creation of textures of format {{GPUTextureFormat/"depth24unorm-stencil8"}}. -
- -
- : "depth32float-stencil8" - :: - Allows for explicit creation of textures of format {{GPUTextureFormat/"depth32float-stencil8"}}. -
- ## GPUDevice ## {#gpu-device} A {{GPUDevice}} encapsulates a [=device=] and exposes @@ -7030,6 +7013,112 @@ An Extent3D is a {{GPUExtent3D}}. or the third item of the sequence or 1 if it isn't present. +# Feature Index # {#feature-index} + +## depth-clamping ## {#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: + +
+ : {{GPURasterizationStateDescriptor}} + :: + * {{GPURasterizationStateDescriptor/clampDepth}} +
+ +## depth24unorm-stencil8 ## {#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: + +
+ : {{GPUTextureFormat}} + :: + * {{GPUTextureFormat/"depth24unorm-stencil8"}} +
+ +## depth32float-stencil8 ## {#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: + +
+ : {{GPUTextureFormat}} + :: + * {{GPUTextureFormat/"depth32float-stencil8"}} +
+ +## pipeline-statistics-query ## {#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: + +
+ : {{GPUQueryType}} + :: + * {{GPUQueryType/"pipeline-statistics"}} +
+ + +## texture-compression-bc ## {#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: + +
+ : {{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"}} +
+ +## timestamp-query ## {#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: + +
+ : {{GPUQueryType}} + :: + * {{GPUQueryType/"timestamp"}} +
+ # Appendices # {#appendices} ## Texture Format Capabilities ## {#texture-format-caps}