Aller au contenu

org.graphiks.webgpu.browser

Types

Adapter

class Adapter(val handler: WGPUAdapter) : GPUAdapter

BindGroup

class BindGroup(val handler: WGPUBindGroup) : GPUBindGroup

BindGroupLayout

class BindGroupLayout(val handler: WGPUBindGroupLayout) : GPUBindGroupLayout

Buffer

class Buffer(val handler: WGPUBuffer) : GPUBuffer

CanvasSurface

class CanvasSurface(val handler: WGPUCanvasContext) : AutoCloseable
A configured WebGPU canvas context. The textures it hands out are borrowed from the canvas: closing their wrapper never destroys them.

CommandBuffer

class CommandBuffer(val handler: WGPUCommandBuffer) : GPUCommandBuffer

CommandEncoder

class CommandEncoder(val handler: WGPUCommandEncoder) : GPUCommandEncoder

ComputePassEncoder

class ComputePassEncoder(val handler: WGPUComputePassEncoder) : GPUComputePassEncoder

ComputePipeline

class ComputePipeline(val handler: WGPUComputePipeline) : GPUComputePipeline

Device

class Device(val handler: WGPUDevice, onUncapturedError: GPUUncapturedErrorCallback? = null) : GPUDevice

GPUCanvasAlphaMode

Alpha compositing mode used by a canvas configuration.

HTMLCanvasElement

The minimal HTML canvas element used to obtain a WebGPU canvas surface.

Limits

data class Limits(
    val maxTextureDimension1D: UInt, 
    val maxTextureDimension2D: UInt, 
    val maxTextureDimension3D: UInt, 
    val maxTextureArrayLayers: UInt, 
    val maxBindGroups: UInt, 
    val maxBindGroupsPlusVertexBuffers: UInt, 
    val maxBindingsPerBindGroup: UInt, 
    val maxDynamicUniformBuffersPerPipelineLayout: UInt, 
    val maxDynamicStorageBuffersPerPipelineLayout: UInt, 
    val maxSampledTexturesPerShaderStage: UInt, 
    val maxSamplersPerShaderStage: UInt, 
    val maxStorageBuffersPerShaderStage: UInt, 
    val maxStorageTexturesPerShaderStage: UInt, 
    val maxUniformBuffersPerShaderStage: UInt, 
    val maxUniformBufferBindingSize: ULong, 
    val maxStorageBufferBindingSize: ULong, 
    val minUniformBufferOffsetAlignment: UInt, 
    val minStorageBufferOffsetAlignment: UInt, 
    val maxVertexBuffers: UInt, 
    val maxBufferSize: ULong, 
    val maxVertexAttributes: UInt, 
    val maxVertexBufferArrayStride: UInt, 
    val maxInterStageShaderVariables: UInt, 
    val maxColorAttachments: UInt, 
    val maxColorAttachmentBytesPerSample: UInt, 
    val maxComputeWorkgroupStorageSize: UInt, 
    val maxComputeInvocationsPerWorkgroup: UInt, 
    val maxComputeWorkgroupSizeX: UInt, 
    val maxComputeWorkgroupSizeY: UInt, 
    val maxComputeWorkgroupSizeZ: UInt, 
    val maxComputeWorkgroupsPerDimension: UInt, 
    val maxImmediateSize: UInt, 
    val maxStorageBuffersInVertexStage: UInt, 
    val maxStorageBuffersInFragmentStage: UInt, 
    val maxStorageTexturesInVertexStage: UInt, 
    val maxStorageTexturesInFragmentStage: UInt
) : GPUSupportedLimits

PipelineLayout

class PipelineLayout(handler: WGPUPipelineLayout) : GPUPipelineLayout

PredefinedColorSpace

Color space used by a canvas configuration.

QuerySet

class QuerySet(val handler: WGPUQuerySet) : GPUQuerySet

Queue

class Queue(val handler: WGPUQueue) : GPUQueue

RenderBundle

class RenderBundle(val handler: WGPURenderBundle) : GPURenderBundle

RenderBundleEncoder

class RenderBundleEncoder(val handler: WGPURenderBundleEncoder) : GPURenderBundleEncoder

RenderPassEncoder

class RenderPassEncoder(val handler: WGPURenderPassEncoder) : GPURenderPassEncoder

RenderPipeline

class RenderPipeline(handler: WGPURenderPipeline) : GPURenderPipeline

Sampler

class Sampler(val handler: WGPUSampler) : GPUSampler

ShaderModule

class ShaderModule(val handler: WGPUShaderModule) : GPUShaderModule

SurfaceConfiguration

data class SurfaceConfiguration(
    val device: GPUDevice, 
    val format: GPUTextureFormat, 
    val usage: GPUTextureUsage = GPUTextureUsage.RenderAttachment, 
    val viewFormats: Set<GPUTextureFormat> = emptySet(), 
    val colorSpace: PredefinedColorSpace = PredefinedColorSpace.srgb, 
    val alphaMode: GPUCanvasAlphaMode = GPUCanvasAlphaMode.Opaque
)
Parameters used to configure a canvas surface for a device.

SurfaceTexture

data class SurfaceTexture(val texture: GPUTexture)
A texture acquired from a canvas surface. The browser owns the underlying texture.

Texture

class Texture : GPUTexture
A WebGPU texture wrapper with an explicit ownership contract.

TextureView

class TextureView(val handler: WGPUTextureView) : GPUTextureView

Functions

requestAdapter

suspend fun requestAdapter(options: GPURequestAdapterOptions? = null): Result<Adapter>