@types/sharedworker 0.0.216 → 0.0.218

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.216 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.216.
31
+ You can read what changed in version 0.0.218 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.218.
package/index.d.ts CHANGED
@@ -235,6 +235,12 @@ interface GPUBufferBinding {
235
235
  size?: GPUSize64;
236
236
  }
237
237
 
238
+ interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
239
+ mappedAtCreation?: boolean;
240
+ size: GPUSize64;
241
+ usage: GPUBufferUsageFlags;
242
+ }
243
+
238
244
  interface GPUCanvasConfiguration {
239
245
  alphaMode?: GPUCanvasAlphaMode;
240
246
  colorSpace?: PredefinedColorSpace;
@@ -259,6 +265,9 @@ interface GPUColorDict {
259
265
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
260
266
  }
261
267
 
268
+ interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
269
+ }
270
+
262
271
  interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
263
272
  timestampWrites?: GPUComputePassTimestampWrites;
264
273
  }
@@ -269,6 +278,10 @@ interface GPUComputePassTimestampWrites {
269
278
  querySet: GPUQuerySet;
270
279
  }
271
280
 
281
+ interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
282
+ compute: GPUProgrammableStage;
283
+ }
284
+
272
285
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
273
286
  colorSpace?: PredefinedColorSpace;
274
287
  premultipliedAlpha?: boolean;
@@ -305,13 +318,37 @@ interface GPUOrigin3DDict {
305
318
  z?: GPUIntegerCoordinate;
306
319
  }
307
320
 
321
+ interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
322
+ layout: GPUPipelineLayout | GPUAutoLayoutMode;
323
+ }
324
+
308
325
  interface GPUPipelineErrorInit {
309
326
  reason: GPUPipelineErrorReason;
310
327
  }
311
328
 
329
+ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
330
+ bindGroupLayouts: (GPUBindGroupLayout | null)[];
331
+ }
332
+
333
+ interface GPUProgrammableStage {
334
+ constants?: Record<string, GPUPipelineConstantValue>;
335
+ entryPoint?: string;
336
+ module: GPUShaderModule;
337
+ }
338
+
339
+ interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
340
+ count: GPUSize32;
341
+ type: GPUQueryType;
342
+ }
343
+
312
344
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
313
345
  }
314
346
 
347
+ interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
348
+ depthReadOnly?: boolean;
349
+ stencilReadOnly?: boolean;
350
+ }
351
+
315
352
  interface GPURenderPassColorAttachment {
316
353
  clearValue?: GPUColor;
317
354
  depthSlice?: GPUIntegerCoordinate;
@@ -341,12 +378,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
341
378
  timestampWrites?: GPURenderPassTimestampWrites;
342
379
  }
343
380
 
381
+ interface GPURenderPassLayout extends GPUObjectDescriptorBase {
382
+ colorFormats: (GPUTextureFormat | null)[];
383
+ depthStencilFormat?: GPUTextureFormat;
384
+ sampleCount?: GPUSize32;
385
+ }
386
+
344
387
  interface GPURenderPassTimestampWrites {
345
388
  beginningOfPassWriteIndex?: GPUSize32;
346
389
  endOfPassWriteIndex?: GPUSize32;
347
390
  querySet: GPUQuerySet;
348
391
  }
349
392
 
393
+ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
394
+ addressModeU?: GPUAddressMode;
395
+ addressModeV?: GPUAddressMode;
396
+ addressModeW?: GPUAddressMode;
397
+ compare?: GPUCompareFunction;
398
+ lodMaxClamp?: number;
399
+ lodMinClamp?: number;
400
+ magFilter?: GPUFilterMode;
401
+ maxAnisotropy?: number;
402
+ minFilter?: GPUFilterMode;
403
+ mipmapFilter?: GPUMipmapFilterMode;
404
+ }
405
+
406
+ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
407
+ code: string;
408
+ }
409
+
350
410
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
351
411
  buffer: GPUBuffer;
352
412
  }
@@ -364,6 +424,16 @@ interface GPUTexelCopyTextureInfo {
364
424
  texture: GPUTexture;
365
425
  }
366
426
 
427
+ interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
428
+ dimension?: GPUTextureDimension;
429
+ format: GPUTextureFormat;
430
+ mipLevelCount?: GPUIntegerCoordinate;
431
+ sampleCount?: GPUSize32;
432
+ size: GPUExtent3D;
433
+ usage: GPUTextureUsageFlags;
434
+ viewFormats?: GPUTextureFormat[];
435
+ }
436
+
367
437
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
368
438
  arrayLayerCount?: GPUIntegerCoordinate;
