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

-- | 'ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT' specifies that the attachment
-- aliases the same device memory as other attachments.
pattern $bATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: AttachmentDescriptionFlagBits
$mATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: forall r.
AttachmentDescriptionFlagBits -> (Void# -> r) -> (Void# -> r) -> r
ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = AttachmentDescriptionFlagBits 0x00000001

type AttachmentDescriptionFlags = AttachmentDescriptionFlagBits

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