Wado

WASI WebGPU Standard Library

wasi:webgpu

Effects

pub interface Webgpu

fn get_gpu() -> Gpu

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#get-gpu")]

Resources

pub resource Gpu

async fn request_adapter(&self, options: Option<GpuRequestAdapterOptions>) -> AsyncCall<Option<GpuAdapter>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu.request-adapter")] #[cm_params("self", "options")]

fn get_preferred_canvas_format(&self) -> GpuTextureFormat

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu.get-preferred-canvas-format")] #[cm_params("self")]

fn wgsl_language_features(&self) -> WgslLanguageFeatures

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu.wgsl-language-features")] #[cm_params("self")]

pub resource GpuAdapter

fn features(&self) -> GpuSupportedFeatures

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter.features")] #[cm_params("self")]

fn limits(&self) -> GpuSupportedLimits

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter.limits")] #[cm_params("self")]

fn info(&self) -> GpuAdapterInfo

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter.info")] #[cm_params("self")]

async fn request_device(&self, descriptor: Option<GpuDeviceDescriptor>) -> AsyncCall<Result<GpuDevice, RequestDeviceError>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter.request-device")] #[cm_params("self", "descriptor")]

pub resource GpuAdapterInfo

fn vendor(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.vendor")] #[cm_params("self")]

fn architecture(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.architecture")] #[cm_params("self")]

fn device(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.device")] #[cm_params("self")]

fn description(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.description")] #[cm_params("self")]

fn subgroup_min_size(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.subgroup-min-size")] #[cm_params("self")]

fn subgroup_max_size(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.subgroup-max-size")] #[cm_params("self")]

fn is_fallback_adapter(&self) -> bool

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-adapter-info.is-fallback-adapter")] #[cm_params("self")]

pub resource GpuBindGroup

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-bind-group.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-bind-group.set-label")] #[cm_params("self", "label")]

pub resource GpuBindGroupLayout

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-bind-group-layout.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-bind-group-layout.set-label")] #[cm_params("self", "label")]

pub resource GpuBuffer

fn size(&self) -> GpuSize64Out

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.size")] #[cm_params("self")]

fn usage(&self) -> GpuBufferUsage

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.usage")] #[cm_params("self")]

fn map_state(&self) -> GpuBufferMapState

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.map-state")] #[cm_params("self")]

async fn map_async(&self, mode: GpuMapMode, offset: Option<GpuSize64>, size: Option<GpuSize64>) -> AsyncCall<Result<(), MapAsyncError>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.map-async")] #[cm_params("self", "mode", "offset", "size")]

fn get_mapped_range_get_with_copy(&self, offset: Option<GpuSize64>, size: Option<GpuSize64>) -> Result<List<u8>, GetMappedRangeError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.get-mapped-range-get-with-copy")] #[cm_params("self", "offset", "size")]

fn unmap(&self) -> Result<(), UnmapError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.unmap")] #[cm_params("self")]

fn destroy(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.destroy")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.set-label")] #[cm_params("self", "label")]

fn get_mapped_range_set_with_copy(&self, data: List<u8>, offset: Option<GpuSize64>, size: Option<GpuSize64>) -> Result<(), GetMappedRangeError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-buffer.get-mapped-range-set-with-copy")] #[cm_params("self", "data", "offset", "size")]

pub resource GpuCanvasContext

fn configure(&self, configuration: GpuCanvasConfiguration)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-canvas-context.configure")] #[cm_params("self", "configuration")]

fn unconfigure(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-canvas-context.unconfigure")] #[cm_params("self")]

fn get_configuration(&self) -> Option<GpuCanvasConfigurationOwned>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-canvas-context.get-configuration")] #[cm_params("self")]

fn get_current_texture(&self) -> GpuTexture

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-canvas-context.get-current-texture")] #[cm_params("self")]

pub resource GpuCommandBuffer

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-buffer.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-buffer.set-label")] #[cm_params("self", "label")]

pub resource GpuCommandEncoder

fn begin_render_pass(&self, descriptor: GpuRenderPassDescriptor) -> GpuRenderPassEncoder

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.begin-render-pass")] #[cm_params("self", "descriptor")]

fn begin_compute_pass(&self, descriptor: Option<GpuComputePassDescriptor>) -> GpuComputePassEncoder

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.begin-compute-pass")] #[cm_params("self", "descriptor")]

fn copy_buffer_to_buffer(&self, source: &GpuBuffer, source_offset: Option<GpuSize64>, destination: &GpuBuffer, destination_offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.copy-buffer-to-buffer")] #[cm_params("self", "source", "source-offset", "destination", "destination-offset", "size")]

fn copy_buffer_to_texture(&self, source: GpuTexelCopyBufferInfo, destination: GpuTexelCopyTextureInfo, copy_size: GpuExtent3D)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.copy-buffer-to-texture")] #[cm_params("self", "source", "destination", "copy-size")]

fn copy_texture_to_buffer(&self, source: GpuTexelCopyTextureInfo, destination: GpuTexelCopyBufferInfo, copy_size: GpuExtent3D)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.copy-texture-to-buffer")] #[cm_params("self", "source", "destination", "copy-size")]

fn copy_texture_to_texture(&self, source: GpuTexelCopyTextureInfo, destination: GpuTexelCopyTextureInfo, copy_size: GpuExtent3D)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.copy-texture-to-texture")] #[cm_params("self", "source", "destination", "copy-size")]

fn clear_buffer(&self, buffer: &GpuBuffer, offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.clear-buffer")] #[cm_params("self", "buffer", "offset", "size")]

fn resolve_query_set(&self, query_set: &GpuQuerySet, first_query: GpuSize32, query_count: GpuSize32, destination: &GpuBuffer, destination_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.resolve-query-set")] #[cm_params("self", "query-set", "first-query", "query-count", "destination", "destination-offset")]

fn finish(&self, descriptor: Option<GpuCommandBufferDescriptor>) -> GpuCommandBuffer

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.finish")] #[cm_params("self", "descriptor")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.set-label")] #[cm_params("self", "label")]

fn push_debug_group(&self, group_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.push-debug-group")] #[cm_params("self", "group-label")]

fn pop_debug_group(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.pop-debug-group")] #[cm_params("self")]

fn insert_debug_marker(&self, marker_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-command-encoder.insert-debug-marker")] #[cm_params("self", "marker-label")]

pub resource GpuCompilationInfo

fn messages(&self) -> List<GpuCompilationMessage>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-info.messages")] #[cm_params("self")]

pub resource GpuCompilationMessage

fn message(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.message")] #[cm_params("self")]

fn type(&self) -> GpuCompilationMessageType

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.type")] #[cm_params("self")]

fn line_num(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.line-num")] #[cm_params("self")]

fn line_pos(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.line-pos")] #[cm_params("self")]

fn offset(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.offset")] #[cm_params("self")]

fn length(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compilation-message.length")] #[cm_params("self")]

pub resource GpuComputePassEncoder

fn set_pipeline(&self, pipeline: &GpuComputePipeline)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.set-pipeline")] #[cm_params("self", "pipeline")]

fn dispatch_workgroups(&self, workgroup_count_x: GpuSize32, workgroup_count_y: Option<GpuSize32>, workgroup_count_z: Option<GpuSize32>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.dispatch-workgroups")] #[cm_params("self", "workgroup-count-x", "workgroup-count-y", "workgroup-count-z")]

fn dispatch_workgroups_indirect(&self, indirect_buffer: &GpuBuffer, indirect_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.dispatch-workgroups-indirect")] #[cm_params("self", "indirect-buffer", "indirect-offset")]

fn end(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.end")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.set-label")] #[cm_params("self", "label")]

fn push_debug_group(&self, group_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.push-debug-group")] #[cm_params("self", "group-label")]

fn pop_debug_group(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.pop-debug-group")] #[cm_params("self")]

fn insert_debug_marker(&self, marker_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.insert-debug-marker")] #[cm_params("self", "marker-label")]

fn set_bind_group(&self, index: GpuIndex32, bind_group: Option<&GpuBindGroup>, dynamic_offsets_data: Option<List<GpuBufferDynamicOffset>>, dynamic_offsets_data_start: Option<GpuSize64>, dynamic_offsets_data_length: Option<GpuSize32>) -> Result<(), SetBindGroupError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.set-bind-group")] #[cm_params("self", "index", "bind-group", "dynamic-offsets-data", "dynamic-offsets-data-start", "dynamic-offsets-data-length")]

fn set_immediates(&self, range_offset: GpuSize32, data: List<u8>, data_offset: Option<GpuSize64>, data_size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pass-encoder.set-immediates")] #[cm_params("self", "range-offset", "data", "data-offset", "data-size")]

pub resource GpuComputePipeline

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pipeline.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pipeline.set-label")] #[cm_params("self", "label")]

fn get_bind_group_layout(&self, index: u32) -> GpuBindGroupLayout

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-compute-pipeline.get-bind-group-layout")] #[cm_params("self", "index")]

pub resource GpuDevice

fn features(&self) -> GpuSupportedFeatures

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.features")] #[cm_params("self")]

fn limits(&self) -> GpuSupportedLimits

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.limits")] #[cm_params("self")]

fn adapter_info(&self) -> GpuAdapterInfo

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.adapter-info")] #[cm_params("self")]

fn queue(&self) -> GpuQueue

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.queue")] #[cm_params("self")]

fn destroy(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.destroy")] #[cm_params("self")]

fn create_buffer(&self, descriptor: GpuBufferDescriptor) -> GpuBuffer

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-buffer")] #[cm_params("self", "descriptor")]

fn create_texture(&self, descriptor: GpuTextureDescriptor) -> GpuTexture

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-texture")] #[cm_params("self", "descriptor")]

fn create_sampler(&self, descriptor: Option<GpuSamplerDescriptor>) -> GpuSampler

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-sampler")] #[cm_params("self", "descriptor")]

fn create_bind_group_layout(&self, descriptor: GpuBindGroupLayoutDescriptor) -> GpuBindGroupLayout

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-bind-group-layout")] #[cm_params("self", "descriptor")]

fn create_pipeline_layout(&self, descriptor: GpuPipelineLayoutDescriptor) -> GpuPipelineLayout

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-pipeline-layout")] #[cm_params("self", "descriptor")]

fn create_bind_group(&self, descriptor: GpuBindGroupDescriptor) -> GpuBindGroup

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-bind-group")] #[cm_params("self", "descriptor")]

fn create_shader_module(&self, descriptor: GpuShaderModuleDescriptor) -> GpuShaderModule

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-shader-module")] #[cm_params("self", "descriptor")]

fn create_compute_pipeline(&self, descriptor: GpuComputePipelineDescriptor) -> GpuComputePipeline

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-compute-pipeline")] #[cm_params("self", "descriptor")]

fn create_render_pipeline(&self, descriptor: GpuRenderPipelineDescriptor) -> GpuRenderPipeline

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-render-pipeline")] #[cm_params("self", "descriptor")]

async fn create_compute_pipeline_async(&self, descriptor: GpuComputePipelineDescriptor) -> AsyncCall<Result<GpuComputePipeline, CreatePipelineError>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-compute-pipeline-async")] #[cm_params("self", "descriptor")]

async fn create_render_pipeline_async(&self, descriptor: GpuRenderPipelineDescriptor) -> AsyncCall<Result<GpuRenderPipeline, CreatePipelineError>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-render-pipeline-async")] #[cm_params("self", "descriptor")]

fn create_command_encoder(&self, descriptor: Option<GpuCommandEncoderDescriptor>) -> GpuCommandEncoder

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-command-encoder")] #[cm_params("self", "descriptor")]

fn create_render_bundle_encoder(&self, descriptor: GpuRenderBundleEncoderDescriptor) -> GpuRenderBundleEncoder

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-render-bundle-encoder")] #[cm_params("self", "descriptor")]

fn create_query_set(&self, descriptor: GpuQuerySetDescriptor) -> Result<GpuQuerySet, CreateQuerySetError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.create-query-set")] #[cm_params("self", "descriptor")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.set-label")] #[cm_params("self", "label")]

fn lost(&self) -> Future<GpuDeviceLostInfo>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.lost")] #[cm_params("self")]

fn push_error_scope(&self, filter: GpuErrorFilter)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.push-error-scope")] #[cm_params("self", "filter")]

async fn pop_error_scope(&self) -> AsyncCall<Result<Option<GpuError>, PopErrorScopeError>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.pop-error-scope")] #[cm_params("self")]

fn on_uncaptured_error(&self) -> Stream<GpuError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device.on-uncaptured-error")] #[cm_params("self")]

pub resource GpuDeviceLostInfo

fn reason(&self) -> GpuDeviceLostReason

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device-lost-info.reason")] #[cm_params("self")]

fn message(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-device-lost-info.message")] #[cm_params("self")]

pub resource GpuError

fn message(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-error.message")] #[cm_params("self")]

fn kind(&self) -> GpuErrorKind

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-error.kind")] #[cm_params("self")]

pub resource GpuPipelineLayout

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-pipeline-layout.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-pipeline-layout.set-label")] #[cm_params("self", "label")]

pub resource GpuQuerySet

fn destroy(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-query-set.destroy")] #[cm_params("self")]

fn type(&self) -> GpuQueryType

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-query-set.type")] #[cm_params("self")]

fn count(&self) -> GpuSize32Out

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-query-set.count")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-query-set.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-query-set.set-label")] #[cm_params("self", "label")]

pub resource GpuQueue

fn submit(&self, command_buffers: List<&GpuCommandBuffer>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.submit")] #[cm_params("self", "command-buffers")]

async fn on_submitted_work_done(&self) -> AsyncCall<()>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.on-submitted-work-done")] #[cm_params("self")]

fn write_buffer_with_copy(&self, buffer: &GpuBuffer, buffer_offset: GpuSize64, data: List<u8>, data_offset: Option<GpuSize64>, size: Option<GpuSize64>) -> Result<(), WriteBufferError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.write-buffer-with-copy")] #[cm_params("self", "buffer", "buffer-offset", "data", "data-offset", "size")]

fn write_texture_with_copy(&self, destination: GpuTexelCopyTextureInfo, data: List<u8>, data_layout: GpuTexelCopyBufferLayout, size: GpuExtent3D)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.write-texture-with-copy")] #[cm_params("self", "destination", "data", "data-layout", "size")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-queue.set-label")] #[cm_params("self", "label")]

pub resource GpuRenderBundle

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle.set-label")] #[cm_params("self", "label")]

pub resource GpuRenderBundleEncoder

fn finish(&self, descriptor: Option<GpuRenderBundleDescriptor>) -> GpuRenderBundle

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.finish")] #[cm_params("self", "descriptor")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-label")] #[cm_params("self", "label")]

fn push_debug_group(&self, group_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.push-debug-group")] #[cm_params("self", "group-label")]

fn pop_debug_group(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.pop-debug-group")] #[cm_params("self")]

fn insert_debug_marker(&self, marker_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.insert-debug-marker")] #[cm_params("self", "marker-label")]

fn set_bind_group(&self, index: GpuIndex32, bind_group: Option<&GpuBindGroup>, dynamic_offsets_data: Option<List<GpuBufferDynamicOffset>>, dynamic_offsets_data_start: Option<GpuSize64>, dynamic_offsets_data_length: Option<GpuSize32>) -> Result<(), SetBindGroupError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-bind-group")] #[cm_params("self", "index", "bind-group", "dynamic-offsets-data", "dynamic-offsets-data-start", "dynamic-offsets-data-length")]

fn set_immediates(&self, range_offset: GpuSize32, data: List<u8>, data_offset: Option<GpuSize64>, data_size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-immediates")] #[cm_params("self", "range-offset", "data", "data-offset", "data-size")]

fn set_pipeline(&self, pipeline: &GpuRenderPipeline)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-pipeline")] #[cm_params("self", "pipeline")]

fn set_index_buffer(&self, buffer: &GpuBuffer, index_format: GpuIndexFormat, offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-index-buffer")] #[cm_params("self", "buffer", "index-format", "offset", "size")]

fn set_vertex_buffer(&self, slot: GpuIndex32, buffer: Option<&GpuBuffer>, offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.set-vertex-buffer")] #[cm_params("self", "slot", "buffer", "offset", "size")]

fn draw(&self, vertex_count: GpuSize32, instance_count: Option<GpuSize32>, first_vertex: Option<GpuSize32>, first_instance: Option<GpuSize32>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.draw")] #[cm_params("self", "vertex-count", "instance-count", "first-vertex", "first-instance")]

fn draw_indexed(&self, index_count: GpuSize32, instance_count: Option<GpuSize32>, first_index: Option<GpuSize32>, base_vertex: Option<GpuSignedOffset32>, first_instance: Option<GpuSize32>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.draw-indexed")] #[cm_params("self", "index-count", "instance-count", "first-index", "base-vertex", "first-instance")]

fn draw_indirect(&self, indirect_buffer: &GpuBuffer, indirect_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.draw-indirect")] #[cm_params("self", "indirect-buffer", "indirect-offset")]

fn draw_indexed_indirect(&self, indirect_buffer: &GpuBuffer, indirect_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-bundle-encoder.draw-indexed-indirect")] #[cm_params("self", "indirect-buffer", "indirect-offset")]

pub resource GpuRenderPassEncoder

fn set_viewport(&self, x: f32, y: f32, width: f32, height: f32, min_depth: f32, max_depth: f32)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-viewport")] #[cm_params("self", "x", "y", "width", "height", "min-depth", "max-depth")]

fn set_scissor_rect(&self, x: GpuIntegerCoordinate, y: GpuIntegerCoordinate, width: GpuIntegerCoordinate, height: GpuIntegerCoordinate)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-scissor-rect")] #[cm_params("self", "x", "y", "width", "height")]

fn set_blend_constant(&self, color: GpuColor)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-blend-constant")] #[cm_params("self", "color")]

fn set_stencil_reference(&self, reference: GpuStencilValue)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-stencil-reference")] #[cm_params("self", "reference")]

fn begin_occlusion_query(&self, query_index: GpuSize32)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.begin-occlusion-query")] #[cm_params("self", "query-index")]

fn end_occlusion_query(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.end-occlusion-query")] #[cm_params("self")]

fn execute_bundles(&self, bundles: List<&GpuRenderBundle>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.execute-bundles")] #[cm_params("self", "bundles")]

fn end(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.end")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-label")] #[cm_params("self", "label")]

fn push_debug_group(&self, group_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.push-debug-group")] #[cm_params("self", "group-label")]

fn pop_debug_group(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.pop-debug-group")] #[cm_params("self")]

fn insert_debug_marker(&self, marker_label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.insert-debug-marker")] #[cm_params("self", "marker-label")]

fn set_bind_group(&self, index: GpuIndex32, bind_group: Option<&GpuBindGroup>, dynamic_offsets_data: Option<List<GpuBufferDynamicOffset>>, dynamic_offsets_data_start: Option<GpuSize64>, dynamic_offsets_data_length: Option<GpuSize32>) -> Result<(), SetBindGroupError>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-bind-group")] #[cm_params("self", "index", "bind-group", "dynamic-offsets-data", "dynamic-offsets-data-start", "dynamic-offsets-data-length")]

fn set_immediates(&self, range_offset: GpuSize32, data: List<u8>, data_offset: Option<GpuSize64>, data_size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-immediates")] #[cm_params("self", "range-offset", "data", "data-offset", "data-size")]

fn set_pipeline(&self, pipeline: &GpuRenderPipeline)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-pipeline")] #[cm_params("self", "pipeline")]

fn set_index_buffer(&self, buffer: &GpuBuffer, index_format: GpuIndexFormat, offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-index-buffer")] #[cm_params("self", "buffer", "index-format", "offset", "size")]

fn set_vertex_buffer(&self, slot: GpuIndex32, buffer: Option<&GpuBuffer>, offset: Option<GpuSize64>, size: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.set-vertex-buffer")] #[cm_params("self", "slot", "buffer", "offset", "size")]

fn draw(&self, vertex_count: GpuSize32, instance_count: Option<GpuSize32>, first_vertex: Option<GpuSize32>, first_instance: Option<GpuSize32>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.draw")] #[cm_params("self", "vertex-count", "instance-count", "first-vertex", "first-instance")]

fn draw_indexed(&self, index_count: GpuSize32, instance_count: Option<GpuSize32>, first_index: Option<GpuSize32>, base_vertex: Option<GpuSignedOffset32>, first_instance: Option<GpuSize32>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.draw-indexed")] #[cm_params("self", "index-count", "instance-count", "first-index", "base-vertex", "first-instance")]

fn draw_indirect(&self, indirect_buffer: &GpuBuffer, indirect_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.draw-indirect")] #[cm_params("self", "indirect-buffer", "indirect-offset")]

fn draw_indexed_indirect(&self, indirect_buffer: &GpuBuffer, indirect_offset: GpuSize64)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pass-encoder.draw-indexed-indirect")] #[cm_params("self", "indirect-buffer", "indirect-offset")]

pub resource GpuRenderPipeline

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pipeline.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pipeline.set-label")] #[cm_params("self", "label")]

fn get_bind_group_layout(&self, index: u32) -> GpuBindGroupLayout

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-render-pipeline.get-bind-group-layout")] #[cm_params("self", "index")]

pub resource GpuSampler

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-sampler.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-sampler.set-label")] #[cm_params("self", "label")]

pub resource GpuShaderModule

async fn get_compilation_info(&self) -> AsyncCall<GpuCompilationInfo>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-shader-module.get-compilation-info")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-shader-module.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-shader-module.set-label")] #[cm_params("self", "label")]

pub resource GpuSupportedFeatures

fn has(&self, value: String) -> bool

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-features.has")] #[cm_params("self", "value")]

pub resource GpuSupportedLimits

fn max_texture_dimension1_d(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-texture-dimension1-d")] #[cm_params("self")]

fn max_texture_dimension2_d(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-texture-dimension2-d")] #[cm_params("self")]

fn max_texture_dimension3_d(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-texture-dimension3-d")] #[cm_params("self")]

fn max_texture_array_layers(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-texture-array-layers")] #[cm_params("self")]

fn max_bind_groups(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-bind-groups")] #[cm_params("self")]

fn max_bind_groups_plus_vertex_buffers(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-bind-groups-plus-vertex-buffers")] #[cm_params("self")]

fn max_immediate_size(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-immediate-size")] #[cm_params("self")]

fn max_bindings_per_bind_group(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-bindings-per-bind-group")] #[cm_params("self")]

fn max_dynamic_uniform_buffers_per_pipeline_layout(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-dynamic-uniform-buffers-per-pipeline-layout")] #[cm_params("self")]

fn max_dynamic_storage_buffers_per_pipeline_layout(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-dynamic-storage-buffers-per-pipeline-layout")] #[cm_params("self")]

fn max_sampled_textures_per_shader_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-sampled-textures-per-shader-stage")] #[cm_params("self")]

fn max_samplers_per_shader_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-samplers-per-shader-stage")] #[cm_params("self")]

fn max_storage_buffers_per_shader_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-buffers-per-shader-stage")] #[cm_params("self")]

fn max_storage_buffers_in_vertex_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-buffers-in-vertex-stage")] #[cm_params("self")]

fn max_storage_buffers_in_fragment_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-buffers-in-fragment-stage")] #[cm_params("self")]

fn max_storage_textures_per_shader_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-textures-per-shader-stage")] #[cm_params("self")]

fn max_storage_textures_in_vertex_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-textures-in-vertex-stage")] #[cm_params("self")]

fn max_storage_textures_in_fragment_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-textures-in-fragment-stage")] #[cm_params("self")]

fn max_uniform_buffers_per_shader_stage(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-uniform-buffers-per-shader-stage")] #[cm_params("self")]

fn max_uniform_buffer_binding_size(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-uniform-buffer-binding-size")] #[cm_params("self")]

fn max_storage_buffer_binding_size(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-storage-buffer-binding-size")] #[cm_params("self")]

fn min_uniform_buffer_offset_alignment(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.min-uniform-buffer-offset-alignment")] #[cm_params("self")]

fn min_storage_buffer_offset_alignment(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.min-storage-buffer-offset-alignment")] #[cm_params("self")]

fn max_vertex_buffers(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-vertex-buffers")] #[cm_params("self")]

fn max_buffer_size(&self) -> u64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-buffer-size")] #[cm_params("self")]

fn max_vertex_attributes(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-vertex-attributes")] #[cm_params("self")]

fn max_vertex_buffer_array_stride(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-vertex-buffer-array-stride")] #[cm_params("self")]

fn max_inter_stage_shader_variables(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-inter-stage-shader-variables")] #[cm_params("self")]

fn max_color_attachments(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-color-attachments")] #[cm_params("self")]

fn max_color_attachment_bytes_per_sample(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-color-attachment-bytes-per-sample")] #[cm_params("self")]

fn max_compute_workgroup_storage_size(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-workgroup-storage-size")] #[cm_params("self")]

fn max_compute_invocations_per_workgroup(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-invocations-per-workgroup")] #[cm_params("self")]

fn max_compute_workgroup_size_x(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-workgroup-size-x")] #[cm_params("self")]

fn max_compute_workgroup_size_y(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-workgroup-size-y")] #[cm_params("self")]

fn max_compute_workgroup_size_z(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-workgroup-size-z")] #[cm_params("self")]

fn max_compute_workgroups_per_dimension(&self) -> u32

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-supported-limits.max-compute-workgroups-per-dimension")] #[cm_params("self")]

pub resource GpuTexture

fn create_view(&self, descriptor: Option<GpuTextureViewDescriptor>) -> GpuTextureView

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.create-view")] #[cm_params("self", "descriptor")]

fn destroy(&self)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.destroy")] #[cm_params("self")]

fn width(&self) -> GpuIntegerCoordinateOut

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.width")] #[cm_params("self")]

fn height(&self) -> GpuIntegerCoordinateOut

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.height")] #[cm_params("self")]

fn depth_or_array_layers(&self) -> GpuIntegerCoordinateOut

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.depth-or-array-layers")] #[cm_params("self")]

fn mip_level_count(&self) -> GpuIntegerCoordinateOut

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.mip-level-count")] #[cm_params("self")]

fn sample_count(&self) -> GpuSize32Out

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.sample-count")] #[cm_params("self")]

fn dimension(&self) -> GpuTextureDimension

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.dimension")] #[cm_params("self")]

fn format(&self) -> GpuTextureFormat

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.format")] #[cm_params("self")]

fn usage(&self) -> GpuTextureUsage

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.usage")] #[cm_params("self")]

fn texture_binding_view_dimension(&self) -> Option<GpuTextureViewDimension>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.texture-binding-view-dimension")] #[cm_params("self")]

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture.set-label")] #[cm_params("self", "label")]

pub resource GpuTextureView

fn label(&self) -> String

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture-view.label")] #[cm_params("self")]

fn set_label(&self, label: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-texture-view.set-label")] #[cm_params("self", "label")]

pub resource GpuUncapturedErrorEvent

fn error(&self) -> GpuError

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]gpu-uncaptured-error-event.error")] #[cm_params("self")]

pub resource RecordGpuPipelineConstantValue

fn new() -> RecordGpuPipelineConstantValue

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[constructor]record-gpu-pipeline-constant-value")]

fn add(&self, key: String, value: GpuPipelineConstantValue)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.add")] #[cm_params("self", "key", "value")]

fn get(&self, key: String) -> Option<GpuPipelineConstantValue>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.get")] #[cm_params("self", "key")]

fn has(&self, key: String) -> bool

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.has")] #[cm_params("self", "key")]

fn remove(&self, key: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.remove")] #[cm_params("self", "key")]

fn keys(&self) -> List<String>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.keys")] #[cm_params("self")]

fn values(&self) -> List<GpuPipelineConstantValue>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.values")] #[cm_params("self")]

fn entries(&self) -> List<[String, GpuPipelineConstantValue]>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-gpu-pipeline-constant-value.entries")] #[cm_params("self")]

pub resource RecordOptionGpuSize64

fn new() -> RecordOptionGpuSize64

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[constructor]record-option-gpu-size64")]

fn add(&self, key: String, value: Option<GpuSize64>)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.add")] #[cm_params("self", "key", "value")]

fn get(&self, key: String) -> Option<Option<GpuSize64>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.get")] #[cm_params("self", "key")]

fn has(&self, key: String) -> bool

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.has")] #[cm_params("self", "key")]

fn remove(&self, key: String)

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.remove")] #[cm_params("self", "key")]

fn keys(&self) -> List<String>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.keys")] #[cm_params("self")]

fn values(&self) -> List<Option<GpuSize64>>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.values")] #[cm_params("self")]

fn entries(&self) -> List<[String, Option<GpuSize64>]>

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]record-option-gpu-size64.entries")] #[cm_params("self")]

pub resource WgslLanguageFeatures

fn has(&self, value: String) -> bool

#[cm("wasi:webgpu/webgpu@0.3.0-rc.2#[method]wgsl-language-features.has")] #[cm_params("self", "value")]

Types

pub type GpuBufferDynamicOffset = u32

pub type GpuDepthBias = i32

pub type GpuIndex32 = u32

pub type GpuIntegerCoordinate = u32

pub type GpuIntegerCoordinateOut = u32

pub type GpuPipelineConstantValue = f64

pub type GpuSampleMask = u32

pub type GpuSignedOffset32 = i32

pub type GpuSize32 = u32

pub type GpuSize32Out = u32

pub type GpuSize64 = u64

pub type GpuSize64Out = u64

pub type GpuStencilValue = u32

Structs

pub struct CreateQuerySetError

kind: CreateQuerySetErrorKind
message: String

pub struct GetMappedRangeError

kind: GetMappedRangeErrorKind
message: String

pub struct GpuBlendComponent

operation: Option<GpuBlendOperation>
src_factor: Option<GpuBlendFactor>
dst_factor: Option<GpuBlendFactor>

pub struct GpuBlendState

color: GpuBlendComponent
alpha: GpuBlendComponent

pub struct GpuCanvasToneMapping

mode: Option<GpuCanvasToneMappingMode>

pub struct GpuColor

r: f64
g: f64
b: f64
a: f64

pub struct GpuCommandBufferDescriptor

label: Option<String>

pub struct GpuCommandEncoderDescriptor

label: Option<String>

pub struct GpuExtent3D

width: GpuIntegerCoordinate
height: Option<GpuIntegerCoordinate>
depth_or_array_layers: Option<GpuIntegerCoordinate>

pub struct GpuOrigin3D

x: Option<GpuIntegerCoordinate>
y: Option<GpuIntegerCoordinate>
z: Option<GpuIntegerCoordinate>

pub struct CreatePipelineError

kind: CreatePipelineErrorKind
message: String

pub struct GpuPrimitiveState

topology: Option<GpuPrimitiveTopology>
strip_index_format: Option<GpuIndexFormat>
front_face: Option<GpuFrontFace>
cull_mode: Option<GpuCullMode>
unclipped_depth: Option<bool>

pub struct GpuQueueDescriptor

label: Option<String>

pub struct GpuRenderBundleDescriptor

label: Option<String>

pub struct GpuRequestAdapterOptions

feature_level: Option<String>
power_preference: Option<GpuPowerPreference>
force_fallback_adapter: Option<bool>
xr_compatible: Option<bool>

pub struct GpuSamplerBindingLayout

type: Option<GpuSamplerBindingType>

pub struct GpuSamplerDescriptor

address_mode_u: Option<GpuAddressMode>
address_mode_v: Option<GpuAddressMode>
address_mode_w: Option<GpuAddressMode>
mag_filter: Option<GpuFilterMode>
min_filter: Option<GpuFilterMode>
mipmap_filter: Option<GpuMipmapFilterMode>
lod_min_clamp: Option<f32>
lod_max_clamp: Option<f32>
compare: Option<GpuCompareFunction>
max_anisotropy: Option<u16>
label: Option<String>

pub struct GpuShaderModuleCompilationHint

entry_point: String
layout: Option<GpuLayoutMode>

pub struct GpuShaderModuleDescriptor

code: String
compilation_hints: Option<List<GpuShaderModuleCompilationHint>>
label: Option<String>

pub struct GpuComputePassTimestampWrites

query_set: &GpuQuerySet
beginning_of_pass_write_index: Option<GpuSize32>
end_of_pass_write_index: Option<GpuSize32>

pub struct GpuComputePassDescriptor

timestamp_writes: Option<GpuComputePassTimestampWrites>
label: Option<String>

pub struct GpuMultisampleState

count: Option<GpuSize32>
mask: Option<GpuSampleMask>
alpha_to_coverage_enabled: Option<bool>

pub struct GpuPipelineLayoutDescriptor

bind_group_layouts: List<Option<&GpuBindGroupLayout>>
immediate_size: Option<GpuSize32>
label: Option<String>

pub struct GpuQuerySetDescriptor

type: GpuQueryType
count: GpuSize32
label: Option<String>

pub struct GpuRenderPassTimestampWrites

query_set: &GpuQuerySet
beginning_of_pass_write_index: Option<GpuSize32>
end_of_pass_write_index: Option<GpuSize32>

pub struct GpuBufferBinding

buffer: &GpuBuffer
offset: Option<GpuSize64>
size: Option<GpuSize64>

pub struct GpuBufferBindingLayout

type: Option<GpuBufferBindingType>
has_dynamic_offset: Option<bool>
min_binding_size: Option<GpuSize64>

pub struct GpuBufferDescriptor

size: GpuSize64
usage: GpuBufferUsage
mapped_at_creation: Option<bool>
label: Option<String>

pub struct GpuStencilFaceState

compare: Option<GpuCompareFunction>
fail_op: Option<GpuStencilOperation>
depth_fail_op: Option<GpuStencilOperation>
pass_op: Option<GpuStencilOperation>

pub struct GpuTexelCopyBufferInfo

buffer: &GpuBuffer
offset: Option<GpuSize64>
bytes_per_row: Option<GpuSize32>
rows_per_image: Option<GpuSize32>

pub struct GpuTexelCopyBufferLayout

offset: Option<GpuSize64>
bytes_per_row: Option<GpuSize32>
rows_per_image: Option<GpuSize32>

pub struct GpuTexelCopyTextureInfo

texture: &GpuTexture
mip_level: Option<GpuIntegerCoordinate>
origin: Option<GpuOrigin3D>
aspect: Option<GpuTextureAspect>

pub struct GpuColorTargetState

format: GpuTextureFormat
blend: Option<GpuBlendState>
write_mask: Option<GpuColorWrite>

pub struct GpuDepthStencilState

format: GpuTextureFormat
depth_write_enabled: Option<bool>
depth_compare: Option<GpuCompareFunction>
stencil_front: Option<GpuStencilFaceState>
stencil_back: Option<GpuStencilFaceState>
stencil_read_mask: Option<GpuStencilValue>
stencil_write_mask: Option<GpuStencilValue>
depth_bias: Option<GpuDepthBias>
depth_bias_slope_scale: Option<f32>
depth_bias_clamp: Option<f32>

pub struct GpuRenderBundleEncoderDescriptor

depth_read_only: Option<bool>
stencil_read_only: Option<bool>
color_formats: List<Option<GpuTextureFormat>>
depth_stencil_format: Option<GpuTextureFormat>
sample_count: Option<GpuSize32>
label: Option<String>

pub struct GpuBindGroupEntry

binding: GpuIndex32
resource: GpuBindingResource

pub struct GpuBindGroupDescriptor

layout: &GpuBindGroupLayout
entries: List<GpuBindGroupEntry>
label: Option<String>

pub struct GpuRenderPassColorAttachment

view: &GpuTextureView
depth_slice: Option<GpuIntegerCoordinate>
resolve_target: Option<&GpuTextureView>
clear_value: Option<GpuColor>
load_op: GpuLoadOp
store_op: GpuStoreOp

pub struct GpuRenderPassDepthStencilAttachment

view: &GpuTextureView
depth_clear_value: Option<f32>
depth_load_op: Option<GpuLoadOp>
depth_store_op: Option<GpuStoreOp>
depth_read_only: Option<bool>
stencil_clear_value: Option<GpuStencilValue>
stencil_load_op: Option<GpuLoadOp>
stencil_store_op: Option<GpuStoreOp>
stencil_read_only: Option<bool>

pub struct GpuRenderPassDescriptor

color_attachments: List<Option<GpuRenderPassColorAttachment>>
depth_stencil_attachment: Option<GpuRenderPassDepthStencilAttachment>
occlusion_query_set: Option<&GpuQuerySet>
timestamp_writes: Option<GpuRenderPassTimestampWrites>
max_draw_count: Option<GpuSize64>
label: Option<String>

pub struct GpuStorageTextureBindingLayout

access: Option<GpuStorageTextureAccess>
format: GpuTextureFormat
view_dimension: Option<GpuTextureViewDimension>

pub struct GpuTextureBindingLayout

sample_type: Option<GpuTextureSampleType>
view_dimension: Option<GpuTextureViewDimension>
multisampled: Option<bool>

pub struct GpuBindGroupLayoutEntry

binding: GpuIndex32
visibility: GpuShaderStage
buffer: Option<GpuBufferBindingLayout>
sampler: Option<GpuSamplerBindingLayout>
texture: Option<GpuTextureBindingLayout>
storage_texture: Option<GpuStorageTextureBindingLayout>

pub struct GpuBindGroupLayoutDescriptor

entries: List<GpuBindGroupLayoutEntry>
label: Option<String>

pub struct GpuTextureDescriptor

size: GpuExtent3D
mip_level_count: Option<GpuIntegerCoordinate>
sample_count: Option<GpuSize32>
dimension: Option<GpuTextureDimension>
format: GpuTextureFormat
usage: GpuTextureUsage
view_formats: Option<List<GpuTextureFormat>>
texture_binding_view_dimension: Option<GpuTextureViewDimension>
label: Option<String>

pub struct GpuTextureViewDescriptor

format: Option<GpuTextureFormat>
dimension: Option<GpuTextureViewDimension>
usage: Option<GpuTextureUsage>
aspect: Option<GpuTextureAspect>
base_mip_level: Option<GpuIntegerCoordinate>
mip_level_count: Option<GpuIntegerCoordinate>
base_array_layer: Option<GpuIntegerCoordinate>
array_layer_count: Option<GpuIntegerCoordinate>
swizzle: Option<String>
label: Option<String>

pub struct GpuVertexAttribute

format: GpuVertexFormat
offset: GpuSize64
shader_location: GpuIndex32

pub struct GpuVertexBufferLayout

array_stride: GpuSize64
step_mode: Option<GpuVertexStepMode>
attributes: List<GpuVertexAttribute>

pub struct MapAsyncError

kind: MapAsyncErrorKind
message: String

pub struct PopErrorScopeError

kind: PopErrorScopeErrorKind
message: String

pub struct GpuCanvasConfiguration

device: &GpuDevice
format: GpuTextureFormat
usage: Option<GpuTextureUsage>
view_formats: Option<List<GpuTextureFormat>>
color_space: Option<PredefinedColorSpace>
tone_mapping: Option<GpuCanvasToneMapping>
alpha_mode: Option<GpuCanvasAlphaMode>

pub struct GpuCanvasConfigurationOwned

device: GpuDevice
format: GpuTextureFormat
usage: Option<GpuTextureUsage>
view_formats: Option<List<GpuTextureFormat>>
color_space: Option<PredefinedColorSpace>
tone_mapping: Option<GpuCanvasToneMapping>
alpha_mode: Option<GpuCanvasAlphaMode>

pub struct GpuFragmentState

targets: List<Option<GpuColorTargetState>>
module: &GpuShaderModule
entry_point: Option<String>
constants: Option<RecordGpuPipelineConstantValue>

pub struct GpuProgrammableStage

module: &GpuShaderModule
entry_point: Option<String>
constants: Option<RecordGpuPipelineConstantValue>

pub struct GpuComputePipelineDescriptor

compute: GpuProgrammableStage
layout: GpuLayoutMode
label: Option<String>

pub struct GpuVertexState

buffers: Option<List<Option<GpuVertexBufferLayout>>>
module: &GpuShaderModule
entry_point: Option<String>
constants: Option<RecordGpuPipelineConstantValue>

pub struct GpuRenderPipelineDescriptor

vertex: GpuVertexState
primitive: Option<GpuPrimitiveState>
depth_stencil: Option<GpuDepthStencilState>
multisample: Option<GpuMultisampleState>
fragment: Option<GpuFragmentState>
layout: GpuLayoutMode
label: Option<String>

pub struct GpuDeviceDescriptor

required_features: Option<List<GpuFeatureName>>
required_limits: Option<RecordOptionGpuSize64>
default_queue: Option<GpuQueueDescriptor>
label: Option<String>

pub struct RequestDeviceError

kind: RequestDeviceErrorKind
message: String

pub struct SetBindGroupError

kind: SetBindGroupErrorKind
message: String

pub struct UnmapError

kind: UnmapErrorKind
message: String

pub struct WriteBufferError

kind: WriteBufferErrorKind
message: String

Variants

pub variant CreateQuerySetErrorKind

TypeError

pub variant GetMappedRangeErrorKind

OperationError
RangeError
TypeError

pub variant GpuErrorKind

ValidationError
OutOfMemoryError
InternalError

pub variant CreatePipelineErrorKind

GpuPipelineError(GpuPipelineErrorReason)

pub variant GpuLayoutMode

Specific(&GpuPipelineLayout)
Auto

pub variant GpuBindingResource

GpuBuffer(&GpuBuffer)
GpuBufferBinding(GpuBufferBinding)
GpuSampler(&GpuSampler)
GpuTexture(&GpuTexture)
GpuTextureView(&GpuTextureView)

pub variant MapAsyncErrorKind

OperationError
RangeError
AbortError

pub variant PopErrorScopeErrorKind

OperationError

pub variant RequestDeviceErrorKind

TypeError
OperationError

pub variant SetBindGroupErrorKind

RangeError

pub variant UnmapErrorKind

AbortError

pub variant WriteBufferErrorKind

OperationError

Enums

pub enum GpuAddressMode

ClampToEdge
Repeat
MirrorRepeat

pub enum GpuBlendFactor

Zero
One
Src
OneMinusSrc
SrcAlpha
OneMinusSrcAlpha
Dst
OneMinusDst
DstAlpha
OneMinusDstAlpha
SrcAlphaSaturated
Constant
OneMinusConstant
Src1
OneMinusSrc1
Src1Alpha
OneMinusSrc1Alpha

pub enum GpuBlendOperation

Add
Subtract
ReverseSubtract
Min
Max

pub enum GpuBufferBindingType

Uniform
Storage
ReadOnlyStorage

pub enum GpuBufferMapState

Unmapped
Pending
Mapped

pub enum GpuCanvasAlphaMode

Opaque
Premultiplied

pub enum GpuCanvasToneMappingMode

Standard
Extended

pub enum GpuCompareFunction

Never
Less
Equal
LessEqual
Greater
NotEqual
GreaterEqual
Always

pub enum GpuCompilationMessageType

Error
Warning
Info

pub enum GpuCullMode

None
Front
Back

pub enum GpuDeviceLostReason

Unknown
Destroyed

pub enum GpuErrorFilter

Validation
OutOfMemory
Internal

pub enum GpuFeatureName

CoreFeaturesAndLimits
DepthClipControl
Depth32floatStencil8
TextureCompressionBc
TextureCompressionBcSliced3d
TextureCompressionEtc2
TextureCompressionAstc
TextureCompressionAstcSliced3d
TimestampQuery
IndirectFirstInstance
ShaderF16
Rg11b10ufloatRenderable
Bgra8unormStorage
Float32Filterable
Float32Blendable
ClipDistances
DualSourceBlending
Subgroups
TextureFormatsTier1
TextureFormatsTier2
PrimitiveIndex
TextureComponentSwizzle

pub enum GpuFilterMode

Nearest
Linear

pub enum GpuFrontFace

Ccw
Cw

pub enum GpuIndexFormat

Uint16
Uint32

pub enum GpuLoadOp

Load
Clear

pub enum GpuMipmapFilterMode

Nearest
Linear

pub enum GpuPipelineErrorReason

Validation
Internal

pub enum GpuPowerPreference

LowPower
HighPerformance

pub enum GpuPrimitiveTopology

PointList
LineList
LineStrip
TriangleList
TriangleStrip

pub enum GpuQueryType

Occlusion
Timestamp

pub enum GpuSamplerBindingType

Filtering
NonFiltering
Comparison

pub enum GpuStencilOperation

Keep
Zero
Replace
Invert
IncrementClamp
DecrementClamp
IncrementWrap
DecrementWrap

pub enum GpuStorageTextureAccess

WriteOnly
ReadOnly
ReadWrite

pub enum GpuStoreOp

Store
Discard

pub enum GpuTextureAspect

All
StencilOnly
DepthOnly

pub enum GpuTextureDimension

D1
D2
D3

pub enum GpuTextureFormat

R8unorm
R8snorm
R8uint
R8sint
R16unorm
R16snorm
R16uint
R16sint
R16float
Rg8unorm
Rg8snorm
Rg8uint
Rg8sint
R32uint
R32sint
R32float
Rg16unorm
Rg16snorm
Rg16uint
Rg16sint
Rg16float
Rgba8unorm
Rgba8unormSrgb
Rgba8snorm
Rgba8uint
Rgba8sint
Bgra8unorm
Bgra8unormSrgb
Rgb9e5ufloat
Rgb10a2uint
Rgb10a2unorm
Rg11b10ufloat
Rg32uint
Rg32sint
Rg32float
Rgba16unorm
Rgba16snorm
Rgba16uint
Rgba16sint
Rgba16float
Rgba32uint
Rgba32sint
Rgba32float
Stencil8
Depth16unorm
Depth24plus
Depth24plusStencil8
Depth32float
Depth32floatStencil8
Bc1RgbaUnorm
Bc1RgbaUnormSrgb
Bc2RgbaUnorm
Bc2RgbaUnormSrgb
Bc3RgbaUnorm
Bc3RgbaUnormSrgb
Bc4RUnorm
Bc4RSnorm
Bc5RgUnorm
Bc5RgSnorm
Bc6hRgbUfloat
Bc6hRgbFloat
Bc7RgbaUnorm
Bc7RgbaUnormSrgb
Etc2Rgb8unorm
Etc2Rgb8unormSrgb
Etc2Rgb8a1unorm
Etc2Rgb8a1unormSrgb
Etc2Rgba8unorm
Etc2Rgba8unormSrgb
EacR11unorm
EacR11snorm
EacRg11unorm
EacRg11snorm
Astc4x4Unorm
Astc4x4UnormSrgb
Astc5x4Unorm
Astc5x4UnormSrgb
Astc5x5Unorm
Astc5x5UnormSrgb
Astc6x5Unorm
Astc6x5UnormSrgb
Astc6x6Unorm
Astc6x6UnormSrgb
Astc8x5Unorm
Astc8x5UnormSrgb
Astc8x6Unorm
Astc8x6UnormSrgb
Astc8x8Unorm
Astc8x8UnormSrgb
Astc10x5Unorm
Astc10x5UnormSrgb
Astc10x6Unorm
Astc10x6UnormSrgb
Astc10x8Unorm
Astc10x8UnormSrgb
Astc10x10Unorm
Astc10x10UnormSrgb
Astc12x10Unorm
Astc12x10UnormSrgb
Astc12x12Unorm
Astc12x12UnormSrgb

pub enum GpuTextureSampleType

Float
UnfilterableFloat
Depth
Sint
Uint

pub enum GpuTextureViewDimension

D1
D2
D2Array
Cube
CubeArray
D3

pub enum GpuVertexFormat

Uint8
Uint8x2
Uint8x4
Sint8
Sint8x2
Sint8x4
Unorm8
Unorm8x2
Unorm8x4
Snorm8
Snorm8x2
Snorm8x4
Uint16
Uint16x2
Uint16x4
Sint16
Sint16x2
Sint16x4
Unorm16
Unorm16x2
Unorm16x4
Snorm16
Snorm16x2
Snorm16x4
Float16
Float16x2
Float16x4
Float32
Float32x2
Float32x3
Float32x4
Uint32
Uint32x2
Uint32x3
Uint32x4
Sint32
Sint32x2
Sint32x3
Sint32x4
Unorm1010102
Unorm8x4Bgra

pub enum GpuVertexStepMode

Vertex
Instance

pub enum PredefinedColorSpace

Srgb
DisplayP3

Flags

pub flags GpuBufferUsage

MapRead
MapWrite
CopySrc
CopyDst
Index
Vertex
Uniform
Storage
Indirect
QueryResolve

pub flags GpuColorWrite

Red
Green
Blue
Alpha
All

pub flags GpuMapMode

Read
Write

pub flags GpuShaderStage

Vertex
Fragment
Compute

pub flags GpuTextureUsage

CopySrc
CopyDst
TextureBinding
StorageBinding
RenderAttachment
TransientAttachment