369
439
  aspect?: GPUTextureAspect;
@@ -4473,6 +4543,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
4473
4543
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
4474
4544
  */
4475
4545
  createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
4546
+ /**
4547
+ * The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
4548
+ *
4549
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
4550
+ */
4551
+ createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
4552
+ /**
4553
+ * The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
4554
+ *
4555
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
4556
+ */
4557
+ createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
4558
+ /**
4559
+ * The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
4560
+ *
4561
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
4562
+ */
4563
+ createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
4564
+ /**
4565
+ * The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
4566
+ *
4567
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
4568
+ */
4569
+ createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
4570
+ /**
4571
+ * The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
4572
+ *
4573
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
4574
+ */
4575
+ createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
4576
+ /**
4577
+ * The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
4578
+ *
4579
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
4580
+ */
4581
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
4582
+ /**
4583
+ * The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
4584
+ *
4585
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
4586
+ */
4587
+ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
4588
+ /**
4589
+ * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
4590
+ *
4591
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
4592
+ */
4593
+ createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
4594
+ /**
4595
+ * The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
4596
+ *
4597
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
4598
+ */
4599
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
4600
+ /**
4601
+ * The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
4602
+ *
4603
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
4604
+ */
4605
+ createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
4476
4606
  /**
4477
4607
  * The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
4478
4608
  *
@@ -12656,6 +12786,7 @@ type GLuint = number;
12656
12786
  type GLuint64 = number;
12657
12787
  type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
12658
12788
  type GPUBufferDynamicOffset = number;
12789
+ type GPUBufferUsageFlags = number;
12659
12790
  type GPUColor = number[] | GPUColorDict;
12660
12791
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12661
12792
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
@@ -12666,6 +12797,7 @@ type GPUIntegerCoordinateOut = number;
12666
12797
  type GPUMapModeFlags = number;
12667
12798
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12668
12799
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12800
+ type GPUPipelineConstantValue = number;
12669
12801
  type GPUSignedOffset32 = number;
12670
12802
  type GPUSize32 = number;
12671
12803
  type GPUSize32Out = number;
@@ -12717,14 +12849,19 @@ type FileSystemHandleKind = "directory" | "file";
12717
12849
  type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
12718
12850
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12719
12851
  type FontFaceSetLoadStatus = "loaded" | "loading";
12852
+ type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
12853
+ type GPUAutoLayoutMode = "auto";
12720
12854
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12721
12855
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12722
12856
  type GPUCanvasToneMappingMode = "extended" | "standard";
12857
+ type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
12723
12858
  type GPUCompilationMessageType = "error" | "info" | "warning";
12724
12859
  type GPUDeviceLostReason = "destroyed" | "unknown";
12725
12860
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
12861
+ type GPUFilterMode = "linear" | "nearest";
12726
12862
  type GPUIndexFormat = "uint16" | "uint32";
12727
12863
  type GPULoadOp = "clear" | "load";
12864
+ type GPUMipmapFilterMode = "linear" | "nearest";
12728
12865
  type GPUPipelineErrorReason = "internal" | "validation";
12729
12866
  type GPUQueryType = "occlusion" | "timestamp";
12730
12867
  type GPUStoreOp = "discard" | "store";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.216",
3
+ "version": "0.0.218",
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
@@ -232,6 +232,12 @@ interface GPUBufferBinding {
232
232
  size?: GPUSize64;
233
233
  }
234
234
 
235
+ interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
236
+ mappedAtCreation?: boolean;
237
+ size: GPUSize64;
238
+ usage: GPUBufferUsageFlags;
239
+ }
240
+
235
241
  interface GPUCanvasConfiguration {
236
242
  alphaMode?: GPUCanvasAlphaMode;
237
243
  colorSpace?: PredefinedColorSpace;
@@ -256,6 +262,9 @@ interface GPUColorDict {
256
262
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
257
263
  }
258
264
 
265
+ interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
266
+ }
267
+
259
268
  interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
260
269
  timestampWrites?: GPUComputePassTimestampWrites;
261
270
  }
@@ -266,6 +275,10 @@ interface GPUComputePassTimestampWrites {
266
275
  querySet: GPUQuerySet;
267
276
  }
268
277
 
278
+ interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
279
+ compute: GPUProgrammableStage;
280
+ }
281
+
269
282
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
270
283
  colorSpace?: PredefinedColorSpace;
271
284
  premultipliedAlpha?: boolean;
@@ -302,13 +315,37 @@ interface GPUOrigin3DDict {
302
315
  z?: GPUIntegerCoordinate;
303
316
  }
304
317
 
318
+ interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
319
+ layout: GPUPipelineLayout | GPUAutoLayoutMode;
320
+ }
321
+
305
322
  interface GPUPipelineErrorInit {
306
323
  reason: GPUPipelineErrorReason;
307
324
  }
308
325
 
326
+ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
327
+ bindGroupLayouts: (GPUBindGroupLayout | null)[];
328
+ }
329
+
330
+ interface GPUProgrammableStage {
331
+ constants?: Record<string, GPUPipelineConstantValue>;
332
+ entryPoint?: string;
333
+ module: GPUShaderModule;
334
+ }
335
+
336
+ interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
337
+ count: GPUSize32;
338
+ type: GPUQueryType;
339
+ }
340
+
309
341
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
310
342
  }
311
343
 
344
+ interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
345
+ depthReadOnly?: boolean;
346
+ stencilReadOnly?: boolean;
347
+ }
348
+
312
349
  interface GPURenderPassColorAttachment {
313
350
  clearValue?: GPUColor;
314
351
  depthSlice?: GPUIntegerCoordinate;
@@ -338,12 +375,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
338
375
  timestampWrites?: GPURenderPassTimestampWrites;
339
376
  }
340
377
 
378
+ interface GPURenderPassLayout extends GPUObjectDescriptorBase {
379
+ colorFormats: (GPUTextureFormat | null)[];
380
+ depthStencilFormat?: GPUTextureFormat;
381
+ sampleCount?: GPUSize32;
382
+ }
383
+
341
384
  interface GPURenderPassTimestampWrites {
342
385
  beginningOfPassWriteIndex?: GPUSize32;
343
386
  endOfPassWriteIndex?: GPUSize32;
344
387
  querySet: GPUQuerySet;
345
388
  }
346
389
 
390
+ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
391
+ addressModeU?: GPUAddressMode;
392
+ addressModeV?: GPUAddressMode;
393
+ addressModeW?: GPUAddressMode;
394
+ compare?: GPUCompareFunction;
395
+ lodMaxClamp?: number;
396
+ lodMinClamp?: number;
397
+ magFilter?: GPUFilterMode;
398
+ maxAnisotropy?: number;
399
+ minFilter?: GPUFilterMode;
400
+ mipmapFilter?: GPUMipmapFilterMode;
401
+ }
402
+
403
+ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
404
+ code: string;
405
+ }
406
+
347
407
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
348
408
  buffer: GPUBuffer;
349
409
  }
@@ -361,6 +421,16 @@ interface GPUTexelCopyTextureInfo {
361
421
  texture: GPUTexture;
362
422
  }
363
423
 
424
+ interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
425
+ dimension?: GPUTextureDimension;
426
+ format: GPUTextureFormat;
427
+ mipLevelCount?: GPUIntegerCoordinate;
428
+ sampleCount?: GPUSize32;
429
+ size: GPUExtent3D;
430
+ usage: GPUTextureUsageFlags;
431
+ viewFormats?: GPUTextureFormat[];
432
+ }
433
+
364
434
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
365
435
  arrayLayerCount?: GPUIntegerCoordinate;
366
436
  aspect?: GPUTextureAspect;
@@ -4470,6 +4540,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
4470
4540
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
4471
4541
  */
