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