From 794110ebe58ad72d809291e9feb3f2cc92819941 Mon Sep 17 00:00:00 2001 From: Samson <16504129+sagudev@users.noreply.github.com> Date: Wed, 22 May 2024 18:47:35 +0200 Subject: 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 --- components/webgpu/script_messages.rs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'components/webgpu/script_messages.rs') diff --git a/components/webgpu/script_messages.rs b/components/webgpu/script_messages.rs index 74a827d6dd1..7142641a466 100644 --- a/components/webgpu/script_messages.rs +++ b/components/webgpu/script_messages.rs @@ -7,20 +7,13 @@ use base::id::PipelineId; use serde::{Deserialize, Serialize}; +use crate::gpu_error::Error; use crate::identity::WebGPUDevice; use crate::wgc::id::{ AdapterId, BindGroupId, BindGroupLayoutId, BufferId, CommandBufferId, ComputePipelineId, DeviceId, PipelineLayoutId, QuerySetId, RenderBundleId, RenderPipelineId, SamplerId, ShaderModuleId, StagingBufferId, SurfaceId, TextureId, TextureViewId, }; -use crate::ErrorScopeId; - -#[derive(Clone, Debug, Deserialize, Serialize)] -pub enum WebGPUOpResult { - ValidationError(String), - OutOfMemoryError, - Success, -} #[derive(Clone, Debug, Deserialize, Serialize)] pub enum WebGPUMsg { @@ -41,15 +34,14 @@ pub enum WebGPUMsg { FreeRenderBundle(RenderBundleId), FreeStagingBuffer(StagingBufferId), FreeQuerySet(QuerySetId), - WebGPUOpResult { + CleanDevice { device: WebGPUDevice, - scope_id: Option, pipeline_id: PipelineId, - result: WebGPUOpResult, }, - CleanDevice { + UncapturedError { device: WebGPUDevice, pipeline_id: PipelineId, + error: Error, }, Exit, } -- cgit v1.2.3