@types/web 0.0.328 → 0.0.330

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/ts5.9/index.d.ts CHANGED
@@ -805,6 +805,36 @@ interface FullscreenOptions {
805
805
  navigationUI?: FullscreenNavigationUI;
806
806
  }
807
807
 
808
+ interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
809
+ entries: GPUBindGroupEntry[];
810
+ layout: GPUBindGroupLayout;
811
+ }
812
+
813
+ interface GPUBindGroupEntry {
814
+ binding: GPUIndex32;
815
+ resource: GPUBindingResource;
816
+ }
817
+
818
+ interface GPUBufferBinding {
819
+ buffer: GPUBuffer;
820
+ offset?: GPUSize64;
821
+ size?: GPUSize64;
822
+ }
823
+
824
+ interface GPUCanvasConfiguration {
825
+ alphaMode?: GPUCanvasAlphaMode;
826
+ colorSpace?: PredefinedColorSpace;
827
+ device: GPUDevice;
828
+ format: GPUTextureFormat;
829
+ toneMapping?: GPUCanvasToneMapping;
830
+ usage?: GPUTextureUsageFlags;
831
+ viewFormats?: GPUTextureFormat[];
832
+ }
833
+
834
+ interface GPUCanvasToneMapping {
835
+ mode?: GPUCanvasToneMappingMode;
836
+ }
837
+
808
838
  interface GPUColorDict {
809
839
  a: number;
810
840
  b: number;
@@ -812,6 +842,19 @@ interface GPUColorDict {
812
842
  r: number;
813
843
  }
814
844
 
845
+ interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
846
+ }
847
+
848
+ interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
849
+ timestampWrites?: GPUComputePassTimestampWrites;
850
+ }
851
+
852
+ interface GPUComputePassTimestampWrites {
853
+ beginningOfPassWriteIndex?: GPUSize32;
854
+ endOfPassWriteIndex?: GPUSize32;
855
+ querySet: GPUQuerySet;
856
+ }
857
+
815
858
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
816
859
  colorSpace?: PredefinedColorSpace;
817
860
  premultipliedAlpha?: boolean;
@@ -829,6 +872,11 @@ interface GPUExtent3DDict {
829
872
  width: GPUIntegerCoordinate;
830
873
  }
831
874
 
875
+ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
876
+ colorSpace?: PredefinedColorSpace;
877
+ source: HTMLVideoElement | VideoFrame;
878
+ }
879
+
832
880
  interface GPUObjectDescriptorBase {
833
881
  label?: string;
834
882
  }
@@ -851,6 +899,45 @@ interface GPUPipelineErrorInit {
851
899
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
852
900
  }
853
901
 
