;
+}
+
+declare var GPUCompilationInfo: {
+ prototype: GPUCompilationInfo;
+ new (): never;
+};
+
+interface GPUCompilationMessage {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUCompilationMessage";
+ /**
+ * The human-readable, localizable text for this compilation message.
+ * Note: The {@link GPUCompilationMessage#message} should follow the best practices for language
+ * and direction information. This includes making use of any future standards which may
+ * emerge regarding the reporting of string language and direction metadata.
+ * Editorial:
+ * At the time of this writing, no language/direction recommendation is available that provides
+ * compatibility and consistency with legacy APIs, but when there is, adopt it formally.
+ */
+ readonly message: string;
+ /**
+ * The severity level of the message.
+ * If the {@link GPUCompilationMessage#type} is {@link GPUCompilationMessageType#"error"}, it
+ * corresponds to a shader-creation error.
+ */
+ readonly type: GPUCompilationMessageType;
+ /**
+ * The line number in the shader {@link GPUShaderModuleDescriptor#code} the
+ * {@link GPUCompilationMessage#message} corresponds to. Value is one-based, such that a lineNum of
+ * `1` indicates the first line of the shader {@link GPUShaderModuleDescriptor#code}. Lines are
+ * delimited by line breaks.
+ * If the {@link GPUCompilationMessage#message} corresponds to a substring this points to
+ * the line on which the substring begins. Must be `0` if the {@link GPUCompilationMessage#message}
+ * does not correspond to any specific point in the shader {@link GPUShaderModuleDescriptor#code}.
+ */
+ readonly lineNum: number;
+ /**
+ * The offset, in UTF-16 code units, from the beginning of line {@link GPUCompilationMessage#lineNum}
+ * of the shader {@link GPUShaderModuleDescriptor#code} to the point or beginning of the substring
+ * that the {@link GPUCompilationMessage#message} corresponds to. Value is one-based, such that a
+ * {@link GPUCompilationMessage#linePos} of `1` indicates the first code unit of the line.
+ * If {@link GPUCompilationMessage#message} corresponds to a substring this points to the
+ * first UTF-16 code unit of the substring. Must be `0` if the {@link GPUCompilationMessage#message}
+ * does not correspond to any specific point in the shader {@link GPUShaderModuleDescriptor#code}.
+ */
+ readonly linePos: number;
+ /**
+ * The offset from the beginning of the shader {@link GPUShaderModuleDescriptor#code} in UTF-16
+ * code units to the point or beginning of the substring that {@link GPUCompilationMessage#message}
+ * corresponds to. Must reference the same position as {@link GPUCompilationMessage#lineNum} and
+ * {@link GPUCompilationMessage#linePos}. Must be `0` if the {@link GPUCompilationMessage#message}
+ * does not correspond to any specific point in the shader {@link GPUShaderModuleDescriptor#code}.
+ */
+ readonly offset: number;
+ /**
+ * The number of UTF-16 code units in the substring that {@link GPUCompilationMessage#message}
+ * corresponds to. If the message does not correspond with a substring then
+ * {@link GPUCompilationMessage#length} must be 0.
+ */
+ readonly length: number;
+}
+
+declare var GPUCompilationMessage: {
+ prototype: GPUCompilationMessage;
+ new (): never;
+};
+
+interface GPUComputePassEncoder
+ extends GPUObjectBase,
+ GPUCommandsMixin,
+ GPUDebugCommandsMixin,
+ GPUBindingCommandsMixin {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUComputePassEncoder";
+ /**
+ * Sets the current {@link GPUComputePipeline}.
+ * @param pipeline - The compute pipeline to use for subsequent dispatch commands.
+ */
+ setPipeline(
+ pipeline: GPUComputePipeline
+ ): undefined;
+ /**
+ * Dispatch work to be performed with the current {@link GPUComputePipeline}.
+ * See [[#computing-operations]] for the detailed specification.
+ * @param workgroupCountX - X dimension of the grid of workgroups to dispatch.
+ * @param workgroupCountY - Y dimension of the grid of workgroups to dispatch.
+ * @param workgroupCountZ - Z dimension of the grid of workgroups to dispatch.
+ */
+ dispatchWorkgroups(
+ workgroupCountX: GPUSize32,
+ workgroupCountY?: GPUSize32,
+ workgroupCountZ?: GPUSize32
+ ): undefined;
+ /**
+ * Dispatch work to be performed with the current {@link GPUComputePipeline} using parameters read
+ * from a {@link GPUBuffer}.
+ * See [[#computing-operations]] for the detailed specification.
+ * packed block of **three 32-bit unsigned integer values (12 bytes total)**,
+ * given in the same order as the arguments for {@link GPUComputePassEncoder#dispatchWorkgroups}.
+ * For example:
+ * @param indirectBuffer - Buffer containing the indirect dispatch parameters.
+ * @param indirectOffset - Offset in bytes into `indirectBuffer` where the dispatch data begins.
+ */
+ dispatchWorkgroupsIndirect(
+ indirectBuffer: GPUBuffer,
+ indirectOffset: GPUSize64
+ ): undefined;
+ /**
+ * Completes recording of the compute pass commands sequence.
+ */
+ end(): undefined;
+}
+
+declare var GPUComputePassEncoder: {
+ prototype: GPUComputePassEncoder;
+ new (): never;
+};
+
+interface GPUComputePipeline
+ extends GPUObjectBase,
+ GPUPipelineBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUComputePipeline";
+}
+
+declare var GPUComputePipeline: {
+ prototype: GPUComputePipeline;
+ new (): never;
+};
+
+interface GPUDevice
+ extends EventTarget,
+ GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUDevice";
+ /**
+ * A set containing the {@link GPUFeatureName} values of the features
+ * supported by the device (i.e. the ones with which it was created).
+ */
+ readonly features: GPUSupportedFeatures;
+ /**
+ * Exposes the limits supported by the device
+ * (which are exactly the ones with which it was created).
+ */
+ readonly limits: GPUSupportedLimits;
+ /**
+ * The primary {@link GPUQueue} for this device.
+ */
+ readonly queue: GPUQueue;
+ /**
+ * Destroys the device, preventing further operations on it.
+ * Outstanding asynchronous operations will fail.
+ * Note: It is valid to destroy a device multiple times.
+ */
+ destroy(): undefined;
+ /**
+ * Creates a {@link GPUBuffer}.
+ * @param descriptor - Description of the {@link GPUBuffer} to create.
+ */
+ createBuffer(
+ descriptor: GPUBufferDescriptor
+ ): GPUBuffer;
+ /**
+ * Creates a {@link GPUTexture}.
+ * @param descriptor - Description of the {@link GPUTexture} to create.
+ */
+ createTexture(
+ descriptor: GPUTextureDescriptor
+ ): GPUTexture;
+ /**
+ * Creates a {@link GPUSampler}.
+ * @param descriptor - Description of the {@link GPUSampler} to create.
+ */
+ createSampler(
+ descriptor?: GPUSamplerDescriptor
+ ): GPUSampler;
+ /**
+ * Creates a {@link GPUExternalTexture} wrapping the provided image source.
+ * @param descriptor - Provides the external image source object (and any creation options).
+ */
+ importExternalTexture(
+ descriptor: GPUExternalTextureDescriptor
+ ): GPUExternalTexture;
+ /**
+ * Creates a {@link GPUBindGroupLayout}.
+ * @param descriptor - Description of the {@link GPUBindGroupLayout} to create.
+ */
+ createBindGroupLayout(
+ descriptor: GPUBindGroupLayoutDescriptor
+ ): GPUBindGroupLayout;
+ /**
+ * Creates a {@link GPUPipelineLayout}.
+ * @param descriptor - Description of the {@link GPUPipelineLayout} to create.
+ */
+ createPipelineLayout(
+ descriptor: GPUPipelineLayoutDescriptor
+ ): GPUPipelineLayout;
+ /**
+ * Creates a {@link GPUBindGroup}.
+ * @param descriptor - Description of the {@link GPUBindGroup} to create.
+ */
+ createBindGroup(
+ descriptor: GPUBindGroupDescriptor
+ ): GPUBindGroup;
+ /**
+ * Creates a {@link GPUShaderModule}.
+ * @param descriptor - Description of the {@link GPUShaderModule} to create.
+ */
+ createShaderModule(
+ descriptor: GPUShaderModuleDescriptor
+ ): GPUShaderModule;
+ /**
+ * Creates a {@link GPUComputePipeline} using immediate pipeline creation.
+ * @param descriptor - Description of the {@link GPUComputePipeline} to create.
+ */
+ createComputePipeline(
+ descriptor: GPUComputePipelineDescriptor
+ ): GPUComputePipeline;
+ /**
+ * Creates a {@link GPURenderPipeline} using immediate pipeline creation.
+ * @param descriptor - Description of the {@link GPURenderPipeline} to create.
+ */
+ createRenderPipeline(
+ descriptor: GPURenderPipelineDescriptor
+ ): GPURenderPipeline;
+ /**
+ * Creates a {@link GPUComputePipeline} using async pipeline creation.
+ * The returned {@link Promise} resolves when the created pipeline
+ * is ready to be used without additional delay.
+ * If pipeline creation fails, the returned {@link Promise} rejects with an {@link GPUPipelineError}.
+ * Note: Use of this method is preferred whenever possible, as it prevents blocking the
+ * queue timeline work on pipeline compilation.
+ * @param descriptor - Description of the {@link GPUComputePipeline} to create.
+ */
+ createComputePipelineAsync(
+ descriptor: GPUComputePipelineDescriptor
+ ): Promise;
+ /**
+ * Creates a {@link GPURenderPipeline} using async pipeline creation.
+ * The returned {@link Promise} resolves when the created pipeline
+ * is ready to be used without additional delay.
+ * If pipeline creation fails, the returned {@link Promise} rejects with an {@link GPUPipelineError}.
+ * Note: Use of this method is preferred whenever possible, as it prevents blocking the
+ * queue timeline work on pipeline compilation.
+ * @param descriptor - Description of the {@link GPURenderPipeline} to create.
+ */
+ createRenderPipelineAsync(
+ descriptor: GPURenderPipelineDescriptor
+ ): Promise;
+ /**
+ * Creates a {@link GPUCommandEncoder}.
+ * @param descriptor - Description of the {@link GPUCommandEncoder} to create.
+ */
+ createCommandEncoder(
+ descriptor?: GPUCommandEncoderDescriptor
+ ): GPUCommandEncoder;
+ /**
+ * Creates a {@link GPURenderBundleEncoder}.
+ * @param descriptor - Description of the {@link GPURenderBundleEncoder} to create.
+ */
+ createRenderBundleEncoder(
+ descriptor: GPURenderBundleEncoderDescriptor
+ ): GPURenderBundleEncoder;
+ /**
+ * Creates a {@link GPUQuerySet}.
+ * @param descriptor - Description of the {@link GPUQuerySet} to create.
+ */
+ createQuerySet(
+ descriptor: GPUQuerySetDescriptor
+ ): GPUQuerySet;
+ /**
+ * A slot-backed attribute holding a promise which is created with the device, remains
+ * pending for the lifetime of the device, then resolves when the device is lost.
+ * Upon initialization, it is set to a new promise.
+ */
+ readonly lost: Promise;
+ /**
+ * Pushes a new GPU error scope onto the {@link GPUDevice#[[errorScopeStack]]} for `this`.
+ * @param filter - Which class of errors this error scope observes.
+ */
+ pushErrorScope(
+ filter: GPUErrorFilter
+ ): undefined;
+ /**
+ * Pops a GPU error scope off the {@link GPUDevice#[[errorScopeStack]]} for `this`
+ * and resolves to **any** {@link GPUError} observed by the error scope, or `null` if none.
+ * There is no guarantee of the ordering of promise resolution.
+ */
+ popErrorScope(): Promise;
+ /**
+ * An event handler IDL attribute for the {@link GPUDevice#uncapturederror} event type.
+ */
+ onuncapturederror:
+ | ((
+ this: GPUDevice,
+ ev: GPUUncapturedErrorEvent
+ ) => any)
+ | null;
+}
+
+declare var GPUDevice: {
+ prototype: GPUDevice;
+ new (): never;
+};
+
+interface GPUDeviceLostInfo {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUDeviceLostInfo";
+ readonly reason: GPUDeviceLostReason;
+ readonly message: string;
+}
+
+declare var GPUDeviceLostInfo: {
+ prototype: GPUDeviceLostInfo;
+ new (): never;
+};
+
+interface GPUError {
+ /**
+ * A human-readable, localizable text message providing information about the error that
+ * occurred.
+ * Note: This message is generally intended for application developers to debug their
+ * applications and capture information for debug reports, not to be surfaced to end-users.
+ * Note: User agents should not include potentially machine-parsable details in this message,
+ * such as free system memory on {@link GPUErrorFilter#"out-of-memory"} or other details about the
+ * conditions under which memory was exhausted.
+ * Note: The {@link GPUError#message} should follow the best practices for language and
+ * direction information. This includes making use of any future standards which may emerge
+ * regarding the reporting of string language and direction metadata.
+ * Editorial:
+ * At the time of this writing, no language/direction recommendation is available that provides
+ * compatibility and consistency with legacy APIs, but when there is, adopt it formally.
+ */
+ readonly message: string;
+}
+
+declare var GPUError: {
+ prototype: GPUError;
+ new (): never;
+};
+
+interface GPUExternalTexture
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUExternalTexture";
+}
+
+declare var GPUExternalTexture: {
+ prototype: GPUExternalTexture;
+ new (): never;
+};
+
+interface GPUInternalError
+ extends GPUError {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUInternalError";
+}
+
+declare var GPUInternalError: {
+ prototype: GPUInternalError;
+ new (
+ message: string
+ ): GPUInternalError;
+};
+
+interface GPUOutOfMemoryError
+ extends GPUError {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUOutOfMemoryError";
+}
+
+declare var GPUOutOfMemoryError: {
+ prototype: GPUOutOfMemoryError;
+ new (
+ message: string
+ ): GPUOutOfMemoryError;
+};
+
+interface GPUPipelineError
+ extends DOMException {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUPipelineError";
+ /**
+ * A read-only slot-backed attribute exposing the type of error encountered in pipeline creation
+ * as a GPUPipelineErrorReason:
+ *
+ * - "validation": A [$validation error$].
+ * - "internal": An [$internal error$].
+ *
+ */
+ readonly reason: GPUPipelineErrorReason;
+}
+
+declare var GPUPipelineError: {
+ prototype: GPUPipelineError;
+ new (
+ message:
+ | string
+ | undefined,
+ options: GPUPipelineErrorInit
+ ): GPUPipelineError;
+};
+
+interface GPUPipelineLayout
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUPipelineLayout";
+}
+
+declare var GPUPipelineLayout: {
+ prototype: GPUPipelineLayout;
+ new (): never;
+};
+
+interface GPUQuerySet
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUQuerySet";
+ /**
+ * Destroys the {@link GPUQuerySet}.
+ */
+ destroy(): undefined;
+ /**
+ * The type of the queries managed by this {@link GPUQuerySet}.
+ */
+ readonly type: GPUQueryType;
+ /**
+ * The number of queries managed by this {@link GPUQuerySet}.
+ */
+ readonly count: GPUSize32Out;
+}
+
+declare var GPUQuerySet: {
+ prototype: GPUQuerySet;
+ new (): never;
+};
+
+interface GPUQueue
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUQueue";
+ /**
+ * Schedules the execution of the command buffers by the GPU on this queue.
+ * Submitted command buffers cannot be used again.
+ * `commandBuffers`:
+ */
+ submit(
+ commandBuffers: Iterable
+ ): undefined;
+ /**
+ * Returns a {@link Promise} that resolves once this queue finishes processing all the work submitted
+ * up to this moment.
+ * Resolution of this {@link Promise} implies the completion of
+ * {@link GPUBuffer#mapAsync} calls made prior to that call,
+ * on {@link GPUBuffer}s last used exclusively on that queue.
+ */
+ onSubmittedWorkDone(): Promise;
+ /**
+ * Issues a write operation of the provided data into a {@link GPUBuffer}.
+ * @param buffer - The buffer to write to.
+ * @param bufferOffset - Offset in bytes into `buffer` to begin writing at.
+ * @param data - Data to write into `buffer`.
+ * @param dataOffset - Offset in into `data` to begin writing from. Given in elements if
+ * `data` is a `TypedArray` and bytes otherwise.
+ * @param size - Size of content to write from `data` to `buffer`. Given in elements if
+ * `data` is a `TypedArray` and bytes otherwise.
+ */
+ writeBuffer(
+ buffer: GPUBuffer,
+ bufferOffset: GPUSize64,
+ data:
+ | BufferSource
+ | SharedArrayBuffer,
+ dataOffset?: GPUSize64,
+ size?: GPUSize64
+ ): undefined;
+ /**
+ * Issues a write operation of the provided data into a {@link GPUTexture}.
+ * @param destination - The texture subresource and origin to write to.
+ * @param data - Data to write into `destination`.
+ * @param dataLayout - Layout of the content in `data`.
+ * @param size - Extents of the content to write from `data` to `destination`.
+ */
+ writeTexture(
+ destination: GPUImageCopyTexture,
+ data:
+ | BufferSource
+ | SharedArrayBuffer,
+ dataLayout: GPUImageDataLayout,
+ size: GPUExtent3DStrict
+ ): undefined;
+ /**
+ * Issues a copy operation of the contents of a platform image/canvas
+ * into the destination texture.
+ * This operation performs [[#color-space-conversions|color encoding]] into the destination
+ * encoding according to the parameters of {@link GPUImageCopyTextureTagged}.
+ * Copying into a `-srgb` texture results in the same texture bytes, not the same decoded
+ * values, as copying into the corresponding non-`-srgb` format.
+ * Thus, after a copy operation, sampling the destination texture has
+ * different results depending on whether its format is `-srgb`, all else unchanged.
+ *
+ * @param source - source image and origin to copy to `destination`.
+ * @param destination - The texture subresource and origin to write to, and its encoding metadata.
+ * @param copySize - Extents of the content to write from `source` to `destination`.
+ */
+ copyExternalImageToTexture(
+ source: GPUImageCopyExternalImage,
+ destination: GPUImageCopyTextureTagged,
+ copySize: GPUExtent3DStrict
+ ): undefined;
+}
+
+declare var GPUQueue: {
+ prototype: GPUQueue;
+ new (): never;
+};
+
+interface GPURenderBundle
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPURenderBundle";
+}
+
+declare var GPURenderBundle: {
+ prototype: GPURenderBundle;
+ new (): never;
+};
+
+interface GPURenderBundleEncoder
+ extends GPUObjectBase,
+ GPUCommandsMixin,
+ GPUDebugCommandsMixin,
+ GPUBindingCommandsMixin,
+ GPURenderCommandsMixin {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPURenderBundleEncoder";
+ /**
+ * Completes recording of the render bundle commands sequence.
+ * descriptor:
+ */
+ finish(
+ descriptor?: GPURenderBundleDescriptor
+ ): GPURenderBundle;
+}
+
+declare var GPURenderBundleEncoder: {
+ prototype: GPURenderBundleEncoder;
+ new (): never;
+};
+
+interface GPURenderPassEncoder
+ extends GPUObjectBase,
+ GPUCommandsMixin,
+ GPUDebugCommandsMixin,
+ GPUBindingCommandsMixin,
+ GPURenderCommandsMixin {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPURenderPassEncoder";
+ /**
+ * Sets the viewport used during the rasterization stage to linearly map from
+ * NDC|normalized device coordinates to viewport coordinates.
+ * @param x - Minimum X value of the viewport in pixels.
+ * @param y - Minimum Y value of the viewport in pixels.
+ * @param width - Width of the viewport in pixels.
+ * @param height - Height of the viewport in pixels.
+ * @param minDepth - Minimum depth value of the viewport.
+ * @param maxDepth - Maximum depth value of the viewport.
+ */
+ setViewport(
+ x: number,
+ y: number,
+ width: number,
+ height: number,
+ minDepth: number,
+ maxDepth: number
+ ): undefined;
+ /**
+ * Sets the scissor rectangle used during the rasterization stage.
+ * After transformation into viewport coordinates any fragments which fall outside the scissor
+ * rectangle will be discarded.
+ * @param x - Minimum X value of the scissor rectangle in pixels.
+ * @param y - Minimum Y value of the scissor rectangle in pixels.
+ * @param width - Width of the scissor rectangle in pixels.
+ * @param height - Height of the scissor rectangle in pixels.
+ */
+ setScissorRect(
+ x: GPUIntegerCoordinate,
+ y: GPUIntegerCoordinate,
+ width: GPUIntegerCoordinate,
+ height: GPUIntegerCoordinate
+ ): undefined;
+ /**
+ * Sets the constant blend color and alpha values used with {@link GPUBlendFactor#"constant"}
+ * and {@link GPUBlendFactor#"one-minus-constant"} {@link GPUBlendFactor}s.
+ * @param color - The color to use when blending.
+ */
+ setBlendConstant(
+ color: GPUColor
+ ): undefined;
+ /**
+ * Sets the {@link RenderState#[[stencilReference]]} value used during stencil tests with
+ * the {@link GPUStencilOperation#"replace"} {@link GPUStencilOperation}.
+ * @param reference - The new stencil reference value.
+ */
+ setStencilReference(
+ reference: GPUStencilValue
+ ): undefined;
+ /**
+ * @param queryIndex - The index of the query in the query set.
+ */
+ beginOcclusionQuery(
+ queryIndex: GPUSize32
+ ): undefined;
+ /**
+ */
+ endOcclusionQuery(): undefined;
+ /**
+ * Executes the commands previously recorded into the given {@link GPURenderBundle}s as part of
+ * this render pass.
+ * When a {@link GPURenderBundle} is executed, it does not inherit the render pass's pipeline, bind
+ * groups, or vertex and index buffers. After a {@link GPURenderBundle} has executed, the render
+ * pass's pipeline, bind group, and vertex/index buffer state is cleared
+ * (to the initial, empty values).
+ * Note: The state is cleared, not restored to the previous state.
+ * This occurs even if zero {@link GPURenderBundle|GPURenderBundles} are executed.
+ * @param bundles - List of render bundles to execute.
+ */
+ executeBundles(
+ bundles: Iterable
+ ): undefined;
+ /**
+ * Completes recording of the render pass commands sequence.
+ */
+ end(): undefined;
+}
+
+declare var GPURenderPassEncoder: {
+ prototype: GPURenderPassEncoder;
+ new (): never;
+};
+
+interface GPURenderPipeline
+ extends GPUObjectBase,
+ GPUPipelineBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPURenderPipeline";
+}
+
+declare var GPURenderPipeline: {
+ prototype: GPURenderPipeline;
+ new (): never;
+};
+
+interface GPUSampler
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUSampler";
+}
+
+declare var GPUSampler: {
+ prototype: GPUSampler;
+ new (): never;
+};
+
+interface GPUShaderModule
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUShaderModule";
+ /**
+ * Returns any messages generated during the {@link GPUShaderModule}'s compilation.
+ * The locations, order, and contents of messages are implementation-defined.
+ * In particular, messages may not be ordered by {@link GPUCompilationMessage#lineNum}.
+ */
+ getCompilationInfo(): Promise;
+}
+
+declare var GPUShaderModule: {
+ prototype: GPUShaderModule;
+ new (): never;
+};
+
+type GPUSupportedFeatures =
+ ReadonlySet;
+
+interface GPUSupportedLimits {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUSupportedLimits";
+ readonly maxTextureDimension1D: number;
+ readonly maxTextureDimension2D: number;
+ readonly maxTextureDimension3D: number;
+ readonly maxTextureArrayLayers: number;
+ readonly maxBindGroups: number;
+ readonly maxBindGroupsPlusVertexBuffers: number;
+ readonly maxBindingsPerBindGroup: number;
+ readonly maxDynamicUniformBuffersPerPipelineLayout: number;
+ readonly maxDynamicStorageBuffersPerPipelineLayout: number;
+ readonly maxSampledTexturesPerShaderStage: number;
+ readonly maxSamplersPerShaderStage: number;
+ readonly maxStorageBuffersPerShaderStage: number;
+ readonly maxStorageTexturesPerShaderStage: number;
+ readonly maxUniformBuffersPerShaderStage: number;
+ readonly maxUniformBufferBindingSize: number;
+ readonly maxStorageBufferBindingSize: number;
+ readonly minUniformBufferOffsetAlignment: number;
+ readonly minStorageBufferOffsetAlignment: number;
+ readonly maxVertexBuffers: number;
+ readonly maxBufferSize: number;
+ readonly maxVertexAttributes: number;
+ readonly maxVertexBufferArrayStride: number;
+ readonly maxInterStageShaderComponents: number;
+ readonly maxInterStageShaderVariables: number;
+ readonly maxColorAttachments: number;
+ readonly maxColorAttachmentBytesPerSample: number;
+ readonly maxComputeWorkgroupStorageSize: number;
+ readonly maxComputeInvocationsPerWorkgroup: number;
+ readonly maxComputeWorkgroupSizeX: number;
+ readonly maxComputeWorkgroupSizeY: number;
+ readonly maxComputeWorkgroupSizeZ: number;
+ readonly maxComputeWorkgroupsPerDimension: number;
+}
+
+declare var GPUSupportedLimits: {
+ prototype: GPUSupportedLimits;
+};
+
+interface GPUTexture
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUTexture";
+ /**
+ * Creates a {@link GPUTextureView}.
+ * @param descriptor - Description of the {@link GPUTextureView} to create.
+ */
+ createView(
+ descriptor?: GPUTextureViewDescriptor
+ ): GPUTextureView;
+ /**
+ * Destroys the {@link GPUTexture}.
+ */
+ destroy(): undefined;
+ /**
+ * The width of this {@link GPUTexture}.
+ */
+ readonly width: GPUIntegerCoordinateOut;
+ /**
+ * The height of this {@link GPUTexture}.
+ */
+ readonly height: GPUIntegerCoordinateOut;
+ /**
+ * The depth or layer count of this {@link GPUTexture}.
+ */
+ readonly depthOrArrayLayers: GPUIntegerCoordinateOut;
+ /**
+ * The number of mip levels of this {@link GPUTexture}.
+ */
+ readonly mipLevelCount: GPUIntegerCoordinateOut;
+ /**
+ * The number of sample count of this {@link GPUTexture}.
+ */
+ readonly sampleCount: GPUSize32Out;
+ /**
+ * The dimension of the set of texel for each of this {@link GPUTexture}'s subresources.
+ */
+ readonly dimension: GPUTextureDimension;
+ /**
+ * The format of this {@link GPUTexture}.
+ */
+ readonly format: GPUTextureFormat;
+ /**
+ * The allowed usages for this {@link GPUTexture}.
+ */
+ readonly usage: GPUFlagsConstant;
+}
+
+declare var GPUTexture: {
+ prototype: GPUTexture;
+ new (): never;
+};
+
+interface GPUTextureView
+ extends GPUObjectBase {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUTextureView";
+}
+
+declare var GPUTextureView: {
+ prototype: GPUTextureView;
+ new (): never;
+};
+
+interface GPUUncapturedErrorEvent
+ extends Event {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUUncapturedErrorEvent";
+ /**
+ * A slot-backed attribute holding an object representing the error that was uncaptured.
+ * This has the same type as errors returned by {@link GPUDevice#popErrorScope}.
+ */
+ readonly error: GPUError;
+}
+
+declare var GPUUncapturedErrorEvent: {
+ prototype: GPUUncapturedErrorEvent;
+ new (
+ type: string,
+ gpuUncapturedErrorEventInitDict: GPUUncapturedErrorEventInit
+ ): GPUUncapturedErrorEvent;
+};
+
+interface GPUValidationError
+ extends GPUError {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUValidationError";
+}
+
+declare var GPUValidationError: {
+ prototype: GPUValidationError;
+ new (
+ message: string
+ ): GPUValidationError;
+};
+
+type WGSLLanguageFeatures =
+ ReadonlySet;
+
+interface Navigator
+ extends NavigatorGPU {}
+
+interface WorkerNavigator
+ extends NavigatorGPU {}
+
+interface GPUBufferUsage {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUBufferUsage";
+ readonly MAP_READ: GPUFlagsConstant;
+ readonly MAP_WRITE: GPUFlagsConstant;
+ readonly COPY_SRC: GPUFlagsConstant;
+ readonly COPY_DST: GPUFlagsConstant;
+ readonly INDEX: GPUFlagsConstant;
+ readonly VERTEX: GPUFlagsConstant;
+ readonly UNIFORM: GPUFlagsConstant;
+ readonly STORAGE: GPUFlagsConstant;
+ readonly INDIRECT: GPUFlagsConstant;
+ readonly QUERY_RESOLVE: GPUFlagsConstant;
+}
+
+declare var GPUBufferUsage: {
+ prototype: GPUBufferUsage;
+ readonly MAP_READ: GPUFlagsConstant;
+ readonly MAP_WRITE: GPUFlagsConstant;
+ readonly COPY_SRC: GPUFlagsConstant;
+ readonly COPY_DST: GPUFlagsConstant;
+ readonly INDEX: GPUFlagsConstant;
+ readonly VERTEX: GPUFlagsConstant;
+ readonly UNIFORM: GPUFlagsConstant;
+ readonly STORAGE: GPUFlagsConstant;
+ readonly INDIRECT: GPUFlagsConstant;
+ readonly QUERY_RESOLVE: GPUFlagsConstant;
+};
+
+interface GPUColorWrite {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUColorWrite";
+ readonly RED: GPUFlagsConstant;
+ readonly GREEN: GPUFlagsConstant;
+ readonly BLUE: GPUFlagsConstant;
+ readonly ALPHA: GPUFlagsConstant;
+ readonly ALL: GPUFlagsConstant;
+}
+
+declare var GPUColorWrite: {
+ prototype: GPUColorWrite;
+ readonly RED: GPUFlagsConstant;
+ readonly GREEN: GPUFlagsConstant;
+ readonly BLUE: GPUFlagsConstant;
+ readonly ALPHA: GPUFlagsConstant;
+ readonly ALL: GPUFlagsConstant;
+};
+
+interface GPUMapMode {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUMapMode";
+ readonly READ: GPUFlagsConstant;
+ readonly WRITE: GPUFlagsConstant;
+}
+
+declare var GPUMapMode: {
+ prototype: GPUMapMode;
+ new (): never;
+ readonly READ: GPUFlagsConstant;
+ readonly WRITE: GPUFlagsConstant;
+};
+
+interface GPUShaderStage {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUShaderStage";
+ readonly VERTEX: GPUFlagsConstant;
+ readonly FRAGMENT: GPUFlagsConstant;
+ readonly COMPUTE: GPUFlagsConstant;
+}
+
+declare var GPUShaderStage: {
+ prototype: GPUShaderStage;
+ readonly VERTEX: GPUFlagsConstant;
+ readonly FRAGMENT: GPUFlagsConstant;
+ readonly COMPUTE: GPUFlagsConstant;
+};
+
+interface GPUTextureUsage {
+ /**
+ * Nominal type branding.
+ * https://github.com/microsoft/TypeScript/pull/33038
+ * @internal
+ */
+ readonly __brand: "GPUTextureUsage";
+ readonly COPY_SRC: GPUFlagsConstant;
+ readonly COPY_DST: GPUFlagsConstant;
+ readonly TEXTURE_BINDING: GPUFlagsConstant;
+ readonly STORAGE_BINDING: GPUFlagsConstant;
+ readonly RENDER_ATTACHMENT: GPUFlagsConstant;
+}
+
+declare var GPUTextureUsage: {
+ prototype: GPUTextureUsage;
+ readonly COPY_SRC: GPUFlagsConstant;
+ readonly COPY_DST: GPUFlagsConstant;
+ readonly TEXTURE_BINDING: GPUFlagsConstant;
+ readonly STORAGE_BINDING: GPUFlagsConstant;
+ readonly RENDER_ATTACHMENT: GPUFlagsConstant;
+};