{-# language CPP #-}
module Graphics.Vulkan.Core11.Enums.PeerMemoryFeatureFlagBits ( PeerMemoryFeatureFlagBits( PEER_MEMORY_FEATURE_COPY_SRC_BIT
, PEER_MEMORY_FEATURE_COPY_DST_BIT
, PEER_MEMORY_FEATURE_GENERIC_SRC_BIT
, PEER_MEMORY_FEATURE_GENERIC_DST_BIT
, ..
)
, PeerMemoryFeatureFlags
) 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 PeerMemoryFeatureFlagBits = PeerMemoryFeatureFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern PEER_MEMORY_FEATURE_COPY_SRC_BIT = PeerMemoryFeatureFlagBits 0x00000001
pattern PEER_MEMORY_FEATURE_COPY_DST_BIT = PeerMemoryFeatureFlagBits 0x00000002
pattern PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = PeerMemoryFeatureFlagBits 0x00000004
pattern PEER_MEMORY_FEATURE_GENERIC_DST_BIT = PeerMemoryFeatureFlagBits 0x00000008
type PeerMemoryFeatureFlags = PeerMemoryFeatureFlagBits
instance Show PeerMemoryFeatureFlagBits where
showsPrec p = \case
PEER_MEMORY_FEATURE_COPY_SRC_BIT -> showString "PEER_MEMORY_FEATURE_COPY_SRC_BIT"
PEER_MEMORY_FEATURE_COPY_DST_BIT -> showString "PEER_MEMORY_FEATURE_COPY_DST_BIT"
PEER_MEMORY_FEATURE_GENERIC_SRC_BIT -> showString "PEER_MEMORY_FEATURE_GENERIC_SRC_BIT"
PEER_MEMORY_FEATURE_GENERIC_DST_BIT -> showString "PEER_MEMORY_FEATURE_GENERIC_DST_BIT"
PeerMemoryFeatureFlagBits x -> showParen (p >= 11) (showString "PeerMemoryFeatureFlagBits 0x" . showHex x)
instance Read PeerMemoryFeatureFlagBits where
readPrec = parens (choose [("PEER_MEMORY_FEATURE_COPY_SRC_BIT", pure PEER_MEMORY_FEATURE_COPY_SRC_BIT)
, ("PEER_MEMORY_FEATURE_COPY_DST_BIT", pure PEER_MEMORY_FEATURE_COPY_DST_BIT)
, ("PEER_MEMORY_FEATURE_GENERIC_SRC_BIT", pure PEER_MEMORY_FEATURE_GENERIC_SRC_BIT)
, ("PEER_MEMORY_FEATURE_GENERIC_DST_BIT", pure PEER_MEMORY_FEATURE_GENERIC_DST_BIT)]
+++
prec 10 (do
expectP (Ident "PeerMemoryFeatureFlagBits")
v <- step readPrec
pure (PeerMemoryFeatureFlagBits v)))