902
+ interface GPURenderPassColorAttachment {
903
+ clearValue?: GPUColor;
904
+ depthSlice?: GPUIntegerCoordinate;
905
+ loadOp: GPULoadOp;
906
+ resolveTarget?: GPUTexture | GPUTextureView;
907
+ storeOp: GPUStoreOp;
908
+ view: GPUTexture | GPUTextureView;
909
+ }
910
+
911
+ interface GPURenderPassDepthStencilAttachment {
912
+ depthClearValue?: number;
913
+ depthLoadOp?: GPULoadOp;
914
+ depthReadOnly?: boolean;
915
+ depthStoreOp?: GPUStoreOp;
916
+ stencilClearValue?: GPUStencilValue;
917
+ stencilLoadOp?: GPULoadOp;
918
+ stencilReadOnly?: boolean;
919
+ stencilStoreOp?: GPUStoreOp;
920
+ view: GPUTexture | GPUTextureView;
921
+ }
922
+
923
+ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
924
+ colorAttachments: (GPURenderPassColorAttachment | null)[];
925
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
926
+ maxDrawCount?: GPUSize64;
927
+ occlusionQuerySet?: GPUQuerySet;
928
+ timestampWrites?: GPURenderPassTimestampWrites;
929
+ }
930
+
931
+ interface GPURenderPassTimestampWrites {
932
+ beginningOfPassWriteIndex?: GPUSize32;
933
+ endOfPassWriteIndex?: GPUSize32;
934
+ querySet: GPUQuerySet;
935
+ }
936
+
937
+ interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
938
+ buffer: GPUBuffer;
939
+ }
940
+
854
941
  interface GPUTexelCopyBufferLayout {
855
942
  bytesPerRow?: GPUSize32;
856
943
  offset?: GPUSize64;
@@ -14951,6 +15038,50 @@ declare var GPUBuffer: {
14951
15038
  new(): GPUBuffer;
14952
15039
  };
14953
15040
 
15041
+ /**
15042
+ * The **`GPUCanvasContext`** interface of the WebGPU API represents the WebGPU rendering context of a <canvas> element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
15043
+ * Available only in secure contexts.
15044
+ *
15045
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
15046
+ */
15047
+ interface GPUCanvasContext {
15048
+ /**
15049
+ * The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
15050
+ *
15051
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
15052
+ */
15053
+ readonly canvas: HTMLCanvasElement | OffscreenCanvas;
15054
+ /**
15055
+ * The **`configure()`** method of the GPUCanvasContext interface configures the context to use for rendering with a given GPUDevice. When called the canvas will initially be cleared to transparent black.
15056
+ *
15057
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
15058
+ */
15059
+ configure(configuration: GPUCanvasConfiguration): void;
15060
+ /**
15061
+ * The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
15062
+ *
15063
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
15064
+ */
15065
+ getConfiguration(): GPUCanvasConfiguration | null;
15066
+ /**
15067
+ * The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
15068
+ *
15069
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
15070
+ */
15071
+ getCurrentTexture(): GPUTexture;
15072
+ /**
15073
+ * The **`unconfigure()`** method of the GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
15074
+ *
15075
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
15076
+ */
15077
+ unconfigure(): void;
15078
+ }
15079
+
15080
+ declare var GPUCanvasContext: {
15081
+ prototype: GPUCanvasContext;
15082
+ new(): GPUCanvasContext;
15083
+ };
15084
+
14954
15085
  /**
14955
15086
  * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
14956
15087
  * Available only in secure contexts.
@@ -14965,6 +15096,75 @@ declare var GPUCommandBuffer: {
14965
15096
  new(): GPUCommandBuffer;
14966
15097
  };
14967
15098
 
15099
+ /**
15100
+ * The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
15101
+ * Available only in secure contexts.
15102
+ *
15103
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
15104
+ */
15105
+ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
15106
+ /**
15107
+ * The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
15108
+ *
15109
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
15110
+ */
15111
+ beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
15112
+ /**
15113
+ * The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
15114
+ *
15115
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
15116
+ */
15117
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
15118
+ /**
15119
+ * The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
15120
+ *
15121
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
15122
+ */
15123
+ clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
15124
+ /**
15125
+ * The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
15126
+ *
15127
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
15128
+ */
15129
+ copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
15130
+ copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
15131
+ /**
15132
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
15133
+ *
15134
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
15135
+ */
15136
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
15137
+ /**
15138
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
15139
+ *
15140
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
15141
+ */
15142
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
15143
+ /**
15144
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
15145
+ *
15146
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
15147
+ */
15148
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
15149
+ /**
15150
+ * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
15151
+ *
15152
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
15153
+ */
15154
+ finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
15155
+ /**
15156
+ * The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
15157
+ *
15158
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
15159
+ */
15160
+ resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
15161
+ }
15162
+
15163
+ declare var GPUCommandEncoder: {
15164
+ prototype: GPUCommandEncoder;
15165
+ new(): GPUCommandEncoder;
15166
+ };
15167
+
14968
15168
  /**
14969
15169
  * The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
14970
15170
  * Available only in secure contexts.
@@ -15096,6 +15296,90 @@ interface GPUDebugCommandsMixin {
15096
15296
  pushDebugGroup(groupLabel: string): void;
15097
15297
  }
15098
15298
 
15299
+ interface GPUDeviceEventMap {
15300
+ "uncapturederror": GPUUncapturedErrorEvent;
15301
+ }
15302
+
15303
+ /**
15304
+ * The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
15305
+ * Available only in secure contexts.
15306
+ *
15307
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
15308
+ */
15309
+ interface GPUDevice extends EventTarget, GPUObjectBase {
15310
+ /**
15311
+ * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
15312
+ *
15313
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
15314
+ */
15315
+ readonly adapterInfo: GPUAdapterInfo;
15316
+ /**
15317
+ * The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.
15318
+ *
15319
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
15320
+ */
15321
+ readonly features: GPUSupportedFeatures;
15322
+ /**
15323
+ * The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.
15324
+ *
15325
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
15326
+ */
15327
+ readonly limits: GPUSupportedLimits;
15328
+ /**
15329
+ * The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.
15330
+ *
15331
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
15332
+ */
15333
+ readonly lost: Promise<GPUDeviceLostInfo>;
15334
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
15335
+ onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
15336
+ /**
15337
+ * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
15338
+ *
15339
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
15340
+ */
15341
+ readonly queue: GPUQueue;
15342
+ /**
15343
+ * The **`createBindGroup()`** method of the GPUDevice interface creates a GPUBindGroup based on a GPUBindGroupLayout that defines a set of resources to be bound together in a group and how those resources are used in shader stages.
15344
+ *
15345
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
15346
+ */
15347
+ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
15348
+ /**
15349
+ * The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
15350
+ *
15351
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
15352
+ */
15353
+ destroy(): void;
15354
+ /**
15355
+ * The **`importExternalTexture()`** method of the GPUDevice interface takes an HTMLVideoElement or a VideoFrame object as an input and returns a GPUExternalTexture wrapper object containing a snapshot of the video that can be used as a frame in GPU rendering operations.
15356
+ *
15357
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
15358
+ */
15359
+ importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
15360
+ /**
15361
+ * The **`popErrorScope()`** method of the GPUDevice interface pops an existing GPU error scope from the error scope stack (originally pushed using GPUDevice.pushErrorScope()) and returns a Promise that resolves to an object describing the first error captured in the scope, or null if no error occurred.
15362
+ *
15363
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
15364
+ */
15365
+ popErrorScope(): Promise<GPUError | null>;
15366
+ /**
15367
+ * The **`pushErrorScope()`** method of the GPUDevice interface pushes a new GPU error scope onto the device's error scope stack, allowing you to capture errors of a particular type.
15368
+ *
15369
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
15370
+ */
15371
+ pushErrorScope(filter: GPUErrorFilter): void;
15372
+ addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
15373
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
15374
+ removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
15375
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
15376
+ }
15377
+
15378
+ declare var GPUDevice: {
15379
+ prototype: GPUDevice;
15380
+ new(): GPUDevice;
15381
+ };
15382
+
15099
15383
  /**
15100
15384
  * The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
15101
15385
  * Available only in secure contexts.
@@ -28087,6 +28371,12 @@ declare var PushManager: {
28087
28371
  readonly supportedContentEncodings: ReadonlyArray<string>;
28088
28372
  };
28089
28373
 
28374
+ /** Available only in secure contexts. */
28375
+ interface PushManagerAttribute {
28376
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
28377
+ readonly pushManager: PushManager;
28378
+ }
28379
+
28090
28380
  /**
28091
28381
  * The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
28092
28382
  * Available only in secure contexts.
@@ -34505,7 +34795,7 @@ interface ServiceWorkerRegistrationEventMap {
34505
34795
  *
34506
34796
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
34507
34797
  */
