Expand description
Conversions between wgpu’s vocabulary and wasi:webgpu’s.
Every conversion is total: a wgpu value without a wasi counterpart panics naming the gap (the list is in the crate documentation); nothing is silently substituted. The wasi records spell out every optional member the WebGPU dictionaries default, so the host never fills in a default wgpu did not ask for.
Structs§
- Attachment
Ops - An attachment’s operations as WebGPU states them: a load op plus the value a clear uses.
Functions§
- adapter_
info_ from_ wasi - The wasi info is strings where wgpu has PCI ids: the description becomes the name and the
rest lands in
driver_info. The backend is reported as WebGPU, the API this is. - address_
mode_ to_ wasi - alpha_
mode_ to_ wasi - How the canvas blends its picture:
Autois WebGPU’s default, opaque, as wgpu’s browser backend takes it. - bind_
group_ layout_ entry_ to_ wasi - blend_
component_ to_ wasi - blend_
factor_ to_ wasi - blend_
operation_ to_ wasi - blend_
state_ to_ wasi - buffer_
binding_ type_ to_ wasi - buffer_
usages_ from_ wasi - buffer_
usages_ to_ wasi - color_
space_ to_ wasi - The canvas’s colour space and tone mapping for
space:AutoandSrgbleave WebGPU’s defaults, an sRGB canvas with standard tone mapping; an extended space is its colour space with extended tone mapping, as wgpu’s browser backend sets it. - color_
target_ to_ wasi - color_
to_ wasi - color_
writes_ to_ wasi - The WIT gives
allits own bit next to the four channels; it is set alongside them when every channel is written, so either reading of the flags sees the same mask. - compare_
function_ to_ wasi - compilation_
info_ from_ wasi - compilation_
message_ from_ wasi - Locations are passed through as the host reports them; a message without a span (offset and length both zero) has none.
- cull_
mode_ to_ wasi - depth_
stencil_ state_ to_ wasi - device_
lost_ reason_ from_ wasi - error_
filter_ to_ wasi - error_
from_ wasi - extent_
to_ wasi - features_
from_ wasi - features_
to_ wasi - The WIT names of
required, or the features wasi:webgpu has no name for. - filter_
mode_ to_ wasi - front_
face_ to_ wasi - index_
format_ to_ wasi - label
- A wgpu label as the WIT carries it.
- limits_
from_ wasi - wgpu limits with no WebGPU counterpart (binding arrays, mesh shaders, ray tracing, multiview) stay at wgpu’s defaults.
- limits_
to_ wasi - The requested limits under their
GPUSupportedLimitsmember names. Limits wgpu has and WebGPU does not are not requestable and are left out. - map_
mode_ to_ wasi - mipmap_
filter_ mode_ to_ wasi - multisample_
state_ to_ wasi - operations_
to_ wasi LoadOp::DontCareleaves the contents undefined, which WebGPU cannot say; it clears toundefined_value, as wgpu’s web backend does.- origin_
to_ wasi - power_
preference_ to_ wasi - primitive_
state_ to_ wasi - primitive_
topology_ to_ wasi - sampler_
binding_ type_ to_ wasi - sampler_
descriptor_ to_ wasi - shader_
stages_ to_ wasi - stencil_
face_ to_ wasi - stencil_
operation_ to_ wasi - storage_
texture_ access_ to_ wasi - store_
op_ to_ wasi - texel_
copy_ layout_ to_ wasi - texture_
aspect_ to_ wasi - texture_
dimension_ from_ wasi - texture_
dimension_ to_ wasi - texture_
format_ from_ wasi - texture_
format_ to_ wasi - texture_
sample_ type_ to_ wasi - texture_
usages_ from_ wasi - texture_
usages_ to_ wasi - texture_
view_ dimension_ to_ wasi - vertex_
attribute_ to_ wasi - vertex_
buffer_ layout_ to_ wasi - vertex_
format_ to_ wasi - vertex_
step_ mode_ to_ wasi