{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.CommandPoolCreateFlagBits ( CommandPoolCreateFlagBits( COMMAND_POOL_CREATE_TRANSIENT_BIT
, COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
, COMMAND_POOL_CREATE_PROTECTED_BIT
, ..
)
, CommandPoolCreateFlags
) 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 Graphics.Vulkan.Core10.BaseType (Flags)
import Graphics.Vulkan.Zero (Zero)
newtype CommandPoolCreateFlagBits = CommandPoolCreateFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern COMMAND_POOL_CREATE_TRANSIENT_BIT = CommandPoolCreateFlagBits 0x00000001
pattern COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = CommandPoolCreateFlagBits 0x00000002
pattern COMMAND_POOL_CREATE_PROTECTED_BIT = CommandPoolCreateFlagBits 0x00000004
type CommandPoolCreateFlags = CommandPoolCreateFlagBits
instance Show CommandPoolCreateFlagBits where
showsPrec p = \case
COMMAND_POOL_CREATE_TRANSIENT_BIT -> showString "COMMAND_POOL_CREATE_TRANSIENT_BIT"
COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT -> showString "COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT"
COMMAND_POOL_CREATE_PROTECTED_BIT -> showString "COMMAND_POOL_CREATE_PROTECTED_BIT"
CommandPoolCreateFlagBits x -> showParen (p >= 11) (showString "CommandPoolCreateFlagBits 0x" . showHex x)
instance Read CommandPoolCreateFlagBits where
readPrec = parens (choose [("COMMAND_POOL_CREATE_TRANSIENT_BIT", pure COMMAND_POOL_CREATE_TRANSIENT_BIT)
, ("COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT", pure COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT)
, ("COMMAND_POOL_CREATE_PROTECTED_BIT", pure COMMAND_POOL_CREATE_PROTECTED_BIT)]
+++
prec 10 (do
expectP (Ident "CommandPoolCreateFlagBits")
v <- step readPrec
pure (CommandPoolCreateFlagBits v)))