org.graphiks.webgpu¶
Types¶
AndroidArrayBuffer¶
@JvmInline
value class AndroidArrayBuffer : ArrayBuffer
An Android-specific implementation of the `ArrayBuffer` interface.
ArrayBuffer¶
expect sealed interface ArrayBuffer
actual interface ArrayBuffer
actual interface ArrayBuffer
actual interface ArrayBuffer
actual interface ArrayBuffer
=== "common"
Represents a buffer of raw binary data, which can be used in various WebGPU operations. Provides a mechanism to work directly with raw memory for performance-critical computations or data manipulation when working with GPU resources.
=== "android"
Represents a platform-specific abstraction for handling raw binary data buffers.
=== "jvm"
Represents a platform-specific abstraction for handling raw binary data buffers.
=== "native"
Represents a platform-specific abstraction over raw binary data stored in an ArrayBuffer.
=== "web"
A platform-independent representation of a fixed-length raw binary data buffer.
FlagEnumeration¶
interface FlagEnumeration
Represents a generic interface for flag-based enumerations where each enumeration is associated with a unique unsigned long integer value.
GPUAdapter¶
interface GPUAdapter : AutoCloseable
A GPUAdapter encapsulates an adapter, and describes its capabilities (features and limits).
GPUAdapterInfo¶
interface GPUAdapterInfo
GPUAdapterInfo exposes various identifying information about an adapter.
GPUAddressMode¶
expect enum GPUAddressMode : Enum<GPUAddressMode>
actual enum GPUAddressMode : Enum<GPUAddressMode>
actual enum GPUAddressMode : Enum<GPUAddressMode>
=== "common"
Selects how texture coordinates outside the normalized range are addressed.
=== "commonNative"
Selects how texture coordinates outside the normalized range are addressed.
=== "web"
Selects how texture coordinates outside the normalized range are addressed.
GPUBindGroup¶
interface GPUBindGroup : GPUObjectBase, AutoCloseable
A GPUBindGroup defines a set of resources to be bound together in a group and how the resources are used in shader stages.
GPUBindGroupDescriptor¶
interface GPUBindGroupDescriptor : GPUObjectDescriptorBase
Describes the layout and resources used to create a GPUBindGroup.
GPUBindGroupEntry¶
interface GPUBindGroupEntry
Associates a binding index with the GPU resource supplied for that binding.
GPUBindGroupLayout¶
interface GPUBindGroupLayout : GPUObjectBase, AutoCloseable
A GPUBindGroupLayout defines the interface between a set of resources bound in a GPUBindGroup and their accessibility in shader stages.
GPUBindGroupLayoutDescriptor¶
interface GPUBindGroupLayoutDescriptor : GPUObjectDescriptorBase
Describes the entries that define a GPUBindGroupLayout.
GPUBindGroupLayoutEntry¶
interface GPUBindGroupLayoutEntry
Describes one binding's index, shader visibility, and resource-specific layout.
GPUBindingCommandsMixin¶
interface GPUBindingCommandsMixin
GPUBindingCommandsMixin assumes the presence of GPUObjectBase and GPUCommandsMixin members on the same object. It must only be included by interfaces which also include those mixins.
GPUBindingResource¶
sealed interface GPUBindingResource
A resource accepted by a bind group entry, such as a sampler, texture view, buffer binding, or external texture.
GPUBlendComponent¶
interface GPUBlendComponent
Describes one color or alpha blend component's operation and factors.
GPUBlendFactor¶
expect enum GPUBlendFactor : Enum<GPUBlendFactor>
actual enum GPUBlendFactor : Enum<GPUBlendFactor>
actual enum GPUBlendFactor : Enum<GPUBlendFactor>
=== "common"
Defines the source or destination factor used to scale color and alpha values during blending.
=== "commonNative"
Defines the source or destination factor used to scale color and alpha values during blending.
=== "web"
Defines the source or destination factor used to scale color and alpha values during blending.
GPUBlendOperation¶
expect enum GPUBlendOperation : Enum<GPUBlendOperation>
actual enum GPUBlendOperation : Enum<GPUBlendOperation>
actual enum GPUBlendOperation : Enum<GPUBlendOperation>
=== "common"
Defines the operation used to combine source and destination blend factors.
=== "commonNative"
Defines the operation used to combine source and destination blend factors.
=== "web"
Defines the operation used to combine source and destination blend factors.
GPUBlendState¶
interface GPUBlendState
Describes the color and alpha blend components applied to a color target.
GPUBuffer¶
interface GPUBuffer : GPUBindingResource, GPUObjectBase, AutoCloseable
A GPUBuffer represents a block of memory that can be used in GPU operations. Data is stored in linear layout, meaning that each byte of the allocation can be addressed by its offset from the start of the GPUBuffer, subject to alignment restrictions depending on the operation. Some GPUBuffers can be mapped which makes the block of memory accessible via an ArrayBuffer called its mapping.
GPUBufferBinding¶
interface GPUBufferBinding : GPUBindingResource
A buffer resource and the byte range exposed to a shader through a bind group.
GPUBufferBindingLayout¶
interface GPUBufferBindingLayout
Describes the type, dynamic-offset behavior, and minimum size of a buffer binding.
GPUBufferBindingType¶
expect enum GPUBufferBindingType : Enum<GPUBufferBindingType>
actual enum GPUBufferBindingType : Enum<GPUBufferBindingType>
actual enum GPUBufferBindingType : Enum<GPUBufferBindingType>
=== "common"
Selects how a buffer binding is accessed by shaders.
=== "commonNative"
Selects how a buffer binding is accessed by shaders.
=== "web"
Selects how a buffer binding is accessed by shaders.
GPUBufferDescriptor¶
interface GPUBufferDescriptor : GPUObjectDescriptorBase
Describes a GPUBuffer's size, usage, and optional mapped-at-creation state.
GPUBufferDynamicOffset¶
typealias GPUBufferDynamicOffset = UInt
GPUBufferMapState¶
expect enum GPUBufferMapState : Enum<GPUBufferMapState>
actual enum GPUBufferMapState : Enum<GPUBufferMapState>
actual enum GPUBufferMapState : Enum<GPUBufferMapState>
=== "common"
The mapping state of a GPUBuffer: mapped or unmapped.
=== "commonNative"
The mapping state of a GPUBuffer: mapped or unmapped.
=== "web"
The mapping state of a GPUBuffer: mapped or unmapped.
GPUBufferUsage¶
@JvmInline
value class GPUBufferUsage
GPUColor¶
interface GPUColor
An RGBA color represented by four components.
GPUColorTargetState¶
interface GPUColorTargetState
Describes the format, write mask, and optional blending for a fragment color target.
GPUColorWrite¶
@JvmInline
value class GPUColorWrite
GPUCommandBuffer¶
interface GPUCommandBuffer : GPUObjectBase, AutoCloseable
A recorded sequence of GPU commands ready for submission to a GPUQueue.
GPUCommandBufferDescriptor¶
interface GPUCommandBufferDescriptor : GPUObjectDescriptorBase
Options used when finishing a GPUCommandEncoder to create a GPUCommandBuffer.
GPUCommandEncoder¶
Encodes render, compute, and copy commands into a command buffer.
GPUCommandEncoderDescriptor¶
interface GPUCommandEncoderDescriptor : GPUObjectDescriptorBase
Options used to create a GPUCommandEncoder.
GPUCommandsMixin¶
interface GPUCommandsMixin
GPUCommandsMixin defines state common to all interfaces which encode commands. It has no methods.
GPUCompareFunction¶
expect enum GPUCompareFunction : Enum<GPUCompareFunction>
actual enum GPUCompareFunction : Enum<GPUCompareFunction>
actual enum GPUCompareFunction : Enum<GPUCompareFunction>
=== "common"
Selects the comparison operation used by depth and stencil tests.
=== "commonNative"
Selects the comparison operation used by depth and stencil tests.
=== "web"
Selects the comparison operation used by depth and stencil tests.
GPUCompilationInfo¶
interface GPUCompilationInfo
Contains the messages produced while compiling a GPUShaderModule.
GPUCompilationMessage¶
interface GPUCompilationMessage
A GPUCompilationMessage is an informational, warning, or error message generated by the GPUShaderModule compiler. The messages are intended to be human readable to help developers diagnose issues with their shader code. Each message may correspond to a single point or range of the shader source, or may be unassociated with any specific part of the code.
GPUCompilationMessageType¶
expect enum GPUCompilationMessageType : Enum<GPUCompilationMessageType>
actual enum GPUCompilationMessageType : Enum<GPUCompilationMessageType>
actual enum GPUCompilationMessageType : Enum<GPUCompilationMessageType>
=== "common"
Classifies a GPUCompilationMessage as an error, warning, or informational message.
=== "commonNative"
Classifies a GPUCompilationMessage as an error, warning, or informational message.
=== "web"
Classifies a GPUCompilationMessage as an error, warning, or informational message.
GPUComputePassDescriptor¶
interface GPUComputePassDescriptor : GPUObjectDescriptorBase
Options for beginning a compute pass, including optional timestamp writes.
GPUComputePassEncoder¶
Encodes compute dispatches and related commands in a compute pass.
GPUComputePassTimestampWrites¶
interface GPUComputePassTimestampWrites
Selects query slots for compute-pass beginning and end timestamps.
GPUComputePipeline¶
interface GPUComputePipeline : GPUObjectBase, GPUPipelineBase, AutoCloseable
A GPUComputePipeline is a kind of pipeline that controls the compute shader stage, and can be used in GPUComputePassEncoder.
GPUComputePipelineDescriptor¶
Describes the layout and compute shader stage used to create a GPUComputePipeline.
GPUCullMode¶
expect enum GPUCullMode : Enum<GPUCullMode>
actual enum GPUCullMode : Enum<GPUCullMode>
actual enum GPUCullMode : Enum<GPUCullMode>
=== "common"
Selects whether no polygons, front-facing polygons, or back-facing polygons are culled.
=== "commonNative"
Selects whether no polygons, front-facing polygons, or back-facing polygons are culled.
=== "web"
Selects whether no polygons, front-facing polygons, or back-facing polygons are culled.
GPUDebugCommandsMixin¶
interface GPUDebugCommandsMixin
Adds debug marker and debug group commands to command encoders and pass encoders.
GPUDepthBias¶
typealias GPUDepthBias = Int
GPUDepthStencilState¶
interface GPUDepthStencilState
Describes depth testing, stencil testing, and depth bias for a render pipeline.
GPUDevice¶
interface GPUDevice : GPUObjectBase, AutoCloseable
A GPUDevice encapsulates a device and exposes the functionality of that device.
GPUDeviceDescriptor¶
interface GPUDeviceDescriptor : GPUObjectDescriptorBase
GPUDeviceDescriptor describes a device request.
GPUDeviceLostInfo¶
interface GPUDeviceLostInfo
Information resolved by GPUDevice.lost when the device is lost, including the reason and diagnostic message.
GPUDeviceLostReason¶
expect enum GPUDeviceLostReason : Enum<GPUDeviceLostReason>
actual enum GPUDeviceLostReason : Enum<GPUDeviceLostReason>
actual enum GPUDeviceLostReason : Enum<GPUDeviceLostReason>
=== "common"
Indicates why a GPUDevice was lost.
=== "commonNative"
Indicates why a GPUDevice was lost.
=== "web"
Indicates why a GPUDevice was lost.
GPUError¶
sealed interface GPUError
GPUError is the base interface for all errors surfaced from popErrorScope() and the uncapturederror event.
GPUErrorFilter¶
expect enum GPUErrorFilter : Enum<GPUErrorFilter>
actual enum GPUErrorFilter : Enum<GPUErrorFilter>
actual enum GPUErrorFilter : Enum<GPUErrorFilter>
=== "common"
Selects the error category captured by a GPUDevice error scope.
=== "commonNative"
Selects the error category captured by a GPUDevice error scope.
=== "web"
Selects the error category captured by a GPUDevice error scope.
GPUExtent3D¶
interface GPUExtent3D
A three-dimensional extent represented by width, height, and depth or array-layer count.
GPUFeatureLevel¶
expect enum GPUFeatureLevel : Enum<GPUFeatureLevel>
actual enum GPUFeatureLevel : Enum<GPUFeatureLevel>
actual enum GPUFeatureLevel : Enum<GPUFeatureLevel>
=== "common"
Selects the minimum capabilities and the default feature level of devices requested from an adapter.
=== "commonNative"
Selects the minimum capabilities and the default feature level of devices requested from an adapter.
=== "web"
Selects the minimum capabilities and the default feature level of devices requested from an adapter.
GPUFeatureName¶
expect enum GPUFeatureName : Enum<GPUFeatureName>
actual enum GPUFeatureName : Enum<GPUFeatureName>
actual enum GPUFeatureName : Enum<GPUFeatureName>
=== "common"
Each GPUFeatureName identifies a set of functionality which, if available, allows additional usages of WebGPU that would have otherwise been invalid.
=== "commonNative"
Each GPUFeatureName identifies a set of functionality which, if available, allows additional usages of WebGPU that would have otherwise been invalid.
=== "web"
Each GPUFeatureName identifies a set of functionality which, if available, allows additional usages of WebGPU that would have otherwise been invalid.
GPUFilterMode¶
expect enum GPUFilterMode : Enum<GPUFilterMode>
actual enum GPUFilterMode : Enum<GPUFilterMode>
actual enum GPUFilterMode : Enum<GPUFilterMode>
=== "common"
Selects the filtering behavior used for minification and magnification sampling.
=== "commonNative"
Selects the filtering behavior used for minification and magnification sampling.
=== "web"
Selects the filtering behavior used for minification and magnification sampling.
GPUFlagsConstant¶
typealias GPUFlagsConstant = UInt
GPUFragmentState¶
interface GPUFragmentState : GPUProgrammableStage
Describes the fragment shader stage and its color targets.
GPUFrontFace¶
expect enum GPUFrontFace : Enum<GPUFrontFace>
actual enum GPUFrontFace : Enum<GPUFrontFace>
actual enum GPUFrontFace : Enum<GPUFrontFace>
=== "common"
Selects whether clockwise or counter-clockwise polygons are treated as front-facing.
=== "commonNative"
Selects whether clockwise or counter-clockwise polygons are treated as front-facing.
=== "web"
Selects whether clockwise or counter-clockwise polygons are treated as front-facing.
GPUIndex32¶
typealias GPUIndex32 = UInt
GPUIndexFormat¶
expect enum GPUIndexFormat : Enum<GPUIndexFormat>
actual enum GPUIndexFormat : Enum<GPUIndexFormat>
actual enum GPUIndexFormat : Enum<GPUIndexFormat>
=== "common"
The index format determines both the data type of index values in a buffer and, when used with strip primitive topologies ("line-strip" or "triangle-strip") also specifies the primitive restart value. The primitive restart value indicates which index value indicates that a new primitive should be started rather than continuing to construct the triangle strip with the prior indexed vertices.
=== "commonNative"
The index format determines both the data type of index values in a buffer and, when used with strip primitive topologies ("line-strip" or "triangle-strip") also specifies the primitive restart value. The primitive restart value indicates which index value indicates that a new primitive should be started rather than continuing to construct the triangle strip with the prior indexed vertices.
=== "web"
The index format determines both the data type of index values in a buffer and, when used with strip primitive topologies ("line-strip" or "triangle-strip") also specifies the primitive restart value. The primitive restart value indicates which index value indicates that a new primitive should be started rather than continuing to construct the triangle strip with the prior indexed vertices.
GPUIntegerCoordinate¶
typealias GPUIntegerCoordinate = UInt
GPUIntegerCoordinateOut¶
typealias GPUIntegerCoordinateOut = UInt
GPUInternalError¶
interface GPUInternalError : GPUError
GPUInternalError is a subtype of GPUError which indicates than an operation failed for a system or implementation-specific reason even when all validation requirements have been satisfied. For example, the operation may exceed the capabilities of the implementation in a way not easily captured by the supported limits. The same operation may succeed on other devices or under difference circumstances.
GPULoadOp¶
=== "common"
Selects whether a render pass clears an attachment or loads its existing contents.
=== "commonNative"
Selects whether a render pass clears an attachment or loads its existing contents.
=== "web"
Selects whether a render pass clears an attachment or loads its existing contents.
GPUMapMode¶
@JvmInline
value class GPUMapMode
GPUMipmapFilterMode¶
expect enum GPUMipmapFilterMode : Enum<GPUMipmapFilterMode>
actual enum GPUMipmapFilterMode : Enum<GPUMipmapFilterMode>
actual enum GPUMipmapFilterMode : Enum<GPUMipmapFilterMode>
=== "common"
Selects how samples are filtered between mip levels.
=== "commonNative"
Selects how samples are filtered between mip levels.
=== "web"
Selects how samples are filtered between mip levels.
GPUMultisampleState¶
interface GPUMultisampleState
Describes sample count, sample mask, and alpha-to-coverage behavior.
GPUObjectBase¶
interface GPUObjectBase
Common properties included by WebGPU objects. Its label can identify the object in diagnostics and developer tools.
GPUObjectDescriptorBase¶
interface GPUObjectDescriptorBase
Common label field shared by descriptors that create WebGPU objects.
GPUOrigin2D¶
interface GPUOrigin2D
A two-dimensional origin represented by x and y coordinates.
GPUOrigin3D¶
interface GPUOrigin3D
A three-dimensional origin represented by x, y, and z coordinates.
GPUOutOfMemoryError¶
interface GPUOutOfMemoryError : GPUError
GPUOutOfMemoryError is a subtype of GPUError which indicates that there was not enough free memory to complete the requested operation. The operation may succeed if attempted again with a lower memory requirement (like using smaller texture dimensions), or if memory used by other resources is released first.
GPUPipelineBase¶
interface GPUPipelineBase
Common base for GPU pipelines, including access to bind group layouts.
GPUPipelineConstantValue¶
typealias GPUPipelineConstantValue = Double
GPUPipelineDescriptorBase¶
interface GPUPipelineDescriptorBase : GPUObjectDescriptorBase
Common label field shared by render and compute pipeline descriptors.
GPUPipelineLayout¶
interface GPUPipelineLayout : GPUObjectBase, AutoCloseable
A GPUPipelineLayout defines the mapping between resources of all GPUBindGroup objects set up during command encoding in setBindGroup(), and the shaders of the pipeline set by GPURenderCommandsMixin.setPipeline or GPUComputePassEncoder.setPipeline.
GPUPipelineLayoutDescriptor¶
interface GPUPipelineLayoutDescriptor : GPUObjectDescriptorBase
Lists the GPUBindGroupLayouts used by a pipeline.
GPUPowerPreference¶
expect enum GPUPowerPreference : Enum<GPUPowerPreference>
actual enum GPUPowerPreference : Enum<GPUPowerPreference>
actual enum GPUPowerPreference : Enum<GPUPowerPreference>
=== "common"
Hints whether adapter selection should favor lower power use or higher performance.
=== "commonNative"
Hints whether adapter selection should favor lower power use or higher performance.
=== "web"
Hints whether adapter selection should favor lower power use or higher performance.
GPUPrimitiveState¶
interface GPUPrimitiveState
Describes primitive topology, strip format, front face, and culling for a render pipeline.
GPUPrimitiveTopology¶
expect enum GPUPrimitiveTopology : Enum<GPUPrimitiveTopology>
actual enum GPUPrimitiveTopology : Enum<GPUPrimitiveTopology>
actual enum GPUPrimitiveTopology : Enum<GPUPrimitiveTopology>
=== "common"
Selects how vertex data is assembled into points, lines, or triangles.
=== "commonNative"
Selects how vertex data is assembled into points, lines, or triangles.
=== "web"
Selects how vertex data is assembled into points, lines, or triangles.
GPUProgrammableStage¶
interface GPUProgrammableStage
A GPUProgrammableStage describes the entry point in the user-provided GPUShaderModule that controls one of the programmable stages of a pipeline. Entry point names follow the rules defined in WGSL identifier comparison.
GPUQuerySet¶
interface GPUQuerySet : GPUObjectBase, AutoCloseable
Stores the results of a configured kind and count of GPU queries.
GPUQuerySetDescriptor¶
interface GPUQuerySetDescriptor : GPUObjectDescriptorBase
Describes the query type and number of queries in a GPUQuerySet.
GPUQueryType¶
expect enum GPUQueryType : Enum<GPUQueryType>
actual enum GPUQueryType : Enum<GPUQueryType>
actual enum GPUQueryType : Enum<GPUQueryType>
=== "common"
Selects the kind of result recorded by a GPUQuerySet.
=== "commonNative"
Selects the kind of result recorded by a GPUQuerySet.
=== "web"
Selects the kind of result recorded by a GPUQuerySet.
GPUQueue¶
interface GPUQueue : GPUObjectBase
Submits command buffers and schedules writes and copies for execution by the GPUDevice.
GPUQueueDescriptor¶
interface GPUQueueDescriptor : GPUObjectDescriptorBase
GPUQueueDescriptor describes a queue request.
GPURenderBundle¶
interface GPURenderBundle : GPUObjectBase
A reusable sequence of render commands created by a GPUDevice.
GPURenderBundleDescriptor¶
interface GPURenderBundleDescriptor : GPUObjectDescriptorBase
Options used when finishing a GPURenderBundleEncoder to create a GPURenderBundle.
GPURenderBundleEncoder¶
Encodes render commands into a GPURenderBundle.
GPURenderBundleEncoderDescriptor¶
interface GPURenderBundleEncoderDescriptor : GPURenderPassLayout
Options used to create a GPURenderBundleEncoder.
GPURenderCommandsMixin¶
interface GPURenderCommandsMixin
GPURenderCommandsMixin defines rendering commands common to GPURenderPassEncoder and GPURenderBundleEncoder.
GPURenderPassColorAttachment¶
interface GPURenderPassColorAttachment
Describes a color attachment and its load, store, and resolve operations for a render pass.
GPURenderPassDepthStencilAttachment¶
interface GPURenderPassDepthStencilAttachment
Describes the depth and stencil operations for a render pass attachment.
GPURenderPassDescriptor¶
interface GPURenderPassDescriptor : GPUObjectDescriptorBase
Describes the color, depth/stencil, and optional timestamp attachments for a render pass.
GPURenderPassEncoder¶
When executing encoded render pass commands as part of a GPUCommandBuffer, an internal RenderState object is used to track the current state required for rendering.
GPURenderPassLayout¶
interface GPURenderPassLayout : GPUObjectDescriptorBase
Describes the attachment formats and sample count used by a render pass or render bundle.
GPURenderPassTimestampWrites¶
interface GPURenderPassTimestampWrites
Selects query slots for render-pass beginning, end, and optional per-stage timestamps.
GPURenderPipeline¶
interface GPURenderPipeline : GPUObjectBase, GPUPipelineBase, AutoCloseable
A GPURenderPipeline is a kind of pipeline that controls the vertex and fragment shader stages, and can be used in GPURenderPassEncoder as well as GPURenderBundleEncoder.
GPURenderPipelineDescriptor¶
interface GPURenderPipelineDescriptor : GPUPipelineDescriptorBase
Describes the layout and programmable stages and fixed-function state of a GPURenderPipeline.
GPURequestAdapterOptions¶
interface GPURequestAdapterOptions
Options that constrain which GPU adapter is selected.
GPURequiredLimits¶
interface GPURequiredLimits
GPUSampleMask¶
typealias GPUSampleMask = UInt
GPUSampler¶
interface GPUSampler : GPUBindingResource, GPUObjectBase, AutoCloseable
A GPUSampler encodes transformations and filtering information that can be used in a shader to interpret texture resource data.
GPUSamplerBindingLayout¶
interface GPUSamplerBindingLayout
Describes the sampler binding type expected by a shader.
GPUSamplerBindingType¶
expect enum GPUSamplerBindingType : Enum<GPUSamplerBindingType>
actual enum GPUSamplerBindingType : Enum<GPUSamplerBindingType>
actual enum GPUSamplerBindingType : Enum<GPUSamplerBindingType>
=== "common"
Selects the sampling operations supported by a sampler binding.
=== "commonNative"
Selects the sampling operations supported by a sampler binding.
=== "web"
Selects the sampling operations supported by a sampler binding.
GPUSamplerDescriptor¶
interface GPUSamplerDescriptor : GPUObjectDescriptorBase
Describes the address modes, filtering modes, and level-of-detail limits for a GPUSampler.
GPUShaderModule¶
interface GPUShaderModule : GPUObjectBase, AutoCloseable
Contains shader code compiled for use in GPU pipelines.
GPUShaderModuleCompilationHint¶
interface GPUShaderModuleCompilationHint
A hint associating a shader entry point with the pipeline layout expected to use it.
GPUShaderModuleDescriptor¶
interface GPUShaderModuleDescriptor : GPUObjectDescriptorBase
Describes the shader code and compilation options used to create a GPUShaderModule.
GPUShaderStage¶
@JvmInline
value class GPUShaderStage
GPUSignedOffset32¶
typealias GPUSignedOffset32 = Int
GPUSize32¶
GPUSize32Out¶
typealias GPUSize32Out = UInt
GPUSize64¶
GPUSize64Out¶
typealias GPUSize64Out = ULong
GPUStencilFaceState¶
interface GPUStencilFaceState
Describes stencil comparison and the operations applied to a stencil face.
GPUStencilOperation¶
expect enum GPUStencilOperation : Enum<GPUStencilOperation>
actual enum GPUStencilOperation : Enum<GPUStencilOperation>
actual enum GPUStencilOperation : Enum<GPUStencilOperation>
=== "common"
Selects the operation applied to stencil values when a stencil test succeeds or fails.
=== "commonNative"
Selects the operation applied to stencil values when a stencil test succeeds or fails.
=== "web"
Selects the operation applied to stencil values when a stencil test succeeds or fails.
GPUStencilValue¶
typealias GPUStencilValue = UInt
GPUStorageTextureAccess¶
expect enum GPUStorageTextureAccess : Enum<GPUStorageTextureAccess>
actual enum GPUStorageTextureAccess : Enum<GPUStorageTextureAccess>
actual enum GPUStorageTextureAccess : Enum<GPUStorageTextureAccess>
=== "common"
Selects how a storage texture binding may be accessed by shaders.
=== "commonNative"
Selects how a storage texture binding may be accessed by shaders.
=== "web"
Selects how a storage texture binding may be accessed by shaders.
GPUStorageTextureBindingLayout¶
interface GPUStorageTextureBindingLayout
Describes the access mode, format, and view dimension of a storage texture binding.
GPUStoreOp¶
expect enum GPUStoreOp : Enum<GPUStoreOp>
actual enum GPUStoreOp : Enum<GPUStoreOp>
actual enum GPUStoreOp : Enum<GPUStoreOp>
=== "common"
Selects whether a render pass stores or discards an attachment's contents when the pass ends.
=== "commonNative"
Selects whether a render pass stores or discards an attachment's contents when the pass ends.
=== "web"
Selects whether a render pass stores or discards an attachment's contents when the pass ends.
GPUSupportedFeatures¶
typealias GPUSupportedFeatures = Set<GPUFeatureName>
GPUSupportedLimits¶
interface GPUSupportedLimits
GPUSupportedLimits exposes an adapter or device’s supported limits. See GPUAdapter.limits and GPUDevice.limits.
GPUTexelCopyBufferInfo¶
interface GPUTexelCopyBufferInfo : GPUTexelCopyBufferLayout
"GPUTexelCopyBufferInfo" describes the "info" (GPUBuffer and GPUTexelCopyBufferLayout) about a "buffer" source or destination of a "texel copy" operation. Together with the copySize, it describes the footprint of a region of texels in a GPUBuffer.
GPUTexelCopyBufferLayout¶
interface GPUTexelCopyBufferLayout
"GPUTexelCopyBufferLayout" describes the "layout" of texels in a "buffer" of bytes (GPUBuffer or AllowSharedBufferSource) in a "texel copy" operation.
GPUTexelCopyTextureInfo¶
interface GPUTexelCopyTextureInfo
"GPUTexelCopyTextureInfo" describes the "info" (GPUTexture, etc.) about a "texture" source or destination of a "texel copy" operation. Together with the copySize, it describes a sub-region of a texture (spanning one or more contiguous texture subresources at the same mip-map level).
GPUTexture¶
A texture is made up of 1d, 2d, or 3d arrays of data which can contain multiple values per-element to represent things like colors. Textures can be read and written in many ways, depending on the GPUTextureUsage they are created with. For example, textures can be sampled, read, and written from render and compute pipeline shaders, and they can be written by render pass outputs. Internally, textures are often stored in GPU memory with a layout optimized for multidimensional access rather than linear access.
GPUTextureAspect¶
expect enum GPUTextureAspect : Enum<GPUTextureAspect>
actual enum GPUTextureAspect : Enum<GPUTextureAspect>
actual enum GPUTextureAspect : Enum<GPUTextureAspect>
=== "common"
Selects which aspect of a texture is addressed, such as color, depth, stencil, or all aspects.
=== "commonNative"
Selects which aspect of a texture is addressed, such as color, depth, stencil, or all aspects.
=== "web"
Selects which aspect of a texture is addressed, such as color, depth, stencil, or all aspects.
GPUTextureBindingLayout¶
interface GPUTextureBindingLayout
Describes the sample type, view dimension, and multisampling of a texture binding.
GPUTextureDescriptor¶
interface GPUTextureDescriptor : GPUObjectDescriptorBase
Describes a GPUTexture's size, format, usage, and optional view formats.
GPUTextureDimension¶
expect enum GPUTextureDimension : Enum<GPUTextureDimension>
actual enum GPUTextureDimension : Enum<GPUTextureDimension>
actual enum GPUTextureDimension : Enum<GPUTextureDimension>
=== "common"
Selects the dimensionality of a GPUTexture: 1D, 2D, or 3D.
=== "commonNative"
Selects the dimensionality of a GPUTexture: 1D, 2D, or 3D.
=== "web"
Selects the dimensionality of a GPUTexture: 1D, 2D, or 3D.
GPUTextureFormat¶
expect enum GPUTextureFormat : Enum<GPUTextureFormat>
actual enum GPUTextureFormat : Enum<GPUTextureFormat>
actual enum GPUTextureFormat : Enum<GPUTextureFormat>
=== "common"
Selects the texel representation and sampling or attachment capabilities of a GPUTexture.
=== "commonNative"
Selects the texel representation and sampling or attachment capabilities of a GPUTexture.
=== "web"
Selects the texel representation and sampling or attachment capabilities of a GPUTexture.
GPUTextureOrGPUTextureView¶
sealed interface GPUTextureOrGPUTextureView
A value that is either a GPUTexture or a GPUTextureView.
GPUTextureSampleType¶
expect enum GPUTextureSampleType : Enum<GPUTextureSampleType>
actual enum GPUTextureSampleType : Enum<GPUTextureSampleType>
actual enum GPUTextureSampleType : Enum<GPUTextureSampleType>
=== "common"
Selects the value type produced when sampling a texture binding.
=== "commonNative"
Selects the value type produced when sampling a texture binding.
=== "web"
Selects the value type produced when sampling a texture binding.
GPUTextureSwizzle¶
data class GPUTextureSwizzle(
val red: GPUTextureSwizzleSource = GPUTextureSwizzleSource.Red,
val green: GPUTextureSwizzleSource = GPUTextureSwizzleSource.Green,
val blue: GPUTextureSwizzleSource = GPUTextureSwizzleSource.Blue,
val alpha: GPUTextureSwizzleSource = GPUTextureSwizzleSource.Alpha
)
Maps each output channel to a component of the texture view.
GPUTextureSwizzleSource¶
A source component used to construct one output channel of a texture view.
GPUTextureUsage¶
@JvmInline
value class GPUTextureUsage
GPUTextureView¶
A GPUTextureView is a view onto some subset of the texture subresources defined by a particular GPUTexture.
GPUTextureViewDescriptor¶
interface GPUTextureViewDescriptor : GPUObjectDescriptorBase
Describes the format, dimension, mip levels, array layers, and aspect of a GPUTextureView.
GPUTextureViewDimension¶
expect enum GPUTextureViewDimension : Enum<GPUTextureViewDimension>
actual enum GPUTextureViewDimension : Enum<GPUTextureViewDimension>
actual enum GPUTextureViewDimension : Enum<GPUTextureViewDimension>
=== "common"
Selects the dimensionality and array form of a GPUTextureView.
=== "commonNative"
Selects the dimensionality and array form of a GPUTextureView.
=== "web"
Selects the dimensionality and array form of a GPUTextureView.
GPUUncapturedErrorCallback¶
fun interface GPUUncapturedErrorCallback
Callback invoked when a GPUDevice reports an error that is not captured by an error scope.
GPUValidationError¶
interface GPUValidationError : GPUError
GPUValidationError is a subtype of GPUError which indicates that an operation did not satisfy all validation requirements. Validation errors are always indicative of an application error, and is expected to fail the same way across all devices assuming the same [features] and [limits] are in use.
GPUVertexAttribute¶
interface GPUVertexAttribute
Describes one vertex attribute's format and byte offset in a vertex buffer.
GPUVertexBufferLayout¶
interface GPUVertexBufferLayout
Describes the stride, step mode, and attributes of a vertex buffer.
GPUVertexFormat¶
expect enum GPUVertexFormat : Enum<GPUVertexFormat>
actual enum GPUVertexFormat : Enum<GPUVertexFormat>
actual enum GPUVertexFormat : Enum<GPUVertexFormat>
=== "common"
Selects the scalar type, component count, and layout of a vertex attribute.
=== "commonNative"
Selects the scalar type, component count, and layout of a vertex attribute.
=== "web"
Selects the scalar type, component count, and layout of a vertex attribute.
GPUVertexState¶
interface GPUVertexState : GPUProgrammableStage
Describes the vertex shader stage and vertex buffer layouts for a render pipeline.
GPUVertexStepMode¶
expect enum GPUVertexStepMode : Enum<GPUVertexStepMode>
actual enum GPUVertexStepMode : Enum<GPUVertexStepMode>
actual enum GPUVertexStepMode : Enum<GPUVertexStepMode>
=== "common"
Selects whether a vertex buffer advances once per vertex or once per instance.
=== "commonNative"
Selects whether a vertex buffer advances once per vertex or once per instance.
=== "web"
Selects whether a vertex buffer advances once per vertex or once per instance.
JvmArrayBuffer¶
@JvmInline
value class JvmArrayBuffer : ArrayBuffer
A JVM-specific implementation of the `ArrayBuffer` interface.
OpaquePointerArrayBuffer¶
class OpaquePointerArrayBuffer : ArrayBuffer
Represents a native array buffer backed by an opaque C pointer, providing direct access to unmanaged memory for efficient interop with native C libraries.
WebArrayBuffer¶
value class WebArrayBuffer : ArrayBuffer
A Kotlin/JS value class that serves as a wrapper for the JavaScript `ArrayBuffer`.
Functions¶
toFlagInt¶
fun Set<FlagEnumeration>.toFlagInt(): Int
Converts a set of `FlagEnumeration` instances into a single integer representing the combined bitwise value.
toFlagULong¶
fun Set<FlagEnumeration>.toFlagULong(): ULong
Converts a Set of FlagEnumeration elements into a ULong bitmask, combining their values using bitwise OR operations.