mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
webgpu: Move errorscopes to WGPU thread (#32304)
* Prepare errorscopes logic in wgpu_thread * remove scope_id from ipc * new GPUErrors per spec * remove cotent timeline error_scope * fixup poperrorscope types * device_scope -> gpu_error and nice errors * Handle errors detection more elegantly * good expectations * new expectations * Make error_scope.errors Vec as per spec
This commit is contained in:
parent
9f32809671
commit
794110ebe5
37 changed files with 3401 additions and 725 deletions
|
@ -56,7 +56,7 @@ use script_traits::{
|
|||
};
|
||||
use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
||||
use uuid::Uuid;
|
||||
use webgpu::{ErrorScopeId, WebGPUDevice, WebGPUOpResult};
|
||||
use webgpu::WebGPUDevice;
|
||||
|
||||
use super::bindings::trace::HashMapTracedValues;
|
||||
use crate::dom::bindings::cell::{DomRefCell, RefMut};
|
||||
|
@ -3097,17 +3097,12 @@ impl GlobalScope {
|
|||
let _ = self.gpu_devices.borrow_mut().remove(&device);
|
||||
}
|
||||
|
||||
pub fn handle_wgpu_msg(
|
||||
&self,
|
||||
device: WebGPUDevice,
|
||||
scope: Option<ErrorScopeId>,
|
||||
result: WebGPUOpResult,
|
||||
) {
|
||||
pub fn handle_uncaptured_gpu_error(&self, device: WebGPUDevice, error: webgpu::Error) {
|
||||
self.gpu_devices
|
||||
.borrow()
|
||||
.get(&device)
|
||||
.expect("GPUDevice not found")
|
||||
.handle_server_msg(scope, result);
|
||||
.fire_uncaptured_error(error);
|
||||
}
|
||||
|
||||
pub fn handle_gamepad_event(&self, gamepad_event: GamepadEvent) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue