aboutsummaryrefslogtreecommitdiffstats
path: root/components/webgpu/lib.rs
diff options
context:
space:
mode:
authorIstvan Miklos <istvan.miklos@h-lab.eu>2020-02-18 11:29:21 +0100
committerIstvan Miklos <istvan.miklos@h-lab.eu>2020-02-19 11:19:59 +0100
commit170e9971ac0acab6e5dba52fcc2e09064d1e0090 (patch)
tree514ebccdf98992fd4c80d008c08f0e4bef05290f /components/webgpu/lib.rs
parent5597ccf57ddc2b77fcb4a8071f575b0dc9389a12 (diff)
downloadservo-170e9971ac0acab6e5dba52fcc2e09064d1e0090.tar.gz
servo-170e9971ac0acab6e5dba52fcc2e09064d1e0090.zip
Implement GPUComputePassEncoder functions
Implement the `dispatch`, `endPass`, `setBindGroup`, `setPipeline` functions of `GPUComputePassEncoder`.
Diffstat (limited to 'components/webgpu/lib.rs')
-rw-r--r--components/webgpu/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/webgpu/lib.rs b/components/webgpu/lib.rs
index d7259dba795..ae26972e073 100644
--- a/components/webgpu/lib.rs
+++ b/components/webgpu/lib.rs
@@ -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(()) {