mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Initial implementation of GPUDevice for WebGPU
Added the WebIDL bindigs for GPUDevice, GPUObjectDescriptorBase, GPUDeviceDescriptor, GPUObjectBase Implemented the `requestDevice` function of `GPUAdapter`
This commit is contained in:
parent
7aa68c8fe7
commit
b15d2bb7d7
11 changed files with 270 additions and 16 deletions
|
@ -26,7 +26,7 @@ use crate::dom::xr::XR;
|
|||
use dom_struct::dom_struct;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
use webgpu::wgpu::AdapterId;
|
||||
use webgpu::wgpu::{AdapterId, DeviceId};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct Navigator {
|
||||
|
@ -76,6 +76,10 @@ impl Navigator {
|
|||
pub fn create_adapter_id(&self) -> AdapterId {
|
||||
self.gpu_id_hub.borrow_mut().create_adapter_id()
|
||||
}
|
||||
|
||||
pub fn create_device_id(&self) -> DeviceId {
|
||||
self.gpu_id_hub.borrow_mut().create_device_id()
|
||||
}
|
||||
}
|
||||
|
||||
impl NavigatorMethods for Navigator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue