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

-- | 'COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT' specifies that most or all
-- memory resources currently owned by the command buffer /should/ be
-- returned to the parent command pool. If this flag is not set, then the
-- command buffer /may/ hold onto memory resources and reuse them when
-- recording commands. @commandBuffer@ is moved to the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle initial state>.
pattern $bCOMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT :: CommandBufferResetFlagBits
$mCOMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT :: forall r.
CommandBufferResetFlagBits -> (Void# -> r) -> (Void# -> r) -> r
COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = CommandBufferResetFlagBits 0x00000001

type CommandBufferResetFlags = CommandBufferResetFlagBits

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