{-# language CPP #-}
-- No documentation found for Chapter "CommandBufferUsageFlagBits"
module Vulkan.Core10.Enums.CommandBufferUsageFlagBits  ( CommandBufferUsageFlags
                                                       , CommandBufferUsageFlagBits( COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
                                                                                   , COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
                                                                                   , COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
                                                                                   , ..
                                                                                   )
                                                       ) where

import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Zero (Zero)
type CommandBufferUsageFlags = CommandBufferUsageFlagBits

-- | 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, Bits CommandBufferUsageFlagBits
Bits CommandBufferUsageFlagBits =>
(CommandBufferUsageFlagBits -> Int)
-> (CommandBufferUsageFlagBits -> Int)
-> (CommandBufferUsageFlagBits -> Int)
-> FiniteBits CommandBufferUsageFlagBits
CommandBufferUsageFlagBits -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: CommandBufferUsageFlagBits -> Int
$ccountTrailingZeros :: CommandBufferUsageFlagBits -> Int
countLeadingZeros :: CommandBufferUsageFlagBits -> Int
$ccountLeadingZeros :: CommandBufferUsageFlagBits -> Int
finiteBitSize :: CommandBufferUsageFlagBits -> Int
$cfiniteBitSize :: CommandBufferUsageFlagBits -> Int
$cp1FiniteBits :: Bits CommandBufferUsageFlagBits
FiniteBits)

-- | '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

conNameCommandBufferUsageFlagBits :: String
conNameCommandBufferUsageFlagBits :: String
conNameCommandBufferUsageFlagBits = "CommandBufferUsageFlagBits"

enumPrefixCommandBufferUsageFlagBits :: String
enumPrefixCommandBufferUsageFlagBits :: String
enumPrefixCommandBufferUsageFlagBits = "COMMAND_BUFFER_USAGE_"

showTableCommandBufferUsageFlagBits :: [(CommandBufferUsageFlagBits, String)]
showTableCommandBufferUsageFlagBits :: [(CommandBufferUsageFlagBits, String)]
showTableCommandBufferUsageFlagBits =
  [ (CommandBufferUsageFlagBits
COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT     , "ONE_TIME_SUBMIT_BIT")
  , (CommandBufferUsageFlagBits
COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, "RENDER_PASS_CONTINUE_BIT")
  , (CommandBufferUsageFlagBits
COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT    , "SIMULTANEOUS_USE_BIT")
  ]

instance Show CommandBufferUsageFlagBits where
  showsPrec :: Int -> CommandBufferUsageFlagBits -> ShowS
showsPrec = String
-> [(CommandBufferUsageFlagBits, String)]
-> String
-> (CommandBufferUsageFlagBits -> Flags)
-> (Flags -> ShowS)
-> Int
-> CommandBufferUsageFlagBits
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixCommandBufferUsageFlagBits
                            [(CommandBufferUsageFlagBits, String)]
showTableCommandBufferUsageFlagBits
                            String
conNameCommandBufferUsageFlagBits
                            (\(CommandBufferUsageFlagBits x :: Flags
x) -> Flags
x)
                            (\x :: Flags
x -> String -> ShowS
showString "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 = String
-> [(CommandBufferUsageFlagBits, String)]
-> String
-> (Flags -> CommandBufferUsageFlagBits)
-> ReadPrec CommandBufferUsageFlagBits
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixCommandBufferUsageFlagBits
                          [(CommandBufferUsageFlagBits, String)]
showTableCommandBufferUsageFlagBits
                          String
conNameCommandBufferUsageFlagBits
                          Flags -> CommandBufferUsageFlagBits
CommandBufferUsageFlagBits