diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index dc4f978df..4ad8c1e8e 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -659,6 +659,368 @@ interface FullscreenOptions { navigationUI?: FullscreenNavigationUI; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; + source: HTMLVideoElement | VideoFrame; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -3969,7 +4331,9 @@ declare var CSSNamespaceRule: { new(): CSSNamespaceRule; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations) */ interface CSSNestedDeclarations extends CSSRule { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style) */ get style(): CSSStyleDeclaration; set style(cssText: string); } @@ -4551,7 +4915,9 @@ interface CSSStyleDeclaration { flexWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/float) */ float: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-color) */ floodColor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-opacity) */ floodOpacity: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font) */ font: string; @@ -4683,6 +5049,7 @@ interface CSSStyleDeclaration { readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) */ letterSpacing: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/lighting-color) */ lightingColor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/line-break) */ lineBreak: string; @@ -6835,8 +7202,11 @@ declare var DOMRect: { type SVGRect = DOMRect; declare var SVGRect: typeof DOMRect; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList) */ interface DOMRectList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/item) */ item(index: number): DOMRect | null; [index: number]: DOMRect; } @@ -7677,6 +8047,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "FocusEvent"): FocusEvent; createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; createEvent(eventInterface: "FormDataEvent"): FormDataEvent; + createEvent(eventInterface: "GPUUncapturedErrorEvent"): GPUUncapturedErrorEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; @@ -9230,6 +9601,757 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: HTMLCanvasElement | OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + /** * A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. * @@ -9905,7 +11027,7 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; @@ -16639,7 +17761,7 @@ declare var NavigationPreloadManager: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator) */ -interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { +interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { /** * Available only in secure contexts. * @@ -16748,6 +17870,15 @@ interface NavigatorCookies { readonly cookieEnabled: boolean; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -24115,6 +25246,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** * Available only in secure contexts. * @@ -28882,7 +30027,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ declare var ontimeupdate: ((this: Window, ev: Event) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ declare var ontoggle: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined; @@ -29073,6 +30218,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; type HashAlgorithmIdentifier = AlgorithmIdentifier; @@ -29086,7 +30256,7 @@ type MediaProvider = MediaStream | MediaSource | Blob; type MessageEventSource = WindowProxy | MessagePort | ServiceWorker; type MutationRecordType = "attributes" | "characterData" | "childList"; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type OptionalPostfixToken = ` ${T}` | ""; @@ -29097,7 +30267,7 @@ type RTCRtpTransform = RTCRtpScriptTransform; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; -type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type ReportList = Report[]; type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; @@ -29169,6 +30339,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/dom.iterable.generated.d.ts b/baselines/dom.iterable.generated.d.ts index d383e7690..21ec6da9c 100644 --- a/baselines/dom.iterable.generated.d.ts +++ b/baselines/dom.iterable.generated.d.ts @@ -111,6 +111,39 @@ interface FormData { values(): FormDataIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface HTMLAllCollection { [Symbol.iterator](): ArrayIterator; } @@ -368,6 +401,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/serviceworker.generated.d.ts b/baselines/serviceworker.generated.d.ts index 5eeaf8bc0..88b139c87 100644 --- a/baselines/serviceworker.generated.d.ts +++ b/baselines/serviceworker.generated.d.ts @@ -237,6 +237,367 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -2803,6 +3164,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -3801,6 +4913,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -5564,6 +6685,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -8102,7 +9237,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -8603,6 +9738,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -8610,7 +9770,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; @@ -8648,6 +9808,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/serviceworker.iterable.generated.d.ts b/baselines/serviceworker.iterable.generated.d.ts index 3491ab037..8bb69b507 100644 --- a/baselines/serviceworker.iterable.generated.d.ts +++ b/baselines/serviceworker.iterable.generated.d.ts @@ -63,6 +63,39 @@ interface FormData { values(): FormDataIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface HeadersIterator extends IteratorObject { [Symbol.iterator](): HeadersIterator; } @@ -158,6 +191,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/sharedworker.generated.d.ts b/baselines/sharedworker.generated.d.ts index 4a7ef31a0..bc49dd133 100644 --- a/baselines/sharedworker.generated.d.ts +++ b/baselines/sharedworker.generated.d.ts @@ -212,6 +212,367 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -2692,6 +3053,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -3690,6 +4802,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -5375,6 +6496,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -7931,7 +9066,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -8607,6 +9742,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -8614,7 +9774,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; @@ -8649,6 +9809,40 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/sharedworker.iterable.generated.d.ts b/baselines/sharedworker.iterable.generated.d.ts index a04370d23..c2b5efb89 100644 --- a/baselines/sharedworker.iterable.generated.d.ts +++ b/baselines/sharedworker.iterable.generated.d.ts @@ -63,6 +63,39 @@ interface FormData { values(): FormDataIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface HeadersIterator extends IteratorObject { [Symbol.iterator](): HeadersIterator; } @@ -158,6 +191,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/ts5.5/dom.generated.d.ts b/baselines/ts5.5/dom.generated.d.ts index 2bc49a536..381c250c6 100644 --- a/baselines/ts5.5/dom.generated.d.ts +++ b/baselines/ts5.5/dom.generated.d.ts @@ -659,6 +659,368 @@ interface FullscreenOptions { navigationUI?: FullscreenNavigationUI; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; + source: HTMLVideoElement | VideoFrame; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GainOptions extends AudioNodeOptions { gain?: number; } @@ -3965,7 +4327,9 @@ declare var CSSNamespaceRule: { new(): CSSNamespaceRule; }; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations) */ interface CSSNestedDeclarations extends CSSRule { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNestedDeclarations/style) */ readonly style: CSSStyleDeclaration; } @@ -4545,7 +4909,9 @@ interface CSSStyleDeclaration { flexWrap: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/float) */ float: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-color) */ floodColor: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/flood-opacity) */ floodOpacity: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/font) */ font: string; @@ -4677,6 +5043,7 @@ interface CSSStyleDeclaration { readonly length: number; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/letter-spacing) */ letterSpacing: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/lighting-color) */ lightingColor: string; /** [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/line-break) */ lineBreak: string; @@ -6828,8 +7195,11 @@ declare var DOMRect: { type SVGRect = DOMRect; declare var SVGRect: typeof DOMRect; +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList) */ interface DOMRectList { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/length) */ readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectList/item) */ item(index: number): DOMRect | null; [index: number]: DOMRect; } @@ -7670,6 +8040,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve createEvent(eventInterface: "FocusEvent"): FocusEvent; createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; createEvent(eventInterface: "FormDataEvent"): FormDataEvent; + createEvent(eventInterface: "GPUUncapturedErrorEvent"): GPUUncapturedErrorEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; @@ -9220,6 +9591,757 @@ declare var FragmentDirective: { new(): FragmentDirective; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: HTMLCanvasElement | OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + /** * A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. * @@ -9895,7 +11017,7 @@ interface GlobalEventHandlers { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined; @@ -16619,7 +17741,7 @@ declare var NavigationPreloadManager: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator) */ -interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { +interface Navigator extends NavigatorAutomationInformation, NavigatorBadge, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorPlugins, NavigatorStorage { /** * Available only in secure contexts. * @@ -16728,6 +17850,15 @@ interface NavigatorCookies { readonly cookieEnabled: boolean; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -24093,6 +25224,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** * Available only in secure contexts. * @@ -28860,7 +30005,7 @@ declare var onsuspend: ((this: Window, ev: Event) => any) | null; * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/timeupdate_event) */ declare var ontimeupdate: ((this: Window, ev: Event) => any) | null; -/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLDetailsElement/toggle_event) */ +/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/toggle_event) */ declare var ontoggle: ((this: Window, ev: Event) => any) | null; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/touchcancel_event) */ declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined; @@ -29051,6 +30196,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement; type HashAlgorithmIdentifier = AlgorithmIdentifier; @@ -29064,7 +30234,7 @@ type MediaProvider = MediaStream | MediaSource | Blob; type MessageEventSource = WindowProxy | MessagePort | ServiceWorker; type MutationRecordType = "attributes" | "characterData" | "childList"; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type OptionalPostfixToken = ` ${T}` | ""; @@ -29075,7 +30245,7 @@ type RTCRtpTransform = RTCRtpScriptTransform; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; -type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type ReportList = Report[]; type RequestInfo = Request | string; type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | VideoFrame; @@ -29147,6 +30317,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FullscreenNavigationUI = "auto" | "hide" | "show"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble"; type GamepadHapticsResult = "complete" | "preempted"; type GamepadMappingType = "" | "standard" | "xr-standard"; diff --git a/baselines/ts5.5/dom.iterable.generated.d.ts b/baselines/ts5.5/dom.iterable.generated.d.ts index 2b82aa4f2..0268612aa 100644 --- a/baselines/ts5.5/dom.iterable.generated.d.ts +++ b/baselines/ts5.5/dom.iterable.generated.d.ts @@ -107,6 +107,39 @@ interface FormData { values(): IterableIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface HTMLAllCollection { [Symbol.iterator](): IterableIterator; } @@ -348,6 +381,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/ts5.5/serviceworker.generated.d.ts b/baselines/ts5.5/serviceworker.generated.d.ts index 5eeaf8bc0..88b139c87 100644 --- a/baselines/ts5.5/serviceworker.generated.d.ts +++ b/baselines/ts5.5/serviceworker.generated.d.ts @@ -237,6 +237,367 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -2803,6 +3164,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -3801,6 +4913,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -5564,6 +6685,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -8102,7 +9237,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -8603,6 +9738,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -8610,7 +9770,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; @@ -8648,6 +9808,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.5/serviceworker.iterable.generated.d.ts b/baselines/ts5.5/serviceworker.iterable.generated.d.ts index b311f34ec..434994172 100644 --- a/baselines/ts5.5/serviceworker.iterable.generated.d.ts +++ b/baselines/ts5.5/serviceworker.iterable.generated.d.ts @@ -59,6 +59,39 @@ interface FormData { values(): IterableIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface Headers { [Symbol.iterator](): IterableIterator<[string, string]>; /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ @@ -142,6 +175,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/ts5.5/sharedworker.generated.d.ts b/baselines/ts5.5/sharedworker.generated.d.ts index 4a7ef31a0..bc49dd133 100644 --- a/baselines/ts5.5/sharedworker.generated.d.ts +++ b/baselines/ts5.5/sharedworker.generated.d.ts @@ -212,6 +212,367 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -2692,6 +3053,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -3690,6 +4802,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -5375,6 +6496,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -7931,7 +9066,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -8607,6 +9742,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -8614,7 +9774,7 @@ type ImageBitmapSource = CanvasImageSource | Blob | ImageData; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamController = ReadableStreamDefaultController | ReadableByteStreamController; @@ -8649,6 +9809,40 @@ type FileSystemHandleKind = "directory" | "file"; type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; diff --git a/baselines/ts5.5/sharedworker.iterable.generated.d.ts b/baselines/ts5.5/sharedworker.iterable.generated.d.ts index 3e13f67c8..d120e02bd 100644 --- a/baselines/ts5.5/sharedworker.iterable.generated.d.ts +++ b/baselines/ts5.5/sharedworker.iterable.generated.d.ts @@ -59,6 +59,39 @@ interface FormData { values(): IterableIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface Headers { [Symbol.iterator](): IterableIterator<[string, string]>; /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ @@ -142,6 +175,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/ts5.5/webworker.generated.d.ts b/baselines/ts5.5/webworker.generated.d.ts index e4c77e777..b1013a397 100644 --- a/baselines/ts5.5/webworker.generated.d.ts +++ b/baselines/ts5.5/webworker.generated.d.ts @@ -321,6 +321,368 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; + source: VideoFrame; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -3297,6 +3659,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -4379,6 +5492,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -6437,6 +7559,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -9014,7 +10150,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -9729,6 +10865,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -9737,7 +10898,7 @@ type ImageBufferSource = AllowSharedBufferSource | ReadableStream; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; @@ -9782,6 +10943,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/baselines/ts5.5/webworker.iterable.generated.d.ts b/baselines/ts5.5/webworker.iterable.generated.d.ts index 8e34bfb3a..1dd96a067 100644 --- a/baselines/ts5.5/webworker.iterable.generated.d.ts +++ b/baselines/ts5.5/webworker.iterable.generated.d.ts @@ -59,6 +59,39 @@ interface FormData { values(): IterableIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface Headers { [Symbol.iterator](): IterableIterator<[string, string]>; /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ @@ -146,6 +179,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/baselines/webworker.generated.d.ts b/baselines/webworker.generated.d.ts index e4c77e777..b1013a397 100644 --- a/baselines/webworker.generated.d.ts +++ b/baselines/webworker.generated.d.ts @@ -321,6 +321,368 @@ interface FontFaceSetLoadEventInit extends EventInit { fontfaces?: FontFace[]; } +interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupEntry[]; + layout: GPUBindGroupLayout; +} + +interface GPUBindGroupEntry { + binding: GPUIndex32; + resource: GPUBindingResource; +} + +interface GPUBindGroupLayoutDescriptor extends GPUObjectDescriptorBase { + entries: GPUBindGroupLayoutEntry[]; +} + +interface GPUBindGroupLayoutEntry { + binding: GPUIndex32; + buffer?: GPUBufferBindingLayout; + externalTexture?: GPUExternalTextureBindingLayout; + sampler?: GPUSamplerBindingLayout; + storageTexture?: GPUStorageTextureBindingLayout; + texture?: GPUTextureBindingLayout; + visibility: GPUShaderStageFlags; +} + +interface GPUBlendComponent { + dstFactor?: GPUBlendFactor; + operation?: GPUBlendOperation; + srcFactor?: GPUBlendFactor; +} + +interface GPUBlendState { + alpha: GPUBlendComponent; + color: GPUBlendComponent; +} + +interface GPUBufferBinding { + buffer: GPUBuffer; + offset?: GPUSize64; + size?: GPUSize64; +} + +interface GPUBufferBindingLayout { + hasDynamicOffset?: boolean; + minBindingSize?: GPUSize64; + type?: GPUBufferBindingType; +} + +interface GPUBufferDescriptor extends GPUObjectDescriptorBase { + mappedAtCreation?: boolean; + size: GPUSize64; + usage: GPUBufferUsageFlags; +} + +interface GPUCanvasConfiguration { + alphaMode?: GPUCanvasAlphaMode; + colorSpace?: PredefinedColorSpace; + device: GPUDevice; + format: GPUTextureFormat; + toneMapping?: GPUCanvasToneMapping; + usage?: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUCanvasToneMapping { + mode?: GPUCanvasToneMappingMode; +} + +interface GPUColorDict { + a: number; + b: number; + g: number; + r: number; +} + +interface GPUColorTargetState { + blend?: GPUBlendState; + format: GPUTextureFormat; + writeMask?: GPUColorWriteFlags; +} + +interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase { +} + +interface GPUComputePassDescriptor extends GPUObjectDescriptorBase { + timestampWrites?: GPUComputePassTimestampWrites; +} + +interface GPUComputePassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase { + compute: GPUProgrammableStage; +} + +interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + colorSpace?: PredefinedColorSpace; + premultipliedAlpha?: boolean; +} + +interface GPUCopyExternalImageSourceInfo { + flipY?: boolean; + origin?: GPUOrigin2D; + source: GPUCopyExternalImageSource; +} + +interface GPUDepthStencilState { + depthBias?: GPUDepthBias; + depthBiasClamp?: number; + depthBiasSlopeScale?: number; + depthCompare?: GPUCompareFunction; + depthWriteEnabled?: boolean; + format: GPUTextureFormat; + stencilBack?: GPUStencilFaceState; + stencilFront?: GPUStencilFaceState; + stencilReadMask?: GPUStencilValue; + stencilWriteMask?: GPUStencilValue; +} + +interface GPUDeviceDescriptor extends GPUObjectDescriptorBase { + defaultQueue?: GPUQueueDescriptor; + requiredFeatures?: GPUFeatureName[]; + requiredLimits?: Record; +} + +interface GPUExtent3DDict { + depthOrArrayLayers?: GPUIntegerCoordinate; + height?: GPUIntegerCoordinate; + width: GPUIntegerCoordinate; +} + +interface GPUExternalTextureBindingLayout { +} + +interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { + colorSpace?: PredefinedColorSpace; + source: VideoFrame; +} + +interface GPUFragmentState extends GPUProgrammableStage { + targets: (GPUColorTargetState | null)[]; +} + +interface GPUMultisampleState { + alphaToCoverageEnabled?: boolean; + count?: GPUSize32; + mask?: GPUSampleMask; +} + +interface GPUObjectDescriptorBase { + label?: string; +} + +interface GPUOrigin2DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; +} + +interface GPUOrigin3DDict { + x?: GPUIntegerCoordinate; + y?: GPUIntegerCoordinate; + z?: GPUIntegerCoordinate; +} + +interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase { + layout: GPUPipelineLayout | GPUAutoLayoutMode; +} + +interface GPUPipelineErrorInit { + reason: GPUPipelineErrorReason; +} + +interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase { + bindGroupLayouts: (GPUBindGroupLayout | null)[]; +} + +interface GPUPrimitiveState { + cullMode?: GPUCullMode; + frontFace?: GPUFrontFace; + stripIndexFormat?: GPUIndexFormat; + topology?: GPUPrimitiveTopology; + unclippedDepth?: boolean; +} + +interface GPUProgrammableStage { + constants?: Record; + entryPoint?: string; + module: GPUShaderModule; +} + +interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase { + count: GPUSize32; + type: GPUQueryType; +} + +interface GPUQueueDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase { +} + +interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout { + depthReadOnly?: boolean; + stencilReadOnly?: boolean; +} + +interface GPURenderPassColorAttachment { + clearValue?: GPUColor; + depthSlice?: GPUIntegerCoordinate; + loadOp: GPULoadOp; + resolveTarget?: GPUTextureView; + storeOp: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDepthStencilAttachment { + depthClearValue?: number; + depthLoadOp?: GPULoadOp; + depthReadOnly?: boolean; + depthStoreOp?: GPUStoreOp; + stencilClearValue?: GPUStencilValue; + stencilLoadOp?: GPULoadOp; + stencilReadOnly?: boolean; + stencilStoreOp?: GPUStoreOp; + view: GPUTextureView; +} + +interface GPURenderPassDescriptor extends GPUObjectDescriptorBase { + colorAttachments: (GPURenderPassColorAttachment | null)[]; + depthStencilAttachment?: GPURenderPassDepthStencilAttachment; + maxDrawCount?: GPUSize64; + occlusionQuerySet?: GPUQuerySet; + timestampWrites?: GPURenderPassTimestampWrites; +} + +interface GPURenderPassLayout extends GPUObjectDescriptorBase { + colorFormats: (GPUTextureFormat | null)[]; + depthStencilFormat?: GPUTextureFormat; + sampleCount?: GPUSize32; +} + +interface GPURenderPassTimestampWrites { + beginningOfPassWriteIndex?: GPUSize32; + endOfPassWriteIndex?: GPUSize32; + querySet: GPUQuerySet; +} + +interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { + depthStencil?: GPUDepthStencilState; + fragment?: GPUFragmentState; + multisample?: GPUMultisampleState; + primitive?: GPUPrimitiveState; + vertex: GPUVertexState; +} + +interface GPURequestAdapterOptions { + forceFallbackAdapter?: boolean; + powerPreference?: GPUPowerPreference; +} + +interface GPUSamplerBindingLayout { + type?: GPUSamplerBindingType; +} + +interface GPUSamplerDescriptor extends GPUObjectDescriptorBase { + addressModeU?: GPUAddressMode; + addressModeV?: GPUAddressMode; + addressModeW?: GPUAddressMode; + compare?: GPUCompareFunction; + lodMaxClamp?: number; + lodMinClamp?: number; + magFilter?: GPUFilterMode; + maxAnisotropy?: number; + minFilter?: GPUFilterMode; + mipmapFilter?: GPUMipmapFilterMode; +} + +interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase { + code: string; +} + +interface GPUStencilFaceState { + compare?: GPUCompareFunction; + depthFailOp?: GPUStencilOperation; + failOp?: GPUStencilOperation; + passOp?: GPUStencilOperation; +} + +interface GPUStorageTextureBindingLayout { + access?: GPUStorageTextureAccess; + format: GPUTextureFormat; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout { + buffer: GPUBuffer; +} + +interface GPUTexelCopyBufferLayout { + bytesPerRow?: GPUSize32; + offset?: GPUSize64; + rowsPerImage?: GPUSize32; +} + +interface GPUTexelCopyTextureInfo { + aspect?: GPUTextureAspect; + mipLevel?: GPUIntegerCoordinate; + origin?: GPUOrigin3D; + texture: GPUTexture; +} + +interface GPUTextureBindingLayout { + multisampled?: boolean; + sampleType?: GPUTextureSampleType; + viewDimension?: GPUTextureViewDimension; +} + +interface GPUTextureDescriptor extends GPUObjectDescriptorBase { + dimension?: GPUTextureDimension; + format: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; + sampleCount?: GPUSize32; + size: GPUExtent3D; + usage: GPUTextureUsageFlags; + viewFormats?: GPUTextureFormat[]; +} + +interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase { + arrayLayerCount?: GPUIntegerCoordinate; + aspect?: GPUTextureAspect; + baseArrayLayer?: GPUIntegerCoordinate; + baseMipLevel?: GPUIntegerCoordinate; + dimension?: GPUTextureViewDimension; + format?: GPUTextureFormat; + mipLevelCount?: GPUIntegerCoordinate; +} + +interface GPUUncapturedErrorEventInit extends EventInit { + error: GPUError; +} + +interface GPUVertexAttribute { + format: GPUVertexFormat; + offset: GPUSize64; + shaderLocation: GPUIndex32; +} + +interface GPUVertexBufferLayout { + arrayStride: GPUSize64; + attributes: GPUVertexAttribute[]; + stepMode?: GPUVertexStepMode; +} + +interface GPUVertexState extends GPUProgrammableStage { + buffers?: (GPUVertexBufferLayout | null)[]; +} + interface GetNotificationOptions { tag?: string; } @@ -3297,6 +3659,757 @@ declare var FormData: { new(): FormData; }; +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU) + */ +interface GPU { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/wgslLanguageFeatures) */ + readonly wgslLanguageFeatures: WGSLLanguageFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/getPreferredCanvasFormat) */ + getPreferredCanvasFormat(): GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPU/requestAdapter) */ + requestAdapter(options?: GPURequestAdapterOptions): Promise; +} + +declare var GPU: { + prototype: GPU; + new(): GPU; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter) + */ +interface GPUAdapter { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/info) */ + readonly info: GPUAdapterInfo; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/isFallbackAdapter) */ + readonly isFallbackAdapter: boolean; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapter/requestDevice) */ + requestDevice(descriptor?: GPUDeviceDescriptor): Promise; +} + +declare var GPUAdapter: { + prototype: GPUAdapter; + new(): GPUAdapter; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo) + */ +interface GPUAdapterInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/architecture) */ + readonly architecture: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/description) */ + readonly description: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/device) */ + readonly device: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUAdapterInfo/vendor) */ + readonly vendor: string; +} + +declare var GPUAdapterInfo: { + prototype: GPUAdapterInfo; + new(): GPUAdapterInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup) + */ +interface GPUBindGroup extends GPUObjectBase { +} + +declare var GPUBindGroup: { + prototype: GPUBindGroup; + new(): GPUBindGroup; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroupLayout) + */ +interface GPUBindGroupLayout extends GPUObjectBase { +} + +declare var GPUBindGroupLayout: { + prototype: GPUBindGroupLayout; + new(): GPUBindGroupLayout; +}; + +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void; + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer) + */ +interface GPUBuffer extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapState) */ + readonly mapState: GPUBufferMapState; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/size) */ + readonly size: GPUSize64Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/getMappedRange) */ + getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/mapAsync) */ + mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBuffer/unmap) */ + unmap(): void; +} + +declare var GPUBuffer: { + prototype: GPUBuffer; + new(): GPUBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext) + */ +interface GPUCanvasContext { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas) */ + readonly canvas: OffscreenCanvas; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure) */ + configure(configuration: GPUCanvasConfiguration): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture) */ + getCurrentTexture(): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure) */ + unconfigure(): void; +} + +declare var GPUCanvasContext: { + prototype: GPUCanvasContext; + new(): GPUCanvasContext; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandBuffer) + */ +interface GPUCommandBuffer extends GPUObjectBase { +} + +declare var GPUCommandBuffer: { + prototype: GPUCommandBuffer; + new(): GPUCommandBuffer; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder) + */ +interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass) */ + beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass) */ + beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer) */ + clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer) */ + copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish) */ + finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet) */ + resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void; +} + +declare var GPUCommandEncoder: { + prototype: GPUCommandEncoder; + new(): GPUCommandEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo) + */ +interface GPUCompilationInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationInfo/messages) */ + readonly messages: ReadonlyArray; +} + +declare var GPUCompilationInfo: { + prototype: GPUCompilationInfo; + new(): GPUCompilationInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage) + */ +interface GPUCompilationMessage { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length) */ + readonly length: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum) */ + readonly lineNum: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos) */ + readonly linePos: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset) */ + readonly offset: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type) */ + readonly type: GPUCompilationMessageType; +} + +declare var GPUCompilationMessage: { + prototype: GPUCompilationMessage; + new(): GPUCompilationMessage; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder) + */ +interface GPUComputePassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroups) */ + dispatchWorkgroups(workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/dispatchWorkgroupsIndirect) */ + dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setPipeline) */ + setPipeline(pipeline: GPUComputePipeline): void; +} + +declare var GPUComputePassEncoder: { + prototype: GPUComputePassEncoder; + new(): GPUComputePassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline) + */ +interface GPUComputePipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPUComputePipeline: { + prototype: GPUComputePipeline; + new(): GPUComputePipeline; +}; + +interface GPUDebugCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/insertDebugMarker) */ + insertDebugMarker(markerLabel: string): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/popDebugGroup) */ + popDebugGroup(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/pushDebugGroup) */ + pushDebugGroup(groupLabel: string): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice) + */ +interface GPUDevice extends EventTarget, GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features) */ + readonly features: GPUSupportedFeatures; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits) */ + readonly limits: GPUSupportedLimits; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost) */ + readonly lost: Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue) */ + readonly queue: GPUQueue; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup) */ + createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroupLayout) */ + createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer) */ + createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder) */ + createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline) */ + createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync) */ + createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout) */ + createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet) */ + createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder) */ + createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline) */ + createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync) */ + createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler) */ + createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule) */ + createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture) */ + createTexture(descriptor: GPUTextureDescriptor): GPUTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy) */ + destroy(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture) */ + importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope) */ + popErrorScope(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope) */ + pushErrorScope(filter: GPUErrorFilter): void; +} + +declare var GPUDevice: { + prototype: GPUDevice; + new(): GPUDevice; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo) + */ +interface GPUDeviceLostInfo { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/message) */ + readonly message: string; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDeviceLostInfo/reason) */ + readonly reason: GPUDeviceLostReason; +} + +declare var GPUDeviceLostInfo: { + prototype: GPUDeviceLostInfo; + new(): GPUDeviceLostInfo; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError) + */ +interface GPUError { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUError/message) */ + readonly message: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUExternalTexture) + */ +interface GPUExternalTexture extends GPUObjectBase { +} + +declare var GPUExternalTexture: { + prototype: GPUExternalTexture; + new(): GPUExternalTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUInternalError) + */ +interface GPUInternalError extends GPUError { +} + +declare var GPUInternalError: { + prototype: GPUInternalError; + new(message: string): GPUInternalError; +}; + +interface GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUBindGroup/label) */ + label: string; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUOutOfMemoryError) + */ +interface GPUOutOfMemoryError extends GPUError { +} + +declare var GPUOutOfMemoryError: { + prototype: GPUOutOfMemoryError; + new(message: string): GPUOutOfMemoryError; +}; + +interface GPUPipelineBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePipeline/getBindGroupLayout) */ + getBindGroupLayout(index: number): GPUBindGroupLayout; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError) + */ +interface GPUPipelineError extends DOMException { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineError/reason) */ + readonly reason: GPUPipelineErrorReason; +} + +declare var GPUPipelineError: { + prototype: GPUPipelineError; + new(message: string, options: GPUPipelineErrorInit): GPUPipelineError; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUPipelineLayout) + */ +interface GPUPipelineLayout extends GPUObjectBase { +} + +declare var GPUPipelineLayout: { + prototype: GPUPipelineLayout; + new(): GPUPipelineLayout; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet) + */ +interface GPUQuerySet extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/count) */ + readonly count: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/type) */ + readonly type: GPUQueryType; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQuerySet/destroy) */ + destroy(): void; +} + +declare var GPUQuerySet: { + prototype: GPUQuerySet; + new(): GPUQuerySet; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue) + */ +interface GPUQueue extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone) */ + onSubmittedWorkDone(): Promise; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: GPUCommandBuffer[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer) */ + writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void; +} + +declare var GPUQueue: { + prototype: GPUQueue; + new(): GPUQueue; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundle) + */ +interface GPURenderBundle extends GPUObjectBase { +} + +declare var GPURenderBundle: { + prototype: GPURenderBundle; + new(): GPURenderBundle; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder) + */ +interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish) */ + finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle; +} + +declare var GPURenderBundleEncoder: { + prototype: GPURenderBundleEncoder; + new(): GPURenderBundleEncoder; +}; + +interface GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */ + draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */ + drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */ + drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */ + drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */ + setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */ + setPipeline(pipeline: GPURenderPipeline): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */ + setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void; +} + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder) + */ +interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery) */ + beginOcclusionQuery(queryIndex: GPUSize32): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end) */ + end(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery) */ + endOcclusionQuery(): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: GPURenderBundle[]): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: GPUColor): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect) */ + setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference) */ + setStencilReference(reference: GPUStencilValue): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport) */ + setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void; +} + +declare var GPURenderPassEncoder: { + prototype: GPURenderPassEncoder; + new(): GPURenderPassEncoder; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPipeline) + */ +interface GPURenderPipeline extends GPUObjectBase, GPUPipelineBase { +} + +declare var GPURenderPipeline: { + prototype: GPURenderPipeline; + new(): GPURenderPipeline; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSampler) + */ +interface GPUSampler extends GPUObjectBase { +} + +declare var GPUSampler: { + prototype: GPUSampler; + new(): GPUSampler; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule) + */ +interface GPUShaderModule extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUShaderModule/getCompilationInfo) */ + getCompilationInfo(): Promise; +} + +declare var GPUShaderModule: { + prototype: GPUShaderModule; + new(): GPUShaderModule; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedFeatures) + */ +interface GPUSupportedFeatures { + forEach(callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, thisArg?: any): void; +} + +declare var GPUSupportedFeatures: { + prototype: GPUSupportedFeatures; + new(): GPUSupportedFeatures; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits) + */ +interface GPUSupportedLimits { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroups: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindGroupsPlusVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBindingsPerBindGroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxBufferSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachmentBytesPerSample: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxColorAttachments: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeInvocationsPerWorkgroup: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeX: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeY: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupSizeZ: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupStorageSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxComputeWorkgroupsPerDimension: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicStorageBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxDynamicUniformBuffersPerPipelineLayout: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxInterStageShaderVariables: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSampledTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxSamplersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxStorageTexturesPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureArrayLayers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension1D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension2D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxTextureDimension3D: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBufferBindingSize: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxUniformBuffersPerShaderStage: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexAttributes: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBufferArrayStride: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly maxVertexBuffers: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minStorageBufferOffsetAlignment: number; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */ + readonly minUniformBufferOffsetAlignment: number; +} + +declare var GPUSupportedLimits: { + prototype: GPUSupportedLimits; + new(): GPUSupportedLimits; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture) + */ +interface GPUTexture extends GPUObjectBase { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/depthOrArrayLayers) */ + readonly depthOrArrayLayers: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/dimension) */ + readonly dimension: GPUTextureDimension; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/format) */ + readonly format: GPUTextureFormat; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/height) */ + readonly height: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/mipLevelCount) */ + readonly mipLevelCount: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/sampleCount) */ + readonly sampleCount: GPUSize32Out; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/usage) */ + readonly usage: GPUFlagsConstant; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/width) */ + readonly width: GPUIntegerCoordinateOut; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/createView) */ + createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTexture/destroy) */ + destroy(): void; +} + +declare var GPUTexture: { + prototype: GPUTexture; + new(): GPUTexture; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUTextureView) + */ +interface GPUTextureView extends GPUObjectBase { +} + +declare var GPUTextureView: { + prototype: GPUTextureView; + new(): GPUTextureView; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent) + */ +interface GPUUncapturedErrorEvent extends Event { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUUncapturedErrorEvent/error) */ + readonly error: GPUError; +} + +declare var GPUUncapturedErrorEvent: { + prototype: GPUUncapturedErrorEvent; + new(type: string, gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit): GPUUncapturedErrorEvent; +}; + +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUValidationError) + */ +interface GPUValidationError extends GPUError { +} + +declare var GPUValidationError: { + prototype: GPUValidationError; + new(message: string): GPUValidationError; +}; + interface GenericTransformStream { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */ readonly readable: ReadableStream; @@ -4379,6 +5492,15 @@ interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } +interface NavigatorGPU { + /** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/gpu) + */ + readonly gpu: GPU; +} + interface NavigatorID { /** * @deprecated @@ -6437,6 +7559,20 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLsizei[], countsOffset: number, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: number, drawcount: GLsizei): void; } +/** + * Available only in secure contexts. + * + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WGSLLanguageFeatures) + */ +interface WGSLLanguageFeatures { + forEach(callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, thisArg?: any): void; +} + +declare var WGSLLanguageFeatures: { + prototype: WGSLLanguageFeatures; + new(): WGSLLanguageFeatures; +}; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase { } @@ -9014,7 +10150,7 @@ declare var WorkerLocation: { * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator) */ -interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { +interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, NavigatorGPU, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */ readonly mediaCapabilities: MediaCapabilities; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */ @@ -9729,6 +10865,31 @@ type GLsizei = number; type GLsizeiptr = number; type GLuint = number; type GLuint64 = number; +type GPUBindingResource = GPUSampler | GPUTextureView | GPUBufferBinding | GPUExternalTexture; +type GPUBufferDynamicOffset = number; +type GPUBufferUsageFlags = number; +type GPUColor = number[] | GPUColorDict; +type GPUColorWriteFlags = number; +type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas; +type GPUDepthBias = number; +type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; +type GPUFlagsConstant = number; +type GPUIndex32 = number; +type GPUIntegerCoordinate = number; +type GPUIntegerCoordinateOut = number; +type GPUMapModeFlags = number; +type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict; +type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict; +type GPUPipelineConstantValue = number; +type GPUSampleMask = number; +type GPUShaderStageFlags = number; +type GPUSignedOffset32 = number; +type GPUSize32 = number; +type GPUSize32Out = number; +type GPUSize64 = number; +type GPUSize64Out = number; +type GPUStencilValue = number; +type GPUTextureUsageFlags = number; type HashAlgorithmIdentifier = AlgorithmIdentifier; type HeadersInit = [string, string][] | Record | Headers; type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; @@ -9737,7 +10898,7 @@ type ImageBufferSource = AllowSharedBufferSource | ReadableStream; type Int32List = Int32Array | GLint[]; type MessageEventSource = MessagePort | ServiceWorker; type NamedCurve = string; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; +type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext; type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; type PerformanceEntryList = PerformanceEntry[]; type PushMessageDataInit = BufferSource | string; @@ -9782,6 +10943,40 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat"; +type GPUAutoLayoutMode = "auto"; +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"; +type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; +type GPUBufferMapState = "mapped" | "pending" | "unmapped"; +type GPUCanvasAlphaMode = "opaque" | "premultiplied"; +type GPUCanvasToneMappingMode = "extended" | "standard"; +type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal"; +type GPUCompilationMessageType = "error" | "info" | "warning"; +type GPUCullMode = "back" | "front" | "none"; +type GPUDeviceLostReason = "destroyed" | "unknown"; +type GPUErrorFilter = "internal" | "out-of-memory" | "validation"; +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"; +type GPUFilterMode = "linear" | "nearest"; +type GPUFrontFace = "ccw" | "cw"; +type GPUIndexFormat = "uint16" | "uint32"; +type GPULoadOp = "clear" | "load"; +type GPUMipmapFilterMode = "linear" | "nearest"; +type GPUPipelineErrorReason = "internal" | "validation"; +type GPUPowerPreference = "high-performance" | "low-power"; +type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip"; +type GPUQueryType = "occlusion" | "timestamp"; +type GPUSamplerBindingType = "comparison" | "filtering" | "non-filtering"; +type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero"; +type GPUStorageTextureAccess = "read-only" | "read-write" | "write-only"; +type GPUStoreOp = "discard" | "store"; +type GPUTextureAspect = "all" | "depth-only" | "stencil-only"; +type GPUTextureDimension = "1d" | "2d" | "3d"; +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"; +type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +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"; +type GPUVertexStepMode = "instance" | "vertex"; 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"; type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; diff --git a/baselines/webworker.iterable.generated.d.ts b/baselines/webworker.iterable.generated.d.ts index bb5625ddd..403cfc6ea 100644 --- a/baselines/webworker.iterable.generated.d.ts +++ b/baselines/webworker.iterable.generated.d.ts @@ -63,6 +63,39 @@ interface FormData { values(): FormDataIterator; } +interface GPUBindingCommandsMixin { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUComputePassEncoder/setBindGroup) */ + setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable): void; +} + +interface GPUCommandEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture) */ + copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer) */ + copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture) */ + copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable): void; +} + +interface GPUQueue { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture) */ + copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit) */ + submit(commandBuffers: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture) */ + writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable): void; +} + +interface GPURenderPassEncoder { + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles) */ + executeBundles(bundles: Iterable): void; + /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant) */ + setBlendConstant(color: Iterable): void; +} + +interface GPUSupportedFeatures extends ReadonlySet { +} + interface HeadersIterator extends IteratorObject { [Symbol.iterator](): HeadersIterator; } @@ -162,6 +195,9 @@ interface WEBGL_multi_draw { multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable, countsOffset: number, type: GLenum, offsetsList: Int32Array | Iterable, offsetsOffset: number, drawcount: GLsizei): void; } +interface WGSLLanguageFeatures extends ReadonlySet { +} + interface WebGL2RenderingContextBase { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: number): void; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index ef0de2f43..a423ab2fd 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -480,6 +480,34 @@ } } }, + "GPUError": { + "exposed": "Window Worker", + // WebKit doesn't have GPUError interface but only subinterfaces as of 2024-11-20 + "noInterfaceObject": true, + "properties": { + "property": { + "message": { + "exposed": "Window Worker" + } + } + } + }, + "GPUPipelineError": { + // Web IDL optional argument can be followed by a required argument, but not in TS + // TODO: Maybe do this in the emitter? + "constructor": { + "signature": { + "0": { + "param": [ + { + "name": "message", + "optional": false + } + ] + } + } + } + }, "HTMLElement": { "properties": { "property": { diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index e7219d3d9..3a898e789 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -19,6 +19,37 @@ "ConnectionType": { "value": ["wimax"] }, + "GPUBlendFactor": { + "value": [ + "one-minus-src1", // Blink only as of 2024-11 + "one-minus-src1-alpha", // Blink only as of 2024-11 + "src1", // Blink only as of 2024-11 + "src1-alpha" // Blink only as of 2024-11 + ] + }, + "GPUFeatureName": { + "value": [ + "clip-distances", // Blink only as of 2024-11 + "dual-source-blending", // Blink only as of 2024-11 + "float32-blendable", // Blink only as of 2024-11 + "texture-compression-astc-sliced-3d", // No implementation as of 2024-11 + "texture-compression-bc-sliced-3d" // No implementation as of 2024-11 + ] + }, + "GPUVertexFormat": { + "value": [ + "float16", // Blink only as of 2024-11 + "sint16", // Blink only as of 2024-11 + "sint8", // Blink only as of 2024-11 + "snorm16", // Blink only as of 2024-11 + "snorm8", // Blink only as of 2024-11 + "uint16", // Blink only as of 2024-11 + "uint8", // Blink only as of 2024-11 + "unorm16", // Blink only as of 2024-11 + "unorm8", // Blink only as of 2024-11 + "unorm8x4-bgra" // Blink only as of 2024-11 + ] + }, "MediaSessionAction": { "value": [ "enterpictureinpicture", // Blink only as of 2024-07 @@ -311,6 +342,27 @@ } } }, + "GPURequestAdapterOptions": { + "members": { + "member": { + "featureLevel": null // Blink experimental only as of 2024-11 + } + } + }, + "GPUShaderModuleDescriptor": { + "members": { + "member": { + "compilationHints": null // Blink only as of 2024-11 + } + } + }, + "GPUTextureViewDescriptor": { + "members": { + "member": { + "usage": null // Blink only as of 2024-11 + } + } + }, "IntersectionObserverInit": { "members": { "member": { diff --git a/package-lock.json b/package-lock.json index 7109e4ddb..86c142f48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -349,9 +349,9 @@ } }, "node_modules/@mdn/browser-compat-data": { - "version": "5.6.15", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.6.15.tgz", - "integrity": "sha512-OtMTbZT2qN9/mgkHgsN3xdirnjzRtMrR2CndiQbg2tNv3gipdb/7cYhtdloIL0m6UPm049DZCUdxJO/asqNhFw==", + "version": "5.6.16", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.6.16.tgz", + "integrity": "sha512-48c0o53eGIwocPXgGwS4bAJpQ5YODPdOlus7g1F6vNP+fAv/isoVQA2Z7x+TfhftsapPYJXZVzp3hI4CjD1Dfg==", "dev": true, "license": "CC0-1.0" },