{-# 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 Data.Bits (Bits)
import Data.Bits (FiniteBits)
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showString)
import Numeric (showHex)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Vulkan.Core10.FundamentalTypes (Flags)
type CommandBufferUsageFlags = CommandBufferUsageFlagBits

-- | VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for
-- command buffer
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_VERSION_1_0 VK_VERSION_1_0>,
-- 'CommandBufferUsageFlags'
newtype CommandBufferUsageFlagBits = CommandBufferUsageFlagBits Flags
  deriving newtype (CommandBufferUsageFlagBits -> CommandBufferUsageFlagBits -> Bool
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
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
Ord, Ptr CommandBufferUsageFlagBits -> IO CommandBufferUsageFlagBits
Ptr CommandBufferUsageFlagBits
-> Int -> IO CommandBufferUsageFlagBits
Ptr CommandBufferUsageFlagBits
-> Int -> CommandBufferUsageFlagBits -> IO ()
Ptr CommandBufferUsageFlagBits
-> CommandBufferUsageFlagBits -> IO ()
CommandBufferUsageFlagBits -> Int
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 :: forall b. Ptr b -> Int -> CommandBufferUsageFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> CommandBufferUsageFlagBits -> IO ()
peekByteOff :: forall b. 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
forall a. a -> Zero a
zero :: CommandBufferUsageFlagBits
$czero :: CommandBufferUsageFlagBits
Zero, Eq CommandBufferUsageFlagBits
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
Bits, Bits 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
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 -> ((# #) -> r) -> ((# #) -> 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 -> ((# #) -> r) -> ((# #) -> 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 any queue of the same queue family 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 -> ((# #) -> r) -> ((# #) -> r) -> r
COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = CommandBufferUsageFlagBits 0x00000004

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

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

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

instance Show CommandBufferUsageFlagBits where
  showsPrec :: Int -> CommandBufferUsageFlagBits -> ShowS
showsPrec =
    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 Flags
x) -> Flags
x)
      (\Flags
x -> String -> ShowS
showString String
"0x" forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)

instance Read CommandBufferUsageFlagBits where
  readPrec :: ReadPrec CommandBufferUsageFlagBits
readPrec =
    forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
      String
enumPrefixCommandBufferUsageFlagBits
      [(CommandBufferUsageFlagBits, String)]
showTableCommandBufferUsageFlagBits
      String
conNameCommandBufferUsageFlagBits
      Flags -> CommandBufferUsageFlagBits
CommandBufferUsageFlagBits