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:
Samson 2024-05-22 18:47:35 +02:00 committed by GitHub
parent 9f32809671
commit 794110ebe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 3401 additions and 725 deletions

View file

@ -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 {
device: WebGPUDevice,
scope_id: Option<ErrorScopeId>,
pipeline_id: PipelineId,
result: WebGPUOpResult,
},
CleanDevice {
device: WebGPUDevice,
pipeline_id: PipelineId,
},
UncapturedError {
device: WebGPUDevice,
pipeline_id: PipelineId,
error: Error,
},
Exit,
}