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