diff options
author | Istvan Miklos <istvan.miklos@h-lab.eu> | 2020-01-15 12:16:32 +0100 |
---|---|---|
committer | Istvan Miklos <istvan.miklos@h-lab.eu> | 2020-01-21 14:47:38 +0100 |
commit | d33a4d29a0d8467531a3beb722dfdb3e15df12ae (patch) | |
tree | 43d722bb7cf730337ef875ee55b36757fca6a3ae /components/script/dom/navigator.rs | |
parent | 0dccfd148a62807d1d962aaef5321f4ce6d9dbc9 (diff) | |
download | servo-d33a4d29a0d8467531a3beb722dfdb3e15df12ae.tar.gz servo-d33a4d29a0d8467531a3beb722dfdb3e15df12ae.zip |
Initial implementation of GPUPipelineLayout for WebGPU
Added WebIDL bindings for `GPUPipelineLayout`.
Implemented the createPipelineLayout function of `GPUDevice`.
Diffstat (limited to 'components/script/dom/navigator.rs')
-rw-r--r-- | components/script/dom/navigator.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index 3d04433bfcd..1c96907cb31 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -28,7 +28,7 @@ use smallvec::SmallVec; use std::cell::RefCell; use std::rc::Rc; use webgpu::wgpu::{ - id::{AdapterId, BindGroupLayoutId, BufferId, DeviceId}, + id::{AdapterId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId}, Backend, }; @@ -94,6 +94,12 @@ impl Navigator { .borrow_mut() .create_bind_group_layout_id(backend) } + + pub fn create_pipeline_layout_id(&self, backend: Backend) -> PipelineLayoutId { + self.gpu_id_hub + .borrow_mut() + .create_pipeline_layout_id(backend) + } } impl NavigatorMethods for Navigator { |