{-# language CPP #-}
module Vulkan.Core11.Enums.ExternalFenceFeatureFlagBits  ( ExternalFenceFeatureFlagBits( EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT
                                                                                       , EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT
                                                                                       , ..
                                                                                       )
                                                         , ExternalFenceFeatureFlags
                                                         ) where

import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.Bits (Bits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Core10.BaseType (Flags)
import Vulkan.Zero (Zero)
-- | VkExternalFenceFeatureFlagBits - Bitfield describing features of an
-- external fence handle type
--
-- = See Also
--
-- 'ExternalFenceFeatureFlags'
newtype ExternalFenceFeatureFlagBits = ExternalFenceFeatureFlagBits Flags
  deriving newtype (ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
(ExternalFenceFeatureFlagBits
 -> ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> Bool)
-> Eq ExternalFenceFeatureFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c/= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
== :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c== :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
Eq, Eq ExternalFenceFeatureFlagBits
Eq ExternalFenceFeatureFlagBits =>
(ExternalFenceFeatureFlagBits
 -> ExternalFenceFeatureFlagBits -> Ordering)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> Ord ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Ordering
ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
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 :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$cmin :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
max :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$cmax :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
>= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c>= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
> :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c> :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
<= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c<= :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
< :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
$c< :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Bool
compare :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Ordering
$ccompare :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> Ordering
$cp1Ord :: Eq ExternalFenceFeatureFlagBits
Ord, Ptr b -> Int -> IO ExternalFenceFeatureFlagBits
Ptr b -> Int -> ExternalFenceFeatureFlagBits -> IO ()
Ptr ExternalFenceFeatureFlagBits -> IO ExternalFenceFeatureFlagBits
Ptr ExternalFenceFeatureFlagBits
-> Int -> IO ExternalFenceFeatureFlagBits
Ptr ExternalFenceFeatureFlagBits
-> Int -> ExternalFenceFeatureFlagBits -> IO ()
Ptr ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> IO ()
ExternalFenceFeatureFlagBits -> Int
(ExternalFenceFeatureFlagBits -> Int)
-> (ExternalFenceFeatureFlagBits -> Int)
-> (Ptr ExternalFenceFeatureFlagBits
    -> Int -> IO ExternalFenceFeatureFlagBits)
-> (Ptr ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO ExternalFenceFeatureFlagBits)
-> (forall b.
    Ptr b -> Int -> ExternalFenceFeatureFlagBits -> IO ())
-> (Ptr ExternalFenceFeatureFlagBits
    -> IO ExternalFenceFeatureFlagBits)
-> (Ptr ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> IO ())
-> Storable ExternalFenceFeatureFlagBits
forall b. Ptr b -> Int -> IO ExternalFenceFeatureFlagBits
forall b. Ptr b -> Int -> ExternalFenceFeatureFlagBits -> 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 ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> IO ()
$cpoke :: Ptr ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> IO ()
peek :: Ptr ExternalFenceFeatureFlagBits -> IO ExternalFenceFeatureFlagBits
$cpeek :: Ptr ExternalFenceFeatureFlagBits -> IO ExternalFenceFeatureFlagBits
pokeByteOff :: Ptr b -> Int -> ExternalFenceFeatureFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ExternalFenceFeatureFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO ExternalFenceFeatureFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ExternalFenceFeatureFlagBits
pokeElemOff :: Ptr ExternalFenceFeatureFlagBits
-> Int -> ExternalFenceFeatureFlagBits -> IO ()
$cpokeElemOff :: Ptr ExternalFenceFeatureFlagBits
-> Int -> ExternalFenceFeatureFlagBits -> IO ()
peekElemOff :: Ptr ExternalFenceFeatureFlagBits
-> Int -> IO ExternalFenceFeatureFlagBits
$cpeekElemOff :: Ptr ExternalFenceFeatureFlagBits
-> Int -> IO ExternalFenceFeatureFlagBits
alignment :: ExternalFenceFeatureFlagBits -> Int
$calignment :: ExternalFenceFeatureFlagBits -> Int
sizeOf :: ExternalFenceFeatureFlagBits -> Int
$csizeOf :: ExternalFenceFeatureFlagBits -> Int
Storable, ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits -> Zero ExternalFenceFeatureFlagBits
forall a. a -> Zero a
zero :: ExternalFenceFeatureFlagBits
$czero :: ExternalFenceFeatureFlagBits
Zero, Eq ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits
Eq ExternalFenceFeatureFlagBits =>
(ExternalFenceFeatureFlagBits
 -> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> ExternalFenceFeatureFlagBits
-> (Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits -> Int -> Bool)
-> (ExternalFenceFeatureFlagBits -> Maybe Int)
-> (ExternalFenceFeatureFlagBits -> Int)
-> (ExternalFenceFeatureFlagBits -> Bool)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits
    -> Int -> ExternalFenceFeatureFlagBits)
-> (ExternalFenceFeatureFlagBits -> Int)
-> Bits ExternalFenceFeatureFlagBits
Int -> ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits -> Bool
ExternalFenceFeatureFlagBits -> Int
ExternalFenceFeatureFlagBits -> Maybe Int
ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits -> Int -> Bool
ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: ExternalFenceFeatureFlagBits -> Int
$cpopCount :: ExternalFenceFeatureFlagBits -> Int
rotateR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$crotateR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
rotateL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$crotateL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
unsafeShiftR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cunsafeShiftR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
shiftR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cshiftR :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
unsafeShiftL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cunsafeShiftL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
shiftL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cshiftL :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
isSigned :: ExternalFenceFeatureFlagBits -> Bool
$cisSigned :: ExternalFenceFeatureFlagBits -> Bool
bitSize :: ExternalFenceFeatureFlagBits -> Int
$cbitSize :: ExternalFenceFeatureFlagBits -> Int
bitSizeMaybe :: ExternalFenceFeatureFlagBits -> Maybe Int
$cbitSizeMaybe :: ExternalFenceFeatureFlagBits -> Maybe Int
testBit :: ExternalFenceFeatureFlagBits -> Int -> Bool
$ctestBit :: ExternalFenceFeatureFlagBits -> Int -> Bool
complementBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$ccomplementBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
clearBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cclearBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
setBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$csetBit :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
bit :: Int -> ExternalFenceFeatureFlagBits
$cbit :: Int -> ExternalFenceFeatureFlagBits
zeroBits :: ExternalFenceFeatureFlagBits
$czeroBits :: ExternalFenceFeatureFlagBits
rotate :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$crotate :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
shift :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
$cshift :: ExternalFenceFeatureFlagBits -> Int -> ExternalFenceFeatureFlagBits
complement :: ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$ccomplement :: ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
xor :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$cxor :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
.|. :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$c.|. :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
.&. :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$c.&. :: ExternalFenceFeatureFlagBits
-> ExternalFenceFeatureFlagBits -> ExternalFenceFeatureFlagBits
$cp1Bits :: Eq ExternalFenceFeatureFlagBits
Bits)

-- | 'EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT' specifies handles of this type
-- /can/ be exported from Vulkan fence objects.
pattern $bEXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT :: ExternalFenceFeatureFlagBits
$mEXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT :: forall r.
ExternalFenceFeatureFlagBits -> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = ExternalFenceFeatureFlagBits 0x00000001
-- | 'EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT' specifies handles of this type
-- /can/ be imported to Vulkan fence objects.
pattern $bEXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT :: ExternalFenceFeatureFlagBits
$mEXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT :: forall r.
ExternalFenceFeatureFlagBits -> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = ExternalFenceFeatureFlagBits 0x00000002

type ExternalFenceFeatureFlags = ExternalFenceFeatureFlagBits

instance Show ExternalFenceFeatureFlagBits where
  showsPrec :: Int -> ExternalFenceFeatureFlagBits -> ShowS
showsPrec p :: Int
p = \case
    EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT -> String -> ShowS
showString "EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT"
    EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT -> String -> ShowS
showString "EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT"
    ExternalFenceFeatureFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ExternalFenceFeatureFlagBits 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read ExternalFenceFeatureFlagBits where
  readPrec :: ReadPrec ExternalFenceFeatureFlagBits
readPrec = ReadPrec ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ExternalFenceFeatureFlagBits)]
-> ReadPrec ExternalFenceFeatureFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT", ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure ExternalFenceFeatureFlagBits
EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT)
                            , ("EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT", ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure ExternalFenceFeatureFlagBits
EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT)]
                     ReadPrec ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ExternalFenceFeatureFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       ExternalFenceFeatureFlagBits
-> ReadPrec ExternalFenceFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> ExternalFenceFeatureFlagBits
ExternalFenceFeatureFlagBits Flags
v)))