Make WebGPU resource creation fully async

Remove some garbage code in adapter id checks
Prevent panic during shutdown if using WebGPU
This commit is contained in:
Kunal Mohan 2020-05-26 12:30:28 +05:30
parent a3446579ec
commit f4d0183568
6 changed files with 65 additions and 165 deletions

View file

@ -2016,6 +2016,7 @@ impl ScriptThread {
WebGPUMsg::FreeCommandBuffer(id) => self.gpu_id_hub.lock().kill_command_buffer_id(id),
WebGPUMsg::FreeSampler(id) => self.gpu_id_hub.lock().kill_sampler_id(id),
WebGPUMsg::FreeShaderModule(id) => self.gpu_id_hub.lock().kill_shader_module_id(id),
WebGPUMsg::Exit => *self.webgpu_port.borrow_mut() = None,
_ => {},
}
}