mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue