mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Implement GPUComputePassEncoder functions
Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
This commit is contained in:
parent
5597ccf57d
commit
170e9971ac
10 changed files with 109 additions and 83 deletions
|
@ -103,6 +103,7 @@ pub enum WebGPURequest {
|
|||
// wgpu::command::CommandBufferDescriptor,
|
||||
),
|
||||
Submit(wgpu::id::QueueId, Vec<wgpu::id::CommandBufferId>),
|
||||
RunComputePass(wgpu::id::CommandEncoderId, Vec<u8>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
|
@ -418,6 +419,13 @@ impl WGPU {
|
|||
&command_buffer_ids
|
||||
));
|
||||
},
|
||||
WebGPURequest::RunComputePass(command_encoder_id, raw_data) => {
|
||||
let global = &self.global;
|
||||
gfx_select!(command_encoder_id => global.command_encoder_run_compute_pass(
|
||||
command_encoder_id,
|
||||
&raw_data
|
||||
));
|
||||
},
|
||||
WebGPURequest::Exit(sender) => {
|
||||
self.deinit();
|
||||
if let Err(e) = sender.send(()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue