Initial implementation of GPUBindGroup for WebGPU

Added WebIDL bindings for `GPUBindGroup`.
Implemented the `createBindGroup` function of `GPUDevice`
This commit is contained in:
Istvan Miklos 2020-01-23 12:54:42 +01:00
parent 2b77a992db
commit 3cefc5f3a1
11 changed files with 227 additions and 9 deletions

View file

@ -94,7 +94,7 @@ use std::sync::Arc;
use time::{get_time, Timespec};
use uuid::Uuid;
use webgpu::wgpu::{
id::{AdapterId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId},
id::{AdapterId, BindGroupId, BindGroupLayoutId, BufferId, DeviceId, PipelineLayoutId},
Backend,
};
@ -1985,6 +1985,10 @@ impl GlobalScope {
self.gpu_id_hub.borrow_mut().create_adapter_ids()
}
pub fn wgpu_create_bind_group_id(&self, backend: Backend) -> BindGroupId {
self.gpu_id_hub.borrow_mut().create_bind_group_id(backend)
}
pub fn wgpu_create_bind_group_layout_id(&self, backend: Backend) -> BindGroupLayoutId {
self.gpu_id_hub
.borrow_mut()