@types/webworker 0.0.62 → 0.0.63

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 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.62 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.62.
48
+ You can read what changed in version 0.0.63 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.63.
package/index.d.ts CHANGED
@@ -372,10 +372,38 @@ interface GPUColorDict {
372
372
  r: number;
373
373
  }
374
374
 
375
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
376
+ colorSpace?: PredefinedColorSpace;
377
+ premultipliedAlpha?: boolean;
378
+ }
379
+
380
+ interface GPUCopyExternalImageSourceInfo {
381
+ flipY?: boolean;
382
+ origin?: GPUOrigin2D;
383
+ source: GPUCopyExternalImageSource;
384
+ }
385
+
386
+ interface GPUExtent3DDict {
387
+ depthOrArrayLayers?: GPUIntegerCoordinate;
388
+ height?: GPUIntegerCoordinate;
389
+ width: GPUIntegerCoordinate;
390
+ }
391
+
375
392
  interface GPUObjectDescriptorBase {
376
393
  label?: string;
377
394
  }
378
395
 
396
+ interface GPUOrigin2DDict {
397
+ x?: GPUIntegerCoordinate;
398
+ y?: GPUIntegerCoordinate;
399
+ }
400
+
401
+ interface GPUOrigin3DDict {
402
+ x?: GPUIntegerCoordinate;
403
+ y?: GPUIntegerCoordinate;
404
+ z?: GPUIntegerCoordinate;
405
+ }
406
+
379
407
  interface GPUPipelineErrorInit {
380
408
  reason: GPUPipelineErrorReason;
381
409
  }
@@ -383,6 +411,19 @@ interface GPUPipelineErrorInit {
383
411
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
384
412
  }
385
413
 
414
+ interface GPUTexelCopyBufferLayout {
415
+ bytesPerRow?: GPUSize32;
416
+ offset?: GPUSize64;
417
+ rowsPerImage?: GPUSize32;
418
+ }
419
+
420
+ interface GPUTexelCopyTextureInfo {
421
+ aspect?: GPUTextureAspect;
422
+ mipLevel?: GPUIntegerCoordinate;
423
+ origin?: GPUOrigin3D;
424
+ texture: GPUTexture;
425
+ }
426
+
386
427
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
387
428
  arrayLayerCount?: GPUIntegerCoordinate;
388
429
  aspect?: GPUTextureAspect;
@@ -5367,6 +5408,50 @@ declare var GPUQuerySet: {
5367
5408
  new(): GPUQuerySet;
5368
5409
  };
5369
5410
 
5411
+ /**
5412
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
5413
+ * Available only in secure contexts.
5414
+ *
5415
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
5416
+ */
5417
+ interface GPUQueue extends GPUObjectBase {
5418
+ /**
5419
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
5420
+ *
5421
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
5422
+ */
5423
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
5424
+ /**
5425
+ * 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.
5426
+ *
5427
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
5428
+ */
5429
+ onSubmittedWorkDone(): Promise<void>;
5430
+ /**
5431
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
5432
+ *
5433
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
5434
+ */
5435
+ submit(commandBuffers: GPUCommandBuffer[]): void;
5436
+ /**
5437
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
5438
+ *
5439
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
5440
+ */
5441
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
5442
+ /**
5443
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
5444
+ *
5445
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
5446
+ */
5447
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
5448
+ }
5449
+
5450
+ declare var GPUQueue: {
5451
+ prototype: GPUQueue;
5452
+ new(): GPUQueue;
5453
+ };
5454
+
5370
5455
  /**
5371
5456
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
5372
5457
  * Available only in secure contexts.
@@ -14289,11 +14374,15 @@ type GLuint = number;
14289
14374
  type GLuint64 = number;
14290
14375
  type GPUBufferDynamicOffset = number;
14291
14376
  type GPUColor = number[] | GPUColorDict;
14377
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
14378
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
14292
14379
  type GPUFlagsConstant = number;
14293
14380
  type GPUIndex32 = number;
14294
14381
  type GPUIntegerCoordinate = number;
14295
14382
  type GPUIntegerCoordinateOut = number;
14296
14383
  type GPUMapModeFlags = number;
14384
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
14385
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
14297
14386
  type GPUSignedOffset32 = number;
14298
14387
  type GPUSize32 = number;
14299
14388
  type GPUSize32Out = number;
@@ -14514,6 +14603,27 @@ interface GPUBindingCommandsMixin {
14514
14603
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
14515
14604
  }
14516
14605
 
14606
+ interface GPUQueue {
14607
+ /**
14608
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
14609
+ *
14610
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
14611
+ */
14612
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
14613
+ /**
14614
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
14615
+ *
14616
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
14617
+ */
14618
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
14619
+ /**
14620
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
14621
+ *
14622
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
14623
+ */
14624
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
14625
+ }
14626
+
14517
14627
  interface GPURenderPassEncoder {
14518
14628
  /**
14519
14629
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/webworker",
3
- "version": "0.0.62",
3
+ "version": "0.0.63",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -369,10 +369,38 @@ interface GPUColorDict {
369
369
  r: number;
370
370
  }
371
371
 
372
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
373
+ colorSpace?: PredefinedColorSpace;
374
+ premultipliedAlpha?: boolean;
375
+ }
376
+
377
+ interface GPUCopyExternalImageSourceInfo {
378
+ flipY?: boolean;
379
+ origin?: GPUOrigin2D;
380
+ source: GPUCopyExternalImageSource;
381
+ }
382
+
383
+ interface GPUExtent3DDict {
384
+ depthOrArrayLayers?: GPUIntegerCoordinate;
385
+ height?: GPUIntegerCoordinate;
386
+ width: GPUIntegerCoordinate;
387
+ }
388
+
372
389
  interface GPUObjectDescriptorBase {
373
390
  label?: string;
374
391
  }
375
392
 
393
+ interface GPUOrigin2DDict {
394
+ x?: GPUIntegerCoordinate;
395
+ y?: GPUIntegerCoordinate;
396
+ }
397
+
398
+ interface GPUOrigin3DDict {
399
+ x?: GPUIntegerCoordinate;
400
+ y?: GPUIntegerCoordinate;
401
+ z?: GPUIntegerCoordinate;
402
+ }
403
+
376
404
  interface GPUPipelineErrorInit {
377
405
  reason: GPUPipelineErrorReason;
378
406
  }
@@ -380,6 +408,19 @@ interface GPUPipelineErrorInit {
380
408
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
409
  }
382
410
 
411
+ interface GPUTexelCopyBufferLayout {
412
+ bytesPerRow?: GPUSize32;
413
+ offset?: GPUSize64;
414
+ rowsPerImage?: GPUSize32;
415
+ }
416
+
417
+ interface GPUTexelCopyTextureInfo {
418
+ aspect?: GPUTextureAspect;
419
+ mipLevel?: GPUIntegerCoordinate;
420
+ origin?: GPUOrigin3D;
421
+ texture: GPUTexture;
422
+ }
423
+
383
424
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
384
425
  arrayLayerCount?: GPUIntegerCoordinate;
385
426
  aspect?: GPUTextureAspect;
@@ -5364,6 +5405,50 @@ declare var GPUQuerySet: {
5364
5405
  new(): GPUQuerySet;
5365
5406
  };
5366
5407
 
5408
+ /**
5409
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
5410
+ * Available only in secure contexts.
5411
+ *
5412
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
5413
+ */
5414
+ interface GPUQueue extends GPUObjectBase {
5415
+ /**
5416
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
5417
+ *
5418
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
5419
+ */
5420
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
5421
+ /**
5422
+ * 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.
5423
+ *
5424
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
5425
+ */
5426
+ onSubmittedWorkDone(): Promise<void>;
5427
+ /**
5428
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
5429
+ *
5430
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
5431
+ */
5432
+ submit(commandBuffers: GPUCommandBuffer[]): void;
5433
+ /**
5434
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
5435
+ *
5436
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
5437
+ */
5438
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
5439
+ /**
5440
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
5441
+ *
5442
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
5443
+ */
5444
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
5445
+ }
5446
+
5447
+ declare var GPUQueue: {
5448
+ prototype: GPUQueue;
5449
+ new(): GPUQueue;
5450
+ };
5451
+
5367
5452
  /**
5368
5453
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
5369
5454
  * Available only in secure contexts.
@@ -14286,11 +14371,15 @@ type GLuint = number;
14286
14371
  type GLuint64 = number;
14287
14372
  type GPUBufferDynamicOffset = number;
14288
14373
  type GPUColor = number[] | GPUColorDict;
14374
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
14375
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
14289
14376
  type GPUFlagsConstant = number;
14290
14377
  type GPUIndex32 = number;
14291
14378
  type GPUIntegerCoordinate = number;
14292
14379
  type GPUIntegerCoordinateOut = number;
14293
14380
  type GPUMapModeFlags = number;
14381
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
14382
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
14294
14383
  type GPUSignedOffset32 = number;
14295
14384
  type GPUSize32 = number;
14296
14385
  type GPUSize32Out = number;
@@ -83,6 +83,27 @@ interface GPUBindingCommandsMixin {
83
83
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
84
84
  }
85
85
 
86
+ interface GPUQueue {
87
+ /**
88
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
89
+ *
90
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
91
+ */
92
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
93
+ /**
94
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
95
+ *
96
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
97
+ */
98
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
99
+ /**
100
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
101
+ *
102
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
103
+ */
104
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
105
+ }
106
+
86
107
  interface GPURenderPassEncoder {
87
108
  /**
88
109
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/ts5.6/index.d.ts CHANGED
@@ -369,10 +369,38 @@ interface GPUColorDict {
369
369
  r: number;
370
370
  }
371
371
 
372
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
373
+ colorSpace?: PredefinedColorSpace;
374
+ premultipliedAlpha?: boolean;
375
+ }
376
+
377
+ interface GPUCopyExternalImageSourceInfo {
378
+ flipY?: boolean;
379
+ origin?: GPUOrigin2D;
380
+ source: GPUCopyExternalImageSource;
381
+ }
382
+
383
+ interface GPUExtent3DDict {
384
+ depthOrArrayLayers?: GPUIntegerCoordinate;
385
+ height?: GPUIntegerCoordinate;
386
+ width: GPUIntegerCoordinate;
387
+ }
388
+
372
389
  interface GPUObjectDescriptorBase {
373
390
  label?: string;
374
391
  }
375
392
 
393
+ interface GPUOrigin2DDict {
394
+ x?: GPUIntegerCoordinate;
395
+ y?: GPUIntegerCoordinate;
396
+ }
397
+
398
+ interface GPUOrigin3DDict {
399
+ x?: GPUIntegerCoordinate;
400
+ y?: GPUIntegerCoordinate;
401
+ z?: GPUIntegerCoordinate;
402
+ }
403
+
376
404
  interface GPUPipelineErrorInit {
377
405
  reason: GPUPipelineErrorReason;
378
406
  }
@@ -380,6 +408,19 @@ interface GPUPipelineErrorInit {
380
408
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
409
  }
382
410
 
411
+ interface GPUTexelCopyBufferLayout {
412
+ bytesPerRow?: GPUSize32;
413
+ offset?: GPUSize64;
414
+ rowsPerImage?: GPUSize32;
415
+ }
416
+
417
+ interface GPUTexelCopyTextureInfo {
418
+ aspect?: GPUTextureAspect;
419
+ mipLevel?: GPUIntegerCoordinate;
420
+ origin?: GPUOrigin3D;
421
+ texture: GPUTexture;
422
+ }
423
+
383
424
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
384
425
  arrayLayerCount?: GPUIntegerCoordinate;
385
426
  aspect?: GPUTextureAspect;
@@ -5364,6 +5405,50 @@ declare var GPUQuerySet: {
5364
5405
  new(): GPUQuerySet;
5365
5406
  };
5366
5407
 
5408
+ /**
5409
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
5410
+ * Available only in secure contexts.
5411
+ *
5412
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
5413
+ */
5414
+ interface GPUQueue extends GPUObjectBase {
5415
+ /**
5416
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
5417
+ *
5418
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
5419
+ */
5420
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
5421
+ /**
5422
+ * 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.
5423
+ *
5424
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
5425
+ */
5426
+ onSubmittedWorkDone(): Promise<void>;
5427
+ /**
5428
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
5429
+ *
5430
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
5431
+ */
5432
+ submit(commandBuffers: GPUCommandBuffer[]): void;
5433
+ /**
5434
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
5435
+ *
5436
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
5437
+ */
5438
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
5439
+ /**
5440
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
5441
+ *
5442
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
5443
+ */
5444
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
5445
+ }
5446
+
5447
+ declare var GPUQueue: {
5448
+ prototype: GPUQueue;
5449
+ new(): GPUQueue;
5450
+ };
5451
+
5367
5452
  /**
5368
5453
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
5369
5454
  * Available only in secure contexts.
@@ -14286,11 +14371,15 @@ type GLuint = number;
14286
14371
  type GLuint64 = number;
14287
14372
  type GPUBufferDynamicOffset = number;
14288
14373
  type GPUColor = number[] | GPUColorDict;
14374
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
14375
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
14289
14376
  type GPUFlagsConstant = number;
14290
14377
  type GPUIndex32 = number;
14291
14378
  type GPUIntegerCoordinate = number;
14292
14379
  type GPUIntegerCoordinateOut = number;
14293
14380
  type GPUMapModeFlags = number;
14381
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
14382
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
14294
14383
  type GPUSignedOffset32 = number;
14295
14384
  type GPUSize32 = number;
14296
14385
  type GPUSize32Out = number;
@@ -87,6 +87,27 @@ interface GPUBindingCommandsMixin {
87
87
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
88
88
  }
89
89
 
90
+ interface GPUQueue {
91
+ /**
92
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
93
+ *
94
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
95
+ */
96
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
97
+ /**
98
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
99
+ *
100
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
101
+ */
102
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
103
+ /**
104
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
105
+ *
106
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
107
+ */
108
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
109
+ }
110
+
90
111
  interface GPURenderPassEncoder {
91
112
  /**
92
113
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/ts5.9/index.d.ts CHANGED
@@ -369,10 +369,38 @@ interface GPUColorDict {
369
369
  r: number;
370
370
  }
371
371
 
372
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
373
+ colorSpace?: PredefinedColorSpace;
374
+ premultipliedAlpha?: boolean;
375
+ }
376
+
377
+ interface GPUCopyExternalImageSourceInfo {
378
+ flipY?: boolean;
379
+ origin?: GPUOrigin2D;
380
+ source: GPUCopyExternalImageSource;
381
+ }
382
+
383
+ interface GPUExtent3DDict {
384
+ depthOrArrayLayers?: GPUIntegerCoordinate;
385
+ height?: GPUIntegerCoordinate;
386
+ width: GPUIntegerCoordinate;
387
+ }
388
+
372
389
  interface GPUObjectDescriptorBase {
373
390
  label?: string;
374
391
  }
375
392
 
393
+ interface GPUOrigin2DDict {
394
+ x?: GPUIntegerCoordinate;
395
+ y?: GPUIntegerCoordinate;
396
+ }
397
+
398
+ interface GPUOrigin3DDict {
399
+ x?: GPUIntegerCoordinate;
400
+ y?: GPUIntegerCoordinate;
401
+ z?: GPUIntegerCoordinate;
402
+ }
403
+
376
404
  interface GPUPipelineErrorInit {
377
405
  reason: GPUPipelineErrorReason;
378
406
  }
@@ -380,6 +408,19 @@ interface GPUPipelineErrorInit {
380
408
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
409
  }
382
410
 
411
+ interface GPUTexelCopyBufferLayout {
412
+ bytesPerRow?: GPUSize32;
413
+ offset?: GPUSize64;
414
+ rowsPerImage?: GPUSize32;
415
+ }
416
+
417
+ interface GPUTexelCopyTextureInfo {
418
+ aspect?: GPUTextureAspect;
419
+ mipLevel?: GPUIntegerCoordinate;
420
+ origin?: GPUOrigin3D;
421
+ texture: GPUTexture;
422
+ }
423
+
383
424
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
384
425
  arrayLayerCount?: GPUIntegerCoordinate;
385
426
  aspect?: GPUTextureAspect;
@@ -5364,6 +5405,50 @@ declare var GPUQuerySet: {
5364
5405
  new(): GPUQuerySet;
5365
5406
  };
5366
5407
 
5408
+ /**
5409
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
5410
+ * Available only in secure contexts.
5411
+ *
5412
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
5413
+ */
5414
+ interface GPUQueue extends GPUObjectBase {
5415
+ /**
5416
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
5417
+ *
5418
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
5419
+ */
5420
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
5421
+ /**
5422
+ * 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.
5423
+ *
5424
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
5425
+ */
5426
+ onSubmittedWorkDone(): Promise<void>;
5427
+ /**
5428
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
5429
+ *
5430
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
5431
+ */
5432
+ submit(commandBuffers: GPUCommandBuffer[]): void;
5433
+ /**
5434
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
5435
+ *
5436
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
5437
+ */
5438
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
5439
+ /**
5440
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
5441
+ *
5442
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
5443
+ */
5444
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
5445
+ }
5446
+
5447
+ declare var GPUQueue: {
5448
+ prototype: GPUQueue;
5449
+ new(): GPUQueue;
5450
+ };
5451
+
5367
5452
  /**
5368
5453
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
5369
5454
  * Available only in secure contexts.
@@ -14286,11 +14371,15 @@ type GLuint = number;
14286
14371
  type GLuint64 = number;
14287
14372
  type GPUBufferDynamicOffset = number;
14288
14373
  type GPUColor = number[] | GPUColorDict;
14374
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
14375
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
14289
14376
  type GPUFlagsConstant = number;
14290
14377
  type GPUIndex32 = number;
14291
14378
  type GPUIntegerCoordinate = number;
14292
14379
  type GPUIntegerCoordinateOut = number;
14293
14380
  type GPUMapModeFlags = number;
14381
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
14382
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
14294
14383
  type GPUSignedOffset32 = number;
14295
14384
  type GPUSize32 = number;
14296
14385
  type GPUSize32Out = number;
@@ -87,6 +87,27 @@ interface GPUBindingCommandsMixin {
87
87
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
88
88
  }
89
89
 
90
+ interface GPUQueue {
91
+ /**
92
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
93
+ *
94
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
95
+ */
96
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
97
+ /**
98
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
99
+ *
100
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
101
+ */
102
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
103
+ /**
104
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
105
+ *
106
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
107
+ */
108
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
109
+ }
110
+
90
111
  interface GPURenderPassEncoder {
91
112
  /**
92
113
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.