4472
4542
  createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
4543
+ /**
4544
+ * The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
4545
+ *
4546
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
4547
+ */
4548
+ createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
4549
+ /**
4550
+ * The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
4551
+ *
4552
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
4553
+ */
4554
+ createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
4555
+ /**
4556
+ * The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
4557
+ *
4558
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
4559
+ */
4560
+ createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
4561
+ /**
4562
+ * The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
4563
+ *
4564
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
4565
+ */
4566
+ createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
4567
+ /**
4568
+ * The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
4569
+ *
4570
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
4571
+ */
4572
+ createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
4573
+ /**
4574
+ * The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
4575
+ *
4576
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
4577
+ */
4578
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
4579
+ /**
4580
+ * The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
4581
+ *
4582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
4583
+ */
4584
+ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
4585
+ /**
4586
+ * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
4587
+ *
4588
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
4589
+ */
4590
+ createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
4591
+ /**
4592
+ * The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
4593
+ *
4594
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
4595
+ */
4596
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
4597
+ /**
4598
+ * The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
4599
+ *
4600
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
4601
+ */
4602
+ createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
4473
4603
  /**
4474
4604
  * The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
4475
4605
  *
@@ -12653,6 +12783,7 @@ type GLuint = number;
12653
12783
  type GLuint64 = number;
12654
12784
  type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
12655
12785
  type GPUBufferDynamicOffset = number;
12786
+ type GPUBufferUsageFlags = number;
12656
12787
  type GPUColor = number[] | GPUColorDict;
12657
12788
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12658
12789
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
@@ -12663,6 +12794,7 @@ type GPUIntegerCoordinateOut = number;
12663
12794
  type GPUMapModeFlags = number;
12664
12795
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12665
12796
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12797
+ type GPUPipelineConstantValue = number;
12666
12798
  type GPUSignedOffset32 = number;
12667
12799
  type GPUSize32 = number;
12668
12800
  type GPUSize32Out = number;
@@ -12714,14 +12846,19 @@ type FileSystemHandleKind = "directory" | "file";
12714
12846
  type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
12715
12847
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12716
12848
  type FontFaceSetLoadStatus = "loaded" | "loading";
12849
+ type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
12850
+ type GPUAutoLayoutMode = "auto";
12717
12851
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12718
12852
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12719
12853
  type GPUCanvasToneMappingMode = "extended" | "standard";
12854
+ type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
12720
12855
  type GPUCompilationMessageType = "error" | "info" | "warning";
12721
12856
  type GPUDeviceLostReason = "destroyed" | "unknown";
12722
12857
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
12858
+ type GPUFilterMode = "linear" | "nearest";
12723
12859
  type GPUIndexFormat = "uint16" | "uint32";
12724
12860
  type GPULoadOp = "clear" | "load";
12861
+ type GPUMipmapFilterMode = "linear" | "nearest";
12725
12862
  type GPUPipelineErrorReason = "internal" | "validation";
12726
12863
  type GPUQueryType = "occlusion" | "timestamp";
12727
12864
  type GPUStoreOp = "discard" | "store";
package/ts5.6/index.d.ts CHANGED
@@ -232,6 +232,12 @@ interface GPUBufferBinding {
232
232
  size?: GPUSize64;
233
233
  }
234
234
 
235
+ interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
236
+ mappedAtCreation?: boolean;
237
+ size: GPUSize64;
238
+ usage: GPUBufferUsageFlags;
239
+ }
240
+
235
241
  interface GPUCanvasConfiguration {
236
242
  alphaMode?: GPUCanvasAlphaMode;
237
243
  colorSpace?: PredefinedColorSpace;
@@ -256,6 +262,9 @@ interface GPUColorDict {
256
262
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
257
263
  }
258
264
 
265
+ interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
266
+ }
267
+
259
268
  interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
260
269
  timestampWrites?: GPUComputePassTimestampWrites;
261
270
  }
@@ -266,6 +275,10 @@ interface GPUComputePassTimestampWrites {
266
275
  querySet: GPUQuerySet;
267
276
  }
268
277
 
278
+ interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
279
+ compute: GPUProgrammableStage;
280
+ }
281
+
269
282
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
270
283
  colorSpace?: PredefinedColorSpace;
271
284
  premultipliedAlpha?: boolean;
@@ -302,13 +315,37 @@ interface GPUOrigin3DDict {
302
315
  z?: GPUIntegerCoordinate;
303
316
  }
304
317
 
318
+ interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
319
+ layout: GPUPipelineLayout | GPUAutoLayoutMode;
320
+ }
321
+
305
322
  interface GPUPipelineErrorInit {
306
323
  reason: GPUPipelineErrorReason;
307
324
  }
308
325
 
326
+ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
327
+ bindGroupLayouts: (GPUBindGroupLayout | null)[];
328
+ }
329
+
330
+ interface GPUProgrammableStage {
331
+ constants?: Record<string, GPUPipelineConstantValue>;
332
+ entryPoint?: string;
333
+ module: GPUShaderModule;
334
+ }
335
+
336
+ interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
337
+ count: GPUSize32;
338
+ type: GPUQueryType;
339
+ }
340
+
309
341
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
310
342
  }
311
343
 
344
+ interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
345
+ depthReadOnly?: boolean;
346
+ stencilReadOnly?: boolean;
347
+ }
348
+
312
349
  interface GPURenderPassColorAttachment {
313
350
  clearValue?: GPUColor;
314
351
  depthSlice?: GPUIntegerCoordinate;
@@ -338,12 +375,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
338
375
  timestampWrites?: GPURenderPassTimestampWrites;
339
376
  }
340
377
 
378
+ interface GPURenderPassLayout extends GPUObjectDescriptorBase {
379
+ colorFormats: (GPUTextureFormat | null)[];
380
+ depthStencilFormat?: GPUTextureFormat;
381
+ sampleCount?: GPUSize32;
382
+ }
383
+
341
384
  interface GPURenderPassTimestampWrites {
342
385
  beginningOfPassWriteIndex?: GPUSize32;
343
386
  endOfPassWriteIndex?: GPUSize32;
344
387
  querySet: GPUQuerySet;
345
388
  }
346
389
 
390
+ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
391
+ addressModeU?: GPUAddressMode;
392
+ addressModeV?: GPUAddressMode;
393
+ addressModeW?: GPUAddressMode;
394
+ compare?: GPUCompareFunction;
395
+ lodMaxClamp?: number;
396
+ lodMinClamp?: number;
397
+ magFilter?: GPUFilterMode;
398
+ maxAnisotropy?: number;
399
+ minFilter?: GPUFilterMode;
400
+ mipmapFilter?: GPUMipmapFilterMode;
401
+ }
402
+
403
+ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
404
+ code: string;
405
+ }
406
+
347
407
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
348
408
  buffer: GPUBuffer;
349
409
  }
@@ -361,6 +421,16 @@ interface GPUTexelCopyTextureInfo {
361
421
  texture: GPUTexture;
362
422
  }
363
423
 
424
+ interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
425
+ dimension?: GPUTextureDimension;
426
+ format: GPUTextureFormat;
427
+ mipLevelCount?: GPUIntegerCoordinate;
428
+ sampleCount?: GPUSize32;
429
+ size: GPUExtent3D;
430
+ usage: GPUTextureUsageFlags;
431
+ viewFormats?: GPUTextureFormat[];
432
+ }
433
+
364
434
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
365
435
  arrayLayerCount?: GPUIntegerCoordinate;
366
436
  aspect?: GPUTextureAspect;
@@ -4470,6 +4540,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
4470
4540
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
4471
4541
  */
