Skip to content

Commit 51f0423

Browse files
committed
Add note on how to use optional things
1 parent bb15f36 commit 51f0423

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

dist/index.d.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,7 @@ interface GPUPipelineLayoutDescriptor
11021102
* The size in bytes of the immediate data range.
11031103
*
11041104
* **PROPOSED** in [Immediates](https://github.com/gpuweb/gpuweb/pull/5423).
1105+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
11051106
*/
11061107
immediateSize?: GPUSize32;
11071108
}
@@ -1959,6 +1960,7 @@ interface GPUBindingCommandsMixin {
19591960
* `data` is a `TypedArray` and bytes otherwise.
19601961
*
19611962
* **PROPOSED** in [Immediates](https://github.com/gpuweb/gpuweb/pull/5423).
1963+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
19621964
*/
19631965
setImmediates?(
19641966
rangeOffset: GPUSize32,
@@ -2214,13 +2216,15 @@ interface GPUAdapterInfo {
22142216
* adapter.
22152217
*
22162218
* @todo Temporarily optional until all browsers have implemented it.
2219+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
22172220
*/
22182221
readonly subgroupMinSize?: number;
22192222
/**
22202223
* If the "subgroups" feature is supported, the maximum supported subgroup size for the
22212224
* adapter.
22222225
*
22232226
* @todo Temporarily optional until all browsers have implemented it.
2227+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
22242228
*/
22252229
readonly subgroupMaxSize?: number;
22262230
/**
@@ -3197,14 +3201,26 @@ interface GPUSupportedLimits {
31973201
readonly maxSampledTexturesPerShaderStage: number;
31983202
readonly maxSamplersPerShaderStage: number;
31993203
readonly maxStorageBuffersPerShaderStage: number;
3200-
/** @todo Temporarily optional until all browsers have implemented it. */
3204+
/**
3205+
* @todo Temporarily optional until all browsers have implemented it.
3206+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
3207+
*/
32013208
readonly maxStorageBuffersInVertexStage?: number;
3202-
/** @todo Temporarily optional until all browsers have implemented it. */
3209+
/**
3210+
* @todo Temporarily optional until all browsers have implemented it.
3211+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
3212+
*/
32033213
readonly maxStorageBuffersInFragmentStage?: number;
32043214
readonly maxStorageTexturesPerShaderStage: number;
3205-
/** @todo Temporarily optional until all browsers have implemented it. */
3215+
/**
3216+
* @todo Temporarily optional until all browsers have implemented it.
3217+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
3218+
*/
32063219
readonly maxStorageTexturesInVertexStage?: number;
3207-
/** @todo Temporarily optional until all browsers have implemented it. */
3220+
/**
3221+
* @todo Temporarily optional until all browsers have implemented it.
3222+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
3223+
*/
32083224
readonly maxStorageTexturesInFragmentStage?: number;
32093225
readonly maxUniformBuffersPerShaderStage: number;
32103226
readonly maxUniformBufferBindingSize: number;
@@ -3224,7 +3240,10 @@ interface GPUSupportedLimits {
32243240
readonly maxComputeWorkgroupSizeY: number;
32253241
readonly maxComputeWorkgroupSizeZ: number;
32263242
readonly maxComputeWorkgroupsPerDimension: number;
3227-
/** **PROPOSED** in [Immediates](https://github.com/gpuweb/gpuweb/pull/5423). */
3243+
/**
3244+
* **PROPOSED** in [Immediates](https://github.com/gpuweb/gpuweb/pull/5423).
3245+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
3246+
*/
32283247
readonly maxImmediateSize?: number;
32293248
}
32303249

@@ -3288,6 +3307,7 @@ interface GPUTexture
32883307
* no such restriction.
32893308
*
32903309
* @todo Temporarily optional until all browsers have implemented it.
3310+
* Check support before using. (Use the non-null assertion operator `!` where needed.)
32913311
*/
32923312
readonly textureBindingViewDimension?:
32933313
| GPUTextureViewDimension

0 commit comments

Comments
 (0)