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