4472
4542
  createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
4543
+ /**
4544
+ * The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
4545
+ *
4546
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
4547
+ */
4548
+ createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
4549
+ /**
4550
+ * The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
4551
+ *
4552
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
4553
+ */
4554
+ createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
4555
+ /**
4556
+ * The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
4557
+ *
4558
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
4559
+ */
4560
+ createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
4561
+ /**
4562
+ * The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
4563
+ *
4564
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
4565
+ */
4566
+ createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
4567
+ /**
4568
+ * The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
4569
+ *
4570
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
4571
+ */
4572
+ createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
4573
+ /**
4574
+ * The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
4575
+ *
4576
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
4577
+ */
4578
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
4579
+ /**
4580
+ * The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
4581
+ *
4582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
4583
+ */
4584
+ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
4585
+ /**
4586
+ * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
4587
+ *
4588
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
4589
+ */
4590
+ createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
4591
+ /**
4592
+ * The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
4593
+ *
4594
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
4595
+ */
4596
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
4597
+ /**
4598
+ * The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
4599
+ *
4600
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
4601
+ */
4602
+ createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
4473
4603
  /**
4474
4604
  * The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
4475
4605
  *
@@ -12653,6 +12783,7 @@ type GLuint = number;
12653
12783
  type GLuint64 = number;
12654
12784
  type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
12655
12785
  type GPUBufferDynamicOffset = number;
12786
+ type GPUBufferUsageFlags = number;
12656
12787
  type GPUColor = number[] | GPUColorDict;
12657
12788
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12658
12789
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
@@ -12663,6 +12794,7 @@ type GPUIntegerCoordinateOut = number;
12663
12794
  type GPUMapModeFlags = number;
12664
12795
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12665
12796
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12797
+ type GPUPipelineConstantValue = number;
12666
12798
  type GPUSignedOffset32 = number;
12667
12799
  type GPUSize32 = number;
12668
12800
  type GPUSize32Out = number;
@@ -12714,14 +12846,19 @@ type FileSystemHandleKind = "directory" | "file";
12714
12846
  type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
12715
12847
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12716
12848
  type FontFaceSetLoadStatus = "loaded" | "loading";
12849
+ type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
12850
+ type GPUAutoLayoutMode = "auto";
12717
12851
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12718
12852
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12719
12853
  type GPUCanvasToneMappingMode = "extended" | "standard";
12854
+ type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
12720
12855
  type GPUCompilationMessageType = "error" | "info" | "warning";
12721
12856
  type GPUDeviceLostReason = "destroyed" | "unknown";
12722
12857
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
12858
+ type GPUFilterMode = "linear" | "nearest";
12723
12859
  type GPUIndexFormat = "uint16" | "uint32";
12724
12860
  type GPULoadOp = "clear" | "load";
12861
+ type GPUMipmapFilterMode = "linear" | "nearest";
12725
12862
  type GPUPipelineErrorReason = "internal" | "validation";
12726
12863
  type GPUQueryType = "occlusion" | "timestamp";
12727
12864
  type GPUStoreOp = "discard" | "store";
package/ts5.9/index.d.ts CHANGED
@@ -232,6 +232,12 @@ interface GPUBufferBinding {
232
232
  size?: GPUSize64;
233
233
  }
234
234
 
235
+ interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
236
+ mappedAtCreation?: boolean;
237
+ size: GPUSize64;
238
+ usage: GPUBufferUsageFlags;
239
+ }
240
+
235
241
  interface GPUCanvasConfiguration {
236
242
  alphaMode?: GPUCanvasAlphaMode;
237
243
  colorSpace?: PredefinedColorSpace;
@@ -256,6 +262,9 @@ interface GPUColorDict {
256
262
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
257
263
  }
258
264
 
265
+ interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
266
+ }
267
+
259
268
  interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
260
269
  timestampWrites?: GPUComputePassTimestampWrites;
261
270
  }
@@ -266,6 +275,10 @@ interface GPUComputePassTimestampWrites {
266
275
  querySet: GPUQuerySet;
267
276
  }
268
277
 
278
+ interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
279
+ compute: GPUProgrammableStage;
280
+ }
281
+
269
282
  interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
270
283
  colorSpace?: PredefinedColorSpace;
271
284
  premultipliedAlpha?: boolean;
@@ -302,13 +315,37 @@ interface GPUOrigin3DDict {
302
315
  z?: GPUIntegerCoordinate;
303
316
  }
304
317
 
318
+ interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
319
+ layout: GPUPipelineLayout | GPUAutoLayoutMode;
320
+ }
321
+
305
322
  interface GPUPipelineErrorInit {
306
323
  reason: GPUPipelineErrorReason;
307
324
  }
308
325
 
326
+ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
327
+ bindGroupLayouts: (GPUBindGroupLayout | null)[];
328
+ }
329
+
330
+ interface GPUProgrammableStage {
331
+ constants?: Record<string, GPUPipelineConstantValue>;
332
+ entryPoint?: string;
333
+ module: GPUShaderModule;
334
+ }
335
+
336
+ interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
337
+ count: GPUSize32;
338
+ type: GPUQueryType;
339
+ }
340
+
309
341
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
310
342
  }
311
343
 
344
+ interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
345
+ depthReadOnly?: boolean;
346
+ stencilReadOnly?: boolean;
347
+ }
348
+
312
349
  interface GPURenderPassColorAttachment {
313
350
  clearValue?: GPUColor;
314
351
  depthSlice?: GPUIntegerCoordinate;
@@ -338,12 +375,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
338
375
  timestampWrites?: GPURenderPassTimestampWrites;
339
376
  }
340
377
 
378
+ interface GPURenderPassLayout extends GPUObjectDescriptorBase {
379
+ colorFormats: (GPUTextureFormat | null)[];
380
+ depthStencilFormat?: GPUTextureFormat;
381
+ sampleCount?: GPUSize32;
382
+ }
383
+
341
384
  interface GPURenderPassTimestampWrites {
342
385
  beginningOfPassWriteIndex?: GPUSize32;
343
386
  endOfPassWriteIndex?: GPUSize32;
344
387
  querySet: GPUQuerySet;
345
388
  }
346
389
 
390
+ interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
391
+ addressModeU?: GPUAddressMode;
392
+ addressModeV?: GPUAddressMode;
393
+ addressModeW?: GPUAddressMode;
394
+ compare?: GPUCompareFunction;
395
+ lodMaxClamp?: number;
396
+ lodMinClamp?: number;
397
+ magFilter?: GPUFilterMode;
398
+ maxAnisotropy?: number;
399
+ minFilter?: GPUFilterMode;
400
+ mipmapFilter?: GPUMipmapFilterMode;
401
+ }
402
+
403
+ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
404
+ code: string;
405
+ }
406
+
347
407
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
348
408
  buffer: GPUBuffer;
349
409
  }
@@ -361,6 +421,16 @@ interface GPUTexelCopyTextureInfo {
361
421
  texture: GPUTexture;
362
422
  }
363
423
 
424
+ interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
425
+ dimension?: GPUTextureDimension;
426
+ format: GPUTextureFormat;
427
+ mipLevelCount?: GPUIntegerCoordinate;
428
+ sampleCount?: GPUSize32;
429
+ size: GPUExtent3D;
430
+ usage: GPUTextureUsageFlags;
431
+ viewFormats?: GPUTextureFormat[];
432
+ }
433
+
364
434
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
365
435
  arrayLayerCount?: GPUIntegerCoordinate;
366
436
  aspect?: GPUTextureAspect;
@@ -4470,6 +4540,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
4470
4540
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
4471
4541
  */
