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