mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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:
parent
95614f57f1
commit
9cf007472b
13 changed files with 397 additions and 11 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue