Package-level declarations

Types

Link copied to clipboard
open class GPU

Available only in secure contexts.

Link copied to clipboard
open class GPUAdapter

Available only in secure contexts.

Link copied to clipboard
open class GPUAdapterInfo

Available only in secure contexts.

Link copied to clipboard
sealed interface GPUAddressMode
Link copied to clipboard
sealed interface GPUAutoLayoutMode
Link copied to clipboard

The GPUBindGroup interface of the WebGPU API is based on a GPUBindGroupLayout and defines a set of resources to be bound together in a group and how those resources are used in shader stages. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard

The GPUBindGroupLayout interface of the WebGPU API defines the structure and purpose of related GPU resources such as buffers that will be used in a pipeline, and is used as a template when creating GPUBindGroups. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Union of:

Link copied to clipboard
Link copied to clipboard
sealed interface GPUBlendFactor
Link copied to clipboard
sealed interface GPUBlendOperation
Link copied to clipboard
interface GPUBlendState
Link copied to clipboard

The GPUBuffer interface of the WebGPU API represents a block of memory that can be used to store raw data to use in GPU operations. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface GPUBufferBindingType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface GPUBufferMapState
Link copied to clipboard
Link copied to clipboard
sealed interface GPUCanvasAlphaMode
Link copied to clipboard
Link copied to clipboard
sealed interface GPUCanvasToneMappingMode
Link copied to clipboard
Link copied to clipboard
interface GPUColorDict
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The GPUCommandBuffer interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution. Available only in secure contexts.

Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
sealed interface GPUCompareFunction
Link copied to clipboard

The GPUCompilationInfo interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code. Available only in secure contexts.

Link copied to clipboard

The GPUCompilationMessage interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUCompilationMessageType
Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard

The GPUComputePipeline interface of the WebGPU API represents a pipeline that controls the compute shader stage and can be used in a GPUComputePassEncoder. Available only in secure contexts.

Link copied to clipboard

Union of:

Link copied to clipboard
sealed interface GPUCullMode
Link copied to clipboard
Link copied to clipboard
typealias GPUDepthBias = JsInt
Link copied to clipboard
Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard

The GPUDeviceLostInfo interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUDeviceLostReason
Link copied to clipboard
open class GPUError : JsErrorLike

The GPUError interface of the WebGPU API is the base interface for errors surfaced by GPUDevice.popErrorScope and the uncapturederror event. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUErrorFilter
Link copied to clipboard
Link copied to clipboard
interface GPUExtent3DDict
Link copied to clipboard

The GPUExternalTexture interface of the WebGPU API represents a wrapper object containing an HTMLVideoElement snapshot that can be used as a texture in GPU rendering operations. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUFeatureName
Link copied to clipboard
sealed interface GPUFilterMode
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface GPUFrontFace
Link copied to clipboard
typealias GPUIndex32 = JsInt
Link copied to clipboard
sealed interface GPUIndexFormat
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class GPUInternalError(message: String) : GPUError

The GPUInternalError interface of the WebGPU API describes an application error indicating that an operation failed for a system or implementation-specific reason, even when all validation requirements were satisfied. Available only in secure contexts.

Link copied to clipboard
sealed interface GPULoadOp
Link copied to clipboard
Link copied to clipboard
sealed interface GPUMipmapFilterMode
Link copied to clipboard
Link copied to clipboard
interface GPUObjectBase
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface GPUOrigin2DDict
Link copied to clipboard
Link copied to clipboard
interface GPUOrigin3DDict
Link copied to clipboard
open class GPUOutOfMemoryError(message: String) : GPUError

The GPUOutOfMemoryError interface of the WebGPU API describes an out-of-memory (oom) error indicating that there was not enough free memory to complete the requested operation. Available only in secure contexts.

Link copied to clipboard
interface GPUPipelineBase
Link copied to clipboard
Link copied to clipboard

The GPUPipelineError interface of the WebGPU API describes a pipeline failure. This is the value received when a Promise returned by a GPUDevice.createComputePipelineAsync() or GPUDevice.createRenderPipelineAsync() call rejects. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
sealed interface GPUPipelineErrorReason
Link copied to clipboard

The GPUPipelineLayout interface of the WebGPU API defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUPowerPreference
Link copied to clipboard
Link copied to clipboard
sealed interface GPUPrimitiveTopology
Link copied to clipboard
Link copied to clipboard

Available only in secure contexts.

Link copied to clipboard
sealed interface GPUQueryType
Link copied to clipboard
open class GPUQueue : GPUObjectBase

Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard

The GPURenderBundle interface of the WebGPU API represents a container for pre-recorded bundles of commands. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The GPURenderPipeline interface of the WebGPU API represents a pipeline that controls the vertex and fragment shader stages and can be used in a GPURenderPassEncoder or GPURenderBundleEncoder. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
typealias GPUSampleMask = JsInt
Link copied to clipboard

The GPUSampler interface of the WebGPU API represents an object that can control how shaders transform and filter texture resource data. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
sealed interface GPUSamplerBindingType
Link copied to clipboard

The GPUShaderModule interface of the WebGPU API represents an internal shader module object, a container for WGSL shader code that can be submitted to the GPU for execution by a pipeline. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias GPUSize32 = JsInt
Link copied to clipboard
typealias GPUSize32Out = JsInt
Link copied to clipboard
typealias GPUSize64 = JsUInt53
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface GPUStencilOperation
Link copied to clipboard
Link copied to clipboard
sealed interface GPUStorageTextureAccess
Link copied to clipboard
sealed interface GPUStoreOp
Link copied to clipboard

The GPUSupportedFeatures interface of the WebGPU API is a Set-like object that describes additional functionality supported by a GPUAdapter. Available only in secure contexts.

Link copied to clipboard

The GPUSupportedLimits interface of the WebGPU API describes the limits supported by a GPUAdapter. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The GPUTexture interface of the WebGPU API represents a container used to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUTextureAspect
Link copied to clipboard
Link copied to clipboard
sealed interface GPUTextureDimension
Link copied to clipboard
sealed interface GPUTextureFormat
Link copied to clipboard
sealed interface GPUTextureSampleType
Link copied to clipboard
Link copied to clipboard

The GPUTextureView interface of the WebGPU API represents a view into a subset of the texture resources defined by a particular GPUTexture. Available only in secure contexts.

Link copied to clipboard
sealed interface GPUTextureViewDimension
Link copied to clipboard

The GPUUncapturedErrorEvent interface of the WebGPU API is the event object type for the GPUDevice uncapturederror event, used for telemetry and to report unexpected errors. Available only in secure contexts.

Link copied to clipboard
open class GPUValidationError(message: String) : GPUError

The GPUValidationError interface of the WebGPU API describes an application error indicating that an operation did not pass the WebGPU API's validation constraints. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface GPUVertexFormat
Link copied to clipboard
Link copied to clipboard
sealed interface GPUVertexStepMode
Link copied to clipboard

The WGSLLanguageFeatures interface of the WebGPU API is a setlike object that reports the WGSL language extensions supported by the WebGPU implementation. Available only in secure contexts.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

The getCompilationInfo() method of the GPUShaderModule interface returns a Promise that fulfills with a GPUCompilationInfo object containing messages generated during the GPUShaderModule's compilation.

Link copied to clipboard
inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags)
inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags, offset: GPUSize64)
inline suspend fun GPUBuffer.map(mode: GPUMapModeFlags, offset: GPUSize64, size: GPUSize64)

The mapAsync() method of the GPUBuffer interface maps the specified range of the GPUBuffer. It returns a Promise that resolves when the GPUBuffer's content is ready to be accessed. While the GPUBuffer is mapped it cannot be used in any GPU commands.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard