Initial implementation of GPUBindGroupLayout for WebGPU

Added WebIDL bindings for `GPUBindGroupLayout`, `GPUBindGroupLayoutDescriptor`, `GPUBindingType`, `GPUShaderStage`
and `GPUBindGroupLayoutBinding` (Note: The servo's codegen doesn't like the name, because its already occupied).
Implemented the `createBindGroupLayout` function of `GPUDevice`.
This commit is contained in:
Istvan Miklos 2020-01-06 14:04:38 +01:00
parent 95614f57f1
commit 9cf007472b
13 changed files with 397 additions and 11 deletions

View file

@ -28,7 +28,7 @@ use smallvec::SmallVec;
use std::cell::RefCell;
use std::rc::Rc;
use webgpu::wgpu::{
id::{AdapterId, BufferId, DeviceId},
id::{AdapterId, BindGroupLayoutId, BufferId, DeviceId},
Backend,
};
@ -88,6 +88,12 @@ impl Navigator {
pub fn create_buffer_id(&self, backend: Backend) -> BufferId {
self.gpu_id_hub.borrow_mut().create_buffer_id(backend)
}
pub fn create_bind_group_layout_id(&self, backend: Backend) -> BindGroupLayoutId {
self.gpu_id_hub
.borrow_mut()
.create_bind_group_layout_id(backend)
}
}
impl NavigatorMethods for Navigator {