{-# language CPP #-}
module Graphics.Vulkan.Core12.Enums.DriverId (DriverId( DRIVER_ID_AMD_PROPRIETARY
, DRIVER_ID_AMD_OPEN_SOURCE
, DRIVER_ID_MESA_RADV
, DRIVER_ID_NVIDIA_PROPRIETARY
, DRIVER_ID_INTEL_PROPRIETARY_WINDOWS
, DRIVER_ID_INTEL_OPEN_SOURCE_MESA
, DRIVER_ID_IMAGINATION_PROPRIETARY
, DRIVER_ID_QUALCOMM_PROPRIETARY
, DRIVER_ID_ARM_PROPRIETARY
, DRIVER_ID_GOOGLE_SWIFTSHADER
, DRIVER_ID_GGP_PROPRIETARY
, DRIVER_ID_BROADCOM_PROPRIETARY
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Graphics.Vulkan.Zero (Zero)
newtype DriverId = DriverId Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern DRIVER_ID_AMD_PROPRIETARY = DriverId 1
pattern DRIVER_ID_AMD_OPEN_SOURCE = DriverId 2
pattern DRIVER_ID_MESA_RADV = DriverId 3
pattern DRIVER_ID_NVIDIA_PROPRIETARY = DriverId 4
pattern DRIVER_ID_INTEL_PROPRIETARY_WINDOWS = DriverId 5
pattern DRIVER_ID_INTEL_OPEN_SOURCE_MESA = DriverId 6
pattern DRIVER_ID_IMAGINATION_PROPRIETARY = DriverId 7
pattern DRIVER_ID_QUALCOMM_PROPRIETARY = DriverId 8
pattern DRIVER_ID_ARM_PROPRIETARY = DriverId 9
pattern DRIVER_ID_GOOGLE_SWIFTSHADER = DriverId 10
pattern DRIVER_ID_GGP_PROPRIETARY = DriverId 11
pattern DRIVER_ID_BROADCOM_PROPRIETARY = DriverId 12
{-# complete DRIVER_ID_AMD_PROPRIETARY,
DRIVER_ID_AMD_OPEN_SOURCE,
DRIVER_ID_MESA_RADV,
DRIVER_ID_NVIDIA_PROPRIETARY,
DRIVER_ID_INTEL_PROPRIETARY_WINDOWS,
DRIVER_ID_INTEL_OPEN_SOURCE_MESA,
DRIVER_ID_IMAGINATION_PROPRIETARY,
DRIVER_ID_QUALCOMM_PROPRIETARY,
DRIVER_ID_ARM_PROPRIETARY,
DRIVER_ID_GOOGLE_SWIFTSHADER,
DRIVER_ID_GGP_PROPRIETARY,
DRIVER_ID_BROADCOM_PROPRIETARY :: DriverId #-}
instance Show DriverId where
showsPrec p = \case
DRIVER_ID_AMD_PROPRIETARY -> showString "DRIVER_ID_AMD_PROPRIETARY"
DRIVER_ID_AMD_OPEN_SOURCE -> showString "DRIVER_ID_AMD_OPEN_SOURCE"
DRIVER_ID_MESA_RADV -> showString "DRIVER_ID_MESA_RADV"
DRIVER_ID_NVIDIA_PROPRIETARY -> showString "DRIVER_ID_NVIDIA_PROPRIETARY"
DRIVER_ID_INTEL_PROPRIETARY_WINDOWS -> showString "DRIVER_ID_INTEL_PROPRIETARY_WINDOWS"
DRIVER_ID_INTEL_OPEN_SOURCE_MESA -> showString "DRIVER_ID_INTEL_OPEN_SOURCE_MESA"
DRIVER_ID_IMAGINATION_PROPRIETARY -> showString "DRIVER_ID_IMAGINATION_PROPRIETARY"
DRIVER_ID_QUALCOMM_PROPRIETARY -> showString "DRIVER_ID_QUALCOMM_PROPRIETARY"
DRIVER_ID_ARM_PROPRIETARY -> showString "DRIVER_ID_ARM_PROPRIETARY"
DRIVER_ID_GOOGLE_SWIFTSHADER -> showString "DRIVER_ID_GOOGLE_SWIFTSHADER"
DRIVER_ID_GGP_PROPRIETARY -> showString "DRIVER_ID_GGP_PROPRIETARY"
DRIVER_ID_BROADCOM_PROPRIETARY -> showString "DRIVER_ID_BROADCOM_PROPRIETARY"
DriverId x -> showParen (p >= 11) (showString "DriverId " . showsPrec 11 x)
instance Read DriverId where
readPrec = parens (choose [("DRIVER_ID_AMD_PROPRIETARY", pure DRIVER_ID_AMD_PROPRIETARY)
, ("DRIVER_ID_AMD_OPEN_SOURCE", pure DRIVER_ID_AMD_OPEN_SOURCE)
, ("DRIVER_ID_MESA_RADV", pure DRIVER_ID_MESA_RADV)
, ("DRIVER_ID_NVIDIA_PROPRIETARY", pure DRIVER_ID_NVIDIA_PROPRIETARY)
, ("DRIVER_ID_INTEL_PROPRIETARY_WINDOWS", pure DRIVER_ID_INTEL_PROPRIETARY_WINDOWS)
, ("DRIVER_ID_INTEL_OPEN_SOURCE_MESA", pure DRIVER_ID_INTEL_OPEN_SOURCE_MESA)
, ("DRIVER_ID_IMAGINATION_PROPRIETARY", pure DRIVER_ID_IMAGINATION_PROPRIETARY)
, ("DRIVER_ID_QUALCOMM_PROPRIETARY", pure DRIVER_ID_QUALCOMM_PROPRIETARY)
, ("DRIVER_ID_ARM_PROPRIETARY", pure DRIVER_ID_ARM_PROPRIETARY)
, ("DRIVER_ID_GOOGLE_SWIFTSHADER", pure DRIVER_ID_GOOGLE_SWIFTSHADER)
, ("DRIVER_ID_GGP_PROPRIETARY", pure DRIVER_ID_GGP_PROPRIETARY)
, ("DRIVER_ID_BROADCOM_PROPRIETARY", pure DRIVER_ID_BROADCOM_PROPRIETARY)]
+++
prec 10 (do
expectP (Ident "DriverId")
v <- step readPrec
pure (DriverId v)))