@types/webworker 0.0.62 → 0.0.64

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
@@ -362,6 +362,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
362
362
  fontfaces?: FontFace[];
363
363
  }
364
364
 
365
+ interface GPUCanvasConfiguration {
366
+ alphaMode?: GPUCanvasAlphaMode;
367
+ colorSpace?: PredefinedColorSpace;
368
+ device: GPUDevice;
369
+ format: GPUTextureFormat;
370
+ toneMapping?: GPUCanvasToneMapping;
371
+ usage?: GPUTextureUsageFlags;
372
+ viewFormats?: GPUTextureFormat[];
373
+ }
374
+
375
+ interface GPUCanvasToneMapping {
376
+ mode?: GPUCanvasToneMappingMode;
377
+ }
378
+
365
379
  interface GPUColorDict {
366
380
  a: number;
367
381
  b: number;
@@ -369,10 +383,51 @@ interface GPUColorDict {
369
383
  r: number;
370
384
  }
371
385
 
386
+ interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
387
+ }
388
+
389
+ interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
390
+ timestampWrites?: GPUComputePassTimestampWrites;
391
+ }
392
+
393
+ interface GPUComputePassTimestampWrites {
394
+ beginningOfPassWriteIndex?: GPUSize32;
395
+ endOfPassWriteIndex?: GPUSize32;
396
+ querySet: GPUQuerySet;
397
+ }
398
+
399
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
400
+ colorSpace?: PredefinedColorSpace;
401
+ premultipliedAlpha?: boolean;
402
+ }
403
+
404
+ interface GPUCopyExternalImageSourceInfo {
405
+ flipY?: boolean;
406
+ origin?: GPUOrigin2D;
407
+ source: GPUCopyExternalImageSource;
408
+ }
409
+
410
+ interface GPUExtent3DDict {
411
+ depthOrArrayLayers?: GPUIntegerCoordinate;
412
+ height?: GPUIntegerCoordinate;
413
+ width: GPUIntegerCoordinate;
414
+ }
415
+
372
416
  interface GPUObjectDescriptorBase {
373
417
  label?: string;
374
418
  }
375
419
 
420
+ interface GPUOrigin2DDict {
421
+ x?: GPUIntegerCoordinate;
422
+ y?: GPUIntegerCoordinate;
423
+ }
424
+
425
+ interface GPUOrigin3DDict {
426
+ x?: GPUIntegerCoordinate;
427
+ y?: GPUIntegerCoordinate;
428
+ z?: GPUIntegerCoordinate;
429
+ }
430
+
376
431
  interface GPUPipelineErrorInit {
377
432
  reason: GPUPipelineErrorReason;
378
433
  }
@@ -380,6 +435,58 @@ interface GPUPipelineErrorInit {
380
435
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
436
  }
382
437
 
438
+ interface GPURenderPassColorAttachment {
439
+ clearValue?: GPUColor;
440
+ depthSlice?: GPUIntegerCoordinate;
441
+ loadOp: GPULoadOp;
442
+ resolveTarget?: GPUTexture | GPUTextureView;
443
+ storeOp: GPUStoreOp;
444
+ view: GPUTexture | GPUTextureView;
445
+ }
446
+
447
+ interface GPURenderPassDepthStencilAttachment {
448
+ depthClearValue?: number;
449
+ depthLoadOp?: GPULoadOp;
450
+ depthReadOnly?: boolean;
451
+ depthStoreOp?: GPUStoreOp;
452
+ stencilClearValue?: GPUStencilValue;
453
+ stencilLoadOp?: GPULoadOp;
454
+ stencilReadOnly?: boolean;
455
+ stencilStoreOp?: GPUStoreOp;
456
+ view: GPUTexture | GPUTextureView;
457
+ }
458
+
459
+ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
460
+ colorAttachments: (GPURenderPassColorAttachment | null)[];
461
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
462
+ maxDrawCount?: GPUSize64;
463
+ occlusionQuerySet?: GPUQuerySet;
464
+ timestampWrites?: GPURenderPassTimestampWrites;
465
+ }
466
+
467
+ interface GPURenderPassTimestampWrites {
468
+ beginningOfPassWriteIndex?: GPUSize32;
469
+ endOfPassWriteIndex?: GPUSize32;
470
+ querySet: GPUQuerySet;
471
+ }
472
+
473
+ interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
474
+ buffer: GPUBuffer;
475
+ }
476
+
477
+ interface GPUTexelCopyBufferLayout {
478
+ bytesPerRow?: GPUSize32;
479
+ offset?: GPUSize64;
480
+ rowsPerImage?: GPUSize32;
481
+ }
482
+
483
+ interface GPUTexelCopyTextureInfo {
484
+ aspect?: GPUTextureAspect;
485
+ mipLevel?: GPUIntegerCoordinate;
486
+ origin?: GPUOrigin3D;
487
+ texture: GPUTexture;
488
+ }
489
+
383
490
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
384
491
  arrayLayerCount?: GPUIntegerCoordinate;
