aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpubindgrouplayout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpubindgrouplayout.rs')
-rw-r--r--components/script/dom/gpubindgrouplayout.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/components/script/dom/gpubindgrouplayout.rs b/components/script/dom/gpubindgrouplayout.rs
index 7669f0e5f2d..7651d16b52b 100644
--- a/components/script/dom/gpubindgrouplayout.rs
+++ b/components/script/dom/gpubindgrouplayout.rs
@@ -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> {