{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.AttachmentStoreOp (AttachmentStoreOp( ATTACHMENT_STORE_OP_STORE
, ATTACHMENT_STORE_OP_DONT_CARE
, ATTACHMENT_STORE_OP_NONE_QCOM
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Graphics.Vulkan.Zero (Zero)
newtype AttachmentStoreOp = AttachmentStoreOp Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern ATTACHMENT_STORE_OP_STORE = AttachmentStoreOp 0
pattern ATTACHMENT_STORE_OP_DONT_CARE = AttachmentStoreOp 1
pattern ATTACHMENT_STORE_OP_NONE_QCOM = AttachmentStoreOp 1000301000
{-# complete ATTACHMENT_STORE_OP_STORE,
ATTACHMENT_STORE_OP_DONT_CARE,
ATTACHMENT_STORE_OP_NONE_QCOM :: AttachmentStoreOp #-}
instance Show AttachmentStoreOp where
showsPrec p = \case
ATTACHMENT_STORE_OP_STORE -> showString "ATTACHMENT_STORE_OP_STORE"
ATTACHMENT_STORE_OP_DONT_CARE -> showString "ATTACHMENT_STORE_OP_DONT_CARE"
ATTACHMENT_STORE_OP_NONE_QCOM -> showString "ATTACHMENT_STORE_OP_NONE_QCOM"
AttachmentStoreOp x -> showParen (p >= 11) (showString "AttachmentStoreOp " . showsPrec 11 x)
instance Read AttachmentStoreOp where
readPrec = parens (choose [("ATTACHMENT_STORE_OP_STORE", pure ATTACHMENT_STORE_OP_STORE)
, ("ATTACHMENT_STORE_OP_DONT_CARE", pure ATTACHMENT_STORE_OP_DONT_CARE)
, ("ATTACHMENT_STORE_OP_NONE_QCOM", pure ATTACHMENT_STORE_OP_NONE_QCOM)]
+++
prec 10 (do
expectP (Ident "AttachmentStoreOp")
v <- step readPrec
pure (AttachmentStoreOp v)))