385
492
  aspect?: GPUTextureAspect;
@@ -5055,6 +5162,50 @@ declare var GPUBuffer: {
5055
5162
  new(): GPUBuffer;
5056
5163
  };
5057
5164
 
5165
+ /**
5166
+ * 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".
5167
+ * Available only in secure contexts.
5168
+ *
5169
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
5170
+ */
5171
+ interface GPUCanvasContext {
5172
+ /**
5173
+ * The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
5174
+ *
5175
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
5176
+ */
5177
+ readonly canvas: OffscreenCanvas;
5178
+ /**
5179
+ * 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.
5180
+ *
5181
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
5182
+ */
5183
+ configure(configuration: GPUCanvasConfiguration): void;
5184
+ /**
5185
+ * The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
5186
+ *
5187
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
5188
+ */
5189
+ getConfiguration(): GPUCanvasConfiguration | null;
5190
+ /**
5191
+ * The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
5192
+ *
5193
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
5194
+ */
5195
+ getCurrentTexture(): GPUTexture;
5196
+ /**
5197
+ * 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.
5198
+ *
5199
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
5200
+ */
5201
+ unconfigure(): void;
5202
+ }
5203
+
5204
+ declare var GPUCanvasContext: {
5205
+ prototype: GPUCanvasContext;
5206
+ new(): GPUCanvasContext;
5207
+ };
5208
+
5058
5209
  /**
5059
5210
  * The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
5060
5211
  * Available only in secure contexts.
@@ -5069,6 +5220,75 @@ declare var GPUCommandBuffer: {
5069
5220
  new(): GPUCommandBuffer;
5070
5221
  };
5071
5222
 
5223
+ /**
5224
+ * The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
5225
+ * Available only in secure contexts.
5226
+ *
5227
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
5228
+ */
5229
+ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
5230
+ /**
5231
+ * The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
5232
+ *
5233
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
5234
+ */
5235
+ beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
5236
+ /**
5237
+ * The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
5238
+ *
5239
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
5240
+ */
5241
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
5242
+ /**
5243
+ * The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
5244
+ *
5245
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
5246
+ */
5247
+ clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
5248
+ /**
5249
+ * The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
5250
+ *
5251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
5252
+ */
5253
+ copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
5254
+ copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
5255
+ /**
5256
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
5257
+ *
5258
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
5259
+ */
5260
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
5261
+ /**
5262
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
5263
+ *
5264
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
5265
+ */
5266
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
5267
+ /**
5268
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
5269
+ *
5270
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
5271
+ */
5272
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
5273
+ /**
5274
+ * The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
5275
+ *
5276
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
5277
+ */
5278
+ finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
5279
+ /**
5280
+ * The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
5281
+ *
5282
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
5283
+ */
5284
+ resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
5285
+ }
5286
+
5287
+ declare var GPUCommandEncoder: {
5288
+ prototype: GPUCommandEncoder;
5289
+ new(): GPUCommandEncoder;
5290
+ };
5291
+
5072
5292
  /**
5073
5293
  * 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.
5074
5294
  * Available only in secure contexts.
@@ -5200,6 +5420,60 @@ interface GPUDebugCommandsMixin {
5200
5420
  pushDebugGroup(groupLabel: string): void;
5201
5421
  }
5202
5422
 
5423
+ interface GPUDeviceEventMap {
5424
+ "uncapturederror": GPUUncapturedErrorEvent;
5425
+ }
5426
+
5427
+ /**
5428
+ * 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.
5429
+ * Available only in secure contexts.
5430
+ *
5431
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
5432
+ */
5433
+ interface GPUDevice extends EventTarget, GPUObjectBase {
5434
+ /**
5435
+ * The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
5436
+ *
5437
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
5438
+ */
5439
+ readonly adapterInfo: GPUAdapterInfo;
5440
+ /**
5441
+ * 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.
5442
+ *
5443
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
5444
+ */
5445
+ readonly features: GPUSupportedFeatures;
5446
+ /**
5447
+ * 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.
5448
+ *
5449
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
5450
+ */
5451
+ readonly limits: GPUSupportedLimits;
5452
+ /**
5453
+ * 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.
5454
+ *
5455
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
5456
+ */
5457
+ readonly lost: Promise<GPUDeviceLostInfo>;
5458
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
5459
+ onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
5460
+ /**
5461
+ * The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
5462
+ *
5463
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
5464
+ */
5465
+ readonly queue: GPUQueue;
5466
+ addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5467
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5468
+ removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5469
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5470
+ }
5471
+
5472
+ declare var GPUDevice: {
5473
+ prototype: GPUDevice;
5474
+ new(): GPUDevice;
5475
+ };
5476
+
5203
5477
  /**
5204
5478
  * 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.
5205
5479
  * Available only in secure contexts.
@@ -5364,6 +5638,50 @@ declare var GPUQuerySet: {
5364
5638
  new(): GPUQuerySet;
5365
5639
  };
5366
5640
 
5641
+ /**
5642
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
5643
+ * Available only in secure contexts.
5644
+ *
5645
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
5646
+ */
5647
+ interface GPUQueue extends GPUObjectBase {
5648
+ /**
5649
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
5650
+ *
5651
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
5652
+ */
5653
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
5654
+ /**
5655
+ * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.
5656
+ *
5657
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
5658
+ */
5659
+ onSubmittedWorkDone(): Promise<void>;
5660
+ /**
5661
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
5662
+ *
5663
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
5664
+ */
5665
+ submit(commandBuffers: GPUCommandBuffer[]): void;
5666
+ /**
5667
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
5668
+ *
5669
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
5670
+ */
5671
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
5672
+ /**
5673
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
5674
+ *
5675
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
5676
+ */
5677
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
5678
+ }
5679
+
5680
+ declare var GPUQueue: {
5681
+ prototype: GPUQueue;
5682
+ new(): GPUQueue;
5683
+ };
5684
+
5367
5685
  /**
5368
5686
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
5369
5687
  * Available only in secure contexts.
@@ -14286,11 +14604,15 @@ type GLuint = number;
14286
14604
  type GLuint64 = number;
14287
14605
  type GPUBufferDynamicOffset = number;
14288
14606
  type GPUColor = number[] | GPUColorDict;
14607
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
14608
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
14289
14609
  type GPUFlagsConstant = number;
14290
14610
  type GPUIndex32 = number;
14291
14611
  type GPUIntegerCoordinate = number;
14292
14612
  type GPUIntegerCoordinateOut = number;
14293
14613
  type GPUMapModeFlags = number;
14614
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
14615
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
14294
14616
  type GPUSignedOffset32 = number;
14295
14617
  type GPUSize32 = number;
14296
14618
  type GPUSize32Out = number;
@@ -14307,7 +14629,7 @@ type ImageDataArray = Uint8ClampedArray<ArrayBuffer>;
14307
14629
  type Int32List = Int32Array<ArrayBufferLike> | GLint[];
14308
14630
  type MessageEventSource = MessagePort | ServiceWorker;
14309
14631
  type NamedCurve = string;
14310
- type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
14632
+ type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
14311
14633
  type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
14312
14634
  type PerformanceEntryList = PerformanceEntry[];
14313
14635
  type PushMessageDataInit = BufferSource | string;
@@ -14356,11 +14678,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
14356
14678
  type FontFaceSetLoadStatus = "loaded" | "loading";
14357
14679
  type FrameType = "auxiliary" | "nested" | "none" | "top-level";
14358
14680
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
14681
+ type GPUCanvasAlphaMode = "opaque" | "premultiplied";
14682
+ type GPUCanvasToneMappingMode = "extended" | "standard";
14359
14683
  type GPUCompilationMessageType = "error" | "info" | "warning";
14360
14684
  type GPUDeviceLostReason = "destroyed" | "unknown";
14361
14685
  type GPUIndexFormat = "uint16" | "uint32";
14686
+ type GPULoadOp = "clear" | "load";
14362
14687
  type GPUPipelineErrorReason = "internal" | "validation";
14363
14688
  type GPUQueryType = "occlusion" | "timestamp";
14689
+ type GPUStoreOp = "discard" | "store";
14364
14690
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
14365
14691
  type GPUTextureDimension = "1d" | "2d" | "3d";
14366
14692
  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";
@@ -87,6 +87,48 @@ interface GPUBindingCommandsMixin {
87
87
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
88
88
  }
89
89
 
90
+ interface GPUCommandEncoder {
91
+ /**
92
+ * The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
93
+ *
94
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
95
+ */
96
+ copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
97
+ /**
98
+ * The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
99
+ *
100
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
101
+ */
102
+ copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
103
+ /**
104
+ * The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
105
+ *
106
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
107
+ */
108
+ copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
109
+ }
110
+
111
+ interface GPUQueue {
112
+ /**
113
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
114
+ *
115
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
116
+ */
117
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
118
+ /**
119
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
120
+ *
121
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
122
+ */
123
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
124
+ /**
125
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
126
+ *
127
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
128
+ */
129
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
130
+ }
131
+
90
132
  interface GPURenderPassEncoder {
91
133
  /**
92
134
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.