mirror of
https://github.com/servo/servo.git
synced 2025-06-12 10:24:43 +00:00
webgpu: Implement device lost (#32354)
* device lost promise should be init at creation of device object * device lost impl * lock for device poll workaround for wgpu deadlocks * expect * Less lost reason reasoning in script
This commit is contained in:
parent
3381f2a704
commit
cbc9304c20
9 changed files with 224 additions and 5628 deletions
|
@ -2424,12 +2424,14 @@ impl ScriptThread {
|
|||
WebGPUMsg::FreeTexture(id) => self.gpu_id_hub.lock().kill_texture_id(id),
|
||||
WebGPUMsg::FreeTextureView(id) => self.gpu_id_hub.lock().kill_texture_view_id(id),
|
||||
WebGPUMsg::Exit => *self.webgpu_port.borrow_mut() = None,
|
||||
WebGPUMsg::CleanDevice {
|
||||
WebGPUMsg::DeviceLost {
|
||||
pipeline_id,
|
||||
device,
|
||||
reason,
|
||||
msg,
|
||||
} => {
|
||||
let global = self.documents.borrow().find_global(pipeline_id).unwrap();
|
||||
global.remove_gpu_device(device);
|
||||
global.gpu_device_lost(device, reason, msg);
|
||||
},
|
||||
WebGPUMsg::UncapturedError {
|
||||
device,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue