{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.ImageAspectFlagBits ( ImageAspectFlagBits( IMAGE_ASPECT_COLOR_BIT
, IMAGE_ASPECT_DEPTH_BIT
, IMAGE_ASPECT_STENCIL_BIT
, IMAGE_ASPECT_METADATA_BIT
, IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT
, IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT
, IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT
, IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT
, IMAGE_ASPECT_PLANE_2_BIT
, IMAGE_ASPECT_PLANE_1_BIT
, IMAGE_ASPECT_PLANE_0_BIT
, ..
)
, ImageAspectFlags
) 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 ImageAspectFlagBits = ImageAspectFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern IMAGE_ASPECT_COLOR_BIT = ImageAspectFlagBits 0x00000001
pattern IMAGE_ASPECT_DEPTH_BIT = ImageAspectFlagBits 0x00000002
pattern IMAGE_ASPECT_STENCIL_BIT = ImageAspectFlagBits 0x00000004
pattern IMAGE_ASPECT_METADATA_BIT = ImageAspectFlagBits 0x00000008
pattern IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT = ImageAspectFlagBits 0x00000400
pattern IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT = ImageAspectFlagBits 0x00000200
pattern IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT = ImageAspectFlagBits 0x00000100
pattern IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT = ImageAspectFlagBits 0x00000080
pattern IMAGE_ASPECT_PLANE_2_BIT = ImageAspectFlagBits 0x00000040
pattern IMAGE_ASPECT_PLANE_1_BIT = ImageAspectFlagBits 0x00000020
pattern IMAGE_ASPECT_PLANE_0_BIT = ImageAspectFlagBits 0x00000010
type ImageAspectFlags = ImageAspectFlagBits
instance Show ImageAspectFlagBits where
showsPrec p = \case
IMAGE_ASPECT_COLOR_BIT -> showString "IMAGE_ASPECT_COLOR_BIT"
IMAGE_ASPECT_DEPTH_BIT -> showString "IMAGE_ASPECT_DEPTH_BIT"
IMAGE_ASPECT_STENCIL_BIT -> showString "IMAGE_ASPECT_STENCIL_BIT"
IMAGE_ASPECT_METADATA_BIT -> showString "IMAGE_ASPECT_METADATA_BIT"
IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT -> showString "IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT"
IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT -> showString "IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT"
IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT -> showString "IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT"
IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT -> showString "IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT"
IMAGE_ASPECT_PLANE_2_BIT -> showString "IMAGE_ASPECT_PLANE_2_BIT"
IMAGE_ASPECT_PLANE_1_BIT -> showString "IMAGE_ASPECT_PLANE_1_BIT"
IMAGE_ASPECT_PLANE_0_BIT -> showString "IMAGE_ASPECT_PLANE_0_BIT"
ImageAspectFlagBits x -> showParen (p >= 11) (showString "ImageAspectFlagBits 0x" . showHex x)
instance Read ImageAspectFlagBits where
readPrec = parens (choose [("IMAGE_ASPECT_COLOR_BIT", pure IMAGE_ASPECT_COLOR_BIT)
, ("IMAGE_ASPECT_DEPTH_BIT", pure IMAGE_ASPECT_DEPTH_BIT)
, ("IMAGE_ASPECT_STENCIL_BIT", pure IMAGE_ASPECT_STENCIL_BIT)
, ("IMAGE_ASPECT_METADATA_BIT", pure IMAGE_ASPECT_METADATA_BIT)
, ("IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT", pure IMAGE_ASPECT_MEMORY_PLANE_3_BIT_EXT)
, ("IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT", pure IMAGE_ASPECT_MEMORY_PLANE_2_BIT_EXT)
, ("IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT", pure IMAGE_ASPECT_MEMORY_PLANE_1_BIT_EXT)
, ("IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT", pure IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT)
, ("IMAGE_ASPECT_PLANE_2_BIT", pure IMAGE_ASPECT_PLANE_2_BIT)
, ("IMAGE_ASPECT_PLANE_1_BIT", pure IMAGE_ASPECT_PLANE_1_BIT)
, ("IMAGE_ASPECT_PLANE_0_BIT", pure IMAGE_ASPECT_PLANE_0_BIT)]
+++
prec 10 (do
expectP (Ident "ImageAspectFlagBits")
v <- step readPrec
pure (ImageAspectFlagBits v)))