{-# language CPP #-}
module Vulkan.Core10.Enums.DescriptorPoolCreateFlagBits  ( DescriptorPoolCreateFlagBits( DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
                                                                                       , DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
                                                                                       , ..
                                                                                       )
                                                         , DescriptorPoolCreateFlags
                                                         ) 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)
-- | VkDescriptorPoolCreateFlagBits - Bitmask specifying certain supported
-- operations on a descriptor pool
--
-- = See Also
--
-- 'DescriptorPoolCreateFlags'
newtype DescriptorPoolCreateFlagBits = DescriptorPoolCreateFlagBits Flags
  deriving newtype (DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
(DescriptorPoolCreateFlagBits
 -> DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> Bool)
-> Eq DescriptorPoolCreateFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c/= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
== :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c== :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
Eq, Eq DescriptorPoolCreateFlagBits
Eq DescriptorPoolCreateFlagBits =>
(DescriptorPoolCreateFlagBits
 -> DescriptorPoolCreateFlagBits -> Ordering)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> Ord DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Ordering
DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
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 :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$cmin :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
max :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$cmax :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
>= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c>= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
> :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c> :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
<= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c<= :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
< :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
$c< :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Bool
compare :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Ordering
$ccompare :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> Ordering
$cp1Ord :: Eq DescriptorPoolCreateFlagBits
Ord, Ptr b -> Int -> IO DescriptorPoolCreateFlagBits
Ptr b -> Int -> DescriptorPoolCreateFlagBits -> IO ()
Ptr DescriptorPoolCreateFlagBits -> IO DescriptorPoolCreateFlagBits
Ptr DescriptorPoolCreateFlagBits
-> Int -> IO DescriptorPoolCreateFlagBits
Ptr DescriptorPoolCreateFlagBits
-> Int -> DescriptorPoolCreateFlagBits -> IO ()
Ptr DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> IO ()
DescriptorPoolCreateFlagBits -> Int
(DescriptorPoolCreateFlagBits -> Int)
-> (DescriptorPoolCreateFlagBits -> Int)
-> (Ptr DescriptorPoolCreateFlagBits
    -> Int -> IO DescriptorPoolCreateFlagBits)
-> (Ptr DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO DescriptorPoolCreateFlagBits)
-> (forall b.
    Ptr b -> Int -> DescriptorPoolCreateFlagBits -> IO ())
-> (Ptr DescriptorPoolCreateFlagBits
    -> IO DescriptorPoolCreateFlagBits)
-> (Ptr DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> IO ())
-> Storable DescriptorPoolCreateFlagBits
forall b. Ptr b -> Int -> IO DescriptorPoolCreateFlagBits
forall b. Ptr b -> Int -> DescriptorPoolCreateFlagBits -> 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 DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> IO ()
$cpoke :: Ptr DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> IO ()
peek :: Ptr DescriptorPoolCreateFlagBits -> IO DescriptorPoolCreateFlagBits
$cpeek :: Ptr DescriptorPoolCreateFlagBits -> IO DescriptorPoolCreateFlagBits
pokeByteOff :: Ptr b -> Int -> DescriptorPoolCreateFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> DescriptorPoolCreateFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO DescriptorPoolCreateFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO DescriptorPoolCreateFlagBits
pokeElemOff :: Ptr DescriptorPoolCreateFlagBits
-> Int -> DescriptorPoolCreateFlagBits -> IO ()
$cpokeElemOff :: Ptr DescriptorPoolCreateFlagBits
-> Int -> DescriptorPoolCreateFlagBits -> IO ()
peekElemOff :: Ptr DescriptorPoolCreateFlagBits
-> Int -> IO DescriptorPoolCreateFlagBits
$cpeekElemOff :: Ptr DescriptorPoolCreateFlagBits
-> Int -> IO DescriptorPoolCreateFlagBits
alignment :: DescriptorPoolCreateFlagBits -> Int
$calignment :: DescriptorPoolCreateFlagBits -> Int
sizeOf :: DescriptorPoolCreateFlagBits -> Int
$csizeOf :: DescriptorPoolCreateFlagBits -> Int
Storable, DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits -> Zero DescriptorPoolCreateFlagBits
forall a. a -> Zero a
zero :: DescriptorPoolCreateFlagBits
$czero :: DescriptorPoolCreateFlagBits
Zero, Eq DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits
Eq DescriptorPoolCreateFlagBits =>
(DescriptorPoolCreateFlagBits
 -> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> DescriptorPoolCreateFlagBits
-> (Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits -> Int -> Bool)
-> (DescriptorPoolCreateFlagBits -> Maybe Int)
-> (DescriptorPoolCreateFlagBits -> Int)
-> (DescriptorPoolCreateFlagBits -> Bool)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits
    -> Int -> DescriptorPoolCreateFlagBits)
-> (DescriptorPoolCreateFlagBits -> Int)
-> Bits DescriptorPoolCreateFlagBits
Int -> DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits -> Bool
DescriptorPoolCreateFlagBits -> Int
DescriptorPoolCreateFlagBits -> Maybe Int
DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits -> Int -> Bool
DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
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 :: DescriptorPoolCreateFlagBits -> Int
$cpopCount :: DescriptorPoolCreateFlagBits -> Int
rotateR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$crotateR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
rotateL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$crotateL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
unsafeShiftR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cunsafeShiftR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
shiftR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cshiftR :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
unsafeShiftL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cunsafeShiftL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
shiftL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cshiftL :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
isSigned :: DescriptorPoolCreateFlagBits -> Bool
$cisSigned :: DescriptorPoolCreateFlagBits -> Bool
bitSize :: DescriptorPoolCreateFlagBits -> Int
$cbitSize :: DescriptorPoolCreateFlagBits -> Int
bitSizeMaybe :: DescriptorPoolCreateFlagBits -> Maybe Int
$cbitSizeMaybe :: DescriptorPoolCreateFlagBits -> Maybe Int
testBit :: DescriptorPoolCreateFlagBits -> Int -> Bool
$ctestBit :: DescriptorPoolCreateFlagBits -> Int -> Bool
complementBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$ccomplementBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
clearBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cclearBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
setBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$csetBit :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
bit :: Int -> DescriptorPoolCreateFlagBits
$cbit :: Int -> DescriptorPoolCreateFlagBits
zeroBits :: DescriptorPoolCreateFlagBits
$czeroBits :: DescriptorPoolCreateFlagBits
rotate :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$crotate :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
shift :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
$cshift :: DescriptorPoolCreateFlagBits -> Int -> DescriptorPoolCreateFlagBits
complement :: DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$ccomplement :: DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
xor :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$cxor :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
.|. :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$c.|. :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
.&. :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$c.&. :: DescriptorPoolCreateFlagBits
-> DescriptorPoolCreateFlagBits -> DescriptorPoolCreateFlagBits
$cp1Bits :: Eq DescriptorPoolCreateFlagBits
Bits)

