androidx.webgpu


Interfaces

Classes

AdapterInfo

Information about a GPU adapter.

GPUAdapter

Represents an abstract graphics card on the system.

GPUAdapterInfo

Information about a GPU adapter.

GPUBindGroup

A collection of resources (buffers, textures, samplers) bound to a shader pipeline.

GPUBindGroupDescriptor

A description of a bind group, including its layout and the resources it binds.

GPUBindGroupEntry

A single entry within a bind group, defining a bound resource.

GPUBindGroupLayout

Defines the structure and types of resource bindings within a bind group.

GPUBindGroupLayoutDescriptor

A description of the layout for a single bind group.

GPUBindGroupLayoutEntry

A single entry within a bind group layout, defining a resource binding slot.

GPUBlendComponent

Defines the operation and factors for one component (color or alpha) in blending.

GPUBlendState

Defines the blend behavior for color and alpha components.

GPUBuffer

A chunk of memory allocated on the GPU, used for vertex data, uniforms, storage, etc.

GPUBufferBindingLayout

The required configuration for a buffer binding in a bind group layout.

GPUBufferDescriptor

A descriptor used to create a GPU buffer.

GPUColor

Represents a color with four floating-point components (Red, Green, Blue, Alpha).

GPUColorTargetState

Defines the configuration for a single color attachment in a render pipeline.

GPUCommandBuffer

An immutable list of GPU commands generated by a command encoder.

GPUCommandBufferDescriptor

A descriptor for creating a command buffer.

GPUCommandEncoder

Used to record a sequence of GPU commands and produce a command buffer.

GPUCommandEncoderDescriptor

A descriptor for creating a command encoder.

GPUCompilationInfo

Detailed information about the compilation process of a shader module.

GPUCompilationMessage

A single message generated during shader compilation.

GPUComputePassDescriptor

A descriptor for starting a compute pass.

GPUComputePassEncoder

Used to record compute pipeline dispatch commands within a command encoder.

GPUComputePipeline

A GPU pipeline object responsible for the compute stage.

GPUComputePipelineDescriptor

A descriptor for creating a compute pipeline.

GPUComputeState

The configuration for the compute shader stage.

GPUConstantEntry

A single constant value override for a shader module.

GPUDepthStencilState

Defines the state for depth and stencil testing and operations.

GPUDevice

The primary interface for interacting with the GPU, used to create most resources.

GPUDeviceDescriptor

A descriptor for creating a GPU device.

GPUExtent3D

A structure representing the width, height, and depth/layer count of a 3D region.

GPUFragmentState

The configuration for the fragment shader stage and color output targets.

GPUInstance

The entry point for the WebGPU API; used for adapter and surface discovery/creation.

GPUInstanceDescriptor

A descriptor for creating a WebGPU instance.

GPUInstanceLimits
GPULimits

The set of capabilities and constraints for a GPU device.

GPUMultisampleState

Defines the configuration for multisampling (e.g., antialiasing).

GPUOrigin3D

A structure representing the starting point (x, y, z) of a 3D region.

GPUPassTimestampWrites

Configuration for writing GPU timestamps during a compute or render pass.

GPUPipelineLayout

Defines the overall structure of resource bindings (bind group layouts) for a pipeline.

GPUPipelineLayoutDescriptor

A descriptor for creating a pipeline layout.

GPUPrimitiveState

Defines the state for primitive assembly (e.g., topology, culling, winding order).

GPUQuerySet

A set of GPU query objects used to record performance or visibility information.

GPUQuerySetDescriptor

A descriptor for creating a query set.

GPUQueue

Used to submit recorded command buffers to the GPU for execution.

GPUQueueDescriptor

A descriptor for the GPU command queue.

GPURenderBundle

A collection of pre-recorded rendering commands that can be executed multiple times inside a render pass.

GPURenderBundleDescriptor

A descriptor for creating a render bundle.

GPURenderBundleEncoder

Used to record rendering commands into a render bundle.

GPURenderBundleEncoderDescriptor

A descriptor for creating a render bundle encoder.

GPURenderPassColorAttachment

Defines a single color attachment configuration for a render pass.

GPURenderPassDepthStencilAttachment

Defines the depth and stencil attachment configuration for a render pass.

GPURenderPassDescriptor

A descriptor for starting a render pass.

GPURenderPassEncoder

Used to record rendering commands within a command encoder, operating on render attachments.

GPURenderPassMaxDrawCount
GPURenderPipeline

A GPU pipeline object responsible for the vertex and fragment stages.

GPURenderPipelineDescriptor

A descriptor for creating a render pipeline.

GPURequestAdapterOptions

Options for selecting a GPU adapter.

GPURequestAdapterWebXROptions
GPUSampler

Defines how a texture is sampled (filtering, addressing modes, LOD, etc.) in a shader.

GPUSamplerBindingLayout

The required configuration for a sampler binding in a bind group layout.

GPUSamplerDescriptor

A descriptor for creating a sampler.

GPUShaderModule

Represents the compiled code for one or more shader stages (e.g., WGSL or SPIR-V).

GPUShaderModuleDescriptor

A descriptor for creating a shader module.

GPUShaderSourceSPIRV
GPUShaderSourceWGSL
GPUStencilFaceState

Defines the state and operations for the front or back face in stencil testing.

GPUStorageTextureBindingLayout

The required configuration for a storage texture binding in a bind group layout.

GPUSupportedFeatures

A list of features supported by a device.

GPUSupportedInstanceFeatures

A list of features supported by an instance.

GPUSupportedWGSLLanguageFeatures

A list of WGSL language features supported by the instance.

GPUSurface

Represents a native window or display surface that can be drawn to.

GPUSurfaceCapabilities

A structure containing the presentation capabilities of a surface for a given adapter.

GPUSurfaceColorManagement

Extension for configuring surface color management options.

GPUSurfaceConfiguration

A descriptor for configuring a surface.

GPUSurfaceDescriptor

A descriptor for creating a surface, potentially extended with platform-specific options.

GPUSurfaceSourceAndroidNativeWindow

Extension for creating a surface from an Android native window.

GPUSurfaceTexture
GPUTexelCopyBufferInfo

Information about a buffer used as a source or destination for a texel copy operation.

GPUTexelCopyBufferLayout

Defines the layout of image data within a buffer for copy operations.

GPUTexelCopyTextureInfo

Information about a texture used as a source or destination for a texel copy operation.

GPUTexture

A GPU texture object for image data storage.

GPUTextureBindingLayout

The required configuration for a texture binding in a bind group layout.

GPUTextureComponentSwizzle

Defines how the color components of a texture are remapped for a texture view.

GPUTextureComponentSwizzleDescriptor

Extension for specifying texture component swizzling when creating a texture view.

GPUTextureDescriptor

A descriptor for creating a GPU texture.

GPUTextureView

A view into a texture resource, often used for sampling, storage, or as a render target.

GPUTextureViewDescriptor

A descriptor for creating a texture view.

GPUVertexAttribute

Defines the format and offset for a single attribute in a vertex buffer.

GPUVertexBufferLayout

Defines the memory layout and step rate for a single vertex buffer.

GPUVertexState

The configuration for the vertex shader stage and vertex buffers.

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 GPUDevice is lost and can no longer be used.

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.

Objects