mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Initial implementation of GPUBuffer for WebGPU
Added WebIDL bindings for GPUBuffer, GPUBufferDescriptor, GPUBufferUsage Implemented the `createBuffer` and `createBufferMapped` functions of GPUDevice
This commit is contained in:
parent
6ccad53937
commit
ebfcd0f27f
14 changed files with 428 additions and 12 deletions
|
@ -28,7 +28,7 @@ use smallvec::SmallVec;
|
|||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use webgpu::wgpu::{
|
||||
id::{AdapterId, DeviceId},
|
||||
id::{AdapterId, BufferId, DeviceId},
|
||||
Backend,
|
||||
};
|
||||
|
||||
|
@ -84,6 +84,10 @@ impl Navigator {
|
|||
pub fn create_device_id(&self, backend: Backend) -> DeviceId {
|
||||
self.gpu_id_hub.borrow_mut().create_device_id(backend)
|
||||
}
|
||||
|
||||
pub fn create_buffer_id(&self, backend: Backend) -> BufferId {
|
||||
self.gpu_id_hub.borrow_mut().create_buffer_id(backend)
|
||||
}
|
||||
}
|
||||
|
||||
impl NavigatorMethods for Navigator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue