{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.ImageUsageFlagBits ( ImageUsageFlagBits( IMAGE_USAGE_TRANSFER_SRC_BIT
, IMAGE_USAGE_TRANSFER_DST_BIT
, IMAGE_USAGE_SAMPLED_BIT
, IMAGE_USAGE_STORAGE_BIT
, IMAGE_USAGE_COLOR_ATTACHMENT_BIT
, IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
, IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
, IMAGE_USAGE_INPUT_ATTACHMENT_BIT
, IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
, IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
, ..
)
, ImageUsageFlags
) 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 ImageUsageFlagBits = ImageUsageFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern IMAGE_USAGE_TRANSFER_SRC_BIT = ImageUsageFlagBits 0x00000001
pattern IMAGE_USAGE_TRANSFER_DST_BIT = ImageUsageFlagBits 0x00000002
pattern IMAGE_USAGE_SAMPLED_BIT = ImageUsageFlagBits 0x00000004
pattern IMAGE_USAGE_STORAGE_BIT = ImageUsageFlagBits 0x00000008
pattern IMAGE_USAGE_COLOR_ATTACHMENT_BIT = ImageUsageFlagBits 0x00000010
pattern IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = ImageUsageFlagBits 0x00000020
pattern IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = ImageUsageFlagBits 0x00000040
pattern IMAGE_USAGE_INPUT_ATTACHMENT_BIT = ImageUsageFlagBits 0x00000080
pattern IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = ImageUsageFlagBits 0x00000200
pattern IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = ImageUsageFlagBits 0x00000100
type ImageUsageFlags = ImageUsageFlagBits
instance Show ImageUsageFlagBits where
showsPrec p = \case
IMAGE_USAGE_TRANSFER_SRC_BIT -> showString "IMAGE_USAGE_TRANSFER_SRC_BIT"
IMAGE_USAGE_TRANSFER_DST_BIT -> showString "IMAGE_USAGE_TRANSFER_DST_BIT"
IMAGE_USAGE_SAMPLED_BIT -> showString "IMAGE_USAGE_SAMPLED_BIT"
IMAGE_USAGE_STORAGE_BIT -> showString "IMAGE_USAGE_STORAGE_BIT"
IMAGE_USAGE_COLOR_ATTACHMENT_BIT -> showString "IMAGE_USAGE_COLOR_ATTACHMENT_BIT"
IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT -> showString "IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT"
IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT -> showString "IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT"
IMAGE_USAGE_INPUT_ATTACHMENT_BIT -> showString "IMAGE_USAGE_INPUT_ATTACHMENT_BIT"
IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT -> showString "IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT"
IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV -> showString "IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV"
ImageUsageFlagBits x -> showParen (p >= 11) (showString "ImageUsageFlagBits 0x" . showHex x)
instance Read ImageUsageFlagBits where
readPrec = parens (choose [("IMAGE_USAGE_TRANSFER_SRC_BIT", pure IMAGE_USAGE_TRANSFER_SRC_BIT)
, ("IMAGE_USAGE_TRANSFER_DST_BIT", pure IMAGE_USAGE_TRANSFER_DST_BIT)
, ("IMAGE_USAGE_SAMPLED_BIT", pure IMAGE_USAGE_SAMPLED_BIT)
, ("IMAGE_USAGE_STORAGE_BIT", pure IMAGE_USAGE_STORAGE_BIT)
, ("IMAGE_USAGE_COLOR_ATTACHMENT_BIT", pure IMAGE_USAGE_COLOR_ATTACHMENT_BIT)
, ("IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT", pure IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
, ("IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT", pure IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT)
, ("IMAGE_USAGE_INPUT_ATTACHMENT_BIT", pure IMAGE_USAGE_INPUT_ATTACHMENT_BIT)
, ("IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT", pure IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT)
, ("IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV", pure IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV)]
+++
prec 10 (do
expectP (Ident "ImageUsageFlagBits")
v <- step readPrec
pure (ImageUsageFlagBits v)))