Initial implementation of GPUPipelineLayout for WebGPU

Added WebIDL bindings for `GPUPipelineLayout`.
Implemented the createPipelineLayout function of `GPUDevice`.
This commit is contained in:
Istvan Miklos 2020-01-15 12:16:32 +01:00
parent 0dccfd148a
commit d33a4d29a0
10 changed files with 223 additions and 6 deletions

View file

@ -42,6 +42,7 @@ impl GPUBindGroupLayout {
valid: Cell::new(valid),
}
}
pub fn new(
global: &GlobalScope,
channel: WebGPU,
@ -62,6 +63,20 @@ impl GPUBindGroupLayout {
}
}
impl GPUBindGroupLayout {
pub fn is_valid(&self) -> bool {
self.valid.get()
}
pub fn id(&self) -> WebGPUBindGroupLayout {
self.bind_group_layout
}
pub fn bindings(&self) -> &[GPUBindGroupLayoutBindings] {
&self.bindings
}
}
impl GPUBindGroupLayoutMethods for GPUBindGroupLayout {
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
fn GetLabel(&self) -> Option<DOMString> {