-- | 'DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT' specifies that
-- descriptor sets /can/ return their individual allocations to the pool,
-- i.e. all of 'Vulkan.Core10.DescriptorSet.allocateDescriptorSets',
-- 'Vulkan.Core10.DescriptorSet.freeDescriptorSets', and
-- 'Vulkan.Core10.DescriptorSet.resetDescriptorPool' are allowed.
-- Otherwise, descriptor sets allocated from the pool /must/ not be
-- individually freed back to the pool, i.e. only
-- 'Vulkan.Core10.DescriptorSet.allocateDescriptorSets' and
-- 'Vulkan.Core10.DescriptorSet.resetDescriptorPool' are allowed.
pattern $bDESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT :: DescriptorPoolCreateFlagBits
$mDESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT :: forall r.
DescriptorPoolCreateFlagBits -> (Void# -> r) -> (Void# -> r) -> r
DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = DescriptorPoolCreateFlagBits 0x00000001
-- | 'DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT' specifies that descriptor
-- sets allocated from this pool /can/ include bindings with the
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'
-- bit set. It is valid to allocate descriptor sets that have bindings that
-- do not set the
-- 'Vulkan.Core12.Enums.DescriptorBindingFlagBits.DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT'
-- bit from a pool that has 'DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT'
-- set.
pattern $bDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT :: DescriptorPoolCreateFlagBits
$mDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT :: forall r.
DescriptorPoolCreateFlagBits -> (Void# -> r) -> (Void# -> r) -> r
DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT = DescriptorPoolCreateFlagBits 0x00000002

type DescriptorPoolCreateFlags = DescriptorPoolCreateFlagBits

instance Show DescriptorPoolCreateFlagBits where
  showsPrec :: Int -> DescriptorPoolCreateFlagBits -> ShowS
showsPrec p :: Int
p = \case
    DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT -> String -> ShowS
showString "DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT"
    DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT -> String -> ShowS
showString "DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT"
    DescriptorPoolCreateFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "DescriptorPoolCreateFlagBits 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 DescriptorPoolCreateFlagBits where
  readPrec :: ReadPrec DescriptorPoolCreateFlagBits
readPrec = ReadPrec DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec DescriptorPoolCreateFlagBits)]
-> ReadPrec DescriptorPoolCreateFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT", DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure DescriptorPoolCreateFlagBits
DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT)
                            , ("DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT", DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure DescriptorPoolCreateFlagBits
DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT)]
                     ReadPrec DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "DescriptorPoolCreateFlagBits")
                       Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
                       DescriptorPoolCreateFlagBits
-> ReadPrec DescriptorPoolCreateFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> DescriptorPoolCreateFlagBits
DescriptorPoolCreateFlagBits Flags
v)))