@types/sharedworker 0.0.217 → 0.0.219
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +128 -0
- package/package.json +1 -1
- package/ts5.5/index.d.ts +128 -0
- package/ts5.6/index.d.ts +128 -0
- package/ts5.9/index.d.ts +128 -0
package/README.md
CHANGED
|
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
|
|
|
28
28
|
|
|
29
29
|
## Deploy Metadata
|
|
30
30
|
|
|
31
|
-
You can read what changed in version 0.0.
|
|
31
|
+
You can read what changed in version 0.0.219 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.219.
|
package/index.d.ts
CHANGED
|
@@ -229,6 +229,17 @@ interface GPUBindGroupEntry {
|
|
|
229
229
|
resource: GPUBindingResource;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
interface GPUBlendComponent {
|
|
233
|
+
dstFactor?: GPUBlendFactor;
|
|
234
|
+
operation?: GPUBlendOperation;
|
|
235
|
+
srcFactor?: GPUBlendFactor;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface GPUBlendState {
|
|
239
|
+
alpha: GPUBlendComponent;
|
|
240
|
+
color: GPUBlendComponent;
|
|
241
|
+
}
|
|
242
|
+
|
|
232
243
|
interface GPUBufferBinding {
|
|
233
244
|
buffer: GPUBuffer;
|
|
234
245
|
offset?: GPUSize64;
|
|
@@ -262,6 +273,12 @@ interface GPUColorDict {
|
|
|
262
273
|
r: number;
|
|
263
274
|
}
|
|
264
275
|
|
|
276
|
+
interface GPUColorTargetState {
|
|
277
|
+
blend?: GPUBlendState;
|
|
278
|
+
format: GPUTextureFormat;
|
|
279
|
+
writeMask?: GPUColorWriteFlags;
|
|
280
|
+
}
|
|
281
|
+
|
|
265
282
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
266
283
|
}
|
|
267
284
|
|
|
@@ -293,6 +310,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
293
310
|
source: GPUCopyExternalImageSource;
|
|
294
311
|
}
|
|
295
312
|
|
|
313
|
+
interface GPUDepthStencilState {
|
|
314
|
+
depthBias?: GPUDepthBias;
|
|
315
|
+
depthBiasClamp?: number;
|
|
316
|
+
depthBiasSlopeScale?: number;
|
|
317
|
+
depthCompare?: GPUCompareFunction;
|
|
318
|
+
depthWriteEnabled?: boolean;
|
|
319
|
+
format: GPUTextureFormat;
|
|
320
|
+
stencilBack?: GPUStencilFaceState;
|
|
321
|
+
stencilFront?: GPUStencilFaceState;
|
|
322
|
+
stencilReadMask?: GPUStencilValue;
|
|
323
|
+
stencilWriteMask?: GPUStencilValue;
|
|
324
|
+
}
|
|
325
|
+
|
|
296
326
|
interface GPUExtent3DDict {
|
|
297
327
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
298
328
|
height?: GPUIntegerCoordinate;
|
|
@@ -303,6 +333,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
303
333
|
colorSpace?: PredefinedColorSpace;
|
|
304
334
|
}
|
|
305
335
|
|
|
336
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
337
|
+
targets: (GPUColorTargetState | null)[];
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
interface GPUMultisampleState {
|
|
341
|
+
alphaToCoverageEnabled?: boolean;
|
|
342
|
+
count?: GPUSize32;
|
|
343
|
+
mask?: GPUSampleMask;
|
|
344
|
+
}
|
|
345
|
+
|
|
306
346
|
interface GPUObjectDescriptorBase {
|
|
307
347
|
label?: string;
|
|
308
348
|
}
|
|
@@ -330,6 +370,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
330
370
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
331
371
|
}
|
|
332
372
|
|
|
373
|
+
interface GPUPrimitiveState {
|
|
374
|
+
cullMode?: GPUCullMode;
|
|
375
|
+
frontFace?: GPUFrontFace;
|
|
376
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
377
|
+
topology?: GPUPrimitiveTopology;
|
|
378
|
+
unclippedDepth?: boolean;
|
|
379
|
+
}
|
|
380
|
+
|
|
333
381
|
interface GPUProgrammableStage {
|
|
334
382
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
335
383
|
entryPoint?: string;
|
|
@@ -390,6 +438,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
390
438
|
querySet: GPUQuerySet;
|
|
391
439
|
}
|
|
392
440
|
|
|
441
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
442
|
+
depthStencil?: GPUDepthStencilState;
|
|
443
|
+
fragment?: GPUFragmentState;
|
|
444
|
+
multisample?: GPUMultisampleState;
|
|
445
|
+
primitive?: GPUPrimitiveState;
|
|
446
|
+
vertex: GPUVertexState;
|
|
447
|
+
}
|
|
448
|
+
|
|
393
449
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
394
450
|
addressModeU?: GPUAddressMode;
|
|
395
451
|
addressModeV?: GPUAddressMode;
|
|
@@ -403,6 +459,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
403
459
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
404
460
|
}
|
|
405
461
|
|
|
462
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
463
|
+
code: string;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
interface GPUStencilFaceState {
|
|
467
|
+
compare?: GPUCompareFunction;
|
|
468
|
+
depthFailOp?: GPUStencilOperation;
|
|
469
|
+
failOp?: GPUStencilOperation;
|
|
470
|
+
passOp?: GPUStencilOperation;
|
|
471
|
+
}
|
|
472
|
+
|
|
406
473
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
407
474
|
buffer: GPUBuffer;
|
|
408
475
|
}
|
|
@@ -420,6 +487,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
420
487
|
texture: GPUTexture;
|
|
421
488
|
}
|
|
422
489
|
|
|
490
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
491
|
+
dimension?: GPUTextureDimension;
|
|
492
|
+
format: GPUTextureFormat;
|
|
493
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
494
|
+
sampleCount?: GPUSize32;
|
|
495
|
+
size: GPUExtent3D;
|
|
496
|
+
usage: GPUTextureUsageFlags;
|
|
497
|
+
viewFormats?: GPUTextureFormat[];
|
|
498
|
+
}
|
|
499
|
+
|
|
423
500
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
424
501
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
425
502
|
aspect?: GPUTextureAspect;
|
|
@@ -435,6 +512,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
435
512
|
error: GPUError;
|
|
436
513
|
}
|
|
437
514
|
|
|
515
|
+
interface GPUVertexAttribute {
|
|
516
|
+
format: GPUVertexFormat;
|
|
517
|
+
offset: GPUSize64;
|
|
518
|
+
shaderLocation: GPUIndex32;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
interface GPUVertexBufferLayout {
|
|
522
|
+
arrayStride: GPUSize64;
|
|
523
|
+
attributes: GPUVertexAttribute[];
|
|
524
|
+
stepMode?: GPUVertexStepMode;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
528
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
529
|
+
}
|
|
530
|
+
|
|
438
531
|
interface GetNotificationOptions {
|
|
439
532
|
tag?: string;
|
|
440
533
|
}
|
|
@@ -4571,12 +4664,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4571
4664
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4572
4665
|
*/
|
|
4573
4666
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4667
|
+
/**
|
|
4668
|
+
* The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
|
|
4669
|
+
*
|
|
4670
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
4671
|
+
*/
|
|
4672
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
4673
|
+
/**
|
|
4674
|
+
* The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
|
|
4675
|
+
*
|
|
4676
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
4677
|
+
*/
|
|
4678
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
4574
4679
|
/**
|
|
4575
4680
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4576
4681
|
*
|
|
4577
4682
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4578
4683
|
*/
|
|
4579
4684
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4685
|
+
/**
|
|
4686
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4687
|
+
*
|
|
4688
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4689
|
+
*/
|
|
4690
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4691
|
+
/**
|
|
4692
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4693
|
+
*
|
|
4694
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4695
|
+
*/
|
|
4696
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4580
4697
|
/**
|
|
4581
4698
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4582
4699
|
*
|
|
@@ -12762,7 +12879,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
12762
12879
|
type GPUBufferDynamicOffset = number;
|
|
12763
12880
|
type GPUBufferUsageFlags = number;
|
|
12764
12881
|
type GPUColor = number[] | GPUColorDict;
|
|
12882
|
+
type GPUColorWriteFlags = number;
|
|
12765
12883
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12884
|
+
type GPUDepthBias = number;
|
|
12766
12885
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12767
12886
|
type GPUFlagsConstant = number;
|
|
12768
12887
|
type GPUIndex32 = number;
|
|
@@ -12772,6 +12891,7 @@ type GPUMapModeFlags = number;
|
|
|
12772
12891
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12773
12892
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12774
12893
|
type GPUPipelineConstantValue = number;
|
|
12894
|
+
type GPUSampleMask = number;
|
|
12775
12895
|
type GPUSignedOffset32 = number;
|
|
12776
12896
|
type GPUSize32 = number;
|
|
12777
12897
|
type GPUSize32Out = number;
|
|
@@ -12825,24 +12945,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12825
12945
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12826
12946
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
12827
12947
|
type GPUAutoLayoutMode = "auto";
|
|
12948
|
+
type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
|
|
12949
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
12828
12950
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12829
12951
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12830
12952
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12831
12953
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
12832
12954
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12955
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
12833
12956
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12834
12957
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12835
12958
|
type GPUFilterMode = "linear" | "nearest";
|
|
12959
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
12836
12960
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12837
12961
|
type GPULoadOp = "clear" | "load";
|
|
12838
12962
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
12839
12963
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12964
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
12840
12965
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12966
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
12841
12967
|
type GPUStoreOp = "discard" | "store";
|
|
12842
12968
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12843
12969
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12844
12970
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
12845
12971
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
12972
|
+
type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
|
|
12973
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
12846
12974
|
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
|
|
12847
12975
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
12848
12976
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -226,6 +226,17 @@ interface GPUBindGroupEntry {
|
|
|
226
226
|
resource: GPUBindingResource;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
interface GPUBlendComponent {
|
|
230
|
+
dstFactor?: GPUBlendFactor;
|
|
231
|
+
operation?: GPUBlendOperation;
|
|
232
|
+
srcFactor?: GPUBlendFactor;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface GPUBlendState {
|
|
236
|
+
alpha: GPUBlendComponent;
|
|
237
|
+
color: GPUBlendComponent;
|
|
238
|
+
}
|
|
239
|
+
|
|
229
240
|
interface GPUBufferBinding {
|
|
230
241
|
buffer: GPUBuffer;
|
|
231
242
|
offset?: GPUSize64;
|
|
@@ -259,6 +270,12 @@ interface GPUColorDict {
|
|
|
259
270
|
r: number;
|
|
260
271
|
}
|
|
261
272
|
|
|
273
|
+
interface GPUColorTargetState {
|
|
274
|
+
blend?: GPUBlendState;
|
|
275
|
+
format: GPUTextureFormat;
|
|
276
|
+
writeMask?: GPUColorWriteFlags;
|
|
277
|
+
}
|
|
278
|
+
|
|
262
279
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
263
280
|
}
|
|
264
281
|
|
|
@@ -290,6 +307,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
290
307
|
source: GPUCopyExternalImageSource;
|
|
291
308
|
}
|
|
292
309
|
|
|
310
|
+
interface GPUDepthStencilState {
|
|
311
|
+
depthBias?: GPUDepthBias;
|
|
312
|
+
depthBiasClamp?: number;
|
|
313
|
+
depthBiasSlopeScale?: number;
|
|
314
|
+
depthCompare?: GPUCompareFunction;
|
|
315
|
+
depthWriteEnabled?: boolean;
|
|
316
|
+
format: GPUTextureFormat;
|
|
317
|
+
stencilBack?: GPUStencilFaceState;
|
|
318
|
+
stencilFront?: GPUStencilFaceState;
|
|
319
|
+
stencilReadMask?: GPUStencilValue;
|
|
320
|
+
stencilWriteMask?: GPUStencilValue;
|
|
321
|
+
}
|
|
322
|
+
|
|
293
323
|
interface GPUExtent3DDict {
|
|
294
324
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
295
325
|
height?: GPUIntegerCoordinate;
|
|
@@ -300,6 +330,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
300
330
|
colorSpace?: PredefinedColorSpace;
|
|
301
331
|
}
|
|
302
332
|
|
|
333
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
334
|
+
targets: (GPUColorTargetState | null)[];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface GPUMultisampleState {
|
|
338
|
+
alphaToCoverageEnabled?: boolean;
|
|
339
|
+
count?: GPUSize32;
|
|
340
|
+
mask?: GPUSampleMask;
|
|
341
|
+
}
|
|
342
|
+
|
|
303
343
|
interface GPUObjectDescriptorBase {
|
|
304
344
|
label?: string;
|
|
305
345
|
}
|
|
@@ -327,6 +367,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
327
367
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
328
368
|
}
|
|
329
369
|
|
|
370
|
+
interface GPUPrimitiveState {
|
|
371
|
+
cullMode?: GPUCullMode;
|
|
372
|
+
frontFace?: GPUFrontFace;
|
|
373
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
374
|
+
topology?: GPUPrimitiveTopology;
|
|
375
|
+
unclippedDepth?: boolean;
|
|
376
|
+
}
|
|
377
|
+
|
|
330
378
|
interface GPUProgrammableStage {
|
|
331
379
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
332
380
|
entryPoint?: string;
|
|
@@ -387,6 +435,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
387
435
|
querySet: GPUQuerySet;
|
|
388
436
|
}
|
|
389
437
|
|
|
438
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
439
|
+
depthStencil?: GPUDepthStencilState;
|
|
440
|
+
fragment?: GPUFragmentState;
|
|
441
|
+
multisample?: GPUMultisampleState;
|
|
442
|
+
primitive?: GPUPrimitiveState;
|
|
443
|
+
vertex: GPUVertexState;
|
|
444
|
+
}
|
|
445
|
+
|
|
390
446
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
391
447
|
addressModeU?: GPUAddressMode;
|
|
392
448
|
addressModeV?: GPUAddressMode;
|
|
@@ -400,6 +456,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
400
456
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
401
457
|
}
|
|
402
458
|
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
interface GPUStencilFaceState {
|
|
464
|
+
compare?: GPUCompareFunction;
|
|
465
|
+
depthFailOp?: GPUStencilOperation;
|
|
466
|
+
failOp?: GPUStencilOperation;
|
|
467
|
+
passOp?: GPUStencilOperation;
|
|
468
|
+
}
|
|
469
|
+
|
|
403
470
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
471
|
buffer: GPUBuffer;
|
|
405
472
|
}
|
|
@@ -417,6 +484,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
484
|
texture: GPUTexture;
|
|
418
485
|
}
|
|
419
486
|
|
|
487
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
488
|
+
dimension?: GPUTextureDimension;
|
|
489
|
+
format: GPUTextureFormat;
|
|
490
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
491
|
+
sampleCount?: GPUSize32;
|
|
492
|
+
size: GPUExtent3D;
|
|
493
|
+
usage: GPUTextureUsageFlags;
|
|
494
|
+
viewFormats?: GPUTextureFormat[];
|
|
495
|
+
}
|
|
496
|
+
|
|
420
497
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
498
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
499
|
aspect?: GPUTextureAspect;
|
|
@@ -432,6 +509,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
432
509
|
error: GPUError;
|
|
433
510
|
}
|
|
434
511
|
|
|
512
|
+
interface GPUVertexAttribute {
|
|
513
|
+
format: GPUVertexFormat;
|
|
514
|
+
offset: GPUSize64;
|
|
515
|
+
shaderLocation: GPUIndex32;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
interface GPUVertexBufferLayout {
|
|
519
|
+
arrayStride: GPUSize64;
|
|
520
|
+
attributes: GPUVertexAttribute[];
|
|
521
|
+
stepMode?: GPUVertexStepMode;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
525
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
526
|
+
}
|
|
527
|
+
|
|
435
528
|
interface GetNotificationOptions {
|
|
436
529
|
tag?: string;
|
|
437
530
|
}
|
|
@@ -4568,12 +4661,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4568
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4569
4662
|
*/
|
|
4570
4663
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
4668
|
+
*/
|
|
4669
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
4670
|
+
/**
|
|
4671
|
+
* The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
|
|
4672
|
+
*
|
|
4673
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
4674
|
+
*/
|
|
4675
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
4571
4676
|
/**
|
|
4572
4677
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4573
4678
|
*
|
|
4574
4679
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4575
4680
|
*/
|
|
4576
4681
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4682
|
+
/**
|
|
4683
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4684
|
+
*
|
|
4685
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4686
|
+
*/
|
|
4687
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4688
|
+
/**
|
|
4689
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4690
|
+
*
|
|
4691
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4692
|
+
*/
|
|
4693
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4577
4694
|
/**
|
|
4578
4695
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4579
4696
|
*
|
|
@@ -12759,7 +12876,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
12759
12876
|
type GPUBufferDynamicOffset = number;
|
|
12760
12877
|
type GPUBufferUsageFlags = number;
|
|
12761
12878
|
type GPUColor = number[] | GPUColorDict;
|
|
12879
|
+
type GPUColorWriteFlags = number;
|
|
12762
12880
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12881
|
+
type GPUDepthBias = number;
|
|
12763
12882
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12764
12883
|
type GPUFlagsConstant = number;
|
|
12765
12884
|
type GPUIndex32 = number;
|
|
@@ -12769,6 +12888,7 @@ type GPUMapModeFlags = number;
|
|
|
12769
12888
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12770
12889
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12771
12890
|
type GPUPipelineConstantValue = number;
|
|
12891
|
+
type GPUSampleMask = number;
|
|
12772
12892
|
type GPUSignedOffset32 = number;
|
|
12773
12893
|
type GPUSize32 = number;
|
|
12774
12894
|
type GPUSize32Out = number;
|
|
@@ -12822,24 +12942,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12822
12942
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12823
12943
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
12824
12944
|
type GPUAutoLayoutMode = "auto";
|
|
12945
|
+
type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
|
|
12946
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
12825
12947
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12826
12948
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12827
12949
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12828
12950
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
12829
12951
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12952
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
12830
12953
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12831
12954
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12832
12955
|
type GPUFilterMode = "linear" | "nearest";
|
|
12956
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
12833
12957
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12834
12958
|
type GPULoadOp = "clear" | "load";
|
|
12835
12959
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
12836
12960
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12961
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
12837
12962
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12963
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
12838
12964
|
type GPUStoreOp = "discard" | "store";
|
|
12839
12965
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12840
12966
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12841
12967
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
12842
12968
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
12969
|
+
type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
|
|
12970
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
12843
12971
|
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
|
|
12844
12972
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
12845
12973
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -226,6 +226,17 @@ interface GPUBindGroupEntry {
|
|
|
226
226
|
resource: GPUBindingResource;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
interface GPUBlendComponent {
|
|
230
|
+
dstFactor?: GPUBlendFactor;
|
|
231
|
+
operation?: GPUBlendOperation;
|
|
232
|
+
srcFactor?: GPUBlendFactor;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface GPUBlendState {
|
|
236
|
+
alpha: GPUBlendComponent;
|
|
237
|
+
color: GPUBlendComponent;
|
|
238
|
+
}
|
|
239
|
+
|
|
229
240
|
interface GPUBufferBinding {
|
|
230
241
|
buffer: GPUBuffer;
|
|
231
242
|
offset?: GPUSize64;
|
|
@@ -259,6 +270,12 @@ interface GPUColorDict {
|
|
|
259
270
|
r: number;
|
|
260
271
|
}
|
|
261
272
|
|
|
273
|
+
interface GPUColorTargetState {
|
|
274
|
+
blend?: GPUBlendState;
|
|
275
|
+
format: GPUTextureFormat;
|
|
276
|
+
writeMask?: GPUColorWriteFlags;
|
|
277
|
+
}
|
|
278
|
+
|
|
262
279
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
263
280
|
}
|
|
264
281
|
|
|
@@ -290,6 +307,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
290
307
|
source: GPUCopyExternalImageSource;
|
|
291
308
|
}
|
|
292
309
|
|
|
310
|
+
interface GPUDepthStencilState {
|
|
311
|
+
depthBias?: GPUDepthBias;
|
|
312
|
+
depthBiasClamp?: number;
|
|
313
|
+
depthBiasSlopeScale?: number;
|
|
314
|
+
depthCompare?: GPUCompareFunction;
|
|
315
|
+
depthWriteEnabled?: boolean;
|
|
316
|
+
format: GPUTextureFormat;
|
|
317
|
+
stencilBack?: GPUStencilFaceState;
|
|
318
|
+
stencilFront?: GPUStencilFaceState;
|
|
319
|
+
stencilReadMask?: GPUStencilValue;
|
|
320
|
+
stencilWriteMask?: GPUStencilValue;
|
|
321
|
+
}
|
|
322
|
+
|
|
293
323
|
interface GPUExtent3DDict {
|
|
294
324
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
295
325
|
height?: GPUIntegerCoordinate;
|
|
@@ -300,6 +330,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
300
330
|
colorSpace?: PredefinedColorSpace;
|
|
301
331
|
}
|
|
302
332
|
|
|
333
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
334
|
+
targets: (GPUColorTargetState | null)[];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface GPUMultisampleState {
|
|
338
|
+
alphaToCoverageEnabled?: boolean;
|
|
339
|
+
count?: GPUSize32;
|
|
340
|
+
mask?: GPUSampleMask;
|
|
341
|
+
}
|
|
342
|
+
|
|
303
343
|
interface GPUObjectDescriptorBase {
|
|
304
344
|
label?: string;
|
|
305
345
|
}
|
|
@@ -327,6 +367,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
327
367
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
328
368
|
}
|
|
329
369
|
|
|
370
|
+
interface GPUPrimitiveState {
|
|
371
|
+
cullMode?: GPUCullMode;
|
|
372
|
+
frontFace?: GPUFrontFace;
|
|
373
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
374
|
+
topology?: GPUPrimitiveTopology;
|
|
375
|
+
unclippedDepth?: boolean;
|
|
376
|
+
}
|
|
377
|
+
|
|
330
378
|
interface GPUProgrammableStage {
|
|
331
379
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
332
380
|
entryPoint?: string;
|
|
@@ -387,6 +435,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
387
435
|
querySet: GPUQuerySet;
|
|
388
436
|
}
|
|
389
437
|
|
|
438
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
439
|
+
depthStencil?: GPUDepthStencilState;
|
|
440
|
+
fragment?: GPUFragmentState;
|
|
441
|
+
multisample?: GPUMultisampleState;
|
|
442
|
+
primitive?: GPUPrimitiveState;
|
|
443
|
+
vertex: GPUVertexState;
|
|
444
|
+
}
|
|
445
|
+
|
|
390
446
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
391
447
|
addressModeU?: GPUAddressMode;
|
|
392
448
|
addressModeV?: GPUAddressMode;
|
|
@@ -400,6 +456,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
400
456
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
401
457
|
}
|
|
402
458
|
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
interface GPUStencilFaceState {
|
|
464
|
+
compare?: GPUCompareFunction;
|
|
465
|
+
depthFailOp?: GPUStencilOperation;
|
|
466
|
+
failOp?: GPUStencilOperation;
|
|
467
|
+
passOp?: GPUStencilOperation;
|
|
468
|
+
}
|
|
469
|
+
|
|
403
470
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
471
|
buffer: GPUBuffer;
|
|
405
472
|
}
|
|
@@ -417,6 +484,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
484
|
texture: GPUTexture;
|
|
418
485
|
}
|
|
419
486
|
|
|
487
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
488
|
+
dimension?: GPUTextureDimension;
|
|
489
|
+
format: GPUTextureFormat;
|
|
490
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
491
|
+
sampleCount?: GPUSize32;
|
|
492
|
+
size: GPUExtent3D;
|
|
493
|
+
usage: GPUTextureUsageFlags;
|
|
494
|
+
viewFormats?: GPUTextureFormat[];
|
|
495
|
+
}
|
|
496
|
+
|
|
420
497
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
498
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
499
|
aspect?: GPUTextureAspect;
|
|
@@ -432,6 +509,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
432
509
|
error: GPUError;
|
|
433
510
|
}
|
|
434
511
|
|
|
512
|
+
interface GPUVertexAttribute {
|
|
513
|
+
format: GPUVertexFormat;
|
|
514
|
+
offset: GPUSize64;
|
|
515
|
+
shaderLocation: GPUIndex32;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
interface GPUVertexBufferLayout {
|
|
519
|
+
arrayStride: GPUSize64;
|
|
520
|
+
attributes: GPUVertexAttribute[];
|
|
521
|
+
stepMode?: GPUVertexStepMode;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
525
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
526
|
+
}
|
|
527
|
+
|
|
435
528
|
interface GetNotificationOptions {
|
|
436
529
|
tag?: string;
|
|
437
530
|
}
|
|
@@ -4568,12 +4661,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4568
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4569
4662
|
*/
|
|
4570
4663
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
4668
|
+
*/
|
|
4669
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
4670
|
+
/**
|
|
4671
|
+
* The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
|
|
4672
|
+
*
|
|
4673
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
4674
|
+
*/
|
|
4675
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
4571
4676
|
/**
|
|
4572
4677
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4573
4678
|
*
|
|
4574
4679
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4575
4680
|
*/
|
|
4576
4681
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4682
|
+
/**
|
|
4683
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4684
|
+
*
|
|
4685
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4686
|
+
*/
|
|
4687
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4688
|
+
/**
|
|
4689
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4690
|
+
*
|
|
4691
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4692
|
+
*/
|
|
4693
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4577
4694
|
/**
|
|
4578
4695
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4579
4696
|
*
|
|
@@ -12759,7 +12876,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
12759
12876
|
type GPUBufferDynamicOffset = number;
|
|
12760
12877
|
type GPUBufferUsageFlags = number;
|
|
12761
12878
|
type GPUColor = number[] | GPUColorDict;
|
|
12879
|
+
type GPUColorWriteFlags = number;
|
|
12762
12880
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12881
|
+
type GPUDepthBias = number;
|
|
12763
12882
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12764
12883
|
type GPUFlagsConstant = number;
|
|
12765
12884
|
type GPUIndex32 = number;
|
|
@@ -12769,6 +12888,7 @@ type GPUMapModeFlags = number;
|
|
|
12769
12888
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12770
12889
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12771
12890
|
type GPUPipelineConstantValue = number;
|
|
12891
|
+
type GPUSampleMask = number;
|
|
12772
12892
|
type GPUSignedOffset32 = number;
|
|
12773
12893
|
type GPUSize32 = number;
|
|
12774
12894
|
type GPUSize32Out = number;
|
|
@@ -12822,24 +12942,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12822
12942
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12823
12943
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
12824
12944
|
type GPUAutoLayoutMode = "auto";
|
|
12945
|
+
type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
|
|
12946
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
12825
12947
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12826
12948
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12827
12949
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12828
12950
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
12829
12951
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12952
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
12830
12953
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12831
12954
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12832
12955
|
type GPUFilterMode = "linear" | "nearest";
|
|
12956
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
12833
12957
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12834
12958
|
type GPULoadOp = "clear" | "load";
|
|
12835
12959
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
12836
12960
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12961
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
12837
12962
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12963
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
12838
12964
|
type GPUStoreOp = "discard" | "store";
|
|
12839
12965
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12840
12966
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12841
12967
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
12842
12968
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
12969
|
+
type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
|
|
12970
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
12843
12971
|
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
|
|
12844
12972
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
12845
12973
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
package/ts5.9/index.d.ts
CHANGED
|
@@ -226,6 +226,17 @@ interface GPUBindGroupEntry {
|
|
|
226
226
|
resource: GPUBindingResource;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
interface GPUBlendComponent {
|
|
230
|
+
dstFactor?: GPUBlendFactor;
|
|
231
|
+
operation?: GPUBlendOperation;
|
|
232
|
+
srcFactor?: GPUBlendFactor;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface GPUBlendState {
|
|
236
|
+
alpha: GPUBlendComponent;
|
|
237
|
+
color: GPUBlendComponent;
|
|
238
|
+
}
|
|
239
|
+
|
|
229
240
|
interface GPUBufferBinding {
|
|
230
241
|
buffer: GPUBuffer;
|
|
231
242
|
offset?: GPUSize64;
|
|
@@ -259,6 +270,12 @@ interface GPUColorDict {
|
|
|
259
270
|
r: number;
|
|
260
271
|
}
|
|
261
272
|
|
|
273
|
+
interface GPUColorTargetState {
|
|
274
|
+
blend?: GPUBlendState;
|
|
275
|
+
format: GPUTextureFormat;
|
|
276
|
+
writeMask?: GPUColorWriteFlags;
|
|
277
|
+
}
|
|
278
|
+
|
|
262
279
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
263
280
|
}
|
|
264
281
|
|
|
@@ -290,6 +307,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
290
307
|
source: GPUCopyExternalImageSource;
|
|
291
308
|
}
|
|
292
309
|
|
|
310
|
+
interface GPUDepthStencilState {
|
|
311
|
+
depthBias?: GPUDepthBias;
|
|
312
|
+
depthBiasClamp?: number;
|
|
313
|
+
depthBiasSlopeScale?: number;
|
|
314
|
+
depthCompare?: GPUCompareFunction;
|
|
315
|
+
depthWriteEnabled?: boolean;
|
|
316
|
+
format: GPUTextureFormat;
|
|
317
|
+
stencilBack?: GPUStencilFaceState;
|
|
318
|
+
stencilFront?: GPUStencilFaceState;
|
|
319
|
+
stencilReadMask?: GPUStencilValue;
|
|
320
|
+
stencilWriteMask?: GPUStencilValue;
|
|
321
|
+
}
|
|
322
|
+
|
|
293
323
|
interface GPUExtent3DDict {
|
|
294
324
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
295
325
|
height?: GPUIntegerCoordinate;
|
|
@@ -300,6 +330,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
300
330
|
colorSpace?: PredefinedColorSpace;
|
|
301
331
|
}
|
|
302
332
|
|
|
333
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
334
|
+
targets: (GPUColorTargetState | null)[];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface GPUMultisampleState {
|
|
338
|
+
alphaToCoverageEnabled?: boolean;
|
|
339
|
+
count?: GPUSize32;
|
|
340
|
+
mask?: GPUSampleMask;
|
|
341
|
+
}
|
|
342
|
+
|
|
303
343
|
interface GPUObjectDescriptorBase {
|
|
304
344
|
label?: string;
|
|
305
345
|
}
|
|
@@ -327,6 +367,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
327
367
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
328
368
|
}
|
|
329
369
|
|
|
370
|
+
interface GPUPrimitiveState {
|
|
371
|
+
cullMode?: GPUCullMode;
|
|
372
|
+
frontFace?: GPUFrontFace;
|
|
373
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
374
|
+
topology?: GPUPrimitiveTopology;
|
|
375
|
+
unclippedDepth?: boolean;
|
|
376
|
+
}
|
|
377
|
+
|
|
330
378
|
interface GPUProgrammableStage {
|
|
331
379
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
332
380
|
entryPoint?: string;
|
|
@@ -387,6 +435,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
387
435
|
querySet: GPUQuerySet;
|
|
388
436
|
}
|
|
389
437
|
|
|
438
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
439
|
+
depthStencil?: GPUDepthStencilState;
|
|
440
|
+
fragment?: GPUFragmentState;
|
|
441
|
+
multisample?: GPUMultisampleState;
|
|
442
|
+
primitive?: GPUPrimitiveState;
|
|
443
|
+
vertex: GPUVertexState;
|
|
444
|
+
}
|
|
445
|
+
|
|
390
446
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
391
447
|
addressModeU?: GPUAddressMode;
|
|
392
448
|
addressModeV?: GPUAddressMode;
|
|
@@ -400,6 +456,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
400
456
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
401
457
|
}
|
|
402
458
|
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
interface GPUStencilFaceState {
|
|
464
|
+
compare?: GPUCompareFunction;
|
|
465
|
+
depthFailOp?: GPUStencilOperation;
|
|
466
|
+
failOp?: GPUStencilOperation;
|
|
467
|
+
passOp?: GPUStencilOperation;
|
|
468
|
+
}
|
|
469
|
+
|
|
403
470
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
471
|
buffer: GPUBuffer;
|
|
405
472
|
}
|
|
@@ -417,6 +484,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
484
|
texture: GPUTexture;
|
|
418
485
|
}
|
|
419
486
|
|
|
487
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
488
|
+
dimension?: GPUTextureDimension;
|
|
489
|
+
format: GPUTextureFormat;
|
|
490
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
491
|
+
sampleCount?: GPUSize32;
|
|
492
|
+
size: GPUExtent3D;
|
|
493
|
+
usage: GPUTextureUsageFlags;
|
|
494
|
+
viewFormats?: GPUTextureFormat[];
|
|
495
|
+
}
|
|
496
|
+
|
|
420
497
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
498
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
499
|
aspect?: GPUTextureAspect;
|
|
@@ -432,6 +509,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
432
509
|
error: GPUError;
|
|
433
510
|
}
|
|
434
511
|
|
|
512
|
+
interface GPUVertexAttribute {
|
|
513
|
+
format: GPUVertexFormat;
|
|
514
|
+
offset: GPUSize64;
|
|
515
|
+
shaderLocation: GPUIndex32;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
interface GPUVertexBufferLayout {
|
|
519
|
+
arrayStride: GPUSize64;
|
|
520
|
+
attributes: GPUVertexAttribute[];
|
|
521
|
+
stepMode?: GPUVertexStepMode;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
525
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
526
|
+
}
|
|
527
|
+
|
|
435
528
|
interface GetNotificationOptions {
|
|
436
529
|
tag?: string;
|
|
437
530
|
}
|
|
@@ -4568,12 +4661,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4568
4661
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4569
4662
|
*/
|
|
4570
4663
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4664
|
+
/**
|
|
4665
|
+
* The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
|
|
4666
|
+
*
|
|
4667
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
4668
|
+
*/
|
|
4669
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
4670
|
+
/**
|
|
4671
|
+
* The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
|
|
4672
|
+
*
|
|
4673
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
4674
|
+
*/
|
|
4675
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
4571
4676
|
/**
|
|
4572
4677
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4573
4678
|
*
|
|
4574
4679
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4575
4680
|
*/
|
|
4576
4681
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4682
|
+
/**
|
|
4683
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4684
|
+
*
|
|
4685
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4686
|
+
*/
|
|
4687
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4688
|
+
/**
|
|
4689
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4690
|
+
*
|
|
4691
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4692
|
+
*/
|
|
4693
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4577
4694
|
/**
|
|
4578
4695
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4579
4696
|
*
|
|
@@ -12759,7 +12876,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
12759
12876
|
type GPUBufferDynamicOffset = number;
|
|
12760
12877
|
type GPUBufferUsageFlags = number;
|
|
12761
12878
|
type GPUColor = number[] | GPUColorDict;
|
|
12879
|
+
type GPUColorWriteFlags = number;
|
|
12762
12880
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12881
|
+
type GPUDepthBias = number;
|
|
12763
12882
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12764
12883
|
type GPUFlagsConstant = number;
|
|
12765
12884
|
type GPUIndex32 = number;
|
|
@@ -12769,6 +12888,7 @@ type GPUMapModeFlags = number;
|
|
|
12769
12888
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12770
12889
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12771
12890
|
type GPUPipelineConstantValue = number;
|
|
12891
|
+
type GPUSampleMask = number;
|
|
12772
12892
|
type GPUSignedOffset32 = number;
|
|
12773
12893
|
type GPUSize32 = number;
|
|
12774
12894
|
type GPUSize32Out = number;
|
|
@@ -12822,24 +12942,32 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12822
12942
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12823
12943
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
12824
12944
|
type GPUAutoLayoutMode = "auto";
|
|
12945
|
+
type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
|
|
12946
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
12825
12947
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12826
12948
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12827
12949
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12828
12950
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
12829
12951
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12952
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
12830
12953
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12831
12954
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12832
12955
|
type GPUFilterMode = "linear" | "nearest";
|
|
12956
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
12833
12957
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12834
12958
|
type GPULoadOp = "clear" | "load";
|
|
12835
12959
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
12836
12960
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12961
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
12837
12962
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12963
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
12838
12964
|
type GPUStoreOp = "discard" | "store";
|
|
12839
12965
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12840
12966
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12841
12967
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
12842
12968
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
12969
|
+
type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
|
|
12970
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
12843
12971
|
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
|
|
12844
12972
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
12845
12973
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|