@types/sharedworker 0.0.212 → 0.0.213

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
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.212 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.212.
31
+ You can read what changed in version 0.0.213 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.213.
package/index.d.ts CHANGED
@@ -226,10 +226,38 @@ interface GPUColorDict {
226
226
  r: number;
227
227
  }
228
228
 
229
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
230
+ colorSpace?: PredefinedColorSpace;
231
+ premultipliedAlpha?: boolean;
232
+ }
233
+
234
+ interface GPUCopyExternalImageSourceInfo {
235
+ flipY?: boolean;
236
+ origin?: GPUOrigin2D;
237
+ source: GPUCopyExternalImageSource;
238
+ }
239
+
240
+ interface GPUExtent3DDict {
241
+ depthOrArrayLayers?: GPUIntegerCoordinate;
242
+ height?: GPUIntegerCoordinate;
243
+ width: GPUIntegerCoordinate;
244
+ }
245
+
229
246
  interface GPUObjectDescriptorBase {
230
247
  label?: string;
231
248
  }
232
249
 
250
+ interface GPUOrigin2DDict {
251
+ x?: GPUIntegerCoordinate;
252
+ y?: GPUIntegerCoordinate;
253
+ }
254
+
255
+ interface GPUOrigin3DDict {
256
+ x?: GPUIntegerCoordinate;
257
+ y?: GPUIntegerCoordinate;
258
+ z?: GPUIntegerCoordinate;
259
+ }
260
+
233
261
  interface GPUPipelineErrorInit {
234
262
  reason: GPUPipelineErrorReason;
235
263
  }
@@ -237,6 +265,19 @@ interface GPUPipelineErrorInit {
237
265
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
238
266
  }
239
267
 
268
+ interface GPUTexelCopyBufferLayout {
269
+ bytesPerRow?: GPUSize32;
270
+ offset?: GPUSize64;
271
+ rowsPerImage?: GPUSize32;
272
+ }
273
+
274
+ interface GPUTexelCopyTextureInfo {
275
+ aspect?: GPUTextureAspect;
276
+ mipLevel?: GPUIntegerCoordinate;
277
+ origin?: GPUOrigin3D;
278
+ texture: GPUTexture;
279
+ }
280
+
240
281
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
241
282
  arrayLayerCount?: GPUIntegerCoordinate;
242
283
  aspect?: GPUTextureAspect;
@@ -4348,6 +4389,50 @@ declare var GPUQuerySet: {
4348
4389
  new(): GPUQuerySet;
4349
4390
  };
4350
4391
 
