Initial implementation of GPUComputePipeline

Added WebIDL bindings for `GPUComputePipeline`.
Implemented the `createComputePipeline` function of `GPUDevice`.
This commit is contained in:
Istvan Miklos 2020-02-03 15:42:13 +01:00
parent a8621c4ed9
commit 9031369c19
11 changed files with 180 additions and 8 deletions

View file

@ -99,8 +99,8 @@ use time::{get_time, Timespec};
use uuid::Uuid;
use webgpu::wgpu::{
id::{
AdapterId, BindGroupId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId,
ShaderModuleId,
AdapterId, BindGroupId, BindGroupLayoutId, BufferId, ComputePipelineId, DeviceId,
PipelineLayoutId, ShaderModuleId,
},
Backend,
};
@ -2137,6 +2137,11 @@ impl GlobalScope {
.borrow_mut()
.create_shader_module_id(backend)
}
pub fn wgpu_create_compute_pipeline_id(&self, backend: Backend) -> ComputePipelineId {
self.gpu_id_hub
.borrow_mut()
.create_compute_pipeline_id(backend)
}
}
fn timestamp_in_ms(time: Timespec) -> u64 {