@types/webworker 0.0.67 → 0.0.69
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
|
@@ -45,4 +45,4 @@ This project does not respect semantic versioning as almost every change could p
|
|
|
45
45
|
|
|
46
46
|
## Deploy Metadata
|
|
47
47
|
|
|
48
|
-
You can read what changed in version 0.0.
|
|
48
|
+
You can read what changed in version 0.0.69 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.69.
|
package/index.d.ts
CHANGED
|
@@ -375,6 +375,17 @@ interface GPUBindGroupEntry {
|
|
|
375
375
|
resource: GPUBindingResource;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
interface GPUBlendComponent {
|
|
379
|
+
dstFactor?: GPUBlendFactor;
|
|
380
|
+
operation?: GPUBlendOperation;
|
|
381
|
+
srcFactor?: GPUBlendFactor;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
interface GPUBlendState {
|
|
385
|
+
alpha: GPUBlendComponent;
|
|
386
|
+
color: GPUBlendComponent;
|
|
387
|
+
}
|
|
388
|
+
|
|
378
389
|
interface GPUBufferBinding {
|
|
379
390
|
buffer: GPUBuffer;
|
|
380
391
|
offset?: GPUSize64;
|
|
@@ -408,6 +419,12 @@ interface GPUColorDict {
|
|
|
408
419
|
r: number;
|
|
409
420
|
}
|
|
410
421
|
|
|
422
|
+
interface GPUColorTargetState {
|
|
423
|
+
blend?: GPUBlendState;
|
|
424
|
+
format: GPUTextureFormat;
|
|
425
|
+
writeMask?: GPUColorWriteFlags;
|
|
426
|
+
}
|
|
427
|
+
|
|
411
428
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
412
429
|
}
|
|
413
430
|
|
|
@@ -439,6 +456,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
439
456
|
source: GPUCopyExternalImageSource;
|
|
440
457
|
}
|
|
441
458
|
|
|
459
|
+
interface GPUDepthStencilState {
|
|
460
|
+
depthBias?: GPUDepthBias;
|
|
461
|
+
depthBiasClamp?: number;
|
|
462
|
+
depthBiasSlopeScale?: number;
|
|
463
|
+
depthCompare?: GPUCompareFunction;
|
|
464
|
+
depthWriteEnabled?: boolean;
|
|
465
|
+
format: GPUTextureFormat;
|
|
466
|
+
stencilBack?: GPUStencilFaceState;
|
|
467
|
+
stencilFront?: GPUStencilFaceState;
|
|
468
|
+
stencilReadMask?: GPUStencilValue;
|
|
469
|
+
stencilWriteMask?: GPUStencilValue;
|
|
470
|
+
}
|
|
471
|
+
|
|
442
472
|
interface GPUExtent3DDict {
|
|
443
473
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
444
474
|
height?: GPUIntegerCoordinate;
|
|
@@ -450,6 +480,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
450
480
|
source: VideoFrame;
|
|
451
481
|
}
|
|
452
482
|
|
|
483
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
484
|
+
targets: (GPUColorTargetState | null)[];
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
interface GPUMultisampleState {
|
|
488
|
+
alphaToCoverageEnabled?: boolean;
|
|
489
|
+
count?: GPUSize32;
|
|
490
|
+
mask?: GPUSampleMask;
|
|
491
|
+
}
|
|
492
|
+
|
|
453
493
|
interface GPUObjectDescriptorBase {
|
|
454
494
|
label?: string;
|
|
455
495
|
}
|
|
@@ -477,6 +517,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
477
517
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
478
518
|
}
|
|
479
519
|
|
|
520
|
+
interface GPUPrimitiveState {
|
|
521
|
+
cullMode?: GPUCullMode;
|
|
522
|
+
frontFace?: GPUFrontFace;
|
|
523
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
524
|
+
topology?: GPUPrimitiveTopology;
|
|
525
|
+
unclippedDepth?: boolean;
|
|
526
|
+
}
|
|
527
|
+
|
|
480
528
|
interface GPUProgrammableStage {
|
|
481
529
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
482
530
|
entryPoint?: string;
|
|
@@ -537,6 +585,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
537
585
|
querySet: GPUQuerySet;
|
|
538
586
|
}
|
|
539
587
|
|
|
588
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
589
|
+
depthStencil?: GPUDepthStencilState;
|
|
590
|
+
fragment?: GPUFragmentState;
|
|
591
|
+
multisample?: GPUMultisampleState;
|
|
592
|
+
primitive?: GPUPrimitiveState;
|
|
593
|
+
vertex: GPUVertexState;
|
|
594
|
+
}
|
|
595
|
+
|
|
540
596
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
541
597
|
addressModeU?: GPUAddressMode;
|
|
542
598
|
addressModeV?: GPUAddressMode;
|
|
@@ -550,6 +606,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
550
606
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
551
607
|
}
|
|
552
608
|
|
|
609
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
610
|
+
code: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
interface GPUStencilFaceState {
|
|
614
|
+
compare?: GPUCompareFunction;
|
|
615
|
+
depthFailOp?: GPUStencilOperation;
|
|
616
|
+
failOp?: GPUStencilOperation;
|
|
617
|
+
passOp?: GPUStencilOperation;
|
|
618
|
+
}
|
|
619
|
+
|
|
553
620
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
554
621
|
buffer: GPUBuffer;
|
|
555
622
|
}
|
|
@@ -567,6 +634,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
567
634
|
texture: GPUTexture;
|
|
568
635
|
}
|
|
569
636
|
|
|
637
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
638
|
+
dimension?: GPUTextureDimension;
|
|
639
|
+
format: GPUTextureFormat;
|
|
640
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
641
|
+
sampleCount?: GPUSize32;
|
|
642
|
+
size: GPUExtent3D;
|
|
643
|
+
usage: GPUTextureUsageFlags;
|
|
644
|
+
viewFormats?: GPUTextureFormat[];
|
|
645
|
+
}
|
|
646
|
+
|
|
570
647
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
571
648
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
572
649
|
aspect?: GPUTextureAspect;
|
|
@@ -582,6 +659,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
582
659
|
error: GPUError;
|
|
583
660
|
}
|
|
584
661
|
|
|
662
|
+
interface GPUVertexAttribute {
|
|
663
|
+
format: GPUVertexFormat;
|
|
664
|
+
offset: GPUSize64;
|
|
665
|
+
shaderLocation: GPUIndex32;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
interface GPUVertexBufferLayout {
|
|
669
|
+
arrayStride: GPUSize64;
|
|
670
|
+
attributes: GPUVertexAttribute[];
|
|
671
|
+
stepMode?: GPUVertexStepMode;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
675
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
676
|
+
}
|
|
677
|
+
|
|
585
678
|
interface GetNotificationOptions {
|
|
586
679
|
tag?: string;
|
|
587
680
|
}
|
|
@@ -5591,12 +5684,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
5591
5684
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
5592
5685
|
*/
|
|
5593
5686
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
5687
|
+
/**
|
|
5688
|
+
* 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.
|
|
5689
|
+
*
|
|
5690
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
5691
|
+
*/
|
|
5692
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
5693
|
+
/**
|
|
5694
|
+
* 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.
|
|
5695
|
+
*
|
|
5696
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
5697
|
+
*/
|
|
5698
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
5594
5699
|
/**
|
|
5595
5700
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
5596
5701
|
*
|
|
5597
5702
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
5598
5703
|
*/
|
|
5599
5704
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
5705
|
+
/**
|
|
5706
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
5707
|
+
*
|
|
5708
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
5709
|
+
*/
|
|
5710
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
5711
|
+
/**
|
|
5712
|
+
* 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.
|
|
5713
|
+
*
|
|
5714
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
5715
|
+
*/
|
|
5716
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
5600
5717
|
/**
|
|
5601
5718
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
5602
5719
|
*
|
|
@@ -14764,7 +14881,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
14764
14881
|
type GPUBufferDynamicOffset = number;
|
|
14765
14882
|
type GPUBufferUsageFlags = number;
|
|
14766
14883
|
type GPUColor = number[] | GPUColorDict;
|
|
14884
|
+
type GPUColorWriteFlags = number;
|
|
14767
14885
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
|
|
14886
|
+
type GPUDepthBias = number;
|
|
14768
14887
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
14769
14888
|
type GPUFlagsConstant = number;
|
|
14770
14889
|
type GPUIndex32 = number;
|
|
@@ -14774,6 +14893,7 @@ type GPUMapModeFlags = number;
|
|
|
14774
14893
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
14775
14894
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
14776
14895
|
type GPUPipelineConstantValue = number;
|
|
14896
|
+
type GPUSampleMask = number;
|
|
14777
14897
|
type GPUSignedOffset32 = number;
|
|
14778
14898
|
type GPUSize32 = number;
|
|
14779
14899
|
type GPUSize32Out = number;
|
|
@@ -14840,24 +14960,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
|
14840
14960
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
14841
14961
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
14842
14962
|
type GPUAutoLayoutMode = "auto";
|
|
14963
|
+
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";
|
|
14964
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
14843
14965
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
14844
14966
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
14845
14967
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
14846
14968
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
14847
14969
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
14970
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
14848
14971
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
14849
14972
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
14850
14973
|
type GPUFilterMode = "linear" | "nearest";
|
|
14974
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
14851
14975
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
14852
14976
|
type GPULoadOp = "clear" | "load";
|
|
14853
14977
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
14854
14978
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
14979
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
14855
14980
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
14981
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
14856
14982
|
type GPUStoreOp = "discard" | "store";
|
|
14857
14983
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
14858
14984
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
14859
14985
|
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";
|
|
14860
14986
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
14987
|
+
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";
|
|
14988
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
14861
14989
|
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";
|
|
14862
14990
|
type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software";
|
|
14863
14991
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -372,6 +372,17 @@ interface GPUBindGroupEntry {
|
|
|
372
372
|
resource: GPUBindingResource;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
interface GPUBlendComponent {
|
|
376
|
+
dstFactor?: GPUBlendFactor;
|
|
377
|
+
operation?: GPUBlendOperation;
|
|
378
|
+
srcFactor?: GPUBlendFactor;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface GPUBlendState {
|
|
382
|
+
alpha: GPUBlendComponent;
|
|
383
|
+
color: GPUBlendComponent;
|
|
384
|
+
}
|
|
385
|
+
|
|
375
386
|
interface GPUBufferBinding {
|
|
376
387
|
buffer: GPUBuffer;
|
|
377
388
|
offset?: GPUSize64;
|
|
@@ -405,6 +416,12 @@ interface GPUColorDict {
|
|
|
405
416
|
r: number;
|
|
406
417
|
}
|
|
407
418
|
|
|
419
|
+
interface GPUColorTargetState {
|
|
420
|
+
blend?: GPUBlendState;
|
|
421
|
+
format: GPUTextureFormat;
|
|
422
|
+
writeMask?: GPUColorWriteFlags;
|
|
423
|
+
}
|
|
424
|
+
|
|
408
425
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
409
426
|
}
|
|
410
427
|
|
|
@@ -436,6 +453,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
436
453
|
source: GPUCopyExternalImageSource;
|
|
437
454
|
}
|
|
438
455
|
|
|
456
|
+
interface GPUDepthStencilState {
|
|
457
|
+
depthBias?: GPUDepthBias;
|
|
458
|
+
depthBiasClamp?: number;
|
|
459
|
+
depthBiasSlopeScale?: number;
|
|
460
|
+
depthCompare?: GPUCompareFunction;
|
|
461
|
+
depthWriteEnabled?: boolean;
|
|
462
|
+
format: GPUTextureFormat;
|
|
463
|
+
stencilBack?: GPUStencilFaceState;
|
|
464
|
+
stencilFront?: GPUStencilFaceState;
|
|
465
|
+
stencilReadMask?: GPUStencilValue;
|
|
466
|
+
stencilWriteMask?: GPUStencilValue;
|
|
467
|
+
}
|
|
468
|
+
|
|
439
469
|
interface GPUExtent3DDict {
|
|
440
470
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
441
471
|
height?: GPUIntegerCoordinate;
|
|
@@ -447,6 +477,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
447
477
|
source: VideoFrame;
|
|
448
478
|
}
|
|
449
479
|
|
|
480
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
481
|
+
targets: (GPUColorTargetState | null)[];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
interface GPUMultisampleState {
|
|
485
|
+
alphaToCoverageEnabled?: boolean;
|
|
486
|
+
count?: GPUSize32;
|
|
487
|
+
mask?: GPUSampleMask;
|
|
488
|
+
}
|
|
489
|
+
|
|
450
490
|
interface GPUObjectDescriptorBase {
|
|
451
491
|
label?: string;
|
|
452
492
|
}
|
|
@@ -474,6 +514,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
474
514
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
475
515
|
}
|
|
476
516
|
|
|
517
|
+
interface GPUPrimitiveState {
|
|
518
|
+
cullMode?: GPUCullMode;
|
|
519
|
+
frontFace?: GPUFrontFace;
|
|
520
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
521
|
+
topology?: GPUPrimitiveTopology;
|
|
522
|
+
unclippedDepth?: boolean;
|
|
523
|
+
}
|
|
524
|
+
|
|
477
525
|
interface GPUProgrammableStage {
|
|
478
526
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
479
527
|
entryPoint?: string;
|
|
@@ -534,6 +582,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
534
582
|
querySet: GPUQuerySet;
|
|
535
583
|
}
|
|
536
584
|
|
|
585
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
586
|
+
depthStencil?: GPUDepthStencilState;
|
|
587
|
+
fragment?: GPUFragmentState;
|
|
588
|
+
multisample?: GPUMultisampleState;
|
|
589
|
+
primitive?: GPUPrimitiveState;
|
|
590
|
+
vertex: GPUVertexState;
|
|
591
|
+
}
|
|
592
|
+
|
|
537
593
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
538
594
|
addressModeU?: GPUAddressMode;
|
|
539
595
|
addressModeV?: GPUAddressMode;
|
|
@@ -547,6 +603,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
547
603
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
548
604
|
}
|
|
549
605
|
|
|
606
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
607
|
+
code: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface GPUStencilFaceState {
|
|
611
|
+
compare?: GPUCompareFunction;
|
|
612
|
+
depthFailOp?: GPUStencilOperation;
|
|
613
|
+
failOp?: GPUStencilOperation;
|
|
614
|
+
passOp?: GPUStencilOperation;
|
|
615
|
+
}
|
|
616
|
+
|
|
550
617
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
551
618
|
buffer: GPUBuffer;
|
|
552
619
|
}
|
|
@@ -564,6 +631,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
564
631
|
texture: GPUTexture;
|
|
565
632
|
}
|
|
566
633
|
|
|
634
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
635
|
+
dimension?: GPUTextureDimension;
|
|
636
|
+
format: GPUTextureFormat;
|
|
637
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
638
|
+
sampleCount?: GPUSize32;
|
|
639
|
+
size: GPUExtent3D;
|
|
640
|
+
usage: GPUTextureUsageFlags;
|
|
641
|
+
viewFormats?: GPUTextureFormat[];
|
|
642
|
+
}
|
|
643
|
+
|
|
567
644
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
568
645
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
569
646
|
aspect?: GPUTextureAspect;
|
|
@@ -579,6 +656,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
579
656
|
error: GPUError;
|
|
580
657
|
}
|
|
581
658
|
|
|
659
|
+
interface GPUVertexAttribute {
|
|
660
|
+
format: GPUVertexFormat;
|
|
661
|
+
offset: GPUSize64;
|
|
662
|
+
shaderLocation: GPUIndex32;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
interface GPUVertexBufferLayout {
|
|
666
|
+
arrayStride: GPUSize64;
|
|
667
|
+
attributes: GPUVertexAttribute[];
|
|
668
|
+
stepMode?: GPUVertexStepMode;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
672
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
673
|
+
}
|
|
674
|
+
|
|
582
675
|
interface GetNotificationOptions {
|
|
583
676
|
tag?: string;
|
|
584
677
|
}
|
|
@@ -5588,12 +5681,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
5588
5681
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
5589
5682
|
*/
|
|
5590
5683
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
5684
|
+
/**
|
|
5685
|
+
* 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.
|
|
5686
|
+
*
|
|
5687
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
5688
|
+
*/
|
|
5689
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
5690
|
+
/**
|
|
5691
|
+
* 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.
|
|
5692
|
+
*
|
|
5693
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
5694
|
+
*/
|
|
5695
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
5591
5696
|
/**
|
|
5592
5697
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
5593
5698
|
*
|
|
5594
5699
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
5595
5700
|
*/
|
|
5596
5701
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
5702
|
+
/**
|
|
5703
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
5704
|
+
*
|
|
5705
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
5706
|
+
*/
|
|
5707
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
5708
|
+
/**
|
|
5709
|
+
* 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.
|
|
5710
|
+
*
|
|
5711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
5712
|
+
*/
|
|
5713
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
5597
5714
|
/**
|
|
5598
5715
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
5599
5716
|
*
|
|
@@ -14761,7 +14878,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
14761
14878
|
type GPUBufferDynamicOffset = number;
|
|
14762
14879
|
type GPUBufferUsageFlags = number;
|
|
14763
14880
|
type GPUColor = number[] | GPUColorDict;
|
|
14881
|
+
type GPUColorWriteFlags = number;
|
|
14764
14882
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
|
|
14883
|
+
type GPUDepthBias = number;
|
|
14765
14884
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
14766
14885
|
type GPUFlagsConstant = number;
|
|
14767
14886
|
type GPUIndex32 = number;
|
|
@@ -14771,6 +14890,7 @@ type GPUMapModeFlags = number;
|
|
|
14771
14890
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
14772
14891
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
14773
14892
|
type GPUPipelineConstantValue = number;
|
|
14893
|
+
type GPUSampleMask = number;
|
|
14774
14894
|
type GPUSignedOffset32 = number;
|
|
14775
14895
|
type GPUSize32 = number;
|
|
14776
14896
|
type GPUSize32Out = number;
|
|
@@ -14837,24 +14957,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
|
14837
14957
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
14838
14958
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
14839
14959
|
type GPUAutoLayoutMode = "auto";
|
|
14960
|
+
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";
|
|
14961
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
14840
14962
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
14841
14963
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
14842
14964
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
14843
14965
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
14844
14966
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
14967
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
14845
14968
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
14846
14969
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
14847
14970
|
type GPUFilterMode = "linear" | "nearest";
|
|
14971
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
14848
14972
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
14849
14973
|
type GPULoadOp = "clear" | "load";
|
|
14850
14974
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
14851
14975
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
14976
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
14852
14977
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
14978
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
14853
14979
|
type GPUStoreOp = "discard" | "store";
|
|
14854
14980
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
14855
14981
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
14856
14982
|
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";
|
|
14857
14983
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
14984
|
+
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";
|
|
14985
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
14858
14986
|
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";
|
|
14859
14987
|
type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software";
|
|
14860
14988
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -372,6 +372,17 @@ interface GPUBindGroupEntry {
|
|
|
372
372
|
resource: GPUBindingResource;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
interface GPUBlendComponent {
|
|
376
|
+
dstFactor?: GPUBlendFactor;
|
|
377
|
+
operation?: GPUBlendOperation;
|
|
378
|
+
srcFactor?: GPUBlendFactor;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface GPUBlendState {
|
|
382
|
+
alpha: GPUBlendComponent;
|
|
383
|
+
color: GPUBlendComponent;
|
|
384
|
+
}
|
|
385
|
+
|
|
375
386
|
interface GPUBufferBinding {
|
|
376
387
|
buffer: GPUBuffer;
|
|
377
388
|
offset?: GPUSize64;
|
|
@@ -405,6 +416,12 @@ interface GPUColorDict {
|
|
|
405
416
|
r: number;
|
|
406
417
|
}
|
|
407
418
|
|
|
419
|
+
interface GPUColorTargetState {
|
|
420
|
+
blend?: GPUBlendState;
|
|
421
|
+
format: GPUTextureFormat;
|
|
422
|
+
writeMask?: GPUColorWriteFlags;
|
|
423
|
+
}
|
|
424
|
+
|
|
408
425
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
409
426
|
}
|
|
410
427
|
|
|
@@ -436,6 +453,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
436
453
|
source: GPUCopyExternalImageSource;
|
|
437
454
|
}
|
|
438
455
|
|
|
456
|
+
interface GPUDepthStencilState {
|
|
457
|
+
depthBias?: GPUDepthBias;
|
|
458
|
+
depthBiasClamp?: number;
|
|
459
|
+
depthBiasSlopeScale?: number;
|
|
460
|
+
depthCompare?: GPUCompareFunction;
|
|
461
|
+
depthWriteEnabled?: boolean;
|
|
462
|
+
format: GPUTextureFormat;
|
|
463
|
+
stencilBack?: GPUStencilFaceState;
|
|
464
|
+
stencilFront?: GPUStencilFaceState;
|
|
465
|
+
stencilReadMask?: GPUStencilValue;
|
|
466
|
+
stencilWriteMask?: GPUStencilValue;
|
|
467
|
+
}
|
|
468
|
+
|
|
439
469
|
interface GPUExtent3DDict {
|
|
440
470
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
441
471
|
height?: GPUIntegerCoordinate;
|
|
@@ -447,6 +477,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
447
477
|
source: VideoFrame;
|
|
448
478
|
}
|
|
449
479
|
|
|
480
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
481
|
+
targets: (GPUColorTargetState | null)[];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
interface GPUMultisampleState {
|
|
485
|
+
alphaToCoverageEnabled?: boolean;
|
|
486
|
+
count?: GPUSize32;
|
|
487
|
+
mask?: GPUSampleMask;
|
|
488
|
+
}
|
|
489
|
+
|
|
450
490
|
interface GPUObjectDescriptorBase {
|
|
451
491
|
label?: string;
|
|
452
492
|
}
|
|
@@ -474,6 +514,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
474
514
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
475
515
|
}
|
|
476
516
|
|
|
517
|
+
interface GPUPrimitiveState {
|
|
518
|
+
cullMode?: GPUCullMode;
|
|
519
|
+
frontFace?: GPUFrontFace;
|
|
520
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
521
|
+
topology?: GPUPrimitiveTopology;
|
|
522
|
+
unclippedDepth?: boolean;
|
|
523
|
+
}
|
|
524
|
+
|
|
477
525
|
interface GPUProgrammableStage {
|
|
478
526
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
479
527
|
entryPoint?: string;
|
|
@@ -534,6 +582,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
534
582
|
querySet: GPUQuerySet;
|
|
535
583
|
}
|
|
536
584
|
|
|
585
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
586
|
+
depthStencil?: GPUDepthStencilState;
|
|
587
|
+
fragment?: GPUFragmentState;
|
|
588
|
+
multisample?: GPUMultisampleState;
|
|
589
|
+
primitive?: GPUPrimitiveState;
|
|
590
|
+
vertex: GPUVertexState;
|
|
591
|
+
}
|
|
592
|
+
|
|
537
593
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
538
594
|
addressModeU?: GPUAddressMode;
|
|
539
595
|
addressModeV?: GPUAddressMode;
|
|
@@ -547,6 +603,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
547
603
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
548
604
|
}
|
|
549
605
|
|
|
606
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
607
|
+
code: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface GPUStencilFaceState {
|
|
611
|
+
compare?: GPUCompareFunction;
|
|
612
|
+
depthFailOp?: GPUStencilOperation;
|
|
613
|
+
failOp?: GPUStencilOperation;
|
|
614
|
+
passOp?: GPUStencilOperation;
|
|
615
|
+
}
|
|
616
|
+
|
|
550
617
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
551
618
|
buffer: GPUBuffer;
|
|
552
619
|
}
|
|
@@ -564,6 +631,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
564
631
|
texture: GPUTexture;
|
|
565
632
|
}
|
|
566
633
|
|
|
634
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
635
|
+
dimension?: GPUTextureDimension;
|
|
636
|
+
format: GPUTextureFormat;
|
|
637
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
638
|
+
sampleCount?: GPUSize32;
|
|
639
|
+
size: GPUExtent3D;
|
|
640
|
+
usage: GPUTextureUsageFlags;
|
|
641
|
+
viewFormats?: GPUTextureFormat[];
|
|
642
|
+
}
|
|
643
|
+
|
|
567
644
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
568
645
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
569
646
|
aspect?: GPUTextureAspect;
|
|
@@ -579,6 +656,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
579
656
|
error: GPUError;
|
|
580
657
|
}
|
|
581
658
|
|
|
659
|
+
interface GPUVertexAttribute {
|
|
660
|
+
format: GPUVertexFormat;
|
|
661
|
+
offset: GPUSize64;
|
|
662
|
+
shaderLocation: GPUIndex32;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
interface GPUVertexBufferLayout {
|
|
666
|
+
arrayStride: GPUSize64;
|
|
667
|
+
attributes: GPUVertexAttribute[];
|
|
668
|
+
stepMode?: GPUVertexStepMode;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
672
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
673
|
+
}
|
|
674
|
+
|
|
582
675
|
interface GetNotificationOptions {
|
|
583
676
|
tag?: string;
|
|
584
677
|
}
|
|
@@ -5588,12 +5681,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
5588
5681
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
5589
5682
|
*/
|
|
5590
5683
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
5684
|
+
/**
|
|
5685
|
+
* 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.
|
|
5686
|
+
*
|
|
5687
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
5688
|
+
*/
|
|
5689
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
5690
|
+
/**
|
|
5691
|
+
* 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.
|
|
5692
|
+
*
|
|
5693
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
5694
|
+
*/
|
|
5695
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
5591
5696
|
/**
|
|
5592
5697
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
5593
5698
|
*
|
|
5594
5699
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
5595
5700
|
*/
|
|
5596
5701
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
5702
|
+
/**
|
|
5703
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
5704
|
+
*
|
|
5705
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
5706
|
+
*/
|
|
5707
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
5708
|
+
/**
|
|
5709
|
+
* 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.
|
|
5710
|
+
*
|
|
5711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
5712
|
+
*/
|
|
5713
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
5597
5714
|
/**
|
|
5598
5715
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
5599
5716
|
*
|
|
@@ -14761,7 +14878,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
14761
14878
|
type GPUBufferDynamicOffset = number;
|
|
14762
14879
|
type GPUBufferUsageFlags = number;
|
|
14763
14880
|
type GPUColor = number[] | GPUColorDict;
|
|
14881
|
+
type GPUColorWriteFlags = number;
|
|
14764
14882
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
|
|
14883
|
+
type GPUDepthBias = number;
|
|
14765
14884
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
14766
14885
|
type GPUFlagsConstant = number;
|
|
14767
14886
|
type GPUIndex32 = number;
|
|
@@ -14771,6 +14890,7 @@ type GPUMapModeFlags = number;
|
|
|
14771
14890
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
14772
14891
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
14773
14892
|
type GPUPipelineConstantValue = number;
|
|
14893
|
+
type GPUSampleMask = number;
|
|
14774
14894
|
type GPUSignedOffset32 = number;
|
|
14775
14895
|
type GPUSize32 = number;
|
|
14776
14896
|
type GPUSize32Out = number;
|
|
@@ -14837,24 +14957,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
|
14837
14957
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
14838
14958
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
14839
14959
|
type GPUAutoLayoutMode = "auto";
|
|
14960
|
+
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";
|
|
14961
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
14840
14962
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
14841
14963
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
14842
14964
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
14843
14965
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
14844
14966
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
14967
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
14845
14968
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
14846
14969
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
14847
14970
|
type GPUFilterMode = "linear" | "nearest";
|
|
14971
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
14848
14972
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
14849
14973
|
type GPULoadOp = "clear" | "load";
|
|
14850
14974
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
14851
14975
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
14976
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
14852
14977
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
14978
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
14853
14979
|
type GPUStoreOp = "discard" | "store";
|
|
14854
14980
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
14855
14981
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
14856
14982
|
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";
|
|
14857
14983
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
14984
|
+
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";
|
|
14985
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
14858
14986
|
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";
|
|
14859
14987
|
type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software";
|
|
14860
14988
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
package/ts5.9/index.d.ts
CHANGED
|
@@ -372,6 +372,17 @@ interface GPUBindGroupEntry {
|
|
|
372
372
|
resource: GPUBindingResource;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
interface GPUBlendComponent {
|
|
376
|
+
dstFactor?: GPUBlendFactor;
|
|
377
|
+
operation?: GPUBlendOperation;
|
|
378
|
+
srcFactor?: GPUBlendFactor;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface GPUBlendState {
|
|
382
|
+
alpha: GPUBlendComponent;
|
|
383
|
+
color: GPUBlendComponent;
|
|
384
|
+
}
|
|
385
|
+
|
|
375
386
|
interface GPUBufferBinding {
|
|
376
387
|
buffer: GPUBuffer;
|
|
377
388
|
offset?: GPUSize64;
|
|
@@ -405,6 +416,12 @@ interface GPUColorDict {
|
|
|
405
416
|
r: number;
|
|
406
417
|
}
|
|
407
418
|
|
|
419
|
+
interface GPUColorTargetState {
|
|
420
|
+
blend?: GPUBlendState;
|
|
421
|
+
format: GPUTextureFormat;
|
|
422
|
+
writeMask?: GPUColorWriteFlags;
|
|
423
|
+
}
|
|
424
|
+
|
|
408
425
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
409
426
|
}
|
|
410
427
|
|
|
@@ -436,6 +453,19 @@ interface GPUCopyExternalImageSourceInfo {
|
|
|
436
453
|
source: GPUCopyExternalImageSource;
|
|
437
454
|
}
|
|
438
455
|
|
|
456
|
+
interface GPUDepthStencilState {
|
|
457
|
+
depthBias?: GPUDepthBias;
|
|
458
|
+
depthBiasClamp?: number;
|
|
459
|
+
depthBiasSlopeScale?: number;
|
|
460
|
+
depthCompare?: GPUCompareFunction;
|
|
461
|
+
depthWriteEnabled?: boolean;
|
|
462
|
+
format: GPUTextureFormat;
|
|
463
|
+
stencilBack?: GPUStencilFaceState;
|
|
464
|
+
stencilFront?: GPUStencilFaceState;
|
|
465
|
+
stencilReadMask?: GPUStencilValue;
|
|
466
|
+
stencilWriteMask?: GPUStencilValue;
|
|
467
|
+
}
|
|
468
|
+
|
|
439
469
|
interface GPUExtent3DDict {
|
|
440
470
|
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
441
471
|
height?: GPUIntegerCoordinate;
|
|
@@ -447,6 +477,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
|
447
477
|
source: VideoFrame;
|
|
448
478
|
}
|
|
449
479
|
|
|
480
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
481
|
+
targets: (GPUColorTargetState | null)[];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
interface GPUMultisampleState {
|
|
485
|
+
alphaToCoverageEnabled?: boolean;
|
|
486
|
+
count?: GPUSize32;
|
|
487
|
+
mask?: GPUSampleMask;
|
|
488
|
+
}
|
|
489
|
+
|
|
450
490
|
interface GPUObjectDescriptorBase {
|
|
451
491
|
label?: string;
|
|
452
492
|
}
|
|
@@ -474,6 +514,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
|
474
514
|
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
475
515
|
}
|
|
476
516
|
|
|
517
|
+
interface GPUPrimitiveState {
|
|
518
|
+
cullMode?: GPUCullMode;
|
|
519
|
+
frontFace?: GPUFrontFace;
|
|
520
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
521
|
+
topology?: GPUPrimitiveTopology;
|
|
522
|
+
unclippedDepth?: boolean;
|
|
523
|
+
}
|
|
524
|
+
|
|
477
525
|
interface GPUProgrammableStage {
|
|
478
526
|
constants?: Record<string, GPUPipelineConstantValue>;
|
|
479
527
|
entryPoint?: string;
|
|
@@ -534,6 +582,14 @@ interface GPURenderPassTimestampWrites {
|
|
|
534
582
|
querySet: GPUQuerySet;
|
|
535
583
|
}
|
|
536
584
|
|
|
585
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
586
|
+
depthStencil?: GPUDepthStencilState;
|
|
587
|
+
fragment?: GPUFragmentState;
|
|
588
|
+
multisample?: GPUMultisampleState;
|
|
589
|
+
primitive?: GPUPrimitiveState;
|
|
590
|
+
vertex: GPUVertexState;
|
|
591
|
+
}
|
|
592
|
+
|
|
537
593
|
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
538
594
|
addressModeU?: GPUAddressMode;
|
|
539
595
|
addressModeV?: GPUAddressMode;
|
|
@@ -547,6 +603,17 @@ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
|
547
603
|
mipmapFilter?: GPUMipmapFilterMode;
|
|
548
604
|
}
|
|
549
605
|
|
|
606
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
607
|
+
code: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
interface GPUStencilFaceState {
|
|
611
|
+
compare?: GPUCompareFunction;
|
|
612
|
+
depthFailOp?: GPUStencilOperation;
|
|
613
|
+
failOp?: GPUStencilOperation;
|
|
614
|
+
passOp?: GPUStencilOperation;
|
|
615
|
+
}
|
|
616
|
+
|
|
550
617
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
551
618
|
buffer: GPUBuffer;
|
|
552
619
|
}
|
|
@@ -564,6 +631,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
564
631
|
texture: GPUTexture;
|
|
565
632
|
}
|
|
566
633
|
|
|
634
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
635
|
+
dimension?: GPUTextureDimension;
|
|
636
|
+
format: GPUTextureFormat;
|
|
637
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
638
|
+
sampleCount?: GPUSize32;
|
|
639
|
+
size: GPUExtent3D;
|
|
640
|
+
usage: GPUTextureUsageFlags;
|
|
641
|
+
viewFormats?: GPUTextureFormat[];
|
|
642
|
+
}
|
|
643
|
+
|
|
567
644
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
568
645
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
569
646
|
aspect?: GPUTextureAspect;
|
|
@@ -579,6 +656,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
|
|
|
579
656
|
error: GPUError;
|
|
580
657
|
}
|
|
581
658
|
|
|
659
|
+
interface GPUVertexAttribute {
|
|
660
|
+
format: GPUVertexFormat;
|
|
661
|
+
offset: GPUSize64;
|
|
662
|
+
shaderLocation: GPUIndex32;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
interface GPUVertexBufferLayout {
|
|
666
|
+
arrayStride: GPUSize64;
|
|
667
|
+
attributes: GPUVertexAttribute[];
|
|
668
|
+
stepMode?: GPUVertexStepMode;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
672
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
673
|
+
}
|
|
674
|
+
|
|
582
675
|
interface GetNotificationOptions {
|
|
583
676
|
tag?: string;
|
|
584
677
|
}
|
|
@@ -5588,12 +5681,36 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
5588
5681
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
5589
5682
|
*/
|
|
5590
5683
|
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
5684
|
+
/**
|
|
5685
|
+
* 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.
|
|
5686
|
+
*
|
|
5687
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
|
|
5688
|
+
*/
|
|
5689
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
5690
|
+
/**
|
|
5691
|
+
* 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.
|
|
5692
|
+
*
|
|
5693
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
|
|
5694
|
+
*/
|
|
5695
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
5591
5696
|
/**
|
|
5592
5697
|
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
5593
5698
|
*
|
|
5594
5699
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
5595
5700
|
*/
|
|
5596
5701
|
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
5702
|
+
/**
|
|
5703
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
5704
|
+
*
|
|
5705
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
5706
|
+
*/
|
|
5707
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
5708
|
+
/**
|
|
5709
|
+
* 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.
|
|
5710
|
+
*
|
|
5711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
5712
|
+
*/
|
|
5713
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
5597
5714
|
/**
|
|
5598
5715
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
5599
5716
|
*
|
|
@@ -14761,7 +14878,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
|
|
|
14761
14878
|
type GPUBufferDynamicOffset = number;
|
|
14762
14879
|
type GPUBufferUsageFlags = number;
|
|
14763
14880
|
type GPUColor = number[] | GPUColorDict;
|
|
14881
|
+
type GPUColorWriteFlags = number;
|
|
14764
14882
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
|
|
14883
|
+
type GPUDepthBias = number;
|
|
14765
14884
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
14766
14885
|
type GPUFlagsConstant = number;
|
|
14767
14886
|
type GPUIndex32 = number;
|
|
@@ -14771,6 +14890,7 @@ type GPUMapModeFlags = number;
|
|
|
14771
14890
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
14772
14891
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
14773
14892
|
type GPUPipelineConstantValue = number;
|
|
14893
|
+
type GPUSampleMask = number;
|
|
14774
14894
|
type GPUSignedOffset32 = number;
|
|
14775
14895
|
type GPUSize32 = number;
|
|
14776
14896
|
type GPUSize32Out = number;
|
|
@@ -14837,24 +14957,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
|
14837
14957
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
14838
14958
|
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
14839
14959
|
type GPUAutoLayoutMode = "auto";
|
|
14960
|
+
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";
|
|
14961
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
14840
14962
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
14841
14963
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
14842
14964
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
14843
14965
|
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
14844
14966
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
14967
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
14845
14968
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
14846
14969
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
14847
14970
|
type GPUFilterMode = "linear" | "nearest";
|
|
14971
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
14848
14972
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
14849
14973
|
type GPULoadOp = "clear" | "load";
|
|
14850
14974
|
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
14851
14975
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
14976
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
14852
14977
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
14978
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
14853
14979
|
type GPUStoreOp = "discard" | "store";
|
|
14854
14980
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
14855
14981
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
14856
14982
|
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";
|
|
14857
14983
|
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
14984
|
+
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";
|
|
14985
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
14858
14986
|
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";
|
|
14859
14987
|
type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software";
|
|
14860
14988
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|