mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Initial implementation of GPUShaderModule
Added WebIDL bindings for `GPUShaderModule`. Implemented the `createShaderModule` function of `GPUDevice`.
This commit is contained in:
parent
5f55cd5d71
commit
a8621c4ed9
9 changed files with 156 additions and 17 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue