Skip to main content

Module webgpu

Module webgpu 

Source
Available on webgpu only.
Expand description

Vendored WebGPU JS-handle types used by the WebGPU backend.

They are exposed publicly so that interop crates can read the JS handle behind a Texture / Buffer / etc. (via Texture::as_webgpu and siblings), and pass a foreign handle in (via Device::create_texture_from_webgpu_handle).

A web_sys::GpuTexture from a consumer’s own web-sys dependency wraps the same JS object as a wgpu::webgpu::GpuTexture; convert between them with wasm_bindgen::JsCast::unchecked_into.

Structs§

DiscoveredPipelines
The pipelines a pipeline discovery compiled, kept so the browser keeps them cached until they are created again.
GpuBuffer
The GpuBuffer class.
GpuDevice
The GpuDevice class.
GpuQueue
The GpuQueue class.
GpuTexture
The GpuTexture class.
GpuTextureView
The GpuTextureView class.

Type Aliases§

DropCallback
A callback invoked when wgpu releases its reference to an externally owned WebGPU resource (e.g. a GpuTexture passed to crate::Device::create_texture_from_webgpu_handle).