aboutsummaryrefslogtreecommitdiffstats
path: root/components/webgpu/script_messages.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2024-05-22 18:47:35 +0200
committerGitHub <noreply@github.com>2024-05-22 16:47:35 +0000
commit794110ebe58ad72d809291e9feb3f2cc92819941 (patch)
tree9c01451fa022f433fa8a305d58c2a79da747e838 /components/webgpu/script_messages.rs
parent9f32809671c8c8e79d59c95194dcc466452299fc (diff)
downloadservo-794110ebe58ad72d809291e9feb3f2cc92819941.tar.gz
servo-794110ebe58ad72d809291e9feb3f2cc92819941.zip
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
Diffstat (limited to 'components/webgpu/script_messages.rs')
-rw-r--r--components/webgpu/script_messages.rs16
1 files changed, 4 insertions, 12 deletions
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<ErrorScopeId>,
pipeline_id: PipelineId,
- result: WebGPUOpResult,
},
- CleanDevice {
+ UncapturedError {
device: WebGPUDevice,
pipeline_id: PipelineId,
+ error: Error,
},
Exit,
}