androidx.webgpu
Interfaces
Classes
AdapterInfo |
Information about a GPU adapter. |
BindGroupDescriptor |
A description of a bind group, including its layout and the resources it binds. |
BindGroupEntry |
A single entry within a bind group, defining a bound resource. |
BindGroupLayoutDescriptor |
A description of the layout for a single bind group. |
BindGroupLayoutEntry |
A single entry within a bind group layout, defining a resource binding slot. |
BlendComponent |
Defines the operation and factors for one component (color or alpha) in blending. |
BlendState |
Defines the blend behavior for color and alpha components. |
BufferBindingLayout |
The required configuration for a buffer binding in a bind group layout. |
BufferDescriptor |
A descriptor used to create a GPU buffer. |
Color |
Represents a color with four floating-point components (Red, Green, Blue, Alpha). |
ColorTargetState |
Defines the configuration for a single color attachment in a render pipeline. |
CommandBufferDescriptor |
A descriptor for creating a command buffer. |
CommandEncoderDescriptor |
A descriptor for creating a command encoder. |
CompilationInfo |
Detailed information about the compilation process of a shader module. |
CompilationMessage |
A single message generated during shader compilation. |
ComputePassDescriptor |
A descriptor for starting a compute pass. |
ComputePipelineDescriptor |
A descriptor for creating a compute pipeline. |
ComputeState |
The configuration for the compute shader stage. |
ConstantEntry |
A single constant value override for a shader module. |
DepthStencilState |
Defines the state for depth and stencil testing and operations. |
DeviceDescriptor |
A descriptor for creating a GPU device. |
ExceptionsKt |
|
Extent3D |
A structure representing the width, height, and depth/layer count of a 3D region. |
FragmentState |
The configuration for the fragment shader stage and color output targets. |
FunctionsKt |
|
GPUAdapter |
Represents an abstract graphics card on the system. |
GPUBindGroup |
A collection of resources (buffers, textures, samplers) bound to a shader pipeline. |
GPUBindGroupLayout |
Defines the structure and types of resource bindings within a bind group. |
GPUBuffer |
A chunk of memory allocated on the GPU, used for vertex data, uniforms, storage, etc. |
GPUCommandBuffer |
An immutable list of GPU commands generated by a command encoder. |
GPUCommandEncoder |
Used to record a sequence of GPU commands and produce a command buffer. |
GPUComputePassEncoder |
Used to record compute pipeline dispatch commands within a command encoder. |
GPUComputePipeline |
A GPU pipeline object responsible for the compute stage. |
GPUDevice |
The primary interface for interacting with the GPU, used to create most resources. |
GPUInstance |
The entry point for the WebGPU API; used for adapter and surface discovery/creation. |
GPUPipelineLayout |
Defines the overall structure of resource bindings (bind group layouts) for a pipeline. |
GPUQuerySet |
A set of GPU query objects used to record performance or visibility information. |
GPUQueue |
Used to submit recorded command buffers to the GPU for execution. |
GPURenderBundle |
A collection of pre-recorded rendering commands that can be executed multiple times inside a render pass. |
GPURenderBundleEncoder |
Used to record rendering commands into a render bundle. |
GPURenderPassEncoder |
Used to record rendering commands within a command encoder, operating on render attachments. |
GPURenderPipeline |
A GPU pipeline object responsible for the vertex and fragment stages. |
GPUSampler |
Defines how a texture is sampled (filtering, addressing modes, LOD, etc.) in a shader. |
GPUShaderModule |
Represents the compiled code for one or more shader stages (e.g., WGSL or SPIR-V). |
GPUSurface |
Represents a native window or display surface that can be drawn to. |
GPUTexture |
A GPU texture object for image data storage. |
GPUTextureView |
A view into a texture resource, often used for sampling, storage, or as a render target. |
InstanceDescriptor |
A descriptor for creating a WebGPU instance. |
InstanceLimits |
|
Limits |
The set of capabilities and constraints for a GPU device. |
MultisampleState |
Defines the configuration for multisampling (e.g., antialiasing). |
Origin3D |
A structure representing the starting point (x, y, z) of a 3D region. |
PassTimestampWrites |
Configuration for writing GPU timestamps during a compute or render pass. |
PipelineLayoutDescriptor |
A descriptor for creating a pipeline layout. |
PrimitiveState |
Defines the state for primitive assembly (e.g., topology, culling, winding order). |
QuerySetDescriptor |
A descriptor for creating a query set. |
QueueDescriptor |
A descriptor for the GPU command queue. |
RenderBundleDescriptor |
A descriptor for creating a render bundle. |
RenderBundleEncoderDescriptor |
A descriptor for creating a render bundle encoder. |
RenderPassColorAttachment |
Defines a single color attachment configuration for a render pass. |
RenderPassDepthStencilAttachment |
Defines the depth and stencil attachment configuration for a render pass. |
RenderPassDescriptor |
A descriptor for starting a render pass. |
RenderPassMaxDrawCount |
|
RenderPipelineDescriptor |
A descriptor for creating a render pipeline. |
RequestAdapterOptions |
Options for selecting a GPU adapter. |
RequestAdapterWebXROptions |
|
SamplerBindingLayout |
The required configuration for a sampler binding in a bind group layout. |
SamplerDescriptor |
A descriptor for creating a sampler. |
ShaderModuleDescriptor |
A descriptor for creating a shader module. |
ShaderSourceSPIRV |
|
ShaderSourceWGSL |
|
StencilFaceState |
Defines the state and operations for the front or back face in stencil testing. |
StorageTextureBindingLayout |
The required configuration for a storage texture binding in a bind group layout. |
SupportedFeatures |
A list of features supported by a device. |
SupportedInstanceFeatures |
A list of features supported by an instance. |
SupportedWGSLLanguageFeatures |
A list of WGSL language features supported by the instance. |
SurfaceCapabilities |
A structure containing the presentation capabilities of a surface for a given adapter. |
SurfaceColorManagement |
Extension for configuring surface color management options. |
SurfaceConfiguration |
A descriptor for configuring a surface. |
SurfaceDescriptor |
A descriptor for creating a surface, potentially extended with platform-specific options. |
SurfaceSourceAndroidNativeWindow |
Extension for creating a surface from an Android native window. |
SurfaceTexture |
|
TexelCopyBufferInfo |
Information about a buffer used as a source or destination for a texel copy operation. |
TexelCopyBufferLayout |
Defines the layout of image data within a buffer for copy operations. |
TexelCopyTextureInfo |
Information about a texture used as a source or destination for a texel copy operation. |
TextureBindingLayout |
The required configuration for a texture binding in a bind group layout. |
TextureComponentSwizzle |
Defines how the color components of a texture are remapped for a texture view. |
TextureComponentSwizzleDescriptor |
Extension for specifying texture component swizzling when creating a texture view. |
TextureDescriptor |
A descriptor for creating a GPU texture. |
TextureViewDescriptor |
A descriptor for creating a texture view. |
VertexAttribute |
Defines the format and offset for a single attribute in a vertex buffer. |
VertexBufferLayout |
Defines the memory layout and step rate for a single vertex buffer. |
VertexState |
The configuration for the vertex shader stage and vertex buffers. |
Constants |
Exceptions
CompilationInfoRequestException |
|
CreatePipelineAsyncException |
|
DawnException |
Exception for errors originating from the Dawn WebGPU library that do not fit into more specific WebGPU error categories. |
DeviceLostException |
Exception thrown when a |
InternalException |
Exception for Internal type errors. |
MapAsyncException |
|
OutOfMemoryException |
Exception for OutOfMemory type errors. |
PopErrorScopeException |
|
QueueWorkDoneException |
|
RequestAdapterException |
|
RequestDeviceException |
|
SurfaceGetCurrentTextureException |
|
UnknownException |
Exception for Unknown type errors. |
ValidationException |
Exception for Validation type errors. |
WebGpuException |
|
WebGpuRuntimeException |
Base class for exceptions that can happen at runtime. |