{-# language CPP #-}
module Vulkan.Core11.Enums.ExternalMemoryFeatureFlagBits ( ExternalMemoryFeatureFlagBits( EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT
, EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT
, EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT
, ..
)
, ExternalMemoryFeatureFlags
) 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)
newtype ExternalMemoryFeatureFlagBits = ExternalMemoryFeatureFlagBits Flags
deriving newtype (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
(ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> Eq ExternalMemoryFeatureFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c/= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
== :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c== :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
Eq, Eq ExternalMemoryFeatureFlagBits
Eq ExternalMemoryFeatureFlagBits =>
(ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Ordering)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> Ord ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Ordering
ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
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 :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$cmin :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
max :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$cmax :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
>= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c>= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
> :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c> :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
<= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c<= :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
< :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
$c< :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Bool
compare :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Ordering
$ccompare :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> Ordering
$cp1Ord :: Eq ExternalMemoryFeatureFlagBits
Ord, Ptr b -> Int -> IO ExternalMemoryFeatureFlagBits
Ptr b -> Int -> ExternalMemoryFeatureFlagBits -> IO ()
Ptr ExternalMemoryFeatureFlagBits
-> IO ExternalMemoryFeatureFlagBits
Ptr ExternalMemoryFeatureFlagBits
-> Int -> IO ExternalMemoryFeatureFlagBits
Ptr ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits -> IO ()
Ptr ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> IO ()
ExternalMemoryFeatureFlagBits -> Int
(ExternalMemoryFeatureFlagBits -> Int)
-> (ExternalMemoryFeatureFlagBits -> Int)
-> (Ptr ExternalMemoryFeatureFlagBits
-> Int -> IO ExternalMemoryFeatureFlagBits)
-> (Ptr ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO ExternalMemoryFeatureFlagBits)
-> (forall b.
Ptr b -> Int -> ExternalMemoryFeatureFlagBits -> IO ())
-> (Ptr ExternalMemoryFeatureFlagBits
-> IO ExternalMemoryFeatureFlagBits)
-> (Ptr ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> IO ())
-> Storable ExternalMemoryFeatureFlagBits
forall b. Ptr b -> Int -> IO ExternalMemoryFeatureFlagBits
forall b. Ptr b -> Int -> ExternalMemoryFeatureFlagBits -> 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 ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> IO ()
$cpoke :: Ptr ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> IO ()
peek :: Ptr ExternalMemoryFeatureFlagBits
-> IO ExternalMemoryFeatureFlagBits
$cpeek :: Ptr ExternalMemoryFeatureFlagBits
-> IO ExternalMemoryFeatureFlagBits
pokeByteOff :: Ptr b -> Int -> ExternalMemoryFeatureFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ExternalMemoryFeatureFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO ExternalMemoryFeatureFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ExternalMemoryFeatureFlagBits
pokeElemOff :: Ptr ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits -> IO ()
$cpokeElemOff :: Ptr ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits -> IO ()
peekElemOff :: Ptr ExternalMemoryFeatureFlagBits
-> Int -> IO ExternalMemoryFeatureFlagBits
$cpeekElemOff :: Ptr ExternalMemoryFeatureFlagBits
-> Int -> IO ExternalMemoryFeatureFlagBits
alignment :: ExternalMemoryFeatureFlagBits -> Int
$calignment :: ExternalMemoryFeatureFlagBits -> Int
sizeOf :: ExternalMemoryFeatureFlagBits -> Int
$csizeOf :: ExternalMemoryFeatureFlagBits -> Int
Storable, ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits -> Zero ExternalMemoryFeatureFlagBits
forall a. a -> Zero a
zero :: ExternalMemoryFeatureFlagBits
$czero :: ExternalMemoryFeatureFlagBits
Zero, Eq ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits
Eq ExternalMemoryFeatureFlagBits =>
(ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> ExternalMemoryFeatureFlagBits
-> (Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits -> Int -> Bool)
-> (ExternalMemoryFeatureFlagBits -> Maybe Int)
-> (ExternalMemoryFeatureFlagBits -> Int)
-> (ExternalMemoryFeatureFlagBits -> Bool)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits)
-> (ExternalMemoryFeatureFlagBits -> Int)
-> Bits ExternalMemoryFeatureFlagBits
Int -> ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits -> Bool
ExternalMemoryFeatureFlagBits -> Int
ExternalMemoryFeatureFlagBits -> Maybe Int
ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits -> Int -> Bool
ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
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 :: ExternalMemoryFeatureFlagBits -> Int
$cpopCount :: ExternalMemoryFeatureFlagBits -> Int
rotateR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$crotateR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
rotateL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$crotateL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
unsafeShiftR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cunsafeShiftR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
shiftR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cshiftR :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
unsafeShiftL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cunsafeShiftL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
shiftL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cshiftL :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
isSigned :: ExternalMemoryFeatureFlagBits -> Bool
$cisSigned :: ExternalMemoryFeatureFlagBits -> Bool
bitSize :: ExternalMemoryFeatureFlagBits -> Int
$cbitSize :: ExternalMemoryFeatureFlagBits -> Int
bitSizeMaybe :: ExternalMemoryFeatureFlagBits -> Maybe Int
$cbitSizeMaybe :: ExternalMemoryFeatureFlagBits -> Maybe Int
testBit :: ExternalMemoryFeatureFlagBits -> Int -> Bool
$ctestBit :: ExternalMemoryFeatureFlagBits -> Int -> Bool
complementBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$ccomplementBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
clearBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cclearBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
setBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$csetBit :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
bit :: Int -> ExternalMemoryFeatureFlagBits
$cbit :: Int -> ExternalMemoryFeatureFlagBits
zeroBits :: ExternalMemoryFeatureFlagBits
$czeroBits :: ExternalMemoryFeatureFlagBits
rotate :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$crotate :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
shift :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
$cshift :: ExternalMemoryFeatureFlagBits
-> Int -> ExternalMemoryFeatureFlagBits
complement :: ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$ccomplement :: ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
xor :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$cxor :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
.|. :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$c.|. :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
.&. :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$c.&. :: ExternalMemoryFeatureFlagBits
-> ExternalMemoryFeatureFlagBits -> ExternalMemoryFeatureFlagBits
$cp1Bits :: Eq ExternalMemoryFeatureFlagBits
Bits)
pattern $bEXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT :: ExternalMemoryFeatureFlagBits
$mEXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT :: forall r.
ExternalMemoryFeatureFlagBits -> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = ExternalMemoryFeatureFlagBits 0x00000001
pattern $bEXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT :: ExternalMemoryFeatureFlagBits
$mEXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT :: forall r.
ExternalMemoryFeatureFlagBits -> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = ExternalMemoryFeatureFlagBits 0x00000002
pattern $bEXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT :: ExternalMemoryFeatureFlagBits
$mEXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT :: forall r.
ExternalMemoryFeatureFlagBits -> (Void# -> r) -> (Void# -> r) -> r
EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = ExternalMemoryFeatureFlagBits 0x00000004
type ExternalMemoryFeatureFlags = ExternalMemoryFeatureFlagBits
instance Show ExternalMemoryFeatureFlagBits where
showsPrec :: Int -> ExternalMemoryFeatureFlagBits -> ShowS
showsPrec p :: Int
p = \case
EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT -> String -> ShowS
showString "EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT"
EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT -> String -> ShowS
showString "EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT"
EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT -> String -> ShowS
showString "EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT"
ExternalMemoryFeatureFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "ExternalMemoryFeatureFlagBits 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 ExternalMemoryFeatureFlagBits where
readPrec :: ReadPrec ExternalMemoryFeatureFlagBits
readPrec = ReadPrec ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec ExternalMemoryFeatureFlagBits)]
-> ReadPrec ExternalMemoryFeatureFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT", ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure ExternalMemoryFeatureFlagBits
EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT)
, ("EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT", ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure ExternalMemoryFeatureFlagBits
EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT)
, ("EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT", ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure ExternalMemoryFeatureFlagBits
EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT)]
ReadPrec ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "ExternalMemoryFeatureFlagBits")
Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
ExternalMemoryFeatureFlagBits
-> ReadPrec ExternalMemoryFeatureFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> ExternalMemoryFeatureFlagBits
ExternalMemoryFeatureFlagBits Flags
v)))