Enum webgpu::WebGPURequest

source ·
pub enum WebGPURequest {
Show 65 variants BufferMapAsync { sender: IpcSender<WebGPUResponse>, buffer_id: BufferId, device_id: DeviceId, host_map: HostMap, offset: u64, size: Option<u64>, }, CommandEncoderFinish { command_encoder_id: CommandEncoderId, device_id: DeviceId, desc: CommandBufferDescriptor<Label<'static>>, }, CopyBufferToBuffer { command_encoder_id: CommandEncoderId, source_id: BufferId, source_offset: BufferAddress, destination_id: BufferId, destination_offset: BufferAddress, size: BufferAddress, }, CopyBufferToTexture { command_encoder_id: CommandEncoderId, source: TexelCopyBufferInfo, destination: TexelCopyTextureInfo, copy_size: Extent3d, }, CopyTextureToBuffer { command_encoder_id: CommandEncoderId, source: TexelCopyTextureInfo, destination: TexelCopyBufferInfo, copy_size: Extent3d, }, CopyTextureToTexture { command_encoder_id: CommandEncoderId, source: TexelCopyTextureInfo, destination: TexelCopyTextureInfo, copy_size: Extent3d, }, CreateBindGroup { device_id: DeviceId, bind_group_id: BindGroupId, descriptor: BindGroupDescriptor<'static>, }, CreateBindGroupLayout { device_id: DeviceId, bind_group_layout_id: BindGroupLayoutId, descriptor: Option<BindGroupLayoutDescriptor<'static>>, }, CreateBuffer { device_id: DeviceId, buffer_id: BufferId, descriptor: BufferDescriptor<'static>, }, CreateCommandEncoder { device_id: DeviceId, command_encoder_id: CommandEncoderId, desc: CommandEncoderDescriptor<Label<'static>>, }, CreateComputePipeline { device_id: DeviceId, compute_pipeline_id: ComputePipelineId, descriptor: ComputePipelineDescriptor<'static>, implicit_ids: Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>, async_sender: Option<IpcSender<WebGPUResponse>>, }, CreatePipelineLayout { device_id: DeviceId, pipeline_layout_id: PipelineLayoutId, descriptor: PipelineLayoutDescriptor<'static>, }, CreateRenderPipeline { device_id: DeviceId, render_pipeline_id: RenderPipelineId, descriptor: RenderPipelineDescriptor<'static>, implicit_ids: Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>, async_sender: Option<IpcSender<WebGPUResponse>>, }, CreateSampler { device_id: DeviceId, sampler_id: SamplerId, descriptor: SamplerDescriptor<'static>, }, CreateShaderModule { device_id: DeviceId, program_id: ShaderModuleId, program: String, label: Option<String>, sender: IpcSender<WebGPUResponse>, }, CreateContext { buffer_ids: ArrayVec<BufferId, PRESENTATION_BUFFER_COUNT>, size: DeviceIntSize, sender: IpcSender<(WebGPUContextId, ImageKey)>, }, UpdateContext { context_id: WebGPUContextId, size: DeviceIntSize, configuration: Option<ContextConfiguration>, }, SwapChainPresent { context_id: WebGPUContextId, texture_id: TextureId, encoder_id: CommandEncoderId, }, ValidateTextureDescriptor { device_id: DeviceId, texture_id: TextureId, descriptor: TextureDescriptor<'static>, }, DestroyContext { context_id: WebGPUContextId, }, CreateTexture { device_id: DeviceId, texture_id: TextureId, descriptor: TextureDescriptor<'static>, }, CreateTextureView { texture_id: TextureId, texture_view_id: TextureViewId, device_id: DeviceId, descriptor: Option<TextureViewDescriptor<'static>>, }, DestroyBuffer(BufferId), DestroyDevice(DeviceId), DestroyTexture(TextureId), DropTexture(TextureId), DropAdapter(AdapterId), DropDevice(DeviceId), DropBuffer(BufferId), DropPipelineLayout(PipelineLayoutId), DropComputePipeline(ComputePipelineId), DropRenderPipeline(RenderPipelineId), DropBindGroup(BindGroupId), DropBindGroupLayout(BindGroupLayoutId), DropCommandBuffer(CommandBufferId), DropTextureView(TextureViewId), DropSampler(SamplerId), DropShaderModule(ShaderModuleId), DropRenderBundle(RenderBundleId), DropQuerySet(QuerySetId), DropComputePass(ComputePassEncoderId), DropRenderPass(RenderPassEncoderId), Exit(IpcSender<()>), RenderBundleEncoderFinish { render_bundle_encoder: RenderBundleEncoder, descriptor: RenderBundleDescriptor<'static>, render_bundle_id: RenderBundleId, device_id: DeviceId, }, RequestAdapter { sender: IpcSender<WebGPUResponse>, options: RequestAdapterOptions, adapter_id: AdapterId, }, RequestDevice { sender: IpcSender<WebGPUResponse>, adapter_id: WebGPUAdapter, descriptor: DeviceDescriptor<Option<String>>, device_id: DeviceId, queue_id: QueueId, pipeline_id: PipelineId, }, BeginComputePass { command_encoder_id: CommandEncoderId, compute_pass_id: ComputePassId, label: Label<'static>, device_id: DeviceId, }, ComputePassSetPipeline { compute_pass_id: ComputePassId, pipeline_id: ComputePipelineId, device_id: DeviceId, }, ComputePassSetBindGroup { compute_pass_id: ComputePassId, index: u32, bind_group_id: BindGroupId, offsets: Vec<u32>, device_id: DeviceId, }, ComputePassDispatchWorkgroups { compute_pass_id: ComputePassId, x: u32, y: u32, z: u32, device_id: DeviceId, }, ComputePassDispatchWorkgroupsIndirect { compute_pass_id: ComputePassId, buffer_id: BufferId, offset: u64, device_id: DeviceId, }, EndComputePass { compute_pass_id: ComputePassId, device_id: DeviceId, command_encoder_id: CommandEncoderId, }, BeginRenderPass { command_encoder_id: CommandEncoderId, render_pass_id: RenderPassId, label: Label<'static>, color_attachments: Vec<Option<RenderPassColorAttachment>>, depth_stencil_attachment: Option<RenderPassDepthStencilAttachment>, device_id: DeviceId, }, RenderPassCommand { render_pass_id: RenderPassId, render_command: RenderCommand, device_id: DeviceId, }, EndRenderPass { render_pass_id: RenderPassId, device_id: DeviceId, command_encoder_id: CommandEncoderId, }, Submit { device_id: DeviceId, queue_id: QueueId, command_buffers: Vec<CommandBufferId>, }, UnmapBuffer { buffer_id: BufferId, mapping: Option<Mapping>, }, WriteBuffer { device_id: DeviceId, queue_id: QueueId, buffer_id: BufferId, buffer_offset: u64, data: IpcSharedMemory, }, WriteTexture { device_id: DeviceId, queue_id: QueueId, texture_cv: TexelCopyTextureInfo, data_layout: TexelCopyBufferLayout, size: Extent3d, data: IpcSharedMemory, }, QueueOnSubmittedWorkDone { sender: IpcSender<WebGPUResponse>, queue_id: QueueId, }, PushErrorScope { device_id: DeviceId, filter: ErrorFilter, }, DispatchError { device_id: DeviceId, error: Error, }, PopErrorScope { device_id: DeviceId, sender: IpcSender<WebGPUResponse>, }, ComputeGetBindGroupLayout { device_id: DeviceId, pipeline_id: ComputePipelineId, index: u32, id: BindGroupLayoutId, }, RenderGetBindGroupLayout { device_id: DeviceId, pipeline_id: RenderPipelineId, index: u32, id: BindGroupLayoutId, },
}

Variants§

§

BufferMapAsync

Fields

§buffer_id: BufferId
§device_id: DeviceId
§host_map: HostMap
§offset: u64
§size: Option<u64>
§

CommandEncoderFinish

Fields

§command_encoder_id: CommandEncoderId
§device_id: DeviceId
§

CopyBufferToBuffer

Fields

§command_encoder_id: CommandEncoderId
§source_id: BufferId
§source_offset: BufferAddress
§destination_id: BufferId
§destination_offset: BufferAddress
§

CopyBufferToTexture

Fields

§command_encoder_id: CommandEncoderId
§copy_size: Extent3d
§

CopyTextureToBuffer

Fields

§command_encoder_id: CommandEncoderId
§copy_size: Extent3d
§

CopyTextureToTexture

Fields

§command_encoder_id: CommandEncoderId
§copy_size: Extent3d
§

CreateBindGroup

Fields

§device_id: DeviceId
§bind_group_id: BindGroupId
§descriptor: BindGroupDescriptor<'static>
§

CreateBindGroupLayout

Fields

§device_id: DeviceId
§bind_group_layout_id: BindGroupLayoutId
§descriptor: Option<BindGroupLayoutDescriptor<'static>>
§

CreateBuffer

Fields

§device_id: DeviceId
§buffer_id: BufferId
§descriptor: BufferDescriptor<'static>
§

CreateCommandEncoder

Fields

§device_id: DeviceId
§command_encoder_id: CommandEncoderId
§

CreateComputePipeline

Fields

§device_id: DeviceId
§compute_pipeline_id: ComputePipelineId
§descriptor: ComputePipelineDescriptor<'static>
§async_sender: Option<IpcSender<WebGPUResponse>>

present only on ASYNC versions

§

CreatePipelineLayout

Fields

§device_id: DeviceId
§pipeline_layout_id: PipelineLayoutId
§descriptor: PipelineLayoutDescriptor<'static>
§

CreateRenderPipeline

Fields

§device_id: DeviceId
§render_pipeline_id: RenderPipelineId
§descriptor: RenderPipelineDescriptor<'static>
§async_sender: Option<IpcSender<WebGPUResponse>>

present only on ASYNC versions

§

CreateSampler

Fields

§device_id: DeviceId
§sampler_id: SamplerId
§descriptor: SamplerDescriptor<'static>
§

CreateShaderModule

Fields

§device_id: DeviceId
§program_id: ShaderModuleId
§program: String
§

CreateContext

Creates context

Fields

§buffer_ids: ArrayVec<BufferId, PRESENTATION_BUFFER_COUNT>
§

UpdateContext

Recreates swapchain (if needed)

Fields

§context_id: WebGPUContextId
§

SwapChainPresent

Reads texture to swapchains buffer and maps it

Fields

§context_id: WebGPUContextId
§texture_id: TextureId
§encoder_id: CommandEncoderId
§

ValidateTextureDescriptor

Fields

§device_id: DeviceId
§texture_id: TextureId
§descriptor: TextureDescriptor<'static>
§

DestroyContext

Fields

§context_id: WebGPUContextId
§

CreateTexture

Fields

§device_id: DeviceId
§texture_id: TextureId
§descriptor: TextureDescriptor<'static>
§

CreateTextureView

Fields

§texture_id: TextureId
§texture_view_id: TextureViewId
§device_id: DeviceId
§descriptor: Option<TextureViewDescriptor<'static>>
§

DestroyBuffer(BufferId)

§

DestroyDevice(DeviceId)

§

DestroyTexture(TextureId)

§

DropTexture(TextureId)

§

DropAdapter(AdapterId)

§

DropDevice(DeviceId)

§

DropBuffer(BufferId)

§

DropPipelineLayout(PipelineLayoutId)

§

DropComputePipeline(ComputePipelineId)

§

DropRenderPipeline(RenderPipelineId)

§

DropBindGroup(BindGroupId)

§

DropBindGroupLayout(BindGroupLayoutId)

§

DropCommandBuffer(CommandBufferId)

§

DropTextureView(TextureViewId)

§

DropSampler(SamplerId)

§

DropShaderModule(ShaderModuleId)

§

DropRenderBundle(RenderBundleId)

§

DropQuerySet(QuerySetId)

§

DropComputePass(ComputePassEncoderId)

§

DropRenderPass(RenderPassEncoderId)

§

Exit(IpcSender<()>)

§

RenderBundleEncoderFinish

Fields

§render_bundle_encoder: RenderBundleEncoder
§descriptor: RenderBundleDescriptor<'static>
§render_bundle_id: RenderBundleId
§device_id: DeviceId
§

RequestAdapter

§

RequestDevice

Fields

§adapter_id: WebGPUAdapter
§device_id: DeviceId
§queue_id: QueueId
§pipeline_id: PipelineId
§

BeginComputePass

Fields

§command_encoder_id: CommandEncoderId
§compute_pass_id: ComputePassId
§label: Label<'static>
§device_id: DeviceId
§

ComputePassSetPipeline

Fields

§compute_pass_id: ComputePassId
§pipeline_id: ComputePipelineId
§device_id: DeviceId
§

ComputePassSetBindGroup

Fields

§compute_pass_id: ComputePassId
§index: u32
§bind_group_id: BindGroupId
§offsets: Vec<u32>
§device_id: DeviceId
§

ComputePassDispatchWorkgroups

Fields

§compute_pass_id: ComputePassId
§device_id: DeviceId
§

ComputePassDispatchWorkgroupsIndirect

Fields

§compute_pass_id: ComputePassId
§buffer_id: BufferId
§offset: u64
§device_id: DeviceId
§

EndComputePass

Fields

§compute_pass_id: ComputePassId
§device_id: DeviceId
§command_encoder_id: CommandEncoderId
§

BeginRenderPass

Fields

§command_encoder_id: CommandEncoderId
§render_pass_id: RenderPassId
§label: Label<'static>
§depth_stencil_attachment: Option<RenderPassDepthStencilAttachment>
§device_id: DeviceId
§

RenderPassCommand

Fields

§render_pass_id: RenderPassId
§render_command: RenderCommand
§device_id: DeviceId
§

EndRenderPass

Fields

§render_pass_id: RenderPassId
§device_id: DeviceId
§command_encoder_id: CommandEncoderId
§

Submit

Fields

§device_id: DeviceId
§queue_id: QueueId
§command_buffers: Vec<CommandBufferId>
§

UnmapBuffer

Fields

§buffer_id: BufferId
§mapping: Option<Mapping>

Return back mapping for writeback

§

WriteBuffer

Fields

§device_id: DeviceId
§queue_id: QueueId
§buffer_id: BufferId
§buffer_offset: u64
§

WriteTexture

Fields

§device_id: DeviceId
§queue_id: QueueId
§

QueueOnSubmittedWorkDone

Fields

§queue_id: QueueId
§

PushErrorScope

Fields

§device_id: DeviceId
§

DispatchError

Fields

§device_id: DeviceId
§error: Error
§

PopErrorScope

Fields

§device_id: DeviceId
§

ComputeGetBindGroupLayout

Fields

§device_id: DeviceId
§pipeline_id: ComputePipelineId
§index: u32
§

RenderGetBindGroupLayout

Fields

§device_id: DeviceId
§pipeline_id: RenderPipelineId
§index: u32

Trait Implementations§

source§

impl Debug for WebGPURequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for WebGPURequest

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for WebGPURequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T

source§

impl<T> WasmNotSend for T
where T: Send,