4392
+ /**
4393
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
4394
+ * Available only in secure contexts.
4395
+ *
4396
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
4397
+ */
4398
+ interface GPUQueue extends GPUObjectBase {
4399
+ /**
4400
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
4401
+ *
4402
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
4403
+ */
4404
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
4405
+ /**
4406
+ * 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.
4407
+ *
4408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
4409
+ */
4410
+ onSubmittedWorkDone(): Promise<void>;
4411
+ /**
4412
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
4413
+ *
4414
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
4415
+ */
4416
+ submit(commandBuffers: GPUCommandBuffer[]): void;
4417
+ /**
4418
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
4419
+ *
4420
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
4421
+ */
4422
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
4423
+ /**
4424
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
4425
+ *
4426
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
4427
+ */
4428
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
4429
+ }
4430
+
4431
+ declare var GPUQueue: {
4432
+ prototype: GPUQueue;
4433
+ new(): GPUQueue;
4434
+ };
4435
+
4351
4436
  /**
4352
4437
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
4353
4438
  * Available only in secure contexts.
@@ -12282,11 +12367,15 @@ type GLuint = number;
12282
12367
  type GLuint64 = number;
12283
12368
  type GPUBufferDynamicOffset = number;
12284
12369
  type GPUColor = number[] | GPUColorDict;
12370
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12371
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
12285
12372
  type GPUFlagsConstant = number;
12286
12373
  type GPUIndex32 = number;
12287
12374
  type GPUIntegerCoordinate = number;
12288
12375
  type GPUIntegerCoordinateOut = number;
12289
12376
  type GPUMapModeFlags = number;
12377
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12378
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12290
12379
  type GPUSignedOffset32 = number;
12291
12380
  type GPUSize32 = number;
12292
12381
  type GPUSize32Out = number;
@@ -12470,6 +12559,27 @@ interface GPUBindingCommandsMixin {
12470
12559
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
12471
12560
  }
12472
12561
 
12562
+ interface GPUQueue {
12563
+ /**
12564
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
12565
+ *
12566
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
12567
+ */
12568
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
12569
+ /**
12570
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
12571
+ *
12572
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
12573
+ */
12574
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
12575
+ /**
12576
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
12577
+ *
12578
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
12579
+ */
12580
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
12581
+ }
12582
+
12473
12583
  interface GPURenderPassEncoder {
12474
12584
  /**
12475
12585
  * 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/sharedworker",
3
- "version": "0.0.212",
3
+ "version": "0.0.213",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -223,10 +223,38 @@ interface GPUColorDict {
223
223
  r: number;
224
224
  }
225
225
 
226
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
227
+ colorSpace?: PredefinedColorSpace;
228
+ premultipliedAlpha?: boolean;
229
+ }
230
+
231
+ interface GPUCopyExternalImageSourceInfo {
232
+ flipY?: boolean;
233
+ origin?: GPUOrigin2D;
234
+ source: GPUCopyExternalImageSource;
235
+ }
236
+
237
+ interface GPUExtent3DDict {
238
+ depthOrArrayLayers?: GPUIntegerCoordinate;
239
+ height?: GPUIntegerCoordinate;
240
+ width: GPUIntegerCoordinate;
241
+ }
242
+
226
243
  interface GPUObjectDescriptorBase {
227
244
  label?: string;
228
245
  }
229
246
 
247
+ interface GPUOrigin2DDict {
248
+ x?: GPUIntegerCoordinate;
249
+ y?: GPUIntegerCoordinate;
250
+ }
251
+
252
+ interface GPUOrigin3DDict {
253
+ x?: GPUIntegerCoordinate;
254
+ y?: GPUIntegerCoordinate;
255
+ z?: GPUIntegerCoordinate;
256
+ }
257
+
230
258
  interface GPUPipelineErrorInit {
231
259
  reason: GPUPipelineErrorReason;
232
260
  }
@@ -234,6 +262,19 @@ interface GPUPipelineErrorInit {
234
262
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
263
  }
236
264
 
265
+ interface GPUTexelCopyBufferLayout {
266
+ bytesPerRow?: GPUSize32;
267
+ offset?: GPUSize64;
268
+ rowsPerImage?: GPUSize32;
269
+ }
270
+
271
+ interface GPUTexelCopyTextureInfo {
272
+ aspect?: GPUTextureAspect;
273
+ mipLevel?: GPUIntegerCoordinate;
274
+ origin?: GPUOrigin3D;
275
+ texture: GPUTexture;
276
+ }
277
+
237
278
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
238
279
  arrayLayerCount?: GPUIntegerCoordinate;
239
280
  aspect?: GPUTextureAspect;
@@ -4345,6 +4386,50 @@ declare var GPUQuerySet: {
4345
4386
  new(): GPUQuerySet;
4346
4387
  };
4347
4388
 
4389
+ /**
4390
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
4391
+ * Available only in secure contexts.
4392
+ *
4393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
4394
+ */
4395
+ interface GPUQueue extends GPUObjectBase {
4396
+ /**
4397
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
4398
+ *
4399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
4400
+ */
4401
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
4402
+ /**
4403
+ * 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.
4404
+ *
4405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
4406
+ */
4407
+ onSubmittedWorkDone(): Promise<void>;
4408
+ /**
4409
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
4410
+ *
4411
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
4412
+ */
4413
+ submit(commandBuffers: GPUCommandBuffer[]): void;
4414
+ /**
4415
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
4416
+ *
4417
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
4418
+ */
4419
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
4420
+ /**
4421
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
4422
+ *
4423
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
4424
+ */
4425
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
4426
+ }
4427
+
4428
+ declare var GPUQueue: {
4429
+ prototype: GPUQueue;
4430
+ new(): GPUQueue;
4431
+ };
4432
+
4348
4433
  /**
4349
4434
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
4350
4435
  * Available only in secure contexts.
@@ -12279,11 +12364,15 @@ type GLuint = number;
12279
12364
  type GLuint64 = number;
12280
12365
  type GPUBufferDynamicOffset = number;
12281
12366
  type GPUColor = number[] | GPUColorDict;
12367
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12368
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
12282
12369
  type GPUFlagsConstant = number;
12283
12370
  type GPUIndex32 = number;
12284
12371
  type GPUIntegerCoordinate = number;
12285
12372
  type GPUIntegerCoordinateOut = number;
12286
12373
  type GPUMapModeFlags = number;
12374
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12375
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12287
12376
  type GPUSignedOffset32 = number;
12288
12377
  type GPUSize32 = number;
12289
12378
  type GPUSize32Out = number;
@@ -68,6 +68,27 @@ interface GPUBindingCommandsMixin {
68
68
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
69
69
  }
70
70
 
71
+ interface GPUQueue {
72
+ /**
73
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
74
+ *
75
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
76
+ */
77
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
78
+ /**
79
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
80
+ *
81
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
82
+ */
83
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
84
+ /**
85
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
86
+ *
87
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
88
+ */
89
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
90
+ }
91
+
71
92
  interface GPURenderPassEncoder {
72
93
  /**
73
94
  * 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
@@ -223,10 +223,38 @@ interface GPUColorDict {
223
223
  r: number;
224
224
  }
225
225
 
226
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
227
+ colorSpace?: PredefinedColorSpace;
228
+ premultipliedAlpha?: boolean;
229
+ }
230
+
231
+ interface GPUCopyExternalImageSourceInfo {
232
+ flipY?: boolean;
233
+ origin?: GPUOrigin2D;
234
+ source: GPUCopyExternalImageSource;
235
+ }
236
+
237
+ interface GPUExtent3DDict {
238
+ depthOrArrayLayers?: GPUIntegerCoordinate;
239
+ height?: GPUIntegerCoordinate;
240
+ width: GPUIntegerCoordinate;
241
+ }
242
+
226
243
  interface GPUObjectDescriptorBase {
227
244
  label?: string;
228
245
  }
229
246
 
247
+ interface GPUOrigin2DDict {
248
+ x?: GPUIntegerCoordinate;
249
+ y?: GPUIntegerCoordinate;
250
+ }
251
+
252
+ interface GPUOrigin3DDict {
253
+ x?: GPUIntegerCoordinate;
254
+ y?: GPUIntegerCoordinate;
255
+ z?: GPUIntegerCoordinate;
256
+ }
257
+
230
258
  interface GPUPipelineErrorInit {
231
259
  reason: GPUPipelineErrorReason;
232
260
  }
@@ -234,6 +262,19 @@ interface GPUPipelineErrorInit {
234
262
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
263
  }
236
264
 
265
+ interface GPUTexelCopyBufferLayout {
266
+ bytesPerRow?: GPUSize32;
267
+ offset?: GPUSize64;
268
+ rowsPerImage?: GPUSize32;
269
+ }
270
+
271
+ interface GPUTexelCopyTextureInfo {
272
+ aspect?: GPUTextureAspect;
273
+ mipLevel?: GPUIntegerCoordinate;
274
+ origin?: GPUOrigin3D;
275
+ texture: GPUTexture;
276
+ }
277
+
237
278
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
238
279
  arrayLayerCount?: GPUIntegerCoordinate;
239
280
  aspect?: GPUTextureAspect;
@@ -4345,6 +4386,50 @@ declare var GPUQuerySet: {
4345
4386
  new(): GPUQuerySet;
4346
4387
  };
4347
4388
 
4389
+ /**
4390
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
4391
+ * Available only in secure contexts.
4392
+ *
4393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
4394
+ */
4395
+ interface GPUQueue extends GPUObjectBase {
4396
+ /**
4397
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
4398
+ *
4399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
4400
+ */
4401
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
4402
+ /**
4403
+ * 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.
4404
+ *
4405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
4406
+ */
4407
+ onSubmittedWorkDone(): Promise<void>;
4408
+ /**
4409
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
4410
+ *
4411
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
4412
+ */
4413
+ submit(commandBuffers: GPUCommandBuffer[]): void;
4414
+ /**
4415
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
4416
+ *
4417
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
4418
+ */
4419
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
4420
+ /**
4421
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
4422
+ *
4423
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
4424
+ */
4425
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
4426
+ }
4427
+
4428
+ declare var GPUQueue: {
4429
+ prototype: GPUQueue;
4430
+ new(): GPUQueue;
4431
+ };
4432
+
4348
4433
  /**
4349
4434
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
4350
4435
  * Available only in secure contexts.
@@ -12279,11 +12364,15 @@ type GLuint = number;
12279
12364
  type GLuint64 = number;
12280
12365
  type GPUBufferDynamicOffset = number;
12281
12366
  type GPUColor = number[] | GPUColorDict;
12367
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12368
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
12282
12369
  type GPUFlagsConstant = number;
12283
12370
  type GPUIndex32 = number;
12284
12371
  type GPUIntegerCoordinate = number;
12285
12372
  type GPUIntegerCoordinateOut = number;
12286
12373
  type GPUMapModeFlags = number;
12374
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12375
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12287
12376
  type GPUSignedOffset32 = number;
12288
12377
  type GPUSize32 = number;
12289
12378
  type GPUSize32Out = number;
@@ -72,6 +72,27 @@ interface GPUBindingCommandsMixin {
72
72
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
73
73
  }
74
74
 
75
+ interface GPUQueue {
76
+ /**
77
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
78
+ *
79
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
80
+ */
81
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
82
+ /**
83
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
84
+ *
85
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
86
+ */
87
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
88
+ /**
89
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
90
+ *
91
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
92
+ */
93
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
94
+ }
95
+
75
96
  interface GPURenderPassEncoder {
76
97
  /**
77
98
  * 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
@@ -223,10 +223,38 @@ interface GPUColorDict {
223
223
  r: number;
224
224
  }
225
225
 
226
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
227
+ colorSpace?: PredefinedColorSpace;
228
+ premultipliedAlpha?: boolean;
229
+ }
230
+
231
+ interface GPUCopyExternalImageSourceInfo {
232
+ flipY?: boolean;
233
+ origin?: GPUOrigin2D;
234
+ source: GPUCopyExternalImageSource;
235
+ }
236
+
237
+ interface GPUExtent3DDict {
238
+ depthOrArrayLayers?: GPUIntegerCoordinate;
239
+ height?: GPUIntegerCoordinate;
240
+ width: GPUIntegerCoordinate;
241
+ }
242
+
226
243
  interface GPUObjectDescriptorBase {
227
244
  label?: string;
228
245
  }
229
246
 
247
+ interface GPUOrigin2DDict {
248
+ x?: GPUIntegerCoordinate;
249
+ y?: GPUIntegerCoordinate;
250
+ }
251
+
252
+ interface GPUOrigin3DDict {
253
+ x?: GPUIntegerCoordinate;
254
+ y?: GPUIntegerCoordinate;
255
+ z?: GPUIntegerCoordinate;
256
+ }
257
+
230
258
  interface GPUPipelineErrorInit {
231
259
  reason: GPUPipelineErrorReason;
232
260
  }
@@ -234,6 +262,19 @@ interface GPUPipelineErrorInit {
234
262
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
263
  }
236
264
 
265
+ interface GPUTexelCopyBufferLayout {
266
+ bytesPerRow?: GPUSize32;
267
+ offset?: GPUSize64;
268
+ rowsPerImage?: GPUSize32;
269
+ }
270
+
271
+ interface GPUTexelCopyTextureInfo {
272
+ aspect?: GPUTextureAspect;
273
+ mipLevel?: GPUIntegerCoordinate;
274
+ origin?: GPUOrigin3D;
275
+ texture: GPUTexture;
276
+ }
277
+
237
278
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
238
279
  arrayLayerCount?: GPUIntegerCoordinate;
239
280
  aspect?: GPUTextureAspect;
@@ -4345,6 +4386,50 @@ declare var GPUQuerySet: {
4345
4386
  new(): GPUQuerySet;
4346
4387
  };
4347
4388
 
4389
+ /**
4390
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
4391
+ * Available only in secure contexts.
4392
+ *
4393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
4394
+ */
4395
+ interface GPUQueue extends GPUObjectBase {
4396
+ /**
4397
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
4398
+ *
4399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
4400
+ */
4401
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
4402
+ /**
4403
+ * 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.
4404
+ *
4405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
4406
+ */
4407
+ onSubmittedWorkDone(): Promise<void>;
4408
+ /**
4409
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
4410
+ *
4411
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
4412
+ */
4413
+ submit(commandBuffers: GPUCommandBuffer[]): void;
4414
+ /**
4415
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
4416
+ *
4417
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
4418
+ */
4419
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
4420
+ /**
4421
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
4422
+ *
4423
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
4424
+ */
4425
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
4426
+ }
4427
+
4428
+ declare var GPUQueue: {
4429
+ prototype: GPUQueue;
4430
+ new(): GPUQueue;
4431
+ };
4432
+
4348
4433
  /**
4349
4434
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
4350
4435
  * Available only in secure contexts.
@@ -12279,11 +12364,15 @@ type GLuint = number;
12279
12364
  type GLuint64 = number;
12280
12365
  type GPUBufferDynamicOffset = number;
12281
12366
  type GPUColor = number[] | GPUColorDict;
12367
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12368
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
12282
12369
  type GPUFlagsConstant = number;
12283
12370
  type GPUIndex32 = number;
12284
12371
  type GPUIntegerCoordinate = number;
12285
12372
  type GPUIntegerCoordinateOut = number;
12286
12373
  type GPUMapModeFlags = number;
12374
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12375
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12287
12376
  type GPUSignedOffset32 = number;
12288
12377
  type GPUSize32 = number;
12289
12378
  type GPUSize32Out = number;
@@ -72,6 +72,27 @@ interface GPUBindingCommandsMixin {
72
72
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
73
73
  }
74
74
 
75
+ interface GPUQueue {
76
+ /**
77
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
78
+ *
79
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
80
+ */
81
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
82
+ /**
83
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
84
+ *
85
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
86
+ */
87
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
88
+ /**
89
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
90
+ *
91
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
92
+ */
93
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
94
+ }
95
+
75
96
  interface GPURenderPassEncoder {
76
97
  /**
77
98
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.