Initial implementation of GPUQueue

Added WebIDL bindings for `GPUQueue`.
Implemented the `submit` function of `GPUQueue` and `defaultQueue` function of `GPUDevice`.
This commit is contained in:
Zakor 2020-02-03 17:25:01 +01:00 committed by Istvan Miklos
parent 0790c856d5
commit a3c6810b18
11 changed files with 181 additions and 16 deletions

View file

@ -107,7 +107,7 @@ impl GPUAdapterMethods for GPUAdapter {
impl AsyncWGPUListener for GPUAdapter {
fn handle_response(&self, response: WebGPUResponse, promise: &Rc<Promise>) {
match response {
WebGPUResponse::RequestDevice(device_id, _descriptor) => {
WebGPUResponse::RequestDevice(device_id, queue_id, _descriptor) => {
let device = GPUDevice::new(
&self.global(),
self.channel.clone(),
@ -115,6 +115,7 @@ impl AsyncWGPUListener for GPUAdapter {
Heap::default(),
Heap::default(),
device_id,
queue_id,
);
promise.resolve_native(&device);
},