#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EGpuDriverId {
    Invalid = 0,
    Unknown = 1,
    AmdProprietary = 2,
    AmdOpenSource = 3,
    MesaRadv = 4,
    NvidiaProprietary = 5,
    IntelPropietary = 6,
    MesaIntel = 7,
    QualcommProprietary = 8,
    ArmProprietary = 9,
    GoogleSwiftshader = 10,
    BroadcomProprietary = 11,
    MesaLLVMPipe = 12,
    MoltenVK = 13,
    MesaTurnip = 14,
    MesaPanVK = 15,
    MesaVenus = 16,
    MesaDozen = 17,
    MesaNVK = 18,
    MesaHoneyKrisp = 19,
}

impl EGpuDriverId {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Invalid as i32 => Some(Self::Invalid),
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::AmdProprietary as i32 => Some(Self::AmdProprietary),
            x if x == Self::AmdOpenSource as i32 => Some(Self::AmdOpenSource),
            x if x == Self::MesaRadv as i32 => Some(Self::MesaRadv),
            x if x == Self::NvidiaProprietary as i32 => Some(Self::NvidiaProprietary),
            x if x == Self::IntelPropietary as i32 => Some(Self::IntelPropietary),
            x if x == Self::MesaIntel as i32 => Some(Self::MesaIntel),
            x if x == Self::QualcommProprietary as i32 => Some(Self::QualcommProprietary),
            x if x == Self::ArmProprietary as i32 => Some(Self::ArmProprietary),
            x if x == Self::GoogleSwiftshader as i32 => Some(Self::GoogleSwiftshader),
            x if x == Self::BroadcomProprietary as i32 => Some(Self::BroadcomProprietary),
            x if x == Self::MesaLLVMPipe as i32 => Some(Self::MesaLLVMPipe),
            x if x == Self::MoltenVK as i32 => Some(Self::MoltenVK),
            x if x == Self::MesaTurnip as i32 => Some(Self::MesaTurnip),
            x if x == Self::MesaPanVK as i32 => Some(Self::MesaPanVK),
            x if x == Self::MesaVenus as i32 => Some(Self::MesaVenus),
            x if x == Self::MesaDozen as i32 => Some(Self::MesaDozen),
            x if x == Self::MesaNVK as i32 => Some(Self::MesaNVK),
            x if x == Self::MesaHoneyKrisp as i32 => Some(Self::MesaHoneyKrisp),
            _ => None,
        }
    }
}
