{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.QueryType (QueryType( QUERY_TYPE_OCCLUSION
, QUERY_TYPE_PIPELINE_STATISTICS
, QUERY_TYPE_TIMESTAMP
, QUERY_TYPE_PERFORMANCE_QUERY_INTEL
, QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
, QUERY_TYPE_PERFORMANCE_QUERY_KHR
, QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_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 QueryType = QueryType Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern QUERY_TYPE_OCCLUSION = QueryType 0
pattern QUERY_TYPE_PIPELINE_STATISTICS = QueryType 1
pattern QUERY_TYPE_TIMESTAMP = QueryType 2
pattern QUERY_TYPE_PERFORMANCE_QUERY_INTEL = QueryType 1000210000
pattern QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = QueryType 1000165000
pattern QUERY_TYPE_PERFORMANCE_QUERY_KHR = QueryType 1000116000
pattern QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT = QueryType 1000028004
{-# complete QUERY_TYPE_OCCLUSION,
QUERY_TYPE_PIPELINE_STATISTICS,
QUERY_TYPE_TIMESTAMP,
QUERY_TYPE_PERFORMANCE_QUERY_INTEL,
QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV,
QUERY_TYPE_PERFORMANCE_QUERY_KHR,
QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT :: QueryType #-}
instance Show QueryType where
showsPrec p = \case
QUERY_TYPE_OCCLUSION -> showString "QUERY_TYPE_OCCLUSION"
QUERY_TYPE_PIPELINE_STATISTICS -> showString "QUERY_TYPE_PIPELINE_STATISTICS"
QUERY_TYPE_TIMESTAMP -> showString "QUERY_TYPE_TIMESTAMP"
QUERY_TYPE_PERFORMANCE_QUERY_INTEL -> showString "QUERY_TYPE_PERFORMANCE_QUERY_INTEL"
QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV -> showString "QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV"
QUERY_TYPE_PERFORMANCE_QUERY_KHR -> showString "QUERY_TYPE_PERFORMANCE_QUERY_KHR"
QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT -> showString "QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT"
QueryType x -> showParen (p >= 11) (showString "QueryType " . showsPrec 11 x)
instance Read QueryType where
readPrec = parens (choose [("QUERY_TYPE_OCCLUSION", pure QUERY_TYPE_OCCLUSION)
, ("QUERY_TYPE_PIPELINE_STATISTICS", pure QUERY_TYPE_PIPELINE_STATISTICS)
, ("QUERY_TYPE_TIMESTAMP", pure QUERY_TYPE_TIMESTAMP)
, ("QUERY_TYPE_PERFORMANCE_QUERY_INTEL", pure QUERY_TYPE_PERFORMANCE_QUERY_INTEL)
, ("QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV", pure QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV)
, ("QUERY_TYPE_PERFORMANCE_QUERY_KHR", pure QUERY_TYPE_PERFORMANCE_QUERY_KHR)
, ("QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT", pure QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT)]
+++
prec 10 (do
expectP (Ident "QueryType")
v <- step readPrec
pure (QueryType v)))