@types/sharedworker 0.0.132 → 0.0.134
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 +1 -1
- package/index.d.ts +1206 -2
- package/iterable.d.ts +36 -0
- package/package.json +1 -1
- package/ts5.5/index.d.ts +1206 -2
- package/ts5.5/iterable.d.ts +36 -0
package/ts5.5/index.d.ts
CHANGED
|
@@ -214,6 +214,368 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
214
214
|
fontfaces?: FontFace[];
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
|
218
|
+
entries: GPUBindGroupEntry[];
|
|
219
|
+
layout: GPUBindGroupLayout;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
interface GPUBindGroupEntry {
|
|
223
|
+
binding: GPUIndex32;
|
|
224
|
+
resource: GPUBindingResource;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
228
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface GPUBindGroupLayoutEntry {
|
|
232
|
+
binding: GPUIndex32;
|
|
233
|
+
buffer?: GPUBufferBindingLayout;
|
|
234
|
+
externalTexture?: GPUExternalTextureBindingLayout;
|
|
235
|
+
sampler?: GPUSamplerBindingLayout;
|
|
236
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
237
|
+
texture?: GPUTextureBindingLayout;
|
|
238
|
+
visibility: GPUShaderStageFlags;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
interface GPUBlendComponent {
|
|
242
|
+
dstFactor?: GPUBlendFactor;
|
|
243
|
+
operation?: GPUBlendOperation;
|
|
244
|
+
srcFactor?: GPUBlendFactor;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface GPUBlendState {
|
|
248
|
+
alpha: GPUBlendComponent;
|
|
249
|
+
color: GPUBlendComponent;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
interface GPUBufferBinding {
|
|
253
|
+
buffer: GPUBuffer;
|
|
254
|
+
offset?: GPUSize64;
|
|
255
|
+
size?: GPUSize64;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
interface GPUBufferBindingLayout {
|
|
259
|
+
hasDynamicOffset?: boolean;
|
|
260
|
+
minBindingSize?: GPUSize64;
|
|
261
|
+
type?: GPUBufferBindingType;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
|
265
|
+
mappedAtCreation?: boolean;
|
|
266
|
+
size: GPUSize64;
|
|
267
|
+
usage: GPUBufferUsageFlags;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
interface GPUCanvasConfiguration {
|
|
271
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
272
|
+
colorSpace?: PredefinedColorSpace;
|
|
273
|
+
device: GPUDevice;
|
|
274
|
+
format: GPUTextureFormat;
|
|
275
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
276
|
+
usage?: GPUTextureUsageFlags;
|
|
277
|
+
viewFormats?: GPUTextureFormat[];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface GPUCanvasToneMapping {
|
|
281
|
+
mode?: GPUCanvasToneMappingMode;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
interface GPUColorDict {
|
|
285
|
+
a: number;
|
|
286
|
+
b: number;
|
|
287
|
+
g: number;
|
|
288
|
+
r: number;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
interface GPUColorTargetState {
|
|
292
|
+
blend?: GPUBlendState;
|
|
293
|
+
format: GPUTextureFormat;
|
|
294
|
+
writeMask?: GPUColorWriteFlags;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
304
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
interface GPUComputePassTimestampWrites {
|
|
308
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
309
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
310
|
+
querySet: GPUQuerySet;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
314
|
+
compute: GPUProgrammableStage;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
318
|
+
colorSpace?: PredefinedColorSpace;
|
|
319
|
+
premultipliedAlpha?: boolean;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
interface GPUCopyExternalImageSourceInfo {
|
|
323
|
+
flipY?: boolean;
|
|
324
|
+
origin?: GPUOrigin2D;
|
|
325
|
+
source: GPUCopyExternalImageSource;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface GPUDepthStencilState {
|
|
329
|
+
depthBias?: GPUDepthBias;
|
|
330
|
+
depthBiasClamp?: number;
|
|
331
|
+
depthBiasSlopeScale?: number;
|
|
332
|
+
depthCompare?: GPUCompareFunction;
|
|
333
|
+
depthWriteEnabled?: boolean;
|
|
334
|
+
format: GPUTextureFormat;
|
|
335
|
+
stencilBack?: GPUStencilFaceState;
|
|
336
|
+
stencilFront?: GPUStencilFaceState;
|
|
337
|
+
stencilReadMask?: GPUStencilValue;
|
|
338
|
+
stencilWriteMask?: GPUStencilValue;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
interface GPUDeviceDescriptor extends GPUObjectDescriptorBase {
|
|
342
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
343
|
+
requiredFeatures?: GPUFeatureName[];
|
|
344
|
+
requiredLimits?: Record<string, GPUSize64 | undefined>;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface GPUExtent3DDict {
|
|
348
|
+
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
349
|
+
height?: GPUIntegerCoordinate;
|
|
350
|
+
width: GPUIntegerCoordinate;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
interface GPUExternalTextureBindingLayout {
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
357
|
+
colorSpace?: PredefinedColorSpace;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
interface GPUFragmentState extends GPUProgrammableStage {
|
|
361
|
+
targets: (GPUColorTargetState | null)[];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
interface GPUMultisampleState {
|
|
365
|
+
alphaToCoverageEnabled?: boolean;
|
|
366
|
+
count?: GPUSize32;
|
|
367
|
+
mask?: GPUSampleMask;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
interface GPUObjectDescriptorBase {
|
|
371
|
+
label?: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
interface GPUOrigin2DDict {
|
|
375
|
+
x?: GPUIntegerCoordinate;
|
|
376
|
+
y?: GPUIntegerCoordinate;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
interface GPUOrigin3DDict {
|
|
380
|
+
x?: GPUIntegerCoordinate;
|
|
381
|
+
y?: GPUIntegerCoordinate;
|
|
382
|
+
z?: GPUIntegerCoordinate;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
|
386
|
+
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface GPUPipelineErrorInit {
|
|
390
|
+
reason: GPUPipelineErrorReason;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
394
|
+
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
interface GPUPrimitiveState {
|
|
398
|
+
cullMode?: GPUCullMode;
|
|
399
|
+
frontFace?: GPUFrontFace;
|
|
400
|
+
stripIndexFormat?: GPUIndexFormat;
|
|
401
|
+
topology?: GPUPrimitiveTopology;
|
|
402
|
+
unclippedDepth?: boolean;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
interface GPUProgrammableStage {
|
|
406
|
+
constants?: Record<string, GPUPipelineConstantValue>;
|
|
407
|
+
entryPoint?: string;
|
|
408
|
+
module: GPUShaderModule;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
|
412
|
+
count: GPUSize32;
|
|
413
|
+
type: GPUQueryType;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
interface GPUQueueDescriptor extends GPUObjectDescriptorBase {
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
|
423
|
+
depthReadOnly?: boolean;
|
|
424
|
+
stencilReadOnly?: boolean;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
interface GPURenderPassColorAttachment {
|
|
428
|
+
clearValue?: GPUColor;
|
|
429
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
430
|
+
loadOp: GPULoadOp;
|
|
431
|
+
resolveTarget?: GPUTextureView;
|
|
432
|
+
storeOp: GPUStoreOp;
|
|
433
|
+
view: GPUTextureView;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
437
|
+
depthClearValue?: number;
|
|
438
|
+
depthLoadOp?: GPULoadOp;
|
|
439
|
+
depthReadOnly?: boolean;
|
|
440
|
+
depthStoreOp?: GPUStoreOp;
|
|
441
|
+
stencilClearValue?: GPUStencilValue;
|
|
442
|
+
stencilLoadOp?: GPULoadOp;
|
|
443
|
+
stencilReadOnly?: boolean;
|
|
444
|
+
stencilStoreOp?: GPUStoreOp;
|
|
445
|
+
view: GPUTextureView;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
449
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
450
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
451
|
+
maxDrawCount?: GPUSize64;
|
|
452
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
453
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
|
457
|
+
colorFormats: (GPUTextureFormat | null)[];
|
|
458
|
+
depthStencilFormat?: GPUTextureFormat;
|
|
459
|
+
sampleCount?: GPUSize32;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
interface GPURenderPassTimestampWrites {
|
|
463
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
464
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
465
|
+
querySet: GPUQuerySet;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
469
|
+
depthStencil?: GPUDepthStencilState;
|
|
470
|
+
fragment?: GPUFragmentState;
|
|
471
|
+
multisample?: GPUMultisampleState;
|
|
472
|
+
primitive?: GPUPrimitiveState;
|
|
473
|
+
vertex: GPUVertexState;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
interface GPURequestAdapterOptions {
|
|
477
|
+
forceFallbackAdapter?: boolean;
|
|
478
|
+
powerPreference?: GPUPowerPreference;
|
|
479
|
+
xrCompatible?: boolean;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
interface GPUSamplerBindingLayout {
|
|
483
|
+
type?: GPUSamplerBindingType;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
487
|
+
addressModeU?: GPUAddressMode;
|
|
488
|
+
addressModeV?: GPUAddressMode;
|
|
489
|
+
addressModeW?: GPUAddressMode;
|
|
490
|
+
compare?: GPUCompareFunction;
|
|
491
|
+
lodMaxClamp?: number;
|
|
492
|
+
lodMinClamp?: number;
|
|
493
|
+
magFilter?: GPUFilterMode;
|
|
494
|
+
maxAnisotropy?: number;
|
|
495
|
+
minFilter?: GPUFilterMode;
|
|
496
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
500
|
+
code: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
interface GPUStencilFaceState {
|
|
504
|
+
compare?: GPUCompareFunction;
|
|
505
|
+
depthFailOp?: GPUStencilOperation;
|
|
506
|
+
failOp?: GPUStencilOperation;
|
|
507
|
+
passOp?: GPUStencilOperation;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
interface GPUStorageTextureBindingLayout {
|
|
511
|
+
access?: GPUStorageTextureAccess;
|
|
512
|
+
format: GPUTextureFormat;
|
|
513
|
+
viewDimension?: GPUTextureViewDimension;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
517
|
+
buffer: GPUBuffer;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
interface GPUTexelCopyBufferLayout {
|
|
521
|
+
bytesPerRow?: GPUSize32;
|
|
522
|
+
offset?: GPUSize64;
|
|
523
|
+
rowsPerImage?: GPUSize32;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
interface GPUTexelCopyTextureInfo {
|
|
527
|
+
aspect?: GPUTextureAspect;
|
|
528
|
+
mipLevel?: GPUIntegerCoordinate;
|
|
529
|
+
origin?: GPUOrigin3D;
|
|
530
|
+
texture: GPUTexture;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
interface GPUTextureBindingLayout {
|
|
534
|
+
multisampled?: boolean;
|
|
535
|
+
sampleType?: GPUTextureSampleType;
|
|
536
|
+
viewDimension?: GPUTextureViewDimension;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
540
|
+
dimension?: GPUTextureDimension;
|
|
541
|
+
format: GPUTextureFormat;
|
|
542
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
543
|
+
sampleCount?: GPUSize32;
|
|
544
|
+
size: GPUExtent3D;
|
|
545
|
+
usage: GPUTextureUsageFlags;
|
|
546
|
+
viewFormats?: GPUTextureFormat[];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
550
|
+
arrayLayerCount?: GPUIntegerCoordinate;
|
|
551
|
+
aspect?: GPUTextureAspect;
|
|
552
|
+
baseArrayLayer?: GPUIntegerCoordinate;
|
|
553
|
+
baseMipLevel?: GPUIntegerCoordinate;
|
|
554
|
+
dimension?: GPUTextureViewDimension;
|
|
555
|
+
format?: GPUTextureFormat;
|
|
556
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
interface GPUUncapturedErrorEventInit extends EventInit {
|
|
560
|
+
error: GPUError;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
interface GPUVertexAttribute {
|
|
564
|
+
format: GPUVertexFormat;
|
|
565
|
+
offset: GPUSize64;
|
|
566
|
+
shaderLocation: GPUIndex32;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
interface GPUVertexBufferLayout {
|
|
570
|
+
arrayStride: GPUSize64;
|
|
571
|
+
attributes: GPUVertexAttribute[];
|
|
572
|
+
stepMode?: GPUVertexStepMode;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
interface GPUVertexState extends GPUProgrammableStage {
|
|
576
|
+
buffers?: (GPUVertexBufferLayout | null)[];
|
|
577
|
+
}
|
|
578
|
+
|
|
217
579
|
interface GetNotificationOptions {
|
|
218
580
|
tag?: string;
|
|
219
581
|
}
|
|
@@ -1932,9 +2294,13 @@ declare var DOMPointReadOnly: {
|
|
|
1932
2294
|
|
|
1933
2295
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */
|
|
1934
2296
|
interface DOMQuad {
|
|
2297
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */
|
|
1935
2298
|
readonly p1: DOMPoint;
|
|
2299
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p2) */
|
|
1936
2300
|
readonly p2: DOMPoint;
|
|
2301
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p3) */
|
|
1937
2302
|
readonly p3: DOMPoint;
|
|
2303
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p4) */
|
|
1938
2304
|
readonly p4: DOMPoint;
|
|
1939
2305
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/getBounds) */
|
|
1940
2306
|
getBounds(): DOMRect;
|
|
@@ -1951,9 +2317,13 @@ declare var DOMQuad: {
|
|
|
1951
2317
|
|
|
1952
2318
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */
|
|
1953
2319
|
interface DOMRect extends DOMRectReadOnly {
|
|
2320
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/height) */
|
|
1954
2321
|
height: number;
|
|
2322
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/width) */
|
|
1955
2323
|
width: number;
|
|
2324
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/x) */
|
|
1956
2325
|
x: number;
|
|
2326
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect/y) */
|
|
1957
2327
|
y: number;
|
|
1958
2328
|
}
|
|
1959
2329
|
|
|
@@ -1982,6 +2352,7 @@ interface DOMRectReadOnly {
|
|
|
1982
2352
|
readonly x: number;
|
|
1983
2353
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/y) */
|
|
1984
2354
|
readonly y: number;
|
|
2355
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/toJSON) */
|
|
1985
2356
|
toJSON(): any;
|
|
1986
2357
|
}
|
|
1987
2358
|
|
|
@@ -2694,6 +3065,757 @@ declare var FormData: {
|
|
|
2694
3065
|
new(): FormData;
|
|
2695
3066
|
};
|
|
2696
3067
|
|
|
3068
|
+
/**
|
|
3069
|
+
* Available only in secure contexts.
|
|
3070
|
+
*
|
|
3071
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU)
|
|
3072
|
+
*/
|
|
3073
|
+
interface GPU {
|
|
3074
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */
|
|
3075
|
+
readonly wgslLanguageFeatures: WGSLLanguageFeatures;
|
|
3076
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */
|
|
3077
|
+
getPreferredCanvasFormat(): GPUTextureFormat;
|
|
3078
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */
|
|
3079
|
+
requestAdapter(options?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
|
|
3080
|
+
}
|
|
3081
|
+
|
|
3082
|
+
declare var GPU: {
|
|
3083
|
+
prototype: GPU;
|
|
3084
|
+
new(): GPU;
|
|
3085
|
+
};
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* Available only in secure contexts.
|
|
3089
|
+
*
|
|
3090
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter)
|
|
3091
|
+
*/
|
|
3092
|
+
interface GPUAdapter {
|
|
3093
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */
|
|
3094
|
+
readonly features: GPUSupportedFeatures;
|
|
3095
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */
|
|
3096
|
+
readonly info: GPUAdapterInfo;
|
|
3097
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */
|
|
3098
|
+
readonly isFallbackAdapter: boolean;
|
|
3099
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */
|
|
3100
|
+
readonly limits: GPUSupportedLimits;
|
|
3101
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */
|
|
3102
|
+
requestDevice(descriptor?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
declare var GPUAdapter: {
|
|
3106
|
+
prototype: GPUAdapter;
|
|
3107
|
+
new(): GPUAdapter;
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
/**
|
|
3111
|
+
* Available only in secure contexts.
|
|
3112
|
+
*
|
|
3113
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo)
|
|
3114
|
+
*/
|
|
3115
|
+
interface GPUAdapterInfo {
|
|
3116
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */
|
|
3117
|
+
readonly architecture: string;
|
|
3118
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */
|
|
3119
|
+
readonly description: string;
|
|
3120
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */
|
|
3121
|
+
readonly device: string;
|
|
3122
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */
|
|
3123
|
+
readonly vendor: string;
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
declare var GPUAdapterInfo: {
|
|
3127
|
+
prototype: GPUAdapterInfo;
|
|
3128
|
+
new(): GPUAdapterInfo;
|
|
3129
|
+
};
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Available only in secure contexts.
|
|
3133
|
+
*
|
|
3134
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup)
|
|
3135
|
+
*/
|
|
3136
|
+
interface GPUBindGroup extends GPUObjectBase {
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3139
|
+
declare var GPUBindGroup: {
|
|
3140
|
+
prototype: GPUBindGroup;
|
|
3141
|
+
new(): GPUBindGroup;
|
|
3142
|
+
};
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* Available only in secure contexts.
|
|
3146
|
+
*
|
|
3147
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout)
|
|
3148
|
+
*/
|
|
3149
|
+
interface GPUBindGroupLayout extends GPUObjectBase {
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
declare var GPUBindGroupLayout: {
|
|
3153
|
+
prototype: GPUBindGroupLayout;
|
|
3154
|
+
new(): GPUBindGroupLayout;
|
|
3155
|
+
};
|
|
3156
|
+
|
|
3157
|
+
interface GPUBindingCommandsMixin {
|
|
3158
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */
|
|
3159
|
+
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void;
|
|
3160
|
+
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void;
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
/**
|
|
3164
|
+
* Available only in secure contexts.
|
|
3165
|
+
*
|
|
3166
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer)
|
|
3167
|
+
*/
|
|
3168
|
+
interface GPUBuffer extends GPUObjectBase {
|
|
3169
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */
|
|
3170
|
+
readonly mapState: GPUBufferMapState;
|
|
3171
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */
|
|
3172
|
+
readonly size: GPUSize64Out;
|
|
3173
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */
|
|
3174
|
+
readonly usage: GPUFlagsConstant;
|
|
3175
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */
|
|
3176
|
+
destroy(): void;
|
|
3177
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */
|
|
3178
|
+
getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer;
|
|
3179
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */
|
|
3180
|
+
mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise<void>;
|
|
3181
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */
|
|
3182
|
+
unmap(): void;
|
|
3183
|
+
}
|
|
3184
|
+
|
|
3185
|
+
declare var GPUBuffer: {
|
|
3186
|
+
prototype: GPUBuffer;
|
|
3187
|
+
new(): GPUBuffer;
|
|
3188
|
+
};
|
|
3189
|
+
|
|
3190
|
+
/**
|
|
3191
|
+
* Available only in secure contexts.
|
|
3192
|
+
*
|
|
3193
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
3194
|
+
*/
|
|
3195
|
+
interface GPUCanvasContext {
|
|
3196
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */
|
|
3197
|
+
readonly canvas: OffscreenCanvas;
|
|
3198
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */
|
|
3199
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
3200
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */
|
|
3201
|
+
getCurrentTexture(): GPUTexture;
|
|
3202
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */
|
|
3203
|
+
unconfigure(): void;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
declare var GPUCanvasContext: {
|
|
3207
|
+
prototype: GPUCanvasContext;
|
|
3208
|
+
new(): GPUCanvasContext;
|
|
3209
|
+
};
|
|
3210
|
+
|
|
3211
|
+
/**
|
|
3212
|
+
* Available only in secure contexts.
|
|
3213
|
+
*
|
|
3214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer)
|
|
3215
|
+
*/
|
|
3216
|
+
interface GPUCommandBuffer extends GPUObjectBase {
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
declare var GPUCommandBuffer: {
|
|
3220
|
+
prototype: GPUCommandBuffer;
|
|
3221
|
+
new(): GPUCommandBuffer;
|
|
3222
|
+
};
|
|
3223
|
+
|
|
3224
|
+
/**
|
|
3225
|
+
* Available only in secure contexts.
|
|
3226
|
+
*
|
|
3227
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
3228
|
+
*/
|
|
3229
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
3230
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */
|
|
3231
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
3232
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */
|
|
3233
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
3234
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */
|
|
3235
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
3236
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */
|
|
3237
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void;
|
|
3238
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */
|
|
3239
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
3240
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */
|
|
3241
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
3242
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */
|
|
3243
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
3244
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */
|
|
3245
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
3246
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */
|
|
3247
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
declare var GPUCommandEncoder: {
|
|
3251
|
+
prototype: GPUCommandEncoder;
|
|
3252
|
+
new(): GPUCommandEncoder;
|
|
3253
|
+
};
|
|
3254
|
+
|
|
3255
|
+
/**
|
|
3256
|
+
* Available only in secure contexts.
|
|
3257
|
+
*
|
|
3258
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo)
|
|
3259
|
+
*/
|
|
3260
|
+
interface GPUCompilationInfo {
|
|
3261
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */
|
|
3262
|
+
readonly messages: ReadonlyArray<GPUCompilationMessage>;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
declare var GPUCompilationInfo: {
|
|
3266
|
+
prototype: GPUCompilationInfo;
|
|
3267
|
+
new(): GPUCompilationInfo;
|
|
3268
|
+
};
|
|
3269
|
+
|
|
3270
|
+
/**
|
|
3271
|
+
* Available only in secure contexts.
|
|
3272
|
+
*
|
|
3273
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)
|
|
3274
|
+
*/
|
|
3275
|
+
interface GPUCompilationMessage {
|
|
3276
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */
|
|
3277
|
+
readonly length: number;
|
|
3278
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */
|
|
3279
|
+
readonly lineNum: number;
|
|
3280
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */
|
|
3281
|
+
readonly linePos: number;
|
|
3282
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */
|
|
3283
|
+
readonly message: string;
|
|
3284
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */
|
|
3285
|
+
readonly offset: number;
|
|
3286
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */
|
|
3287
|
+
readonly type: GPUCompilationMessageType;
|
|
3288
|
+
}
|
|
3289
|
+
|
|
3290
|
+
declare var GPUCompilationMessage: {
|
|
3291
|
+
prototype: GPUCompilationMessage;
|
|
3292
|
+
new(): GPUCompilationMessage;
|
|
3293
|
+
};
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* Available only in secure contexts.
|
|
3297
|
+
*
|
|
3298
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder)
|
|
3299
|
+
*/
|
|
3300
|
+
interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase {
|
|
3301
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */
|
|
3302
|
+
dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void;
|
|
3303
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */
|
|
3304
|
+
dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
|
|
3305
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */
|
|
3306
|
+
end(): void;
|
|
3307
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */
|
|
3308
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
3309
|
+
}
|
|
3310
|
+
|
|
3311
|
+
declare var GPUComputePassEncoder: {
|
|
3312
|
+
prototype: GPUComputePassEncoder;
|
|
3313
|
+
new(): GPUComputePassEncoder;
|
|
3314
|
+
};
|
|
3315
|
+
|
|
3316
|
+
/**
|
|
3317
|
+
* Available only in secure contexts.
|
|
3318
|
+
*
|
|
3319
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline)
|
|
3320
|
+
*/
|
|
3321
|
+
interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase {
|
|
3322
|
+
}
|
|
3323
|
+
|
|
3324
|
+
declare var GPUComputePipeline: {
|
|
3325
|
+
prototype: GPUComputePipeline;
|
|
3326
|
+
new(): GPUComputePipeline;
|
|
3327
|
+
};
|
|
3328
|
+
|
|
3329
|
+
interface GPUDebugCommandsMixin {
|
|
3330
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */
|
|
3331
|
+
insertDebugMarker(markerLabel: string): void;
|
|
3332
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */
|
|
3333
|
+
popDebugGroup(): void;
|
|
3334
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */
|
|
3335
|
+
pushDebugGroup(groupLabel: string): void;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
/**
|
|
3339
|
+
* Available only in secure contexts.
|
|
3340
|
+
*
|
|
3341
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
3342
|
+
*/
|
|
3343
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
3344
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */
|
|
3345
|
+
readonly features: GPUSupportedFeatures;
|
|
3346
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */
|
|
3347
|
+
readonly limits: GPUSupportedLimits;
|
|
3348
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */
|
|
3349
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
3350
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */
|
|
3351
|
+
readonly queue: GPUQueue;
|
|
3352
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */
|
|
3353
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
3354
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */
|
|
3355
|
+
createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout;
|
|
3356
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */
|
|
3357
|
+
createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
|
|
3358
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */
|
|
3359
|
+
createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
|
|
3360
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */
|
|
3361
|
+
createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
|
|
3362
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */
|
|
3363
|
+
createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
3364
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */
|
|
3365
|
+
createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
|
|
3366
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */
|
|
3367
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
3368
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */
|
|
3369
|
+
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
3370
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */
|
|
3371
|
+
createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
|
|
3372
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */
|
|
3373
|
+
createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
3374
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */
|
|
3375
|
+
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
3376
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */
|
|
3377
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
3378
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */
|
|
3379
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
3380
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */
|
|
3381
|
+
destroy(): void;
|
|
3382
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */
|
|
3383
|
+
importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
|
|
3384
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */
|
|
3385
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
3386
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */
|
|
3387
|
+
pushErrorScope(filter: GPUErrorFilter): void;
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
declare var GPUDevice: {
|
|
3391
|
+
prototype: GPUDevice;
|
|
3392
|
+
new(): GPUDevice;
|
|
3393
|
+
};
|
|
3394
|
+
|
|
3395
|
+
/**
|
|
3396
|
+
* Available only in secure contexts.
|
|
3397
|
+
*
|
|
3398
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo)
|
|
3399
|
+
*/
|
|
3400
|
+
interface GPUDeviceLostInfo {
|
|
3401
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */
|
|
3402
|
+
readonly message: string;
|
|
3403
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */
|
|
3404
|
+
readonly reason: GPUDeviceLostReason;
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3407
|
+
declare var GPUDeviceLostInfo: {
|
|
3408
|
+
prototype: GPUDeviceLostInfo;
|
|
3409
|
+
new(): GPUDeviceLostInfo;
|
|
3410
|
+
};
|
|
3411
|
+
|
|
3412
|
+
/**
|
|
3413
|
+
* Available only in secure contexts.
|
|
3414
|
+
*
|
|
3415
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError)
|
|
3416
|
+
*/
|
|
3417
|
+
interface GPUError {
|
|
3418
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */
|
|
3419
|
+
readonly message: string;
|
|
3420
|
+
}
|
|
3421
|
+
|
|
3422
|
+
/**
|
|
3423
|
+
* Available only in secure contexts.
|
|
3424
|
+
*
|
|
3425
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture)
|
|
3426
|
+
*/
|
|
3427
|
+
interface GPUExternalTexture extends GPUObjectBase {
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
declare var GPUExternalTexture: {
|
|
3431
|
+
prototype: GPUExternalTexture;
|
|
3432
|
+
new(): GPUExternalTexture;
|
|
3433
|
+
};
|
|
3434
|
+
|
|
3435
|
+
/**
|
|
3436
|
+
* Available only in secure contexts.
|
|
3437
|
+
*
|
|
3438
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError)
|
|
3439
|
+
*/
|
|
3440
|
+
interface GPUInternalError extends GPUError {
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
declare var GPUInternalError: {
|
|
3444
|
+
prototype: GPUInternalError;
|
|
3445
|
+
new(message: string): GPUInternalError;
|
|
3446
|
+
};
|
|
3447
|
+
|
|
3448
|
+
interface GPUObjectBase {
|
|
3449
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */
|
|
3450
|
+
label: string;
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Available only in secure contexts.
|
|
3455
|
+
*
|
|
3456
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError)
|
|
3457
|
+
*/
|
|
3458
|
+
interface GPUOutOfMemoryError extends GPUError {
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
declare var GPUOutOfMemoryError: {
|
|
3462
|
+
prototype: GPUOutOfMemoryError;
|
|
3463
|
+
new(message: string): GPUOutOfMemoryError;
|
|
3464
|
+
};
|
|
3465
|
+
|
|
3466
|
+
interface GPUPipelineBase {
|
|
3467
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */
|
|
3468
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* Available only in secure contexts.
|
|
3473
|
+
*
|
|
3474
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError)
|
|
3475
|
+
*/
|
|
3476
|
+
interface GPUPipelineError extends DOMException {
|
|
3477
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */
|
|
3478
|
+
readonly reason: GPUPipelineErrorReason;
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
declare var GPUPipelineError: {
|
|
3482
|
+
prototype: GPUPipelineError;
|
|
3483
|
+
new(message: string, options: GPUPipelineErrorInit): GPUPipelineError;
|
|
3484
|
+
};
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* Available only in secure contexts.
|
|
3488
|
+
*
|
|
3489
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout)
|
|
3490
|
+
*/
|
|
3491
|
+
interface GPUPipelineLayout extends GPUObjectBase {
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
declare var GPUPipelineLayout: {
|
|
3495
|
+
prototype: GPUPipelineLayout;
|
|
3496
|
+
new(): GPUPipelineLayout;
|
|
3497
|
+
};
|
|
3498
|
+
|
|
3499
|
+
/**
|
|
3500
|
+
* Available only in secure contexts.
|
|
3501
|
+
*
|
|
3502
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet)
|
|
3503
|
+
*/
|
|
3504
|
+
interface GPUQuerySet extends GPUObjectBase {
|
|
3505
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */
|
|
3506
|
+
readonly count: GPUSize32Out;
|
|
3507
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */
|
|
3508
|
+
readonly type: GPUQueryType;
|
|
3509
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */
|
|
3510
|
+
destroy(): void;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
declare var GPUQuerySet: {
|
|
3514
|
+
prototype: GPUQuerySet;
|
|
3515
|
+
new(): GPUQuerySet;
|
|
3516
|
+
};
|
|
3517
|
+
|
|
3518
|
+
/**
|
|
3519
|
+
* Available only in secure contexts.
|
|
3520
|
+
*
|
|
3521
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
|
|
3522
|
+
*/
|
|
3523
|
+
interface GPUQueue extends GPUObjectBase {
|
|
3524
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */
|
|
3525
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
|
|
3526
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */
|
|
3527
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
3528
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */
|
|
3529
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
3530
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */
|
|
3531
|
+
writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
|
|
3532
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */
|
|
3533
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
declare var GPUQueue: {
|
|
3537
|
+
prototype: GPUQueue;
|
|
3538
|
+
new(): GPUQueue;
|
|
3539
|
+
};
|
|
3540
|
+
|
|
3541
|
+
/**
|
|
3542
|
+
* Available only in secure contexts.
|
|
3543
|
+
*
|
|
3544
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle)
|
|
3545
|
+
*/
|
|
3546
|
+
interface GPURenderBundle extends GPUObjectBase {
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
declare var GPURenderBundle: {
|
|
3550
|
+
prototype: GPURenderBundle;
|
|
3551
|
+
new(): GPURenderBundle;
|
|
3552
|
+
};
|
|
3553
|
+
|
|
3554
|
+
/**
|
|
3555
|
+
* Available only in secure contexts.
|
|
3556
|
+
*
|
|
3557
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
|
|
3558
|
+
*/
|
|
3559
|
+
interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
|
|
3560
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */
|
|
3561
|
+
finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
|
|
3562
|
+
}
|
|
3563
|
+
|
|
3564
|
+
declare var GPURenderBundleEncoder: {
|
|
3565
|
+
prototype: GPURenderBundleEncoder;
|
|
3566
|
+
new(): GPURenderBundleEncoder;
|
|
3567
|
+
};
|
|
3568
|
+
|
|
3569
|
+
interface GPURenderCommandsMixin {
|
|
3570
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
|
|
3571
|
+
draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
|
|
3572
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
|
|
3573
|
+
drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
|
|
3574
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
|
|
3575
|
+
drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
|
|
3576
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
|
|
3577
|
+
drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
|
|
3578
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
|
|
3579
|
+
setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
|
|
3580
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
|
|
3581
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
3582
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
|
|
3583
|
+
setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
/**
|
|
3587
|
+
* Available only in secure contexts.
|
|
3588
|
+
*
|
|
3589
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
|
|
3590
|
+
*/
|
|
3591
|
+
interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
|
|
3592
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */
|
|
3593
|
+
beginOcclusionQuery(queryIndex: GPUSize32): void;
|
|
3594
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */
|
|
3595
|
+
end(): void;
|
|
3596
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */
|
|
3597
|
+
endOcclusionQuery(): void;
|
|
3598
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */
|
|
3599
|
+
executeBundles(bundles: GPURenderBundle[]): void;
|
|
3600
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */
|
|
3601
|
+
setBlendConstant(color: GPUColor): void;
|
|
3602
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */
|
|
3603
|
+
setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
|
|
3604
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */
|
|
3605
|
+
setStencilReference(reference: GPUStencilValue): void;
|
|
3606
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */
|
|
3607
|
+
setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
|
|
3608
|
+
}
|
|
3609
|
+
|
|
3610
|
+
declare var GPURenderPassEncoder: {
|
|
3611
|
+
prototype: GPURenderPassEncoder;
|
|
3612
|
+
new(): GPURenderPassEncoder;
|
|
3613
|
+
};
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* Available only in secure contexts.
|
|
3617
|
+
*
|
|
3618
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline)
|
|
3619
|
+
*/
|
|
3620
|
+
interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase {
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
declare var GPURenderPipeline: {
|
|
3624
|
+
prototype: GPURenderPipeline;
|
|
3625
|
+
new(): GPURenderPipeline;
|
|
3626
|
+
};
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* Available only in secure contexts.
|
|
3630
|
+
*
|
|
3631
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler)
|
|
3632
|
+
*/
|
|
3633
|
+
interface GPUSampler extends GPUObjectBase {
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
declare var GPUSampler: {
|
|
3637
|
+
prototype: GPUSampler;
|
|
3638
|
+
new(): GPUSampler;
|
|
3639
|
+
};
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Available only in secure contexts.
|
|
3643
|
+
*
|
|
3644
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule)
|
|
3645
|
+
*/
|
|
3646
|
+
interface GPUShaderModule extends GPUObjectBase {
|
|
3647
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */
|
|
3648
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3651
|
+
declare var GPUShaderModule: {
|
|
3652
|
+
prototype: GPUShaderModule;
|
|
3653
|
+
new(): GPUShaderModule;
|
|
3654
|
+
};
|
|
3655
|
+
|
|
3656
|
+
/**
|
|
3657
|
+
* Available only in secure contexts.
|
|
3658
|
+
*
|
|
3659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures)
|
|
3660
|
+
*/
|
|
3661
|
+
interface GPUSupportedFeatures {
|
|
3662
|
+
forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
declare var GPUSupportedFeatures: {
|
|
3666
|
+
prototype: GPUSupportedFeatures;
|
|
3667
|
+
new(): GPUSupportedFeatures;
|
|
3668
|
+
};
|
|
3669
|
+
|
|
3670
|
+
/**
|
|
3671
|
+
* Available only in secure contexts.
|
|
3672
|
+
*
|
|
3673
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits)
|
|
3674
|
+
*/
|
|
3675
|
+
interface GPUSupportedLimits {
|
|
3676
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3677
|
+
readonly maxBindGroups: number;
|
|
3678
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3679
|
+
readonly maxBindGroupsPlusVertexBuffers: number;
|
|
3680
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3681
|
+
readonly maxBindingsPerBindGroup: number;
|
|
3682
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3683
|
+
readonly maxBufferSize: number;
|
|
3684
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3685
|
+
readonly maxColorAttachmentBytesPerSample: number;
|
|
3686
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3687
|
+
readonly maxColorAttachments: number;
|
|
3688
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3689
|
+
readonly maxComputeInvocationsPerWorkgroup: number;
|
|
3690
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3691
|
+
readonly maxComputeWorkgroupSizeX: number;
|
|
3692
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3693
|
+
readonly maxComputeWorkgroupSizeY: number;
|
|
3694
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3695
|
+
readonly maxComputeWorkgroupSizeZ: number;
|
|
3696
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3697
|
+
readonly maxComputeWorkgroupStorageSize: number;
|
|
3698
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3699
|
+
readonly maxComputeWorkgroupsPerDimension: number;
|
|
3700
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3701
|
+
readonly maxDynamicStorageBuffersPerPipelineLayout: number;
|
|
3702
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3703
|
+
readonly maxDynamicUniformBuffersPerPipelineLayout: number;
|
|
3704
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3705
|
+
readonly maxInterStageShaderVariables: number;
|
|
3706
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3707
|
+
readonly maxSampledTexturesPerShaderStage: number;
|
|
3708
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3709
|
+
readonly maxSamplersPerShaderStage: number;
|
|
3710
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3711
|
+
readonly maxStorageBufferBindingSize: number;
|
|
3712
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3713
|
+
readonly maxStorageBuffersPerShaderStage: number;
|
|
3714
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3715
|
+
readonly maxStorageTexturesPerShaderStage: number;
|
|
3716
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3717
|
+
readonly maxTextureArrayLayers: number;
|
|
3718
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3719
|
+
readonly maxTextureDimension1D: number;
|
|
3720
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3721
|
+
readonly maxTextureDimension2D: number;
|
|
3722
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3723
|
+
readonly maxTextureDimension3D: number;
|
|
3724
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3725
|
+
readonly maxUniformBufferBindingSize: number;
|
|
3726
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3727
|
+
readonly maxUniformBuffersPerShaderStage: number;
|
|
3728
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3729
|
+
readonly maxVertexAttributes: number;
|
|
3730
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3731
|
+
readonly maxVertexBufferArrayStride: number;
|
|
3732
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3733
|
+
readonly maxVertexBuffers: number;
|
|
3734
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3735
|
+
readonly minStorageBufferOffsetAlignment: number;
|
|
3736
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
|
|
3737
|
+
readonly minUniformBufferOffsetAlignment: number;
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
declare var GPUSupportedLimits: {
|
|
3741
|
+
prototype: GPUSupportedLimits;
|
|
3742
|
+
new(): GPUSupportedLimits;
|
|
3743
|
+
};
|
|
3744
|
+
|
|
3745
|
+
/**
|
|
3746
|
+
* Available only in secure contexts.
|
|
3747
|
+
*
|
|
3748
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture)
|
|
3749
|
+
*/
|
|
3750
|
+
interface GPUTexture extends GPUObjectBase {
|
|
3751
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */
|
|
3752
|
+
readonly depthOrArrayLayers: GPUIntegerCoordinateOut;
|
|
3753
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */
|
|
3754
|
+
readonly dimension: GPUTextureDimension;
|
|
3755
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */
|
|
3756
|
+
readonly format: GPUTextureFormat;
|
|
3757
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */
|
|
3758
|
+
readonly height: GPUIntegerCoordinateOut;
|
|
3759
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */
|
|
3760
|
+
readonly mipLevelCount: GPUIntegerCoordinateOut;
|
|
3761
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */
|
|
3762
|
+
readonly sampleCount: GPUSize32Out;
|
|
3763
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */
|
|
3764
|
+
readonly usage: GPUFlagsConstant;
|
|
3765
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */
|
|
3766
|
+
readonly width: GPUIntegerCoordinateOut;
|
|
3767
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */
|
|
3768
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
3769
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */
|
|
3770
|
+
destroy(): void;
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3773
|
+
declare var GPUTexture: {
|
|
3774
|
+
prototype: GPUTexture;
|
|
3775
|
+
new(): GPUTexture;
|
|
3776
|
+
};
|
|
3777
|
+
|
|
3778
|
+
/**
|
|
3779
|
+
* Available only in secure contexts.
|
|
3780
|
+
*
|
|
3781
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView)
|
|
3782
|
+
*/
|
|
3783
|
+
interface GPUTextureView extends GPUObjectBase {
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
declare var GPUTextureView: {
|
|
3787
|
+
prototype: GPUTextureView;
|
|
3788
|
+
new(): GPUTextureView;
|
|
3789
|
+
};
|
|
3790
|
+
|
|
3791
|
+
/**
|
|
3792
|
+
* Available only in secure contexts.
|
|
3793
|
+
*
|
|
3794
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent)
|
|
3795
|
+
*/
|
|
3796
|
+
interface GPUUncapturedErrorEvent extends Event {
|
|
3797
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */
|
|
3798
|
+
readonly error: GPUError;
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
declare var GPUUncapturedErrorEvent: {
|
|
3802
|
+
prototype: GPUUncapturedErrorEvent;
|
|
3803
|
+
new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent;
|
|
3804
|
+
};
|
|
3805
|
+
|
|
3806
|
+
/**
|
|
3807
|
+
* Available only in secure contexts.
|
|
3808
|
+
*
|
|
3809
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError)
|
|
3810
|
+
*/
|
|
3811
|
+
interface GPUValidationError extends GPUError {
|
|
3812
|
+
}
|
|
3813
|
+
|
|
3814
|
+
declare var GPUValidationError: {
|
|
3815
|
+
prototype: GPUValidationError;
|
|
3816
|
+
new(message: string): GPUValidationError;
|
|
3817
|
+
};
|
|
3818
|
+
|
|
2697
3819
|
interface GenericTransformStream {
|
|
2698
3820
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */
|
|
2699
3821
|
readonly readable: ReadableStream;
|
|
@@ -3692,6 +4814,15 @@ interface NavigatorConcurrentHardware {
|
|
|
3692
4814
|
readonly hardwareConcurrency: number;
|
|
3693
4815
|
}
|
|
3694
4816
|
|
|
4817
|
+
interface NavigatorGPU {
|
|
4818
|
+
/**
|
|
4819
|
+
* Available only in secure contexts.
|
|
4820
|
+
*
|
|
4821
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu)
|
|
4822
|
+
*/
|
|
4823
|
+
readonly gpu: GPU;
|
|
4824
|
+
}
|
|
4825
|
+
|
|
3695
4826
|
interface NavigatorID {
|
|
3696
4827
|
/**
|
|
3697
4828
|
* @deprecated
|
|
@@ -5377,6 +6508,20 @@ interface WEBGL_multi_draw {
|
|
|
5377
6508
|
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void;
|
|
5378
6509
|
}
|
|
5379
6510
|
|
|
6511
|
+
/**
|
|
6512
|
+
* Available only in secure contexts.
|
|
6513
|
+
*
|
|
6514
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures)
|
|
6515
|
+
*/
|
|
6516
|
+
interface WGSLLanguageFeatures {
|
|
6517
|
+
forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void;
|
|
6518
|
+
}
|
|
6519
|
+
|
|
6520
|
+
declare var WGSLLanguageFeatures: {
|
|
6521
|
+
prototype: WGSLLanguageFeatures;
|
|
6522
|
+
new(): WGSLLanguageFeatures;
|
|
6523
|
+
};
|
|
6524
|
+
|
|
5380
6525
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */
|
|
5381
6526
|
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
|
|
5382
6527
|
}
|
|
@@ -7933,7 +9078,7 @@ declare var WorkerLocation: {
|
|
|
7933
9078
|
*
|
|
7934
9079
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator)
|
|
7935
9080
|
*/
|
|
7936
|
-
interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
|
|
9081
|
+
interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
|
|
7937
9082
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */
|
|
7938
9083
|
readonly mediaCapabilities: MediaCapabilities;
|
|
7939
9084
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */
|
|
@@ -8609,6 +9754,31 @@ type GLsizei = number;
|
|
|
8609
9754
|
type GLsizeiptr = number;
|
|
8610
9755
|
type GLuint = number;
|
|
8611
9756
|
type GLuint64 = number;
|
|
9757
|
+
type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture;
|
|
9758
|
+
type GPUBufferDynamicOffset = number;
|
|
9759
|
+
type GPUBufferUsageFlags = number;
|
|
9760
|
+
type GPUColor = number[] | GPUColorDict;
|
|
9761
|
+
type GPUColorWriteFlags = number;
|
|
9762
|
+
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
9763
|
+
type GPUDepthBias = number;
|
|
9764
|
+
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
9765
|
+
type GPUFlagsConstant = number;
|
|
9766
|
+
type GPUIndex32 = number;
|
|
9767
|
+
type GPUIntegerCoordinate = number;
|
|
9768
|
+
type GPUIntegerCoordinateOut = number;
|
|
9769
|
+
type GPUMapModeFlags = number;
|
|
9770
|
+
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
9771
|
+
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
9772
|
+
type GPUPipelineConstantValue = number;
|
|
9773
|
+
type GPUSampleMask = number;
|
|
9774
|
+
type GPUShaderStageFlags = number;
|
|
9775
|
+
type GPUSignedOffset32 = number;
|
|
9776
|
+
type GPUSize32 = number;
|
|
9777
|
+
type GPUSize32Out = number;
|
|
9778
|
+
type GPUSize64 = number;
|
|
9779
|
+
type GPUSize64Out = number;
|
|
9780
|
+
type GPUStencilValue = number;
|
|
9781
|
+
type GPUTextureUsageFlags = number;
|
|
8612
9782
|
type HashAlgorithmIdentifier = AlgorithmIdentifier;
|
|
8613
9783
|
type HeadersInit = [string, string][] | Record<string, string> | Headers;
|
|
8614
9784
|
type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
|
|
@@ -8616,7 +9786,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
|
|
|
8616
9786
|
type Int32List = Int32Array | GLint[];
|
|
8617
9787
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
8618
9788
|
type NamedCurve = string;
|
|
8619
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
9789
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
8620
9790
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
8621
9791
|
type PerformanceEntryList = PerformanceEntry[];
|
|
8622
9792
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
@@ -8651,6 +9821,40 @@ type FileSystemHandleKind = "directory" | "file";
|
|
|
8651
9821
|
type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
8652
9822
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
8653
9823
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
9824
|
+
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
9825
|
+
type GPUAutoLayoutMode = "auto";
|
|
9826
|
+
type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
|
|
9827
|
+
type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
|
|
9828
|
+
type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform";
|
|
9829
|
+
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
9830
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
9831
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
9832
|
+
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
9833
|
+
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
9834
|
+
type GPUCullMode = "back" | "front" | "none";
|
|
9835
|
+
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
9836
|
+
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
9837
|
+
type GPUFeatureName = "bgra8unorm-storage" | "depth-clip-control" | "depth32float-stencil8" | "float32-filterable" | "indirect-first-instance" | "rg11b10ufloat-renderable" | "shader-f16" | "texture-compression-astc" | "texture-compression-bc" | "texture-compression-etc2" | "timestamp-query";
|
|
9838
|
+
type GPUFilterMode = "linear" | "nearest";
|
|
9839
|
+
type GPUFrontFace = "ccw" | "cw";
|
|
9840
|
+
type GPUIndexFormat = "uint16" | "uint32";
|
|
9841
|
+
type GPULoadOp = "clear" | "load";
|
|
9842
|
+
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
9843
|
+
type GPUPipelineErrorReason = "internal" | "validation";
|
|
9844
|
+
type GPUPowerPreference = "high-performance" | "low-power";
|
|
9845
|
+
type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
|
|
9846
|
+
type GPUQueryType = "occlusion" | "timestamp";
|
|
9847
|
+
type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering";
|
|
9848
|
+
type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
|
|
9849
|
+
type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only";
|
|
9850
|
+
type GPUStoreOp = "discard" | "store";
|
|
9851
|
+
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
9852
|
+
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
9853
|
+
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16uint" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16uint" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16uint" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
9854
|
+
type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float";
|
|
9855
|
+
type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
|
|
9856
|
+
type GPUVertexFormat = "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8x2" | "sint8x4" | "snorm16x2" | "snorm16x4" | "snorm8x2" | "snorm8x4" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16x2" | "unorm16x4" | "unorm8x2" | "unorm8x4";
|
|
9857
|
+
type GPUVertexStepMode = "instance" | "vertex";
|
|
8654
9858
|
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
|
|
8655
9859
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
8656
9860
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|