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