34508
- interface ServiceWorkerRegistration extends EventTarget {
34798
+ interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
34509
34799
  /**
34510
34800
  * The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
34511
34801
  *
@@ -43495,6 +43785,7 @@ type GLsizei = number;
43495
43785
  type GLsizeiptr = number;
43496
43786
  type GLuint = number;
43497
43787
  type GLuint64 = number;
43788
+ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
43498
43789
  type GPUBufferDynamicOffset = number;
43499
43790
  type GPUColor = number[] | GPUColorDict;
43500
43791
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
@@ -43527,7 +43818,7 @@ type MediaProvider = MediaStream | MediaSource | Blob;
43527
43818
  type MessageEventSource = WindowProxy | MessagePort | ServiceWorker;
43528
43819
  type MutationRecordType = "attributes" | "characterData" | "childList";
43529
43820
  type NamedCurve = string;
43530
- type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
43821
+ type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
43531
43822
  type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
43532
43823
  type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
43533
43824
  type OptionalPostfixToken<T extends string> = ` ${T}` | "";
@@ -43539,7 +43830,7 @@ type RTCRtpSenderTransform = RTCRtpScriptTransform;
43539
43830
  type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
43540
43831
  type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
43541
43832
  type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
43542
- type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
43833
+ type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
43543
43834
  type ReportList = Report[];
43544
43835
  type RequestInfo = Request | string;
43545
43836
  type SanitizerAttribute = string | SanitizerAttributeNamespace;
@@ -43620,11 +43911,16 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
43620
43911
  type FontFaceSetLoadStatus = "loaded" | "loading";
43621
43912
  type FullscreenNavigationUI = "auto" | "hide" | "show";
43622
43913
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
43914
+ type GPUCanvasAlphaMode = "opaque" | "premultiplied";
43915
+ type GPUCanvasToneMappingMode = "extended" | "standard";
43623
43916
  type GPUCompilationMessageType = "error" | "info" | "warning";
43624
43917
  type GPUDeviceLostReason = "destroyed" | "unknown";
43918
+ type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
43625
43919
  type GPUIndexFormat = "uint16" | "uint32";
43920
+ type GPULoadOp = "clear" | "load";
43626
43921
  type GPUPipelineErrorReason = "internal" | "validation";
43627
43922
  type GPUQueryType = "occlusion" | "timestamp";
43923
+ type GPUStoreOp = "discard" | "store";
43628
43924
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
43629
43925
  type GPUTextureDimension = "1d" | "2d" | "3d";
43630
43926
  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";
@@ -147,6 +147,27 @@ interface GPUBindingCommandsMixin {
147
147
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
148
148
  }
149
149
 
150
+ interface GPUCommandEncoder {
151
+ /**
152
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
153
+ *
154
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
155
+ */
156
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
157
+ /**
158
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
159
+ *
160
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
161
+ */
162
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
163
+ /**
164
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
165
+ *
166
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
167
+ */
168
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
169
+ }
170
+
150
171
  interface GPUQueue {
151
172
  /**
152
173
  * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.