Upgrade wgpu-core version to 0.5.0 and implement server-side logic for wgpu id recycling

Remove current implementation of MapReadAsync
This commit is contained in:
Kunal Mohan 2020-05-20 11:28:10 +05:30
parent 1a74382603
commit a4f911699a
15 changed files with 504 additions and 339 deletions

View file

@ -20,7 +20,7 @@ use dom_struct::dom_struct;
use js::jsapi::{Heap, JSObject};
use std::ptr::NonNull;
use std::rc::Rc;
use webgpu::{wgpu, WebGPU, WebGPUAdapter, WebGPURequest, WebGPUResponse};
use webgpu::{wgt, WebGPU, WebGPUAdapter, WebGPURequest, WebGPUResponse};
#[dom_struct]
pub struct GPUAdapter {
@ -80,11 +80,11 @@ impl GPUAdapterMethods for GPUAdapter {
fn RequestDevice(&self, descriptor: &GPUDeviceDescriptor, comp: InRealm) -> Rc<Promise> {
let promise = Promise::new_in_current_realm(&self.global(), comp);
let sender = response_async(&promise, self);
let desc = wgpu::instance::DeviceDescriptor {
extensions: wgpu::instance::Extensions {
let desc = wgt::DeviceDescriptor {
extensions: wgt::Extensions {
anisotropic_filtering: descriptor.extensions.anisotropicFiltering,
},
limits: wgpu::instance::Limits {
limits: wgt::Limits {
max_bind_groups: descriptor.limits.maxBindGroups,
},
};