mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
refactor(deno): impl From<wgpu_types::DeviceLostReason> for GPUDeviceLostReason
This commit is contained in:
parent
d1c40f3c68
commit
d8d1af24b6
@ -841,6 +841,15 @@ pub enum GPUDeviceLostReason {
|
|||||||
Destroyed,
|
Destroyed,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<wgpu_types::DeviceLostReason> for GPUDeviceLostReason {
|
||||||
|
fn from(value: wgpu_types::DeviceLostReason) -> Self {
|
||||||
|
match value {
|
||||||
|
wgpu_types::DeviceLostReason::Unknown => Self::Unknown,
|
||||||
|
wgpu_types::DeviceLostReason::Destroyed => Self::Destroyed,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct GPUDeviceLostInfo {
|
pub struct GPUDeviceLostInfo {
|
||||||
pub reason: GPUDeviceLostReason,
|
pub reason: GPUDeviceLostReason,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user