{-# language CPP #-}
module Graphics.Vulkan.Extensions.VK_KHR_performance_query ( enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
, getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
, acquireProfilingLockKHR
, releaseProfilingLockKHR
, PhysicalDevicePerformanceQueryFeaturesKHR(..)
, PhysicalDevicePerformanceQueryPropertiesKHR(..)
, PerformanceCounterKHR(..)
, PerformanceCounterDescriptionKHR(..)
, QueryPoolPerformanceCreateInfoKHR(..)
, AcquireProfilingLockInfoKHR(..)
, PerformanceQuerySubmitInfoKHR(..)
, PerformanceCounterResultKHR(..)
, PerformanceCounterScopeKHR( PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR
, PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR
, PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR
, ..
)
, PerformanceCounterUnitKHR( PERFORMANCE_COUNTER_UNIT_GENERIC_KHR
, PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR
, PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR
, PERFORMANCE_COUNTER_UNIT_BYTES_KHR
, PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR
, PERFORMANCE_COUNTER_UNIT_KELVIN_KHR
, PERFORMANCE_COUNTER_UNIT_WATTS_KHR
, PERFORMANCE_COUNTER_UNIT_VOLTS_KHR
, PERFORMANCE_COUNTER_UNIT_AMPS_KHR
, PERFORMANCE_COUNTER_UNIT_HERTZ_KHR
, PERFORMANCE_COUNTER_UNIT_CYCLES_KHR
, ..
)
, PerformanceCounterStorageKHR( PERFORMANCE_COUNTER_STORAGE_INT32_KHR
, PERFORMANCE_COUNTER_STORAGE_INT64_KHR
, PERFORMANCE_COUNTER_STORAGE_UINT32_KHR
, PERFORMANCE_COUNTER_STORAGE_UINT64_KHR
, PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR
, PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR
, ..
)
, PerformanceCounterDescriptionFlagBitsKHR( PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR
, PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR
, ..
)
, PerformanceCounterDescriptionFlagsKHR
, AcquireProfilingLockFlagBitsKHR(..)
, AcquireProfilingLockFlagsKHR
, KHR_PERFORMANCE_QUERY_SPEC_VERSION
, pattern KHR_PERFORMANCE_QUERY_SPEC_VERSION
, KHR_PERFORMANCE_QUERY_EXTENSION_NAME
, pattern KHR_PERFORMANCE_QUERY_EXTENSION_NAME
) where
import Graphics.Vulkan.CStruct.Utils (FixedArray)
import Control.Exception.Base (bracket)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytesAligned)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (castPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
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 Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.ByteString (packCString)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Control.Monad.Trans.Cont (runContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CChar)
import Foreign.C.Types (CDouble)
import Foreign.C.Types (CDouble(CDouble))
import Foreign.C.Types (CFloat)
import Foreign.C.Types (CFloat(CFloat))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import Data.Int (Int32)
import Data.Int (Int64)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
import Text.Read.Lex (Lexeme(Ident))
import Data.ByteString (ByteString)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Graphics.Vulkan.CStruct.Utils (advancePtrBytes)
import Graphics.Vulkan.Core10.BaseType (bool32ToBool)
import Graphics.Vulkan.Core10.BaseType (boolToBool32)
import Graphics.Vulkan.CStruct.Utils (lowerArrayPtr)
import Graphics.Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Graphics.Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Graphics.Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Graphics.Vulkan.NamedType ((:::))
import Graphics.Vulkan.Core10.BaseType (Bool32)
import Graphics.Vulkan.Core10.Handles (Device)
import Graphics.Vulkan.Core10.Handles (Device(..))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkAcquireProfilingLockKHR))
import Graphics.Vulkan.Dynamic (DeviceCmds(pVkReleaseProfilingLockKHR))
import Graphics.Vulkan.Core10.Handles (Device_T)
import Graphics.Vulkan.Core10.BaseType (Flags)
import Graphics.Vulkan.CStruct (FromCStruct)
import Graphics.Vulkan.CStruct (FromCStruct(..))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR))
import Graphics.Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR))
import Graphics.Vulkan.Core10.APIConstants (MAX_DESCRIPTION_SIZE)
import Graphics.Vulkan.Core10.Handles (PhysicalDevice)
import Graphics.Vulkan.Core10.Handles (PhysicalDevice(..))
import Graphics.Vulkan.Core10.Handles (PhysicalDevice_T)
import Graphics.Vulkan.Core10.Enums.Result (Result)
import Graphics.Vulkan.Core10.Enums.Result (Result(..))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType)
import Graphics.Vulkan.CStruct (ToCStruct)
import Graphics.Vulkan.CStruct (ToCStruct(..))
import Graphics.Vulkan.Core10.APIConstants (UUID_SIZE)
import Graphics.Vulkan.Exception (VulkanException(..))
import Graphics.Vulkan.Zero (Zero)
import Graphics.Vulkan.Zero (Zero(..))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR))
import Graphics.Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR))
import Graphics.Vulkan.Core10.Enums.Result (Result(SUCCESS))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
:: FunPtr (Ptr PhysicalDevice_T -> Word32 -> Ptr Word32 -> Ptr PerformanceCounterKHR -> Ptr PerformanceCounterDescriptionKHR -> IO Result) -> Ptr PhysicalDevice_T -> Word32 -> Ptr Word32 -> Ptr PerformanceCounterKHR -> Ptr PerformanceCounterDescriptionKHR -> IO Result
enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io (Result, ("counters" ::: Vector PerformanceCounterKHR), ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR physicalDevice queueFamilyIndex = liftIO . evalContT $ do
let vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' = mkVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR (pVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR (instanceCmds (physicalDevice :: PhysicalDevice)))
let physicalDevice' = physicalDeviceHandle (physicalDevice)
pPCounterCount <- ContT $ bracket (callocBytes @Word32 4) free
r <- lift $ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' physicalDevice' (queueFamilyIndex) (pPCounterCount) (nullPtr) (nullPtr)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pCounterCount <- lift $ peek @Word32 pPCounterCount
pPCounters <- ContT $ bracket (callocBytes @PerformanceCounterKHR ((fromIntegral (pCounterCount)) * 48)) free
_ <- traverse (\i -> ContT $ pokeZeroCStruct (pPCounters `advancePtrBytes` (i * 48) :: Ptr PerformanceCounterKHR) . ($ ())) [0..(fromIntegral (pCounterCount)) - 1]
pPCounterDescriptions <- ContT $ bracket (callocBytes @PerformanceCounterDescriptionKHR ((fromIntegral (pCounterCount)) * 792)) free
_ <- traverse (\i -> ContT $ pokeZeroCStruct (pPCounterDescriptions `advancePtrBytes` (i * 792) :: Ptr PerformanceCounterDescriptionKHR) . ($ ())) [0..(fromIntegral (pCounterCount)) - 1]
r' <- lift $ vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' physicalDevice' (queueFamilyIndex) (pPCounterCount) ((pPCounters)) ((pPCounterDescriptions))
lift $ when (r' < SUCCESS) (throwIO (VulkanException r'))
pCounterCount' <- lift $ peek @Word32 pPCounterCount
let x32 = pCounterCount'
pCounters' <- lift $ generateM (fromIntegral x32) (\i -> peekCStruct @PerformanceCounterKHR (((pPCounters) `advancePtrBytes` (48 * (i)) :: Ptr PerformanceCounterKHR)))
pCounterDescriptions' <- lift $ generateM (fromIntegral x32) (\i -> peekCStruct @PerformanceCounterDescriptionKHR (((pPCounterDescriptions) `advancePtrBytes` (792 * (i)) :: Ptr PerformanceCounterDescriptionKHR)))
pure $ ((r'), pCounters', pCounterDescriptions')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
:: FunPtr (Ptr PhysicalDevice_T -> Ptr QueryPoolPerformanceCreateInfoKHR -> Ptr Word32 -> IO ()) -> Ptr PhysicalDevice_T -> Ptr QueryPoolPerformanceCreateInfoKHR -> Ptr Word32 -> IO ()
getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: forall io . MonadIO io => PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> io (("numPasses" ::: Word32))
getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR physicalDevice performanceQueryCreateInfo = liftIO . evalContT $ do
let vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' = mkVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR (pVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR (instanceCmds (physicalDevice :: PhysicalDevice)))
pPerformanceQueryCreateInfo <- ContT $ withCStruct (performanceQueryCreateInfo)
pPNumPasses <- ContT $ bracket (callocBytes @Word32 4) free
lift $ vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' (physicalDeviceHandle (physicalDevice)) pPerformanceQueryCreateInfo (pPNumPasses)
pNumPasses <- lift $ peek @Word32 pPNumPasses
pure $ (pNumPasses)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkAcquireProfilingLockKHR
:: FunPtr (Ptr Device_T -> Ptr AcquireProfilingLockInfoKHR -> IO Result) -> Ptr Device_T -> Ptr AcquireProfilingLockInfoKHR -> IO Result
acquireProfilingLockKHR :: forall io . MonadIO io => Device -> AcquireProfilingLockInfoKHR -> io ()
acquireProfilingLockKHR device info = liftIO . evalContT $ do
let vkAcquireProfilingLockKHR' = mkVkAcquireProfilingLockKHR (pVkAcquireProfilingLockKHR (deviceCmds (device :: Device)))
pInfo <- ContT $ withCStruct (info)
r <- lift $ vkAcquireProfilingLockKHR' (deviceHandle (device)) pInfo
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkReleaseProfilingLockKHR
:: FunPtr (Ptr Device_T -> IO ()) -> Ptr Device_T -> IO ()
releaseProfilingLockKHR :: forall io . MonadIO io => Device -> io ()
releaseProfilingLockKHR device = liftIO $ do
let vkReleaseProfilingLockKHR' = mkVkReleaseProfilingLockKHR (pVkReleaseProfilingLockKHR (deviceCmds (device :: Device)))
vkReleaseProfilingLockKHR' (deviceHandle (device))
pure $ ()
data PhysicalDevicePerformanceQueryFeaturesKHR = PhysicalDevicePerformanceQueryFeaturesKHR
{
performanceCounterQueryPools :: Bool
,
performanceCounterMultipleQueryPools :: Bool
}
deriving (Typeable)
deriving instance Show PhysicalDevicePerformanceQueryFeaturesKHR
instance ToCStruct PhysicalDevicePerformanceQueryFeaturesKHR where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p PhysicalDevicePerformanceQueryFeaturesKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (performanceCounterQueryPools))
poke ((p `plusPtr` 20 :: Ptr Bool32)) (boolToBool32 (performanceCounterMultipleQueryPools))
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (zero))
poke ((p `plusPtr` 20 :: Ptr Bool32)) (boolToBool32 (zero))
f
instance FromCStruct PhysicalDevicePerformanceQueryFeaturesKHR where
peekCStruct p = do
performanceCounterQueryPools <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32))
performanceCounterMultipleQueryPools <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
pure $ PhysicalDevicePerformanceQueryFeaturesKHR
(bool32ToBool performanceCounterQueryPools) (bool32ToBool performanceCounterMultipleQueryPools)
instance Storable PhysicalDevicePerformanceQueryFeaturesKHR where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero PhysicalDevicePerformanceQueryFeaturesKHR where
zero = PhysicalDevicePerformanceQueryFeaturesKHR
zero
zero
data PhysicalDevicePerformanceQueryPropertiesKHR = PhysicalDevicePerformanceQueryPropertiesKHR
{
allowCommandBufferQueryCopies :: Bool }
deriving (Typeable)
deriving instance Show PhysicalDevicePerformanceQueryPropertiesKHR
instance ToCStruct PhysicalDevicePerformanceQueryPropertiesKHR where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p PhysicalDevicePerformanceQueryPropertiesKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (allowCommandBufferQueryCopies))
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Bool32)) (boolToBool32 (zero))
f
instance FromCStruct PhysicalDevicePerformanceQueryPropertiesKHR where
peekCStruct p = do
allowCommandBufferQueryCopies <- peek @Bool32 ((p `plusPtr` 16 :: Ptr Bool32))
pure $ PhysicalDevicePerformanceQueryPropertiesKHR
(bool32ToBool allowCommandBufferQueryCopies)
instance Storable PhysicalDevicePerformanceQueryPropertiesKHR where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero PhysicalDevicePerformanceQueryPropertiesKHR where
zero = PhysicalDevicePerformanceQueryPropertiesKHR
zero
data PerformanceCounterKHR = PerformanceCounterKHR
{
unit :: PerformanceCounterUnitKHR
,
scope :: PerformanceCounterScopeKHR
,
storage :: PerformanceCounterStorageKHR
,
uuid :: ByteString
}
deriving (Typeable)
deriving instance Show PerformanceCounterKHR
instance ToCStruct PerformanceCounterKHR where
withCStruct x f = allocaBytesAligned 48 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p PerformanceCounterKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr PerformanceCounterUnitKHR)) (unit)
poke ((p `plusPtr` 20 :: Ptr PerformanceCounterScopeKHR)) (scope)
poke ((p `plusPtr` 24 :: Ptr PerformanceCounterStorageKHR)) (storage)
pokeFixedLengthByteString ((p `plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8))) (uuid)
f
cStructSize = 48
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr PerformanceCounterUnitKHR)) (zero)
poke ((p `plusPtr` 20 :: Ptr PerformanceCounterScopeKHR)) (zero)
poke ((p `plusPtr` 24 :: Ptr PerformanceCounterStorageKHR)) (zero)
pokeFixedLengthByteString ((p `plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8))) (mempty)
f
instance FromCStruct PerformanceCounterKHR where
peekCStruct p = do
unit <- peek @PerformanceCounterUnitKHR ((p `plusPtr` 16 :: Ptr PerformanceCounterUnitKHR))
scope <- peek @PerformanceCounterScopeKHR ((p `plusPtr` 20 :: Ptr PerformanceCounterScopeKHR))
storage <- peek @PerformanceCounterStorageKHR ((p `plusPtr` 24 :: Ptr PerformanceCounterStorageKHR))
uuid <- peekByteStringFromSizedVectorPtr ((p `plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8)))
pure $ PerformanceCounterKHR
unit scope storage uuid
instance Storable PerformanceCounterKHR where
sizeOf ~_ = 48
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero PerformanceCounterKHR where
zero = PerformanceCounterKHR
zero
zero
zero
mempty
data PerformanceCounterDescriptionKHR = PerformanceCounterDescriptionKHR
{
flags :: PerformanceCounterDescriptionFlagsKHR
,
name :: ByteString
,
category :: ByteString
,
description :: ByteString
}
deriving (Typeable)
deriving instance Show PerformanceCounterDescriptionKHR
instance ToCStruct PerformanceCounterDescriptionKHR where
withCStruct x f = allocaBytesAligned 792 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p PerformanceCounterDescriptionKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr PerformanceCounterDescriptionFlagsKHR)) (flags)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (name)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (category)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (description)
f
cStructSize = 792
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (mempty)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (mempty)
pokeFixedLengthNullTerminatedByteString ((p `plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (mempty)
f
instance FromCStruct PerformanceCounterDescriptionKHR where
peekCStruct p = do
flags <- peek @PerformanceCounterDescriptionFlagsKHR ((p `plusPtr` 16 :: Ptr PerformanceCounterDescriptionFlagsKHR))
name <- packCString (lowerArrayPtr ((p `plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
category <- packCString (lowerArrayPtr ((p `plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
description <- packCString (lowerArrayPtr ((p `plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
pure $ PerformanceCounterDescriptionKHR
flags name category description
instance Storable PerformanceCounterDescriptionKHR where
sizeOf ~_ = 792
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero PerformanceCounterDescriptionKHR where
zero = PerformanceCounterDescriptionKHR
zero
mempty
mempty
mempty
data QueryPoolPerformanceCreateInfoKHR = QueryPoolPerformanceCreateInfoKHR
{
queueFamilyIndex :: Word32
,
counterIndices :: Vector Word32
}
deriving (Typeable)
deriving instance Show QueryPoolPerformanceCreateInfoKHR
instance ToCStruct QueryPoolPerformanceCreateInfoKHR where
withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p QueryPoolPerformanceCreateInfoKHR{..} f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (queueFamilyIndex)
lift $ poke ((p `plusPtr` 20 :: Ptr Word32)) ((fromIntegral (Data.Vector.length $ (counterIndices)) :: Word32))
pPCounterIndices' <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (counterIndices)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPCounterIndices' `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (counterIndices)
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr Word32))) (pPCounterIndices')
lift $ f
cStructSize = 32
cStructAlignment = 8
pokeZeroCStruct p f = evalContT $ do
lift $ poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR)
lift $ poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
lift $ poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)
pPCounterIndices' <- ContT $ allocaBytesAligned @Word32 ((Data.Vector.length (mempty)) * 4) 4
lift $ Data.Vector.imapM_ (\i e -> poke (pPCounterIndices' `plusPtr` (4 * (i)) :: Ptr Word32) (e)) (mempty)
lift $ poke ((p `plusPtr` 24 :: Ptr (Ptr Word32))) (pPCounterIndices')
lift $ f
instance FromCStruct QueryPoolPerformanceCreateInfoKHR where
peekCStruct p = do
queueFamilyIndex <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
counterIndexCount <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
pCounterIndices <- peek @(Ptr Word32) ((p `plusPtr` 24 :: Ptr (Ptr Word32)))
pCounterIndices' <- generateM (fromIntegral counterIndexCount) (\i -> peek @Word32 ((pCounterIndices `advancePtrBytes` (4 * (i)) :: Ptr Word32)))
pure $ QueryPoolPerformanceCreateInfoKHR
queueFamilyIndex pCounterIndices'
instance Zero QueryPoolPerformanceCreateInfoKHR where
zero = QueryPoolPerformanceCreateInfoKHR
zero
mempty
data AcquireProfilingLockInfoKHR = AcquireProfilingLockInfoKHR
{
flags :: AcquireProfilingLockFlagsKHR
,
timeout :: Word64
}
deriving (Typeable)
deriving instance Show AcquireProfilingLockInfoKHR
instance ToCStruct AcquireProfilingLockInfoKHR where
withCStruct x f = allocaBytesAligned 32 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p AcquireProfilingLockInfoKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr AcquireProfilingLockFlagsKHR)) (flags)
poke ((p `plusPtr` 24 :: Ptr Word64)) (timeout)
f
cStructSize = 32
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 24 :: Ptr Word64)) (zero)
f
instance FromCStruct AcquireProfilingLockInfoKHR where
peekCStruct p = do
flags <- peek @AcquireProfilingLockFlagsKHR ((p `plusPtr` 16 :: Ptr AcquireProfilingLockFlagsKHR))
timeout <- peek @Word64 ((p `plusPtr` 24 :: Ptr Word64))
pure $ AcquireProfilingLockInfoKHR
flags timeout
instance Storable AcquireProfilingLockInfoKHR where
sizeOf ~_ = 32
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero AcquireProfilingLockInfoKHR where
zero = AcquireProfilingLockInfoKHR
zero
zero
data PerformanceQuerySubmitInfoKHR = PerformanceQuerySubmitInfoKHR
{
counterPassIndex :: Word32 }
deriving (Typeable)
deriving instance Show PerformanceQuerySubmitInfoKHR
instance ToCStruct PerformanceQuerySubmitInfoKHR where
withCStruct x f = allocaBytesAligned 24 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct p PerformanceQuerySubmitInfoKHR{..} f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Word32)) (counterPassIndex)
f
cStructSize = 24
cStructAlignment = 8
pokeZeroCStruct p f = do
poke ((p `plusPtr` 0 :: Ptr StructureType)) (STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR)
poke ((p `plusPtr` 8 :: Ptr (Ptr ()))) (nullPtr)
poke ((p `plusPtr` 16 :: Ptr Word32)) (zero)
f
instance FromCStruct PerformanceQuerySubmitInfoKHR where
peekCStruct p = do
counterPassIndex <- peek @Word32 ((p `plusPtr` 16 :: Ptr Word32))
pure $ PerformanceQuerySubmitInfoKHR
counterPassIndex
instance Storable PerformanceQuerySubmitInfoKHR where
sizeOf ~_ = 24
alignment ~_ = 8
peek = peekCStruct
poke ptr poked = pokeCStruct ptr poked (pure ())
instance Zero PerformanceQuerySubmitInfoKHR where
zero = PerformanceQuerySubmitInfoKHR
zero
data PerformanceCounterResultKHR
= Int32Counter Int32
| Int64Counter Int64
| Uint32Counter Word32
| Uint64Counter Word64
| Float32Counter Float
| Float64Counter Double
deriving (Show)
instance ToCStruct PerformanceCounterResultKHR where
withCStruct x f = allocaBytesAligned 8 8 $ \p -> pokeCStruct p x (f p)
pokeCStruct :: Ptr PerformanceCounterResultKHR -> PerformanceCounterResultKHR -> IO a -> IO a
pokeCStruct p = (. const) . runContT . \case
Int32Counter v -> lift $ poke (castPtr @_ @Int32 p) (v)
Int64Counter v -> lift $ poke (castPtr @_ @Int64 p) (v)
Uint32Counter v -> lift $ poke (castPtr @_ @Word32 p) (v)
Uint64Counter v -> lift $ poke (castPtr @_ @Word64 p) (v)
Float32Counter v -> lift $ poke (castPtr @_ @CFloat p) (CFloat (v))
Float64Counter v -> lift $ poke (castPtr @_ @CDouble p) (CDouble (v))
pokeZeroCStruct :: Ptr PerformanceCounterResultKHR -> IO b -> IO b
pokeZeroCStruct _ f = f
cStructSize = 8
cStructAlignment = 8
instance Zero PerformanceCounterResultKHR where
zero = Int64Counter zero
newtype PerformanceCounterScopeKHR = PerformanceCounterScopeKHR Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = PerformanceCounterScopeKHR 0
pattern PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = PerformanceCounterScopeKHR 1
pattern PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR = PerformanceCounterScopeKHR 2
{-# complete PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR,
PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR,
PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR :: PerformanceCounterScopeKHR #-}
instance Show PerformanceCounterScopeKHR where
showsPrec p = \case
PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR -> showString "PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR"
PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR -> showString "PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR"
PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR -> showString "PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR"
PerformanceCounterScopeKHR x -> showParen (p >= 11) (showString "PerformanceCounterScopeKHR " . showsPrec 11 x)
instance Read PerformanceCounterScopeKHR where
readPrec = parens (choose [("PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR", pure PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR)
, ("PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR", pure PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR)
, ("PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR", pure PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR)]
+++
prec 10 (do
expectP (Ident "PerformanceCounterScopeKHR")
v <- step readPrec
pure (PerformanceCounterScopeKHR v)))
newtype PerformanceCounterUnitKHR = PerformanceCounterUnitKHR Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = PerformanceCounterUnitKHR 0
pattern PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = PerformanceCounterUnitKHR 1
pattern PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = PerformanceCounterUnitKHR 2
pattern PERFORMANCE_COUNTER_UNIT_BYTES_KHR = PerformanceCounterUnitKHR 3
pattern PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = PerformanceCounterUnitKHR 4
pattern PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = PerformanceCounterUnitKHR 5
pattern PERFORMANCE_COUNTER_UNIT_WATTS_KHR = PerformanceCounterUnitKHR 6
pattern PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = PerformanceCounterUnitKHR 7
pattern PERFORMANCE_COUNTER_UNIT_AMPS_KHR = PerformanceCounterUnitKHR 8
pattern PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = PerformanceCounterUnitKHR 9
pattern PERFORMANCE_COUNTER_UNIT_CYCLES_KHR = PerformanceCounterUnitKHR 10
{-# complete PERFORMANCE_COUNTER_UNIT_GENERIC_KHR,
PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR,
PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR,
PERFORMANCE_COUNTER_UNIT_BYTES_KHR,
PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR,
PERFORMANCE_COUNTER_UNIT_KELVIN_KHR,
PERFORMANCE_COUNTER_UNIT_WATTS_KHR,
PERFORMANCE_COUNTER_UNIT_VOLTS_KHR,
PERFORMANCE_COUNTER_UNIT_AMPS_KHR,
PERFORMANCE_COUNTER_UNIT_HERTZ_KHR,
PERFORMANCE_COUNTER_UNIT_CYCLES_KHR :: PerformanceCounterUnitKHR #-}
instance Show PerformanceCounterUnitKHR where
showsPrec p = \case
PERFORMANCE_COUNTER_UNIT_GENERIC_KHR -> showString "PERFORMANCE_COUNTER_UNIT_GENERIC_KHR"
PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR -> showString "PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR"
PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR -> showString "PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR"
PERFORMANCE_COUNTER_UNIT_BYTES_KHR -> showString "PERFORMANCE_COUNTER_UNIT_BYTES_KHR"
PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR -> showString "PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR"
PERFORMANCE_COUNTER_UNIT_KELVIN_KHR -> showString "PERFORMANCE_COUNTER_UNIT_KELVIN_KHR"
PERFORMANCE_COUNTER_UNIT_WATTS_KHR -> showString "PERFORMANCE_COUNTER_UNIT_WATTS_KHR"
PERFORMANCE_COUNTER_UNIT_VOLTS_KHR -> showString "PERFORMANCE_COUNTER_UNIT_VOLTS_KHR"
PERFORMANCE_COUNTER_UNIT_AMPS_KHR -> showString "PERFORMANCE_COUNTER_UNIT_AMPS_KHR"
PERFORMANCE_COUNTER_UNIT_HERTZ_KHR -> showString "PERFORMANCE_COUNTER_UNIT_HERTZ_KHR"
PERFORMANCE_COUNTER_UNIT_CYCLES_KHR -> showString "PERFORMANCE_COUNTER_UNIT_CYCLES_KHR"
PerformanceCounterUnitKHR x -> showParen (p >= 11) (showString "PerformanceCounterUnitKHR " . showsPrec 11 x)
instance Read PerformanceCounterUnitKHR where
readPrec = parens (choose [("PERFORMANCE_COUNTER_UNIT_GENERIC_KHR", pure PERFORMANCE_COUNTER_UNIT_GENERIC_KHR)
, ("PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR", pure PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR)
, ("PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR", pure PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
, ("PERFORMANCE_COUNTER_UNIT_BYTES_KHR", pure PERFORMANCE_COUNTER_UNIT_BYTES_KHR)
, ("PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR", pure PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR)
, ("PERFORMANCE_COUNTER_UNIT_KELVIN_KHR", pure PERFORMANCE_COUNTER_UNIT_KELVIN_KHR)
, ("PERFORMANCE_COUNTER_UNIT_WATTS_KHR", pure PERFORMANCE_COUNTER_UNIT_WATTS_KHR)
, ("PERFORMANCE_COUNTER_UNIT_VOLTS_KHR", pure PERFORMANCE_COUNTER_UNIT_VOLTS_KHR)
, ("PERFORMANCE_COUNTER_UNIT_AMPS_KHR", pure PERFORMANCE_COUNTER_UNIT_AMPS_KHR)
, ("PERFORMANCE_COUNTER_UNIT_HERTZ_KHR", pure PERFORMANCE_COUNTER_UNIT_HERTZ_KHR)
, ("PERFORMANCE_COUNTER_UNIT_CYCLES_KHR", pure PERFORMANCE_COUNTER_UNIT_CYCLES_KHR)]
+++
prec 10 (do
expectP (Ident "PerformanceCounterUnitKHR")
v <- step readPrec
pure (PerformanceCounterUnitKHR v)))
newtype PerformanceCounterStorageKHR = PerformanceCounterStorageKHR Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern PERFORMANCE_COUNTER_STORAGE_INT32_KHR = PerformanceCounterStorageKHR 0
pattern PERFORMANCE_COUNTER_STORAGE_INT64_KHR = PerformanceCounterStorageKHR 1
pattern PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = PerformanceCounterStorageKHR 2
pattern PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = PerformanceCounterStorageKHR 3
pattern PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = PerformanceCounterStorageKHR 4
pattern PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR = PerformanceCounterStorageKHR 5
{-# complete PERFORMANCE_COUNTER_STORAGE_INT32_KHR,
PERFORMANCE_COUNTER_STORAGE_INT64_KHR,
PERFORMANCE_COUNTER_STORAGE_UINT32_KHR,
PERFORMANCE_COUNTER_STORAGE_UINT64_KHR,
PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR,
PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR :: PerformanceCounterStorageKHR #-}
instance Show PerformanceCounterStorageKHR where
showsPrec p = \case
PERFORMANCE_COUNTER_STORAGE_INT32_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_INT32_KHR"
PERFORMANCE_COUNTER_STORAGE_INT64_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_INT64_KHR"
PERFORMANCE_COUNTER_STORAGE_UINT32_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_UINT32_KHR"
PERFORMANCE_COUNTER_STORAGE_UINT64_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_UINT64_KHR"
PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR"
PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR -> showString "PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR"
PerformanceCounterStorageKHR x -> showParen (p >= 11) (showString "PerformanceCounterStorageKHR " . showsPrec 11 x)
instance Read PerformanceCounterStorageKHR where
readPrec = parens (choose [("PERFORMANCE_COUNTER_STORAGE_INT32_KHR", pure PERFORMANCE_COUNTER_STORAGE_INT32_KHR)
, ("PERFORMANCE_COUNTER_STORAGE_INT64_KHR", pure PERFORMANCE_COUNTER_STORAGE_INT64_KHR)
, ("PERFORMANCE_COUNTER_STORAGE_UINT32_KHR", pure PERFORMANCE_COUNTER_STORAGE_UINT32_KHR)
, ("PERFORMANCE_COUNTER_STORAGE_UINT64_KHR", pure PERFORMANCE_COUNTER_STORAGE_UINT64_KHR)
, ("PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR", pure PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR)
, ("PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR", pure PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR)]
+++
prec 10 (do
expectP (Ident "PerformanceCounterStorageKHR")
v <- step readPrec
pure (PerformanceCounterStorageKHR v)))
newtype PerformanceCounterDescriptionFlagBitsKHR = PerformanceCounterDescriptionFlagBitsKHR Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
pattern PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = PerformanceCounterDescriptionFlagBitsKHR 0x00000001
pattern PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = PerformanceCounterDescriptionFlagBitsKHR 0x00000002
type PerformanceCounterDescriptionFlagsKHR = PerformanceCounterDescriptionFlagBitsKHR
instance Show PerformanceCounterDescriptionFlagBitsKHR where
showsPrec p = \case
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR -> showString "PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR"
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR -> showString "PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR"
PerformanceCounterDescriptionFlagBitsKHR x -> showParen (p >= 11) (showString "PerformanceCounterDescriptionFlagBitsKHR 0x" . showHex x)
instance Read PerformanceCounterDescriptionFlagBitsKHR where
readPrec = parens (choose [("PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR", pure PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR)
, ("PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR", pure PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR)]
+++
prec 10 (do
expectP (Ident "PerformanceCounterDescriptionFlagBitsKHR")
v <- step readPrec
pure (PerformanceCounterDescriptionFlagBitsKHR v)))
newtype AcquireProfilingLockFlagBitsKHR = AcquireProfilingLockFlagBitsKHR Flags
deriving newtype (Eq, Ord, Storable, Zero, Bits)
type AcquireProfilingLockFlagsKHR = AcquireProfilingLockFlagBitsKHR
instance Show AcquireProfilingLockFlagBitsKHR where
showsPrec p = \case
AcquireProfilingLockFlagBitsKHR x -> showParen (p >= 11) (showString "AcquireProfilingLockFlagBitsKHR 0x" . showHex x)
instance Read AcquireProfilingLockFlagBitsKHR where
readPrec = parens (choose []
+++
prec 10 (do
expectP (Ident "AcquireProfilingLockFlagBitsKHR")
v <- step readPrec
pure (AcquireProfilingLockFlagBitsKHR v)))
type KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1
pattern KHR_PERFORMANCE_QUERY_SPEC_VERSION :: forall a . Integral a => a
pattern KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1
type KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"
pattern KHR_PERFORMANCE_QUERY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"