{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.ShaderStageFlagBits ( ShaderStageFlagBits( SHADER_STAGE_VERTEX_BIT
, SHADER_STAGE_TESSELLATION_CONTROL_BIT
, SHADER_STAGE_TESSELLATION_EVALUATION_BIT
, SHADER_STAGE_GEOMETRY_BIT
, SHADER_STAGE_FRAGMENT_BIT
, SHADER_STAGE_COMPUTE_BIT
, SHADER_STAGE_ALL_GRAPHICS
, SHADER_STAGE_ALL
, SHADER_STAGE_MESH_BIT_NV
, SHADER_STAGE_TASK_BIT_NV
, SHADER_STAGE_CALLABLE_BIT_NV
, SHADER_STAGE_INTERSECTION_BIT_NV
, SHADER_STAGE_MISS_BIT_NV
, SHADER_STAGE_CLOSEST_HIT_BIT_NV
, SHADER_STAGE_ANY_HIT_BIT_NV
, SHADER_STAGE_RAYGEN_BIT_NV
, ..
)
, ShaderStageFlags
) 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 ShaderStageFlagBits = ShaderStageFlagBits Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern SHADER_STAGE_VERTEX_BIT = ShaderStageFlagBits 0x00000001
pattern SHADER_STAGE_TESSELLATION_CONTROL_BIT = ShaderStageFlagBits 0x00000002
pattern SHADER_STAGE_TESSELLATION_EVALUATION_BIT = ShaderStageFlagBits 0x00000004
pattern SHADER_STAGE_GEOMETRY_BIT = ShaderStageFlagBits 0x00000008
pattern SHADER_STAGE_FRAGMENT_BIT = ShaderStageFlagBits 0x00000010
pattern SHADER_STAGE_COMPUTE_BIT = ShaderStageFlagBits 0x00000020
pattern SHADER_STAGE_ALL_GRAPHICS = ShaderStageFlagBits 0x0000001f
pattern SHADER_STAGE_ALL = ShaderStageFlagBits 0x7fffffff
pattern SHADER_STAGE_MESH_BIT_NV = ShaderStageFlagBits 0x00000080
pattern SHADER_STAGE_TASK_BIT_NV = ShaderStageFlagBits 0x00000040
pattern SHADER_STAGE_CALLABLE_BIT_NV = ShaderStageFlagBits 0x00002000
pattern SHADER_STAGE_INTERSECTION_BIT_NV = ShaderStageFlagBits 0x00001000
pattern SHADER_STAGE_MISS_BIT_NV = ShaderStageFlagBits 0x00000800
pattern SHADER_STAGE_CLOSEST_HIT_BIT_NV = ShaderStageFlagBits 0x00000400
pattern SHADER_STAGE_ANY_HIT_BIT_NV = ShaderStageFlagBits 0x00000200
pattern SHADER_STAGE_RAYGEN_BIT_NV = ShaderStageFlagBits 0x00000100
type ShaderStageFlags = ShaderStageFlagBits
instance Show ShaderStageFlagBits where
showsPrec p = \case
SHADER_STAGE_VERTEX_BIT -> showString "SHADER_STAGE_VERTEX_BIT"
SHADER_STAGE_TESSELLATION_CONTROL_BIT -> showString "SHADER_STAGE_TESSELLATION_CONTROL_BIT"
SHADER_STAGE_TESSELLATION_EVALUATION_BIT -> showString "SHADER_STAGE_TESSELLATION_EVALUATION_BIT"
SHADER_STAGE_GEOMETRY_BIT -> showString "SHADER_STAGE_GEOMETRY_BIT"
SHADER_STAGE_FRAGMENT_BIT -> showString "SHADER_STAGE_FRAGMENT_BIT"
SHADER_STAGE_COMPUTE_BIT -> showString "SHADER_STAGE_COMPUTE_BIT"
SHADER_STAGE_ALL_GRAPHICS -> showString "SHADER_STAGE_ALL_GRAPHICS"
SHADER_STAGE_ALL -> showString "SHADER_STAGE_ALL"
SHADER_STAGE_MESH_BIT_NV -> showString "SHADER_STAGE_MESH_BIT_NV"
SHADER_STAGE_TASK_BIT_NV -> showString "SHADER_STAGE_TASK_BIT_NV"
SHADER_STAGE_CALLABLE_BIT_NV -> showString "SHADER_STAGE_CALLABLE_BIT_NV"
SHADER_STAGE_INTERSECTION_BIT_NV -> showString "SHADER_STAGE_INTERSECTION_BIT_NV"
SHADER_STAGE_MISS_BIT_NV -> showString "SHADER_STAGE_MISS_BIT_NV"
SHADER_STAGE_CLOSEST_HIT_BIT_NV -> showString "SHADER_STAGE_CLOSEST_HIT_BIT_NV"
SHADER_STAGE_ANY_HIT_BIT_NV -> showString "SHADER_STAGE_ANY_HIT_BIT_NV"
SHADER_STAGE_RAYGEN_BIT_NV -> showString "SHADER_STAGE_RAYGEN_BIT_NV"
ShaderStageFlagBits x -> showParen (p >= 11) (showString "ShaderStageFlagBits 0x" . showHex x)
instance Read ShaderStageFlagBits where
readPrec = parens (choose [("SHADER_STAGE_VERTEX_BIT", pure SHADER_STAGE_VERTEX_BIT)
, ("SHADER_STAGE_TESSELLATION_CONTROL_BIT", pure SHADER_STAGE_TESSELLATION_CONTROL_BIT)
, ("SHADER_STAGE_TESSELLATION_EVALUATION_BIT", pure SHADER_STAGE_TESSELLATION_EVALUATION_BIT)
, ("SHADER_STAGE_GEOMETRY_BIT", pure SHADER_STAGE_GEOMETRY_BIT)
, ("SHADER_STAGE_FRAGMENT_BIT", pure SHADER_STAGE_FRAGMENT_BIT)
, ("SHADER_STAGE_COMPUTE_BIT", pure SHADER_STAGE_COMPUTE_BIT)
, ("SHADER_STAGE_ALL_GRAPHICS", pure SHADER_STAGE_ALL_GRAPHICS)
, ("SHADER_STAGE_ALL", pure SHADER_STAGE_ALL)
, ("SHADER_STAGE_MESH_BIT_NV", pure SHADER_STAGE_MESH_BIT_NV)
, ("SHADER_STAGE_TASK_BIT_NV", pure SHADER_STAGE_TASK_BIT_NV)
, ("SHADER_STAGE_CALLABLE_BIT_NV", pure SHADER_STAGE_CALLABLE_BIT_NV)
, ("SHADER_STAGE_INTERSECTION_BIT_NV", pure SHADER_STAGE_INTERSECTION_BIT_NV)
, ("SHADER_STAGE_MISS_BIT_NV", pure SHADER_STAGE_MISS_BIT_NV)
, ("SHADER_STAGE_CLOSEST_HIT_BIT_NV", pure SHADER_STAGE_CLOSEST_HIT_BIT_NV)
, ("SHADER_STAGE_ANY_HIT_BIT_NV", pure SHADER_STAGE_ANY_HIT_BIT_NV)
, ("SHADER_STAGE_RAYGEN_BIT_NV", pure SHADER_STAGE_RAYGEN_BIT_NV)]
+++
prec 10 (do
expectP (Ident "ShaderStageFlagBits")
v <- step readPrec
pure (ShaderStageFlagBits v)))