{-# language CPP #-}
module Vulkan.Core10.Enums.VendorId  (VendorId( VENDOR_ID_VIV
                                              , VENDOR_ID_VSI
                                              , VENDOR_ID_KAZAN
                                              , VENDOR_ID_CODEPLAY
                                              , ..
                                              )) 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 Vulkan.Zero (Zero)
-- | VkVendorId - Khronos vendor IDs
--
-- = Description
--
-- Note
--
-- Khronos vendor IDs may be allocated by vendors at any time. Only the
-- latest canonical versions of this Specification, of the corresponding
-- @vk.xml@ API Registry, and of the corresponding @vulkan_core.h@ header
-- file /must/ contain all reserved Khronos vendor IDs.
--
-- Only Khronos vendor IDs are given symbolic names at present. PCI vendor
-- IDs returned by the implementation can be looked up in the PCI-SIG
-- database.
--
-- = See Also
--
-- No cross-references are available
newtype VendorId = VendorId Int32
  deriving newtype (VendorId -> VendorId -> Bool
(VendorId -> VendorId -> Bool)
-> (VendorId -> VendorId -> Bool) -> Eq VendorId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VendorId -> VendorId -> Bool
$c/= :: VendorId -> VendorId -> Bool
== :: VendorId -> VendorId -> Bool
$c== :: VendorId -> VendorId -> Bool
Eq, Eq VendorId
Eq VendorId =>
(VendorId -> VendorId -> Ordering)
-> (VendorId -> VendorId -> Bool)
-> (VendorId -> VendorId -> Bool)
-> (VendorId -> VendorId -> Bool)
-> (VendorId -> VendorId -> Bool)
-> (VendorId -> VendorId -> VendorId)
-> (VendorId -> VendorId -> VendorId)
-> Ord VendorId
VendorId -> VendorId -> Bool
VendorId -> VendorId -> Ordering
VendorId -> VendorId -> VendorId
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: VendorId -> VendorId -> VendorId
$cmin :: VendorId -> VendorId -> VendorId
max :: VendorId -> VendorId -> VendorId
$cmax :: VendorId -> VendorId -> VendorId
>= :: VendorId -> VendorId -> Bool
$c>= :: VendorId -> VendorId -> Bool
> :: VendorId -> VendorId -> Bool
$c> :: VendorId -> VendorId -> Bool
<= :: VendorId -> VendorId -> Bool
$c<= :: VendorId -> VendorId -> Bool
< :: VendorId -> VendorId -> Bool
$c< :: VendorId -> VendorId -> Bool
compare :: VendorId -> VendorId -> Ordering
$ccompare :: VendorId -> VendorId -> Ordering
$cp1Ord :: Eq VendorId
Ord, Ptr b -> Int -> IO VendorId
Ptr b -> Int -> VendorId -> IO ()
Ptr VendorId -> IO VendorId
Ptr VendorId -> Int -> IO VendorId
Ptr VendorId -> Int -> VendorId -> IO ()
Ptr VendorId -> VendorId -> IO ()
VendorId -> Int
(VendorId -> Int)
-> (VendorId -> Int)
-> (Ptr VendorId -> Int -> IO VendorId)
-> (Ptr VendorId -> Int -> VendorId -> IO ())
-> (forall b. Ptr b -> Int -> IO VendorId)
-> (forall b. Ptr b -> Int -> VendorId -> IO ())
-> (Ptr VendorId -> IO VendorId)
-> (Ptr VendorId -> VendorId -> IO ())
-> Storable VendorId
forall b. Ptr b -> Int -> IO VendorId
forall b. Ptr b -> Int -> VendorId -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr VendorId -> VendorId -> IO ()
$cpoke :: Ptr VendorId -> VendorId -> IO ()
peek :: Ptr VendorId -> IO VendorId
$cpeek :: Ptr VendorId -> IO VendorId
pokeByteOff :: Ptr b -> Int -> VendorId -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> VendorId -> IO ()
peekByteOff :: Ptr b -> Int -> IO VendorId
$cpeekByteOff :: forall b. Ptr b -> Int -> IO VendorId
pokeElemOff :: Ptr VendorId -> Int -> VendorId -> IO ()
$cpokeElemOff :: Ptr VendorId -> Int -> VendorId -> IO ()
peekElemOff :: Ptr VendorId -> Int -> IO VendorId
$cpeekElemOff :: Ptr VendorId -> Int -> IO VendorId
alignment :: VendorId -> Int
$calignment :: VendorId -> Int
sizeOf :: VendorId -> Int
$csizeOf :: VendorId -> Int
Storable, VendorId
VendorId -> Zero VendorId
forall a. a -> Zero a
zero :: VendorId
$czero :: VendorId
Zero)
-- Note that the zero instance does not produce a valid value, passing 'zero' to Vulkan will result in an error

-- No documentation found for Nested "VkVendorId" "VK_VENDOR_ID_VIV"
pattern $bVENDOR_ID_VIV :: VendorId
$mVENDOR_ID_VIV :: forall r. VendorId -> (Void# -> r) -> (Void# -> r) -> r
VENDOR_ID_VIV = VendorId 65537
-- No documentation found for Nested "VkVendorId" "VK_VENDOR_ID_VSI"
pattern $bVENDOR_ID_VSI :: VendorId
$mVENDOR_ID_VSI :: forall r. VendorId -> (Void# -> r) -> (Void# -> r) -> r
VENDOR_ID_VSI = VendorId 65538
-- No documentation found for Nested "VkVendorId" "VK_VENDOR_ID_KAZAN"
pattern $bVENDOR_ID_KAZAN :: VendorId
$mVENDOR_ID_KAZAN :: forall r. VendorId -> (Void# -> r) -> (Void# -> r) -> r
VENDOR_ID_KAZAN = VendorId 65539
-- No documentation found for Nested "VkVendorId" "VK_VENDOR_ID_CODEPLAY"
pattern $bVENDOR_ID_CODEPLAY :: VendorId
$mVENDOR_ID_CODEPLAY :: forall r. VendorId -> (Void# -> r) -> (Void# -> r) -> r
VENDOR_ID_CODEPLAY = VendorId 65540
{-# complete VENDOR_ID_VIV,
             VENDOR_ID_VSI,
             VENDOR_ID_KAZAN,
             VENDOR_ID_CODEPLAY :: VendorId #-}

instance Show VendorId where
  showsPrec :: Int -> VendorId -> ShowS
showsPrec p :: Int
p = \case
    VENDOR_ID_VIV -> String -> ShowS
showString "VENDOR_ID_VIV"
    VENDOR_ID_VSI -> String -> ShowS
showString "VENDOR_ID_VSI"
    VENDOR_ID_KAZAN -> String -> ShowS
showString "VENDOR_ID_KAZAN"
    VENDOR_ID_CODEPLAY -> String -> ShowS
showString "VENDOR_ID_CODEPLAY"
    VendorId x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "VendorId " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read VendorId where
  readPrec :: ReadPrec VendorId
readPrec = ReadPrec VendorId -> ReadPrec VendorId
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec VendorId)] -> ReadPrec VendorId
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("VENDOR_ID_VIV", VendorId -> ReadPrec VendorId
forall (f :: * -> *) a. Applicative f => a -> f a
pure VendorId
VENDOR_ID_VIV)
                            , ("VENDOR_ID_VSI", VendorId -> ReadPrec VendorId
forall (f :: * -> *) a. Applicative f => a -> f a
pure VendorId
VENDOR_ID_VSI)
                            , ("VENDOR_ID_KAZAN", VendorId -> ReadPrec VendorId
forall (f :: * -> *) a. Applicative f => a -> f a
pure VendorId
VENDOR_ID_KAZAN)
                            , ("VENDOR_ID_CODEPLAY", VendorId -> ReadPrec VendorId
forall (f :: * -> *) a. Applicative f => a -> f a
pure VendorId
VENDOR_ID_CODEPLAY)]
                     ReadPrec VendorId -> ReadPrec VendorId -> ReadPrec VendorId
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int -> ReadPrec VendorId -> ReadPrec VendorId
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "VendorId")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       VendorId -> ReadPrec VendorId
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> VendorId
VendorId Int32
v)))