Enum webgpu::WebGPURequest
source · pub enum WebGPURequest {
Show 64 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: ImageCopyBuffer,
destination: ImageCopyTexture,
copy_size: Extent3d,
},
CopyTextureToBuffer {
command_encoder_id: CommandEncoderId,
source: ImageCopyTexture,
destination: ImageCopyBuffer,
copy_size: Extent3d,
},
CopyTextureToTexture {
command_encoder_id: CommandEncoderId,
source: ImageCopyTexture,
destination: ImageCopyTexture,
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>>,
},
CreateContext(IpcSender<ExternalImageId>),
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>,
},
CreateSwapChain {
device_id: DeviceId,
queue_id: QueueId,
buffer_ids: ArrayVec<BufferId, PRESENTATION_BUFFER_COUNT>,
external_id: u64,
sender: IpcSender<ImageKey>,
image_desc: ImageDescriptor,
image_data: ImageData,
},
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 {
device_id: DeviceId,
texture_id: TextureId,
},
DestroySwapChain {
external_id: u64,
image_key: ImageKey,
},
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,
ids: SmallVec<[AdapterId; 4]>,
},
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>,
},
SwapChainPresent {
external_id: u64,
texture_id: TextureId,
encoder_id: CommandEncoderId,
},
UnmapBuffer {
buffer_id: BufferId,
array_buffer: IpcSharedMemory,
write_back: bool,
offset: u64,
size: u64,
},
WriteBuffer {
device_id: DeviceId,
queue_id: QueueId,
buffer_id: BufferId,
buffer_offset: u64,
data: IpcSharedMemory,
},
WriteTexture {
device_id: DeviceId,
queue_id: QueueId,
texture_cv: ImageCopyTexture,
data_layout: ImageDataLayout,
size: Extent3d,
data: IpcSharedMemory,
},
QueueOnSubmittedWorkDone {
sender: IpcSender<WebGPUResponse>,
queue_id: QueueId,
device_id: DeviceId,
},
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
§
sender: IpcSender<WebGPUResponse>
CommandEncoderFinish
CopyBufferToBuffer
Fields
§
command_encoder_id: CommandEncoderId
§
source_offset: BufferAddress
§
destination_offset: BufferAddress
§
size: BufferAddress
CopyBufferToTexture
CopyTextureToBuffer
CopyTextureToTexture
CreateBindGroup
CreateBindGroupLayout
Fields
§
bind_group_layout_id: BindGroupLayoutId
§
descriptor: Option<BindGroupLayoutDescriptor<'static>>
CreateBuffer
CreateCommandEncoder
CreateComputePipeline
Fields
§
compute_pipeline_id: ComputePipelineId
§
descriptor: ComputePipelineDescriptor<'static>
§
implicit_ids: Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>
§
async_sender: Option<IpcSender<WebGPUResponse>>
present only on ASYNC versions
CreateContext(IpcSender<ExternalImageId>)
CreatePipelineLayout
CreateRenderPipeline
Fields
§
render_pipeline_id: RenderPipelineId
§
descriptor: RenderPipelineDescriptor<'static>
§
implicit_ids: Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>
§
async_sender: Option<IpcSender<WebGPUResponse>>
present only on ASYNC versions
CreateSampler
CreateShaderModule
CreateSwapChain
Fields
§
image_desc: ImageDescriptor
CreateTexture
CreateTextureView
DestroyBuffer(BufferId)
DestroyDevice(DeviceId)
DestroyTexture
DestroySwapChain
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
RequestAdapter
RequestDevice
Fields
§
sender: IpcSender<WebGPUResponse>
§
adapter_id: WebGPUAdapter
§
descriptor: DeviceDescriptor<Option<String>>
§
pipeline_id: PipelineId
BeginComputePass
ComputePassSetPipeline
ComputePassSetBindGroup
ComputePassDispatchWorkgroups
ComputePassDispatchWorkgroupsIndirect
EndComputePass
BeginRenderPass
Fields
§
command_encoder_id: CommandEncoderId
§
render_pass_id: RenderPassId
§
color_attachments: Vec<Option<RenderPassColorAttachment>>
§
depth_stencil_attachment: Option<RenderPassDepthStencilAttachment>
RenderPassCommand
EndRenderPass
Submit
SwapChainPresent
UnmapBuffer
WriteBuffer
Fields
§
data: IpcSharedMemory
WriteTexture
QueueOnSubmittedWorkDone
PushErrorScope
DispatchError
PopErrorScope
ComputeGetBindGroupLayout
RenderGetBindGroupLayout
Trait Implementations§
source§impl Debug for WebGPURequest
impl Debug for WebGPURequest
source§impl<'de> Deserialize<'de> for WebGPURequest
impl<'de> Deserialize<'de> for WebGPURequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WebGPURequest
impl !RefUnwindSafe for WebGPURequest
impl Send for WebGPURequest
impl !Sync for WebGPURequest
impl Unpin for WebGPURequest
impl UnwindSafe for WebGPURequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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