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