[remote] Add BufferMapError (#10367)

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Sam authored and GitHub committed 2026-09-17 17:25:04 +00:00
1 parent 535f5c67a1
commit 6b6ffa6606
2 files changed
+21

No files matched your search

+6
View File
@@ -168,3 +168,9 @@ pub enum PipelineError {
Validation(String),
Internal(String),
}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub enum BufferMapError {
Aborted(String),
Operation(String),
}
+15
View File
@@ -36,3 +36,18 @@ pub mod hub;
pub mod id;
pub mod registry;
pub mod storage;
pub fn map_buffer_access_error(
err: wgpu_core::resource::BufferAccessError,
) -> wgpu_core_remote_types::BufferMapError {
match err {
e
@ wgpu_core::resource::BufferAccessError::Device(wgpu_core::device::DeviceError::Lost) => {
wgpu_core_remote_types::BufferMapError::Aborted(e.to_string())
}
e @ wgpu_core::resource::BufferAccessError::MapAborted => {
wgpu_core_remote_types::BufferMapError::Aborted(e.to_string())
}
e => wgpu_core_remote_types::BufferMapError::Operation(e.to_string()),
}
}