aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/globalscope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/globalscope.rs')
-rw-r--r--components/script/dom/globalscope.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index aa0bfee1b79..0656a982cc9 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -98,7 +98,10 @@ use std::sync::Arc;
use time::{get_time, Timespec};
use uuid::Uuid;
use webgpu::wgpu::{
- id::{AdapterId, BindGroupId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId},
+ id::{
+ AdapterId, BindGroupId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId,
+ ShaderModuleId,
+ },
Backend,
};
@@ -2128,6 +2131,12 @@ impl GlobalScope {
.borrow_mut()
.create_pipeline_layout_id(backend)
}
+
+ pub fn wgpu_create_shader_module_id(&self, backend: Backend) -> ShaderModuleId {
+ self.gpu_id_hub
+ .borrow_mut()
+ .create_shader_module_id(backend)
+ }
}
fn timestamp_in_ms(time: Timespec) -> u64 {