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