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

-- | 'COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT' specifies that each recording
-- of the command buffer will only be submitted once, and the command
-- buffer will be reset and recorded again between each submission.
pattern $bCOMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT :: CommandBufferUsageFlagBits
$mCOMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT :: forall r.
CommandBufferUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = CommandBufferUsageFlagBits 0x00000001
-- | 'COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT' specifies that a
-- secondary command buffer is considered to be entirely inside a render
-- pass. If this is a primary command buffer, then this bit is ignored.
pattern $bCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT :: CommandBufferUsageFlagBits
$mCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT :: forall r.
CommandBufferUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = CommandBufferUsageFlagBits 0x00000002
-- | 'COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT' specifies that a command
-- buffer /can/ be resubmitted to a queue while it is in the /pending
-- state/, and recorded into multiple primary command buffers.
pattern $bCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT :: CommandBufferUsageFlagBits
$mCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT :: forall r.
CommandBufferUsageFlagBits -> (Void# -> r) -> (Void# -> r) -> r
COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = CommandBufferUsageFlagBits 0x00000004

type CommandBufferUsageFlags = CommandBufferUsageFlagBits

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