{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.AttachmentLoadOp (AttachmentLoadOp( ATTACHMENT_LOAD_OP_LOAD
, ATTACHMENT_LOAD_OP_CLEAR
, ATTACHMENT_LOAD_OP_DONT_CARE
, ..
)) 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 AttachmentLoadOp = AttachmentLoadOp Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern ATTACHMENT_LOAD_OP_LOAD = AttachmentLoadOp 0
pattern ATTACHMENT_LOAD_OP_CLEAR = AttachmentLoadOp 1
pattern ATTACHMENT_LOAD_OP_DONT_CARE = AttachmentLoadOp 2
{-# complete ATTACHMENT_LOAD_OP_LOAD,
ATTACHMENT_LOAD_OP_CLEAR,
ATTACHMENT_LOAD_OP_DONT_CARE :: AttachmentLoadOp #-}
instance Show AttachmentLoadOp where
showsPrec p = \case
ATTACHMENT_LOAD_OP_LOAD -> showString "ATTACHMENT_LOAD_OP_LOAD"
ATTACHMENT_LOAD_OP_CLEAR -> showString "ATTACHMENT_LOAD_OP_CLEAR"
ATTACHMENT_LOAD_OP_DONT_CARE -> showString "ATTACHMENT_LOAD_OP_DONT_CARE"
AttachmentLoadOp x -> showParen (p >= 11) (showString "AttachmentLoadOp " . showsPrec 11 x)
instance Read AttachmentLoadOp where
readPrec = parens (choose [("ATTACHMENT_LOAD_OP_LOAD", pure ATTACHMENT_LOAD_OP_LOAD)
, ("ATTACHMENT_LOAD_OP_CLEAR", pure ATTACHMENT_LOAD_OP_CLEAR)
, ("ATTACHMENT_LOAD_OP_DONT_CARE", pure ATTACHMENT_LOAD_OP_DONT_CARE)]
+++
prec 10 (do
expectP (Ident "AttachmentLoadOp")
v <- step readPrec
pure (AttachmentLoadOp v)))