4472
4542
  createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
4543
+ /**
4544
+ * The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
4545
+ *
4546
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
4547
+ */
4548
+ createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
4549
+ /**
4550
+ * The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
4551
+ *
4552
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
4553
+ */
4554
+ createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
4555
+ /**
4556
+ * The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
4557
+ *
4558
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
4559
+ */
4560
+ createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
4561
+ /**
4562
+ * The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
4563
+ *
4564
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
4565
+ */
4566
+ createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
4567
+ /**
4568
+ * The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
4569
+ *
4570
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
4571
+ */
4572
+ createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
4573
+ /**
4574
+ * The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
4575
+ *
4576
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
4577
+ */
4578
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
4579
+ /**
4580
+ * The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
4581
+ *
4582
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
4583
+ */
4584
+ createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
4585
+ /**
4586
+ * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
4587
+ *
4588
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
4589
+ */
4590
+ createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
4591
+ /**
4592
+ * The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
4593
+ *
4594
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
4595
+ */
4596
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
4597
+ /**
4598
+ * The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
4599
+ *
4600
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
4601
+ */
4602
+ createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
4473
4603
  /**
4474
4604
  * The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
4475
4605
  *
@@ -12653,6 +12783,7 @@ type GLuint = number;
12653
12783
  type GLuint64 = number;
12654
12784
  type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
12655
12785
  type GPUBufferDynamicOffset = number;
12786
+ type GPUBufferUsageFlags = number;
12656
12787
  type GPUColor = number[] | GPUColorDict;
12657
12788
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
12658
12789
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
@@ -12663,6 +12794,7 @@ type GPUIntegerCoordinateOut = number;
12663
12794
  type GPUMapModeFlags = number;
12664
12795
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
12665
12796
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
12797
+ type GPUPipelineConstantValue = number;
12666
12798
  type GPUSignedOffset32 = number;
12667
12799
  type GPUSize32 = number;
12668
12800
  type GPUSize32Out = number;
@@ -12714,14 +12846,19 @@ type FileSystemHandleKind = "directory" | "file";
12714
12846
  type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
12715
12847
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
12716
12848
  type FontFaceSetLoadStatus = "loaded" | "loading";
12849
+ type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
12850
+ type GPUAutoLayoutMode = "auto";
12717
12851
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12718
12852
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
12719
12853
  type GPUCanvasToneMappingMode = "extended" | "standard";
12854
+ type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
12720
12855
  type GPUCompilationMessageType = "error" | "info" | "warning";
12721
12856
  type GPUDeviceLostReason = "destroyed" | "unknown";
12722
12857
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
12858
+ type GPUFilterMode = "linear" | "nearest";
12723
12859
  type GPUIndexFormat = "uint16" | "uint32";
12724
12860
  type GPULoadOp = "clear" | "load";
12861
+ type GPUMipmapFilterMode = "linear" | "nearest";
12725
12862
  type GPUPipelineErrorReason = "internal" | "validation";
12726
12863
  type GPUQueryType = "occlusion" | "timestamp";
12727
12864
  type GPUStoreOp = "discard" | "store";