{-# language CPP #-}
module 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 Vulkan.CStruct.Utils (FixedArray)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
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 GHC.Ptr (nullFunPtr)
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 GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
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 Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.BaseType (bool32ToBool)
import Vulkan.Core10.BaseType (boolToBool32)
import Vulkan.CStruct.Utils (lowerArrayPtr)
import Vulkan.CStruct.Utils (peekByteStringFromSizedVectorPtr)
import Vulkan.CStruct.Utils (pokeFixedLengthByteString)
import Vulkan.CStruct.Utils (pokeFixedLengthNullTerminatedByteString)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.BaseType (Bool32)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Dynamic (DeviceCmds(pVkAcquireProfilingLockKHR))
import Vulkan.Dynamic (DeviceCmds(pVkReleaseProfilingLockKHR))
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Core10.BaseType (Flags)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.Dynamic (InstanceCmds(pVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR))
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR))
import Vulkan.Core10.APIConstants (MAX_DESCRIPTION_SIZE)
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Core10.APIConstants (UUID_SIZE)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR))
import 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

-- | vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR -
-- Reports properties of the performance query counters available on a
-- queue family of a device
--
-- = Parameters
--
-- -   @physicalDevice@ is the handle to the physical device whose queue
--     family performance query counter properties will be queried.
--
-- -   @queueFamilyIndex@ is the index into the queue family of the
--     physical device we want to get properties for.
--
-- -   @pCounterCount@ is a pointer to an integer related to the number of
--     counters available or queried, as described below.
--
-- -   @pCounters@ is either @NULL@ or a pointer to an array of
--     'PerformanceCounterKHR' structures.
--
-- -   @pCounterDescriptions@ is either @NULL@ or a pointer to an array of
--     'PerformanceCounterDescriptionKHR' structures.
--
-- = Description
--
-- If @pCounters@ is @NULL@ and @pCounterDescriptions@ is @NULL@, then the
-- number of counters available is returned in @pCounterCount@. Otherwise,
-- @pCounterCount@ /must/ point to a variable set by the user to the number
-- of elements in the @pCounters@, @pCounterDescriptions@, or both arrays
-- and on return the variable is overwritten with the number of structures
-- actually written out. If @pCounterCount@ is less than the number of
-- counters available, at most @pCounterCount@ structures will be written
-- and 'Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned instead of
-- 'Vulkan.Core10.Enums.Result.SUCCESS'.
--
-- == Valid Usage (Implicit)
--
-- -   @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   @pCounterCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   If the value referenced by @pCounterCount@ is not @0@, and
--     @pCounters@ is not @NULL@, @pCounters@ /must/ be a valid pointer to
--     an array of @pCounterCount@ 'PerformanceCounterKHR' structures
--
-- -   If the value referenced by @pCounterCount@ is not @0@, and
--     @pCounterDescriptions@ is not @NULL@, @pCounterDescriptions@ /must/
--     be a valid pointer to an array of @pCounterCount@
--     'PerformanceCounterDescriptionKHR' structures
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_INITIALIZATION_FAILED'
--
-- = See Also
--
-- 'PerformanceCounterDescriptionKHR', 'PerformanceCounterKHR',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: forall io . MonadIO io => PhysicalDevice -> ("queueFamilyIndex" ::: Word32) -> io (Result, ("counters" ::: Vector PerformanceCounterKHR), ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR :: PhysicalDevice
-> ("queueFamilyIndex" ::: Word32)
-> io
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR physicalDevice :: PhysicalDevice
physicalDevice queueFamilyIndex :: "queueFamilyIndex" ::: Word32
queueFamilyIndex = IO
  (Result, "counters" ::: Vector PerformanceCounterKHR,
   "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> io
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
   (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> io
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> (ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> io
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  (Result, "counters" ::: Vector PerformanceCounterKHR,
   "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
  IO
  (Result, "counters" ::: Vector PerformanceCounterKHR,
   "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
   IO
   (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> io
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> io
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ do
  let vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHRPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHRPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("queueFamilyIndex" ::: Word32)
      -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
      -> ("pCounters" ::: Ptr PerformanceCounterKHR)
      -> ("pCounterDescriptions"
          ::: Ptr PerformanceCounterDescriptionKHR)
      -> IO Result)
pVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
  IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHRPtr FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("queueFamilyIndex" ::: Word32)
      -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
      -> ("pCounters" ::: Ptr PerformanceCounterKHR)
      -> ("pCounterDescriptions"
          ::: Ptr PerformanceCounterDescriptionKHR)
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' :: Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> ("pCounterDescriptions"
    ::: Ptr PerformanceCounterDescriptionKHR)
-> IO Result
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' = FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
-> Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> ("pCounterDescriptions"
    ::: Ptr PerformanceCounterDescriptionKHR)
-> IO Result
mkVkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR FunPtr
  (Ptr PhysicalDevice_T
   -> ("queueFamilyIndex" ::: Word32)
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> ("pCounters" ::: Ptr PerformanceCounterKHR)
   -> ("pCounterDescriptions"
       ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO Result)
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHRPtr
  let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
  "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterCount <- ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO
        (Result, "counters" ::: Vector PerformanceCounterKHR,
         "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO ())
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)) -> IO ()
forall a. Ptr a -> IO ()
free
  Result
r <- IO Result
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      Result)
-> IO Result
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     Result
forall a b. (a -> b) -> a -> b
$ Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> ("pCounterDescriptions"
    ::: Ptr PerformanceCounterDescriptionKHR)
-> IO Result
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' Ptr PhysicalDevice_T
physicalDevice' ("queueFamilyIndex" ::: Word32
queueFamilyIndex) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterCount) ("pCounters" ::: Ptr PerformanceCounterKHR
forall a. Ptr a
nullPtr) ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
forall a. Ptr a
nullPtr)
  IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))
  "queueFamilyIndex" ::: Word32
pCounterCount <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterCount
  "pCounters" ::: Ptr PerformanceCounterKHR
pPCounters <- ((("pCounters" ::: Ptr PerformanceCounterKHR)
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounters" ::: Ptr PerformanceCounterKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounters" ::: Ptr PerformanceCounterKHR)
   -> IO
        (Result, "counters" ::: Vector PerformanceCounterKHR,
         "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("pCounters" ::: Ptr PerformanceCounterKHR))
-> ((("pCounters" ::: Ptr PerformanceCounterKHR)
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounters" ::: Ptr PerformanceCounterKHR)
forall a b. (a -> b) -> a -> b
$ IO ("pCounters" ::: Ptr PerformanceCounterKHR)
-> (("pCounters" ::: Ptr PerformanceCounterKHR) -> IO ())
-> (("pCounters" ::: Ptr PerformanceCounterKHR)
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pCounters" ::: Ptr PerformanceCounterKHR)
forall a. Int -> IO (Ptr a)
callocBytes @PerformanceCounterKHR ((("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pCounterCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48)) ("pCounters" ::: Ptr PerformanceCounterKHR) -> IO ()
forall a. Ptr a -> IO ()
free
  [()]
_ <- (Int
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> [Int]
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     [()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\i :: Int
i -> ((()
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
   -> IO
        (Result, "counters" ::: Vector PerformanceCounterKHR,
         "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> ((()
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ ("pCounters" ::: Ptr PerformanceCounterKHR)
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pCounters" ::: Ptr PerformanceCounterKHR
pPCounters ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> "pCounters" ::: Ptr PerformanceCounterKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* 48) :: Ptr PerformanceCounterKHR) (IO
   (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ((()
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> (()
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ()
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ ())) [0..(("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pCounterCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- 1]
  "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
pPCounterDescriptions <- ((("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounterDescriptions"
    ::: Ptr PerformanceCounterDescriptionKHR)
   -> IO
        (Result, "counters" ::: Vector PerformanceCounterKHR,
         "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR))
-> ((("pCounterDescriptions"
      ::: Ptr PerformanceCounterDescriptionKHR)
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ IO
  ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> (("pCounterDescriptions"
     ::: Ptr PerformanceCounterDescriptionKHR)
    -> IO ())
-> (("pCounterDescriptions"
     ::: Ptr PerformanceCounterDescriptionKHR)
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int
-> IO
     ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
forall a. Int -> IO (Ptr a)
callocBytes @PerformanceCounterDescriptionKHR ((("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pCounterCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 792)) ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO ()
forall a. Ptr a -> IO ()
free
  [()]
_ <- (Int
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> [Int]
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     [()]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse (\i :: Int
i -> ((()
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
   -> IO
        (Result, "counters" ::: Vector PerformanceCounterKHR,
         "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
  -> IO
       (Result, "counters" ::: Vector PerformanceCounterKHR,
        "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> ((()
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
pPCounterDescriptions ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int
-> "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* 792) :: Ptr PerformanceCounterDescriptionKHR) (IO
   (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ((()
     -> IO
          (Result, "counters" ::: Vector PerformanceCounterKHR,
           "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> (()
    -> IO
         (Result, "counters" ::: Vector PerformanceCounterKHR,
          "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
 -> IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> ()
-> IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ ())) [0..(("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral ("queueFamilyIndex" ::: Word32
pCounterCount)) Int -> Int -> Int
forall a. Num a => a -> a -> a
- 1]
  Result
r' <- IO Result
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      Result)
-> IO Result
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     Result
forall a b. (a -> b) -> a -> b
$ Ptr PhysicalDevice_T
-> ("queueFamilyIndex" ::: Word32)
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> ("pCounterDescriptions"
    ::: Ptr PerformanceCounterDescriptionKHR)
-> IO Result
vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' Ptr PhysicalDevice_T
physicalDevice' ("queueFamilyIndex" ::: Word32
queueFamilyIndex) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterCount) (("pCounters" ::: Ptr PerformanceCounterKHR
pPCounters)) (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
pPCounterDescriptions))
  IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ())
-> IO ()
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r' Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r'))
  "queueFamilyIndex" ::: Word32
pCounterCount' <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterCount
  let x33 :: "queueFamilyIndex" ::: Word32
x33 = "queueFamilyIndex" ::: Word32
pCounterCount'
  "counters" ::: Vector PerformanceCounterKHR
pCounters' <- IO ("counters" ::: Vector PerformanceCounterKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("counters" ::: Vector PerformanceCounterKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("counters" ::: Vector PerformanceCounterKHR)
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("counters" ::: Vector PerformanceCounterKHR))
-> IO ("counters" ::: Vector PerformanceCounterKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("counters" ::: Vector PerformanceCounterKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PerformanceCounterKHR)
-> IO ("counters" ::: Vector PerformanceCounterKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "queueFamilyIndex" ::: Word32
x33) (\i :: Int
i -> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> IO PerformanceCounterKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PerformanceCounterKHR ((("pCounters" ::: Ptr PerformanceCounterKHR
pPCounters) ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> "pCounters" ::: Ptr PerformanceCounterKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (48 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PerformanceCounterKHR)))
  "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR
pCounterDescriptions' <- IO
  ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO
   ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      ("counterDescriptions"
       ::: Vector PerformanceCounterDescriptionKHR))
-> IO
     ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ Int
-> (Int -> IO PerformanceCounterDescriptionKHR)
-> IO
     ("counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "queueFamilyIndex" ::: Word32
x33) (\i :: Int
i -> ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO PerformanceCounterDescriptionKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @PerformanceCounterDescriptionKHR ((("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
pPCounterDescriptions) ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int
-> "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (792 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr PerformanceCounterDescriptionKHR)))
  (Result, "counters" ::: Vector PerformanceCounterKHR,
 "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure ((Result, "counters" ::: Vector PerformanceCounterKHR,
  "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
 -> ContT
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
      IO
      (Result, "counters" ::: Vector PerformanceCounterKHR,
       "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR))
-> (Result, "counters" ::: Vector PerformanceCounterKHR,
    "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
-> ContT
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
     IO
     (Result, "counters" ::: Vector PerformanceCounterKHR,
      "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR)
forall a b. (a -> b) -> a -> b
$ ((Result
r'), "counters" ::: Vector PerformanceCounterKHR
pCounters', "counterDescriptions" ::: Vector PerformanceCounterDescriptionKHR
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 ()

-- | vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR - Reports the
-- number of passes require for a performance query pool type
--
-- = Parameters
--
-- -   @physicalDevice@ is the handle to the physical device whose queue
--     family performance query counter properties will be queried.
--
-- -   @pPerformanceQueryCreateInfo@ is a pointer to a
--     'QueryPoolPerformanceCreateInfoKHR' of the performance query that is
--     to be created.
--
-- -   @pNumPasses@ is a pointer to an integer related to the number of
--     passes required to query the performance query pool, as described
--     below.
--
-- = Description
--
-- The @pPerformanceQueryCreateInfo@ member
-- 'QueryPoolPerformanceCreateInfoKHR'::@queueFamilyIndex@ /must/ be a
-- queue family of @physicalDevice@. The number of passes required to
-- capture the counters specified in the @pPerformanceQueryCreateInfo@
-- member 'QueryPoolPerformanceCreateInfoKHR'::@pCounters@ is returned in
-- @pNumPasses@.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.PhysicalDevice',
-- 'QueryPoolPerformanceCreateInfoKHR'
getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: forall io . MonadIO io => PhysicalDevice -> ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR) -> io (("numPasses" ::: Word32))
getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR :: PhysicalDevice
-> ("performanceQueryCreateInfo"
    ::: QueryPoolPerformanceCreateInfoKHR)
-> io ("queueFamilyIndex" ::: Word32)
getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR physicalDevice :: PhysicalDevice
physicalDevice performanceQueryCreateInfo :: "performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR
performanceQueryCreateInfo = IO ("queueFamilyIndex" ::: Word32)
-> io ("queueFamilyIndex" ::: Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ("queueFamilyIndex" ::: Word32)
 -> io ("queueFamilyIndex" ::: Word32))
-> (ContT
      ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
    -> IO ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
-> io ("queueFamilyIndex" ::: Word32)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
-> IO ("queueFamilyIndex" ::: Word32)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
 -> io ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
-> io ("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHRPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHRPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("pPerformanceQueryCreateInfo"
          ::: Ptr
                ("performanceQueryCreateInfo"
                 ::: QueryPoolPerformanceCreateInfoKHR))
      -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
      -> IO ())
pVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR (PhysicalDevice -> InstanceCmds
instanceCmds (PhysicalDevice
physicalDevice :: PhysicalDevice))
  IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ())
-> IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHRPtr FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
-> FunPtr
     (Ptr PhysicalDevice_T
      -> ("pPerformanceQueryCreateInfo"
          ::: Ptr
                ("performanceQueryCreateInfo"
                 ::: QueryPoolPerformanceCreateInfoKHR))
      -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
      -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' :: Ptr PhysicalDevice_T
-> ("pPerformanceQueryCreateInfo"
    ::: Ptr
          ("performanceQueryCreateInfo"
           ::: QueryPoolPerformanceCreateInfoKHR))
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' = FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
-> Ptr PhysicalDevice_T
-> ("pPerformanceQueryCreateInfo"
    ::: Ptr
          ("performanceQueryCreateInfo"
           ::: QueryPoolPerformanceCreateInfoKHR))
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
mkVkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR FunPtr
  (Ptr PhysicalDevice_T
   -> ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR))
   -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ())
vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHRPtr
  "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
pPerformanceQueryCreateInfo <- ((("pPerformanceQueryCreateInfo"
   ::: Ptr
         ("performanceQueryCreateInfo"
          ::: QueryPoolPerformanceCreateInfoKHR))
  -> IO ("queueFamilyIndex" ::: Word32))
 -> IO ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32)
     IO
     ("pPerformanceQueryCreateInfo"
      ::: Ptr
            ("performanceQueryCreateInfo"
             ::: QueryPoolPerformanceCreateInfoKHR))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pPerformanceQueryCreateInfo"
    ::: Ptr
          ("performanceQueryCreateInfo"
           ::: QueryPoolPerformanceCreateInfoKHR))
   -> IO ("queueFamilyIndex" ::: Word32))
  -> IO ("queueFamilyIndex" ::: Word32))
 -> ContT
      ("queueFamilyIndex" ::: Word32)
      IO
      ("pPerformanceQueryCreateInfo"
       ::: Ptr
             ("performanceQueryCreateInfo"
              ::: QueryPoolPerformanceCreateInfoKHR)))
-> ((("pPerformanceQueryCreateInfo"
      ::: Ptr
            ("performanceQueryCreateInfo"
             ::: QueryPoolPerformanceCreateInfoKHR))
     -> IO ("queueFamilyIndex" ::: Word32))
    -> IO ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32)
     IO
     ("pPerformanceQueryCreateInfo"
      ::: Ptr
            ("performanceQueryCreateInfo"
             ::: QueryPoolPerformanceCreateInfoKHR))
forall a b. (a -> b) -> a -> b
$ ("performanceQueryCreateInfo"
 ::: QueryPoolPerformanceCreateInfoKHR)
-> (("pPerformanceQueryCreateInfo"
     ::: Ptr
           ("performanceQueryCreateInfo"
            ::: QueryPoolPerformanceCreateInfoKHR))
    -> IO ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct ("performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR
performanceQueryCreateInfo)
  "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPNumPasses <- ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
  -> IO ("queueFamilyIndex" ::: Word32))
 -> IO ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32)
     IO
     ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO ("queueFamilyIndex" ::: Word32))
  -> IO ("queueFamilyIndex" ::: Word32))
 -> ContT
      ("queueFamilyIndex" ::: Word32)
      IO
      ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
     -> IO ("queueFamilyIndex" ::: Word32))
    -> IO ("queueFamilyIndex" ::: Word32))
-> ContT
     ("queueFamilyIndex" ::: Word32)
     IO
     ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO ())
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (Int -> IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a. Int -> IO (Ptr a)
callocBytes @Word32 4) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)) -> IO ()
forall a. Ptr a -> IO ()
free
  IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ())
-> IO () -> ContT ("queueFamilyIndex" ::: Word32) IO ()
forall a b. (a -> b) -> a -> b
$ Ptr PhysicalDevice_T
-> ("pPerformanceQueryCreateInfo"
    ::: Ptr
          ("performanceQueryCreateInfo"
           ::: QueryPoolPerformanceCreateInfoKHR))
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR' (PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)) "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
pPerformanceQueryCreateInfo ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPNumPasses)
  "queueFamilyIndex" ::: Word32
pNumPasses <- IO ("queueFamilyIndex" ::: Word32)
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ("queueFamilyIndex" ::: Word32)
 -> ContT
      ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPNumPasses
  ("queueFamilyIndex" ::: Word32)
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("queueFamilyIndex" ::: Word32)
 -> ContT
      ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32)
-> ContT
     ("queueFamilyIndex" ::: Word32) IO ("queueFamilyIndex" ::: Word32)
forall a b. (a -> b) -> a -> b
$ ("queueFamilyIndex" ::: Word32
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

-- | vkAcquireProfilingLockKHR - Acquires the profiling lock
--
-- = Parameters
--
-- -   @device@ is the logical device to profile.
--
-- -   @pInfo@ is a pointer to a 'AcquireProfilingLockInfoKHR' structure
--     which contains information about how the profiling is to be
--     acquired.
--
-- = Description
--
-- Implementations /may/ allow multiple actors to hold the profiling lock
-- concurrently.
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.TIMEOUT'
--
-- = See Also
--
-- 'AcquireProfilingLockInfoKHR', 'Vulkan.Core10.Handles.Device'
acquireProfilingLockKHR :: forall io . MonadIO io => Device -> AcquireProfilingLockInfoKHR -> io ()
acquireProfilingLockKHR :: Device -> AcquireProfilingLockInfoKHR -> io ()
acquireProfilingLockKHR device :: Device
device info :: AcquireProfilingLockInfoKHR
info = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkAcquireProfilingLockKHRPtr :: FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
vkAcquireProfilingLockKHRPtr = DeviceCmds
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
pVkAcquireProfilingLockKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
vkAcquireProfilingLockKHRPtr FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
-> FunPtr
     (Ptr Device_T
      -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkAcquireProfilingLockKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkAcquireProfilingLockKHR' :: Ptr Device_T
-> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result
vkAcquireProfilingLockKHR' = FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
-> Ptr Device_T
-> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> IO Result
mkVkAcquireProfilingLockKHR FunPtr
  (Ptr Device_T
   -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result)
vkAcquireProfilingLockKHRPtr
  "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
pInfo <- ((("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO ()) -> IO ())
-> ContT () IO ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO ())
  -> IO ())
 -> ContT () IO ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR))
-> ((("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO ())
    -> IO ())
-> ContT () IO ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
forall a b. (a -> b) -> a -> b
$ AcquireProfilingLockInfoKHR
-> (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO ())
-> IO ()
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
withCStruct (AcquireProfilingLockInfoKHR
info)
  Result
r <- IO Result -> ContT () IO Result
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO Result -> ContT () IO Result)
-> IO Result -> ContT () IO Result
forall a b. (a -> b) -> a -> b
$ Ptr Device_T
-> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO Result
vkAcquireProfilingLockKHR' (Device -> Ptr Device_T
deviceHandle (Device
device)) "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
pInfo
  IO () -> ContT () IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (Result
r Result -> Result -> Bool
forall a. Ord a => a -> a -> Bool
< Result
SUCCESS) (VulkanException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (Result -> VulkanException
VulkanException Result
r))


foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkReleaseProfilingLockKHR
  :: FunPtr (Ptr Device_T -> IO ()) -> Ptr Device_T -> IO ()

-- | vkReleaseProfilingLockKHR - Releases the profiling lock
--
-- = Parameters
--
-- -   @device@ is the logical device to cease profiling on.
--
-- == Valid Usage
--
-- -   The profiling lock of @device@ /must/ have been held via a previous
--     successful call to 'acquireProfilingLockKHR'
--
-- == Valid Usage (Implicit)
--
-- -   @device@ /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Device'
releaseProfilingLockKHR :: forall io . MonadIO io => Device -> io ()
releaseProfilingLockKHR :: Device -> io ()
releaseProfilingLockKHR device :: Device
device = IO () -> io ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ()) -> IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
  let vkReleaseProfilingLockKHRPtr :: FunPtr (Ptr Device_T -> IO ())
vkReleaseProfilingLockKHRPtr = DeviceCmds -> FunPtr (Ptr Device_T -> IO ())
pVkReleaseProfilingLockKHR (Device -> DeviceCmds
deviceCmds (Device
device :: Device))
  Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr (Ptr Device_T -> IO ())
vkReleaseProfilingLockKHRPtr FunPtr (Ptr Device_T -> IO ())
-> FunPtr (Ptr Device_T -> IO ()) -> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr (Ptr Device_T -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
    IOException -> IO ()
forall e a. Exception e => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument "" "The function pointer for vkReleaseProfilingLockKHR is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkReleaseProfilingLockKHR' :: Ptr Device_T -> IO ()
vkReleaseProfilingLockKHR' = FunPtr (Ptr Device_T -> IO ()) -> Ptr Device_T -> IO ()
mkVkReleaseProfilingLockKHR FunPtr (Ptr Device_T -> IO ())
vkReleaseProfilingLockKHRPtr
  Ptr Device_T -> IO ()
vkReleaseProfilingLockKHR' (Device -> Ptr Device_T
deviceHandle (Device
device))
  () -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure (() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ()


-- | VkPhysicalDevicePerformanceQueryFeaturesKHR - Structure describing
-- performance query support for an implementation
--
-- = Members
--
-- The members of the 'PhysicalDevicePerformanceQueryFeaturesKHR' structure
-- describe the following implementation-dependent features:
--
-- == Valid Usage (Implicit)
--
-- To query supported performance counter query pool features, call
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2'
-- with a 'PhysicalDevicePerformanceQueryFeaturesKHR' structure included in
-- the @pNext@ chain of its @pFeatures@ parameter. The
-- 'PhysicalDevicePerformanceQueryFeaturesKHR' structure /can/ also be
-- included in the @pNext@ chain of a
-- 'Vulkan.Core10.Device.DeviceCreateInfo' structure, in which case it
-- controls which additional features are enabled in the device.
--
-- = See Also
--
-- 'Vulkan.Core10.BaseType.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePerformanceQueryFeaturesKHR = PhysicalDevicePerformanceQueryFeaturesKHR
  { -- | @performanceCounterQueryPools@ is 'Vulkan.Core10.BaseType.TRUE' if the
    -- physical device supports performance counter query pools.
    PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
performanceCounterQueryPools :: Bool
  , -- | @performanceCounterMultipleQueryPools@ is
    -- 'Vulkan.Core10.BaseType.TRUE'\` if the physical device supports using
    -- multiple performance query pools in a primary command buffer and
    -- secondary command buffers executed within it.
    PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
performanceCounterMultipleQueryPools :: Bool
  }
  deriving (Typeable)
deriving instance Show PhysicalDevicePerformanceQueryFeaturesKHR

instance ToCStruct PhysicalDevicePerformanceQueryFeaturesKHR where
  withCStruct :: PhysicalDevicePerformanceQueryFeaturesKHR
-> (Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b) -> IO b
withCStruct x :: PhysicalDevicePerformanceQueryFeaturesKHR
x f :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p -> Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p PhysicalDevicePerformanceQueryFeaturesKHR
x (Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b
f Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p)
  pokeCStruct :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p PhysicalDevicePerformanceQueryFeaturesKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
performanceCounterQueryPools))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
performanceCounterMultipleQueryPools))
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDevicePerformanceQueryFeaturesKHR where
  peekCStruct :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> IO PhysicalDevicePerformanceQueryFeaturesKHR
peekCStruct p :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p = do
    Bool32
performanceCounterQueryPools <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
    Bool32
performanceCounterMultipleQueryPools <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePerformanceQueryFeaturesKHR
p Ptr PhysicalDevicePerformanceQueryFeaturesKHR -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Bool32))
    PhysicalDevicePerformanceQueryFeaturesKHR
-> IO PhysicalDevicePerformanceQueryFeaturesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePerformanceQueryFeaturesKHR
 -> IO PhysicalDevicePerformanceQueryFeaturesKHR)
-> PhysicalDevicePerformanceQueryFeaturesKHR
-> IO PhysicalDevicePerformanceQueryFeaturesKHR
forall a b. (a -> b) -> a -> b
$ Bool -> Bool -> PhysicalDevicePerformanceQueryFeaturesKHR
PhysicalDevicePerformanceQueryFeaturesKHR
             (Bool32 -> Bool
bool32ToBool Bool32
performanceCounterQueryPools) (Bool32 -> Bool
bool32ToBool Bool32
performanceCounterMultipleQueryPools)

instance Storable PhysicalDevicePerformanceQueryFeaturesKHR where
  sizeOf :: PhysicalDevicePerformanceQueryFeaturesKHR -> Int
sizeOf ~PhysicalDevicePerformanceQueryFeaturesKHR
_ = 24
  alignment :: PhysicalDevicePerformanceQueryFeaturesKHR -> Int
alignment ~PhysicalDevicePerformanceQueryFeaturesKHR
_ = 8
  peek :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> IO PhysicalDevicePerformanceQueryFeaturesKHR
peek = Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> IO PhysicalDevicePerformanceQueryFeaturesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> IO ()
poke ptr :: Ptr PhysicalDevicePerformanceQueryFeaturesKHR
ptr poked :: PhysicalDevicePerformanceQueryFeaturesKHR
poked = Ptr PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePerformanceQueryFeaturesKHR
ptr PhysicalDevicePerformanceQueryFeaturesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDevicePerformanceQueryFeaturesKHR where
  zero :: PhysicalDevicePerformanceQueryFeaturesKHR
zero = Bool -> Bool -> PhysicalDevicePerformanceQueryFeaturesKHR
PhysicalDevicePerformanceQueryFeaturesKHR
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero


-- | VkPhysicalDevicePerformanceQueryPropertiesKHR - Structure describing
-- performance query properties for an implementation
--
-- = Members
--
-- The members of the 'PhysicalDevicePerformanceQueryPropertiesKHR'
-- structure describe the following implementation-dependent properties:
--
-- == Valid Usage (Implicit)
--
-- If the 'PhysicalDevicePerformanceQueryPropertiesKHR' structure is
-- included in the @pNext@ chain of
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2',
-- it is filled with the implementation-dependent properties.
--
-- = See Also
--
-- 'Vulkan.Core10.BaseType.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePerformanceQueryPropertiesKHR = PhysicalDevicePerformanceQueryPropertiesKHR
  { -- | @allowCommandBufferQueryCopies@ is 'Vulkan.Core10.BaseType.TRUE' if the
    -- performance query pools are allowed to be used with
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdCopyQueryPoolResults'.
    PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
allowCommandBufferQueryCopies :: Bool }
  deriving (Typeable)
deriving instance Show PhysicalDevicePerformanceQueryPropertiesKHR

instance ToCStruct PhysicalDevicePerformanceQueryPropertiesKHR where
  withCStruct :: PhysicalDevicePerformanceQueryPropertiesKHR
-> (Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b)
-> IO b
withCStruct x :: PhysicalDevicePerformanceQueryPropertiesKHR
x f :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b
f = Int
-> Int
-> (Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b) -> IO b)
-> (Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p -> Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p PhysicalDevicePerformanceQueryPropertiesKHR
x (Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b
f Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p)
  pokeCStruct :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> IO b -> IO b
pokeCStruct p :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p PhysicalDevicePerformanceQueryPropertiesKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
allowCommandBufferQueryCopies))
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDevicePerformanceQueryPropertiesKHR where
  peekCStruct :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> IO PhysicalDevicePerformanceQueryPropertiesKHR
peekCStruct p :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p = do
    Bool32
allowCommandBufferQueryCopies <- Ptr Bool32 -> IO Bool32
forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDevicePerformanceQueryPropertiesKHR
p Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Bool32))
    PhysicalDevicePerformanceQueryPropertiesKHR
-> IO PhysicalDevicePerformanceQueryPropertiesKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PhysicalDevicePerformanceQueryPropertiesKHR
 -> IO PhysicalDevicePerformanceQueryPropertiesKHR)
-> PhysicalDevicePerformanceQueryPropertiesKHR
-> IO PhysicalDevicePerformanceQueryPropertiesKHR
forall a b. (a -> b) -> a -> b
$ Bool -> PhysicalDevicePerformanceQueryPropertiesKHR
PhysicalDevicePerformanceQueryPropertiesKHR
             (Bool32 -> Bool
bool32ToBool Bool32
allowCommandBufferQueryCopies)

instance Storable PhysicalDevicePerformanceQueryPropertiesKHR where
  sizeOf :: PhysicalDevicePerformanceQueryPropertiesKHR -> Int
sizeOf ~PhysicalDevicePerformanceQueryPropertiesKHR
_ = 24
  alignment :: PhysicalDevicePerformanceQueryPropertiesKHR -> Int
alignment ~PhysicalDevicePerformanceQueryPropertiesKHR
_ = 8
  peek :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> IO PhysicalDevicePerformanceQueryPropertiesKHR
peek = Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> IO PhysicalDevicePerformanceQueryPropertiesKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> IO ()
poke ptr :: Ptr PhysicalDevicePerformanceQueryPropertiesKHR
ptr poked :: PhysicalDevicePerformanceQueryPropertiesKHR
poked = Ptr PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDevicePerformanceQueryPropertiesKHR
ptr PhysicalDevicePerformanceQueryPropertiesKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDevicePerformanceQueryPropertiesKHR where
  zero :: PhysicalDevicePerformanceQueryPropertiesKHR
zero = Bool -> PhysicalDevicePerformanceQueryPropertiesKHR
PhysicalDevicePerformanceQueryPropertiesKHR
           Bool
forall a. Zero a => a
zero


-- | VkPerformanceCounterKHR - Structure providing information about a
-- counter
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'PerformanceCounterScopeKHR', 'PerformanceCounterStorageKHR',
-- 'PerformanceCounterUnitKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR'
data PerformanceCounterKHR = PerformanceCounterKHR
  { -- | @unit@ is a 'PerformanceCounterUnitKHR' specifying the unit that the
    -- counter data will record.
    PerformanceCounterKHR -> PerformanceCounterUnitKHR
unit :: PerformanceCounterUnitKHR
  , -- | @scope@ is a 'PerformanceCounterScopeKHR' specifying the scope that the
    -- counter belongs to.
    PerformanceCounterKHR -> PerformanceCounterScopeKHR
scope :: PerformanceCounterScopeKHR
  , -- | @storage@ is a 'PerformanceCounterStorageKHR' specifying the storage
    -- type that the counter’s data uses.
    PerformanceCounterKHR -> PerformanceCounterStorageKHR
storage :: PerformanceCounterStorageKHR
  , -- | @uuid@ is an array of size 'Vulkan.Core10.APIConstants.UUID_SIZE',
    -- containing 8-bit values that represent a universally unique identifier
    -- for the counter of the physical device.
    PerformanceCounterKHR -> ByteString
uuid :: ByteString
  }
  deriving (Typeable)
deriving instance Show PerformanceCounterKHR

instance ToCStruct PerformanceCounterKHR where
  withCStruct :: PerformanceCounterKHR
-> (("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b) -> IO b
withCStruct x :: PerformanceCounterKHR
x f :: ("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b
f = Int
-> Int
-> (("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 48 8 ((("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b) -> IO b)
-> (("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCounters" ::: Ptr PerformanceCounterKHR
p -> ("pCounters" ::: Ptr PerformanceCounterKHR)
-> PerformanceCounterKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCounters" ::: Ptr PerformanceCounterKHR
p PerformanceCounterKHR
x (("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b
f "pCounters" ::: Ptr PerformanceCounterKHR
p)
  pokeCStruct :: ("pCounters" ::: Ptr PerformanceCounterKHR)
-> PerformanceCounterKHR -> IO b -> IO b
pokeCStruct p :: "pCounters" ::: Ptr PerformanceCounterKHR
p PerformanceCounterKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterUnitKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterUnitKHR)) (PerformanceCounterUnitKHR
unit)
    Ptr PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterScopeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr PerformanceCounterScopeKHR)) (PerformanceCounterScopeKHR
scope)
    Ptr PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterStorageKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PerformanceCounterStorageKHR)) (PerformanceCounterStorageKHR
storage)
    Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
uuid)
    IO b
f
  cStructSize :: Int
cStructSize = 48
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCounters" ::: Ptr PerformanceCounterKHR) -> IO b -> IO b
pokeZeroCStruct p :: "pCounters" ::: Ptr PerformanceCounterKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR) -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterUnitKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterUnitKHR)) (PerformanceCounterUnitKHR
forall a. Zero a => a
zero)
    Ptr PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterScopeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr PerformanceCounterScopeKHR)) (PerformanceCounterScopeKHR
forall a. Zero a => a
zero)
    Ptr PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterStorageKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PerformanceCounterStorageKHR)) (PerformanceCounterStorageKHR
forall a. Zero a => a
zero)
    Ptr (FixedArray UUID_SIZE Word8) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> ByteString -> IO ()
pokeFixedLengthByteString (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8))) (ByteString
forall a. Monoid a => a
mempty)
    IO b
f

instance FromCStruct PerformanceCounterKHR where
  peekCStruct :: ("pCounters" ::: Ptr PerformanceCounterKHR)
-> IO PerformanceCounterKHR
peekCStruct p :: "pCounters" ::: Ptr PerformanceCounterKHR
p = do
    PerformanceCounterUnitKHR
unit <- Ptr PerformanceCounterUnitKHR -> IO PerformanceCounterUnitKHR
forall a. Storable a => Ptr a -> IO a
peek @PerformanceCounterUnitKHR (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterUnitKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterUnitKHR))
    PerformanceCounterScopeKHR
scope <- Ptr PerformanceCounterScopeKHR -> IO PerformanceCounterScopeKHR
forall a. Storable a => Ptr a -> IO a
peek @PerformanceCounterScopeKHR (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterScopeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr PerformanceCounterScopeKHR))
    PerformanceCounterStorageKHR
storage <- Ptr PerformanceCounterStorageKHR -> IO PerformanceCounterStorageKHR
forall a. Storable a => Ptr a -> IO a
peek @PerformanceCounterStorageKHR (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr PerformanceCounterStorageKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr PerformanceCounterStorageKHR))
    ByteString
uuid <- Ptr (FixedArray UUID_SIZE Word8) -> IO ByteString
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n Word8) -> IO ByteString
peekByteStringFromSizedVectorPtr (("pCounters" ::: Ptr PerformanceCounterKHR
p ("pCounters" ::: Ptr PerformanceCounterKHR)
-> Int -> Ptr (FixedArray UUID_SIZE Word8)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 28 :: Ptr (FixedArray UUID_SIZE Word8)))
    PerformanceCounterKHR -> IO PerformanceCounterKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PerformanceCounterKHR -> IO PerformanceCounterKHR)
-> PerformanceCounterKHR -> IO PerformanceCounterKHR
forall a b. (a -> b) -> a -> b
$ PerformanceCounterUnitKHR
-> PerformanceCounterScopeKHR
-> PerformanceCounterStorageKHR
-> ByteString
-> PerformanceCounterKHR
PerformanceCounterKHR
             PerformanceCounterUnitKHR
unit PerformanceCounterScopeKHR
scope PerformanceCounterStorageKHR
storage ByteString
uuid

instance Storable PerformanceCounterKHR where
  sizeOf :: PerformanceCounterKHR -> Int
sizeOf ~PerformanceCounterKHR
_ = 48
  alignment :: PerformanceCounterKHR -> Int
alignment ~PerformanceCounterKHR
_ = 8
  peek :: ("pCounters" ::: Ptr PerformanceCounterKHR)
-> IO PerformanceCounterKHR
peek = ("pCounters" ::: Ptr PerformanceCounterKHR)
-> IO PerformanceCounterKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pCounters" ::: Ptr PerformanceCounterKHR)
-> PerformanceCounterKHR -> IO ()
poke ptr :: "pCounters" ::: Ptr PerformanceCounterKHR
ptr poked :: PerformanceCounterKHR
poked = ("pCounters" ::: Ptr PerformanceCounterKHR)
-> PerformanceCounterKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCounters" ::: Ptr PerformanceCounterKHR
ptr PerformanceCounterKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PerformanceCounterKHR where
  zero :: PerformanceCounterKHR
zero = PerformanceCounterUnitKHR
-> PerformanceCounterScopeKHR
-> PerformanceCounterStorageKHR
-> ByteString
-> PerformanceCounterKHR
PerformanceCounterKHR
           PerformanceCounterUnitKHR
forall a. Zero a => a
zero
           PerformanceCounterScopeKHR
forall a. Zero a => a
zero
           PerformanceCounterStorageKHR
forall a. Zero a => a
zero
           ByteString
forall a. Monoid a => a
mempty


-- | VkPerformanceCounterDescriptionKHR - Structure providing more detailed
-- information about a counter
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'PerformanceCounterDescriptionFlagsKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR'
data PerformanceCounterDescriptionKHR = PerformanceCounterDescriptionKHR
  { -- | @flags@ is a bitmask of 'PerformanceCounterDescriptionFlagBitsKHR'
    -- indicating the usage behavior for the counter.
    PerformanceCounterDescriptionKHR
-> PerformanceCounterDescriptionFlagsKHR
flags :: PerformanceCounterDescriptionFlagsKHR
  , -- | @name@ is an array of size
    -- 'Vulkan.Core10.APIConstants.MAX_DESCRIPTION_SIZE', containing a
    -- null-terminated UTF-8 string specifying the name of the counter.
    PerformanceCounterDescriptionKHR -> ByteString
name :: ByteString
  , -- | @category@ is an array of size
    -- 'Vulkan.Core10.APIConstants.MAX_DESCRIPTION_SIZE', containing a
    -- null-terminated UTF-8 string specifying the category of the counter.
    PerformanceCounterDescriptionKHR -> ByteString
category :: ByteString
  , -- | @description@ is an array of size
    -- 'Vulkan.Core10.APIConstants.MAX_DESCRIPTION_SIZE', containing a
    -- null-terminated UTF-8 string specifying the description of the counter.
    PerformanceCounterDescriptionKHR -> ByteString
description :: ByteString
  }
  deriving (Typeable)
deriving instance Show PerformanceCounterDescriptionKHR

instance ToCStruct PerformanceCounterDescriptionKHR where
  withCStruct :: PerformanceCounterDescriptionKHR
-> (("pCounterDescriptions"
     ::: Ptr PerformanceCounterDescriptionKHR)
    -> IO b)
-> IO b
withCStruct x :: PerformanceCounterDescriptionKHR
x f :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO b
f = Int
-> Int
-> (("pCounterDescriptions"
     ::: Ptr PerformanceCounterDescriptionKHR)
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 792 8 ((("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
  -> IO b)
 -> IO b)
-> (("pCounterDescriptions"
     ::: Ptr PerformanceCounterDescriptionKHR)
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p -> ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> PerformanceCounterDescriptionKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p PerformanceCounterDescriptionKHR
x (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO b
f "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p)
  pokeCStruct :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> PerformanceCounterDescriptionKHR -> IO b -> IO b
pokeCStruct p :: "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p PerformanceCounterDescriptionKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr PerformanceCounterDescriptionFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterDescriptionFlagsKHR)) (PerformanceCounterDescriptionFlagsKHR
flags)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
name)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
category)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
description)
    IO b
f
  cStructSize :: Int
cStructSize = 792
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO b -> IO b
pokeZeroCStruct p :: "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
    Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> ByteString -> IO ()
forall (n :: Nat).
KnownNat n =>
Ptr (FixedArray n CChar) -> ByteString -> IO ()
pokeFixedLengthNullTerminatedByteString (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))) (ByteString
forall a. Monoid a => a
mempty)
    IO b
f

instance FromCStruct PerformanceCounterDescriptionKHR where
  peekCStruct :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO PerformanceCounterDescriptionKHR
peekCStruct p :: "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p = do
    PerformanceCounterDescriptionFlagsKHR
flags <- Ptr PerformanceCounterDescriptionFlagsKHR
-> IO PerformanceCounterDescriptionFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @PerformanceCounterDescriptionFlagsKHR (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr PerformanceCounterDescriptionFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterDescriptionFlagsKHR))
    ByteString
name <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
    ByteString
category <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 276 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
    ByteString
description <- CString -> IO ByteString
packCString (Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar) -> CString
forall a (n :: Nat). Ptr (FixedArray n a) -> Ptr a
lowerArrayPtr (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 532 :: Ptr (FixedArray MAX_DESCRIPTION_SIZE CChar))))
    PerformanceCounterDescriptionKHR
-> IO PerformanceCounterDescriptionKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PerformanceCounterDescriptionKHR
 -> IO PerformanceCounterDescriptionKHR)
-> PerformanceCounterDescriptionKHR
-> IO PerformanceCounterDescriptionKHR
forall a b. (a -> b) -> a -> b
$ PerformanceCounterDescriptionFlagsKHR
-> ByteString
-> ByteString
-> ByteString
-> PerformanceCounterDescriptionKHR
PerformanceCounterDescriptionKHR
             PerformanceCounterDescriptionFlagsKHR
flags ByteString
name ByteString
category ByteString
description

instance Storable PerformanceCounterDescriptionKHR where
  sizeOf :: PerformanceCounterDescriptionKHR -> Int
sizeOf ~PerformanceCounterDescriptionKHR
_ = 792
  alignment :: PerformanceCounterDescriptionKHR -> Int
alignment ~PerformanceCounterDescriptionKHR
_ = 8
  peek :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO PerformanceCounterDescriptionKHR
peek = ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> IO PerformanceCounterDescriptionKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> PerformanceCounterDescriptionKHR -> IO ()
poke ptr :: "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
ptr poked :: PerformanceCounterDescriptionKHR
poked = ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> PerformanceCounterDescriptionKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
ptr PerformanceCounterDescriptionKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PerformanceCounterDescriptionKHR where
  zero :: PerformanceCounterDescriptionKHR
zero = PerformanceCounterDescriptionFlagsKHR
-> ByteString
-> ByteString
-> ByteString
-> PerformanceCounterDescriptionKHR
PerformanceCounterDescriptionKHR
           PerformanceCounterDescriptionFlagsKHR
forall a. Zero a => a
zero
           ByteString
forall a. Monoid a => a
mempty
           ByteString
forall a. Monoid a => a
mempty
           ByteString
forall a. Monoid a => a
mempty


-- | VkQueryPoolPerformanceCreateInfoKHR - Structure specifying parameters of
-- a newly created performance query pool
--
-- == Valid Usage
--
-- -   @queueFamilyIndex@ /must/ be a valid queue family index of the
--     device
--
-- -   The
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-features-performanceCounterQueryPools performanceCounterQueryPools>
--     feature /must/ be enabled
--
-- -   Each element of @pCounterIndices@ /must/ be in the range of counters
--     reported by
--     'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' for
--     the queue family specified in @queueFamilyIndex@
--
-- == Valid Usage (Implicit)
--
-- -   @sType@ /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR'
--
-- -   @pCounterIndices@ /must/ be a valid pointer to an array of
--     @counterIndexCount@ @uint32_t@ values
--
-- -   @counterIndexCount@ /must/ be greater than @0@
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'
data QueryPoolPerformanceCreateInfoKHR = QueryPoolPerformanceCreateInfoKHR
  { -- | @queueFamilyIndex@ is the queue family index to create this performance
    -- query pool for.
    ("performanceQueryCreateInfo"
 ::: QueryPoolPerformanceCreateInfoKHR)
-> "queueFamilyIndex" ::: Word32
queueFamilyIndex :: Word32
  , -- | @pCounterIndices@ is the array of indices into the
    -- 'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR'::@pCounters@
    -- to enable in this performance query pool.
    ("performanceQueryCreateInfo"
 ::: QueryPoolPerformanceCreateInfoKHR)
-> Vector ("queueFamilyIndex" ::: Word32)
counterIndices :: Vector Word32
  }
  deriving (Typeable)
deriving instance Show QueryPoolPerformanceCreateInfoKHR

instance ToCStruct QueryPoolPerformanceCreateInfoKHR where
  withCStruct :: ("performanceQueryCreateInfo"
 ::: QueryPoolPerformanceCreateInfoKHR)
-> (("pPerformanceQueryCreateInfo"
     ::: Ptr
           ("performanceQueryCreateInfo"
            ::: QueryPoolPerformanceCreateInfoKHR))
    -> IO b)
-> IO b
withCStruct x :: "performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR
x f :: ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> IO b
f = Int
-> Int
-> (("pPerformanceQueryCreateInfo"
     ::: Ptr
           ("performanceQueryCreateInfo"
            ::: QueryPoolPerformanceCreateInfoKHR))
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pPerformanceQueryCreateInfo"
   ::: Ptr
         ("performanceQueryCreateInfo"
          ::: QueryPoolPerformanceCreateInfoKHR))
  -> IO b)
 -> IO b)
-> (("pPerformanceQueryCreateInfo"
     ::: Ptr
           ("performanceQueryCreateInfo"
            ::: QueryPoolPerformanceCreateInfoKHR))
    -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p -> ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> ("performanceQueryCreateInfo"
    ::: QueryPoolPerformanceCreateInfoKHR)
-> IO b
-> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p "performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR
x (("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> IO b
f "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p)
  pokeCStruct :: ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> ("performanceQueryCreateInfo"
    ::: QueryPoolPerformanceCreateInfoKHR)
-> IO b
-> IO b
pokeCStruct p :: "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p QueryPoolPerformanceCreateInfoKHR{..} f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
queueFamilyIndex)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32)) ((Int -> "queueFamilyIndex" ::: Word32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Vector ("queueFamilyIndex" ::: Word32) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("queueFamilyIndex" ::: Word32) -> Int)
-> Vector ("queueFamilyIndex" ::: Word32) -> Int
forall a b. (a -> b) -> a -> b
$ (Vector ("queueFamilyIndex" ::: Word32)
counterIndices)) :: Word32))
    "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices' <- ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
  -> IO b)
 -> IO b)
-> ContT
     b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO b)
  -> IO b)
 -> ContT
      b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
     -> IO b)
    -> IO b)
-> ContT
     b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector ("queueFamilyIndex" ::: Word32) -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector ("queueFamilyIndex" ::: Word32)
counterIndices)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> ("queueFamilyIndex" ::: Word32) -> IO ())
-> Vector ("queueFamilyIndex" ::: Word32) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: "queueFamilyIndex" ::: Word32
e -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices' ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("queueFamilyIndex" ::: Word32
e)) (Vector ("queueFamilyIndex" ::: Word32)
counterIndices)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int
-> Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32))) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> IO b -> IO b
pokeZeroCStruct p :: "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p f :: IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero)
    "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices' <- ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
  -> IO b)
 -> IO b)
-> ContT
     b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall k (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
   -> IO b)
  -> IO b)
 -> ContT
      b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)))
-> ((("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
     -> IO b)
    -> IO b)
-> ContT
     b IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. (a -> b) -> a -> b
$ Int
-> Int
-> (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
    -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned @Word32 ((Vector Any -> Int
forall a. Vector a -> Int
Data.Vector.length (Vector Any
forall a. Monoid a => a
mempty)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* 4) 4
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ (Int -> ("queueFamilyIndex" ::: Word32) -> IO ())
-> Vector ("queueFamilyIndex" ::: Word32) -> IO ()
forall (m :: * -> *) a b.
Monad m =>
(Int -> a -> m b) -> Vector a -> m ()
Data.Vector.imapM_ (\i :: Int
i e :: "queueFamilyIndex" ::: Word32
e -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices' ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32) ("queueFamilyIndex" ::: Word32
e)) (Vector ("queueFamilyIndex" ::: Word32)
forall a. Monoid a => a
mempty)
    IO () -> ContT b IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int
-> Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32))) ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pPCounterIndices')
    IO b -> ContT b IO b
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f

instance FromCStruct QueryPoolPerformanceCreateInfoKHR where
  peekCStruct :: ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> IO
     ("performanceQueryCreateInfo"
      ::: QueryPoolPerformanceCreateInfoKHR)
peekCStruct p :: "pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p = do
    "queueFamilyIndex" ::: Word32
queueFamilyIndex <- ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    "queueFamilyIndex" ::: Word32
counterIndexCount <- ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 20 :: Ptr Word32))
    "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pCounterIndices <- Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a. Storable a => Ptr a -> IO a
peek @(Ptr Word32) (("pPerformanceQueryCreateInfo"
::: Ptr
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR)
p ("pPerformanceQueryCreateInfo"
 ::: Ptr
       ("performanceQueryCreateInfo"
        ::: QueryPoolPerformanceCreateInfoKHR))
-> Int
-> Ptr ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr (Ptr Word32)))
    Vector ("queueFamilyIndex" ::: Word32)
pCounterIndices' <- Int
-> (Int -> IO ("queueFamilyIndex" ::: Word32))
-> IO (Vector ("queueFamilyIndex" ::: Word32))
forall (m :: * -> *) a.
Monad m =>
Int -> (Int -> m a) -> m (Vector a)
generateM (("queueFamilyIndex" ::: Word32) -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral "queueFamilyIndex" ::: Word32
counterIndexCount) (\i :: Int
i -> ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 (("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
pCounterIndices ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (4 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr Word32)))
    ("performanceQueryCreateInfo"
 ::: QueryPoolPerformanceCreateInfoKHR)
-> IO
     ("performanceQueryCreateInfo"
      ::: QueryPoolPerformanceCreateInfoKHR)
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("performanceQueryCreateInfo"
  ::: QueryPoolPerformanceCreateInfoKHR)
 -> IO
      ("performanceQueryCreateInfo"
       ::: QueryPoolPerformanceCreateInfoKHR))
-> ("performanceQueryCreateInfo"
    ::: QueryPoolPerformanceCreateInfoKHR)
-> IO
     ("performanceQueryCreateInfo"
      ::: QueryPoolPerformanceCreateInfoKHR)
forall a b. (a -> b) -> a -> b
$ ("queueFamilyIndex" ::: Word32)
-> Vector ("queueFamilyIndex" ::: Word32)
-> "performanceQueryCreateInfo"
   ::: QueryPoolPerformanceCreateInfoKHR
QueryPoolPerformanceCreateInfoKHR
             "queueFamilyIndex" ::: Word32
queueFamilyIndex Vector ("queueFamilyIndex" ::: Word32)
pCounterIndices'

instance Zero QueryPoolPerformanceCreateInfoKHR where
  zero :: "performanceQueryCreateInfo" ::: QueryPoolPerformanceCreateInfoKHR
zero = ("queueFamilyIndex" ::: Word32)
-> Vector ("queueFamilyIndex" ::: Word32)
-> "performanceQueryCreateInfo"
   ::: QueryPoolPerformanceCreateInfoKHR
QueryPoolPerformanceCreateInfoKHR
           "queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero
           Vector ("queueFamilyIndex" ::: Word32)
forall a. Monoid a => a
mempty


-- | VkAcquireProfilingLockInfoKHR - Structure specifying parameters to
-- acquire the profiling lock
--
-- == Valid Usage (Implicit)
--
-- If @timeout@ is 0, 'acquireProfilingLockKHR' will not block while
-- attempting to acquire the profling lock. If @timeout@ is @UINT64_MAX@,
-- the function will not return until the profiling lock was acquired.
--
-- = See Also
--
-- 'AcquireProfilingLockFlagsKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'acquireProfilingLockKHR'
data AcquireProfilingLockInfoKHR = AcquireProfilingLockInfoKHR
  { -- | @flags@ /must/ be @0@
    AcquireProfilingLockInfoKHR -> AcquireProfilingLockFlagsKHR
flags :: AcquireProfilingLockFlagsKHR
  , -- | @timeout@ indicates how long the function waits, in nanoseconds, if the
    -- profiling lock is not available.
    AcquireProfilingLockInfoKHR -> Word64
timeout :: Word64
  }
  deriving (Typeable)
deriving instance Show AcquireProfilingLockInfoKHR

instance ToCStruct AcquireProfilingLockInfoKHR where
  withCStruct :: AcquireProfilingLockInfoKHR
-> (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b) -> IO b
withCStruct x :: AcquireProfilingLockInfoKHR
x f :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b
f = Int
-> Int
-> (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b)
-> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 32 8 ((("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b) -> IO b)
-> (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p -> ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> AcquireProfilingLockInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p AcquireProfilingLockInfoKHR
x (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b
f "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p)
  pokeCStruct :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> AcquireProfilingLockInfoKHR -> IO b -> IO b
pokeCStruct p :: "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p AcquireProfilingLockInfoKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr AcquireProfilingLockFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AcquireProfilingLockFlagsKHR)) (AcquireProfilingLockFlagsKHR
flags)
    Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64)) (Word64
timeout)
    IO b
f
  cStructSize :: Int
cStructSize = 32
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> IO b -> IO b
pokeZeroCStruct p :: "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64)) (Word64
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct AcquireProfilingLockInfoKHR where
  peekCStruct :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> IO AcquireProfilingLockInfoKHR
peekCStruct p :: "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p = do
    AcquireProfilingLockFlagsKHR
flags <- Ptr AcquireProfilingLockFlagsKHR -> IO AcquireProfilingLockFlagsKHR
forall a. Storable a => Ptr a -> IO a
peek @AcquireProfilingLockFlagsKHR (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> Int -> Ptr AcquireProfilingLockFlagsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr AcquireProfilingLockFlagsKHR))
    Word64
timeout <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek @Word64 (("pInfo" ::: Ptr AcquireProfilingLockInfoKHR
p ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR) -> Int -> Ptr Word64
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 24 :: Ptr Word64))
    AcquireProfilingLockInfoKHR -> IO AcquireProfilingLockInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AcquireProfilingLockInfoKHR -> IO AcquireProfilingLockInfoKHR)
-> AcquireProfilingLockInfoKHR -> IO AcquireProfilingLockInfoKHR
forall a b. (a -> b) -> a -> b
$ AcquireProfilingLockFlagsKHR
-> Word64 -> AcquireProfilingLockInfoKHR
AcquireProfilingLockInfoKHR
             AcquireProfilingLockFlagsKHR
flags Word64
timeout

instance Storable AcquireProfilingLockInfoKHR where
  sizeOf :: AcquireProfilingLockInfoKHR -> Int
sizeOf ~AcquireProfilingLockInfoKHR
_ = 32
  alignment :: AcquireProfilingLockInfoKHR -> Int
alignment ~AcquireProfilingLockInfoKHR
_ = 8
  peek :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> IO AcquireProfilingLockInfoKHR
peek = ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> IO AcquireProfilingLockInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> AcquireProfilingLockInfoKHR -> IO ()
poke ptr :: "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
ptr poked :: AcquireProfilingLockInfoKHR
poked = ("pInfo" ::: Ptr AcquireProfilingLockInfoKHR)
-> AcquireProfilingLockInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct "pInfo" ::: Ptr AcquireProfilingLockInfoKHR
ptr AcquireProfilingLockInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero AcquireProfilingLockInfoKHR where
  zero :: AcquireProfilingLockInfoKHR
zero = AcquireProfilingLockFlagsKHR
-> Word64 -> AcquireProfilingLockInfoKHR
AcquireProfilingLockInfoKHR
           AcquireProfilingLockFlagsKHR
forall a. Zero a => a
zero
           Word64
forall a. Zero a => a
zero


-- | VkPerformanceQuerySubmitInfoKHR - Structure indicating which counter
-- pass index is active for performance queries
--
-- = Description
--
-- If the 'Vulkan.Core10.Queue.SubmitInfo'::@pNext@ chain does not include
-- this structure, the batch defaults to use counter pass index 0.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PerformanceQuerySubmitInfoKHR = PerformanceQuerySubmitInfoKHR
  { -- | @counterPassIndex@ /must/ be less than the number of counter passes
    -- required by any queries within the batch. The required number of counter
    -- passes for a performance query is obtained by calling
    -- 'getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'
    PerformanceQuerySubmitInfoKHR -> "queueFamilyIndex" ::: Word32
counterPassIndex :: Word32 }
  deriving (Typeable)
deriving instance Show PerformanceQuerySubmitInfoKHR

instance ToCStruct PerformanceQuerySubmitInfoKHR where
  withCStruct :: PerformanceQuerySubmitInfoKHR
-> (Ptr PerformanceQuerySubmitInfoKHR -> IO b) -> IO b
withCStruct x :: PerformanceQuerySubmitInfoKHR
x f :: Ptr PerformanceQuerySubmitInfoKHR -> IO b
f = Int -> Int -> (Ptr PerformanceQuerySubmitInfoKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 24 8 ((Ptr PerformanceQuerySubmitInfoKHR -> IO b) -> IO b)
-> (Ptr PerformanceQuerySubmitInfoKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PerformanceQuerySubmitInfoKHR
p -> Ptr PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PerformanceQuerySubmitInfoKHR
p PerformanceQuerySubmitInfoKHR
x (Ptr PerformanceQuerySubmitInfoKHR -> IO b
f Ptr PerformanceQuerySubmitInfoKHR
p)
  pokeCStruct :: Ptr PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> IO b -> IO b
pokeCStruct p :: Ptr PerformanceQuerySubmitInfoKHR
p PerformanceQuerySubmitInfoKHR{..} f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
counterPassIndex)
    IO b
f
  cStructSize :: Int
cStructSize = 24
  cStructAlignment :: Int
cStructAlignment = 8
  pokeZeroCStruct :: Ptr PerformanceQuerySubmitInfoKHR -> IO b -> IO b
pokeZeroCStruct p :: Ptr PerformanceQuerySubmitInfoKHR
p f :: IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32)) ("queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PerformanceQuerySubmitInfoKHR where
  peekCStruct :: Ptr PerformanceQuerySubmitInfoKHR
-> IO PerformanceQuerySubmitInfoKHR
peekCStruct p :: Ptr PerformanceQuerySubmitInfoKHR
p = do
    "queueFamilyIndex" ::: Word32
counterPassIndex <- ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> IO ("queueFamilyIndex" ::: Word32)
forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PerformanceQuerySubmitInfoKHR
p Ptr PerformanceQuerySubmitInfoKHR
-> Int -> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr Word32))
    PerformanceQuerySubmitInfoKHR -> IO PerformanceQuerySubmitInfoKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (PerformanceQuerySubmitInfoKHR -> IO PerformanceQuerySubmitInfoKHR)
-> PerformanceQuerySubmitInfoKHR
-> IO PerformanceQuerySubmitInfoKHR
forall a b. (a -> b) -> a -> b
$ ("queueFamilyIndex" ::: Word32) -> PerformanceQuerySubmitInfoKHR
PerformanceQuerySubmitInfoKHR
             "queueFamilyIndex" ::: Word32
counterPassIndex

instance Storable PerformanceQuerySubmitInfoKHR where
  sizeOf :: PerformanceQuerySubmitInfoKHR -> Int
sizeOf ~PerformanceQuerySubmitInfoKHR
_ = 24
  alignment :: PerformanceQuerySubmitInfoKHR -> Int
alignment ~PerformanceQuerySubmitInfoKHR
_ = 8
  peek :: Ptr PerformanceQuerySubmitInfoKHR
-> IO PerformanceQuerySubmitInfoKHR
peek = Ptr PerformanceQuerySubmitInfoKHR
-> IO PerformanceQuerySubmitInfoKHR
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> IO ()
poke ptr :: Ptr PerformanceQuerySubmitInfoKHR
ptr poked :: PerformanceQuerySubmitInfoKHR
poked = Ptr PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> IO () -> IO ()
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PerformanceQuerySubmitInfoKHR
ptr PerformanceQuerySubmitInfoKHR
poked (() -> IO ()
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PerformanceQuerySubmitInfoKHR where
  zero :: PerformanceQuerySubmitInfoKHR
zero = ("queueFamilyIndex" ::: Word32) -> PerformanceQuerySubmitInfoKHR
PerformanceQuerySubmitInfoKHR
           "queueFamilyIndex" ::: Word32
forall a. Zero a => a
zero


data PerformanceCounterResultKHR
  = Int32Counter Int32
  | Int64Counter Int64
  | Uint32Counter Word32
  | Uint64Counter Word64
  | Float32Counter Float
  | Float64Counter Double
  deriving (Int -> PerformanceCounterResultKHR -> ShowS
[PerformanceCounterResultKHR] -> ShowS
PerformanceCounterResultKHR -> String
(Int -> PerformanceCounterResultKHR -> ShowS)
-> (PerformanceCounterResultKHR -> String)
-> ([PerformanceCounterResultKHR] -> ShowS)
-> Show PerformanceCounterResultKHR
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PerformanceCounterResultKHR] -> ShowS
$cshowList :: [PerformanceCounterResultKHR] -> ShowS
show :: PerformanceCounterResultKHR -> String
$cshow :: PerformanceCounterResultKHR -> String
showsPrec :: Int -> PerformanceCounterResultKHR -> ShowS
$cshowsPrec :: Int -> PerformanceCounterResultKHR -> ShowS
Show)

instance ToCStruct PerformanceCounterResultKHR where
  withCStruct :: PerformanceCounterResultKHR
-> (Ptr PerformanceCounterResultKHR -> IO b) -> IO b
withCStruct x :: PerformanceCounterResultKHR
x f :: Ptr PerformanceCounterResultKHR -> IO b
f = Int -> Int -> (Ptr PerformanceCounterResultKHR -> IO b) -> IO b
forall a b. Int -> Int -> (Ptr a -> IO b) -> IO b
allocaBytesAligned 8 8 ((Ptr PerformanceCounterResultKHR -> IO b) -> IO b)
-> (Ptr PerformanceCounterResultKHR -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \p :: Ptr PerformanceCounterResultKHR
p -> Ptr PerformanceCounterResultKHR
-> PerformanceCounterResultKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PerformanceCounterResultKHR
p PerformanceCounterResultKHR
x (Ptr PerformanceCounterResultKHR -> IO b
f Ptr PerformanceCounterResultKHR
p)
  pokeCStruct :: Ptr PerformanceCounterResultKHR -> PerformanceCounterResultKHR -> IO a -> IO a
  pokeCStruct :: Ptr PerformanceCounterResultKHR
-> PerformanceCounterResultKHR -> IO a -> IO a
pokeCStruct p :: Ptr PerformanceCounterResultKHR
p = (((() -> IO a) -> IO a) -> (IO a -> () -> IO a) -> IO a -> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IO a -> () -> IO a
forall a b. a -> b -> a
const) (((() -> IO a) -> IO a) -> IO a -> IO a)
-> (PerformanceCounterResultKHR -> (() -> IO a) -> IO a)
-> PerformanceCounterResultKHR
-> IO a
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT a IO () -> (() -> IO a) -> IO a
forall k (r :: k) (m :: k -> *) a. ContT r m a -> (a -> m r) -> m r
runContT (ContT a IO () -> (() -> IO a) -> IO a)
-> (PerformanceCounterResultKHR -> ContT a IO ())
-> PerformanceCounterResultKHR
-> (() -> IO a)
-> IO a
forall b c a. (b -> c) -> (a -> b) -> a -> c
.  \case
    Int32Counter v :: Int32
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Int32 -> Int32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR -> Ptr Int32
forall a b. Ptr a -> Ptr b
castPtr @_ @Int32 Ptr PerformanceCounterResultKHR
p) (Int32
v)
    Int64Counter v :: Int64
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Int64 -> Int64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR -> Ptr Int64
forall a b. Ptr a -> Ptr b
castPtr @_ @Int64 Ptr PerformanceCounterResultKHR
p) (Int64
v)
    Uint32Counter v :: "queueFamilyIndex" ::: Word32
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ ("pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32))
-> ("queueFamilyIndex" ::: Word32) -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR
-> "pCounterCount" ::: Ptr ("queueFamilyIndex" ::: Word32)
forall a b. Ptr a -> Ptr b
castPtr @_ @Word32 Ptr PerformanceCounterResultKHR
p) ("queueFamilyIndex" ::: Word32
v)
    Uint64Counter v :: Word64
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word64 -> Word64 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR -> Ptr Word64
forall a b. Ptr a -> Ptr b
castPtr @_ @Word64 Ptr PerformanceCounterResultKHR
p) (Word64
v)
    Float32Counter v :: Float
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CFloat -> CFloat -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR -> Ptr CFloat
forall a b. Ptr a -> Ptr b
castPtr @_ @CFloat Ptr PerformanceCounterResultKHR
p) (Float -> CFloat
CFloat (Float
v))
    Float64Counter v :: Double
v -> IO () -> ContT a IO ()
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT a IO ()) -> IO () -> ContT a IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr PerformanceCounterResultKHR -> Ptr CDouble
forall a b. Ptr a -> Ptr b
castPtr @_ @CDouble Ptr PerformanceCounterResultKHR
p) (Double -> CDouble
CDouble (Double
v))
  pokeZeroCStruct :: Ptr PerformanceCounterResultKHR -> IO b -> IO b
  pokeZeroCStruct :: Ptr PerformanceCounterResultKHR -> IO b -> IO b
pokeZeroCStruct _ f :: IO b
f = IO b
f
  cStructSize :: Int
cStructSize = 8
  cStructAlignment :: Int
cStructAlignment = 8

instance Zero PerformanceCounterResultKHR where
  zero :: PerformanceCounterResultKHR
zero = Int64 -> PerformanceCounterResultKHR
Int64Counter Int64
forall a. Zero a => a
zero


-- | VkPerformanceCounterScopeKHR - Supported counter scope types
--
-- = See Also
--
-- 'PerformanceCounterKHR'
newtype PerformanceCounterScopeKHR = PerformanceCounterScopeKHR Int32
  deriving newtype (PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
(PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> Bool)
-> Eq PerformanceCounterScopeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c/= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
== :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c== :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
Eq, Eq PerformanceCounterScopeKHR
Eq PerformanceCounterScopeKHR =>
(PerformanceCounterScopeKHR
 -> PerformanceCounterScopeKHR -> Ordering)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> Bool)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> Bool)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> Bool)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> Bool)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR)
-> (PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR)
-> Ord PerformanceCounterScopeKHR
PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> Ordering
PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR
$cmin :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR
max :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR
$cmax :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR
>= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c>= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
> :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c> :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
<= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c<= :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
< :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
$c< :: PerformanceCounterScopeKHR -> PerformanceCounterScopeKHR -> Bool
compare :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> Ordering
$ccompare :: PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> Ordering
$cp1Ord :: Eq PerformanceCounterScopeKHR
Ord, Ptr b -> Int -> IO PerformanceCounterScopeKHR
Ptr b -> Int -> PerformanceCounterScopeKHR -> IO ()
Ptr PerformanceCounterScopeKHR -> IO PerformanceCounterScopeKHR
Ptr PerformanceCounterScopeKHR
-> Int -> IO PerformanceCounterScopeKHR
Ptr PerformanceCounterScopeKHR
-> Int -> PerformanceCounterScopeKHR -> IO ()
Ptr PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> IO ()
PerformanceCounterScopeKHR -> Int
(PerformanceCounterScopeKHR -> Int)
-> (PerformanceCounterScopeKHR -> Int)
-> (Ptr PerformanceCounterScopeKHR
    -> Int -> IO PerformanceCounterScopeKHR)
-> (Ptr PerformanceCounterScopeKHR
    -> Int -> PerformanceCounterScopeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PerformanceCounterScopeKHR)
-> (forall b. Ptr b -> Int -> PerformanceCounterScopeKHR -> IO ())
-> (Ptr PerformanceCounterScopeKHR
    -> IO PerformanceCounterScopeKHR)
-> (Ptr PerformanceCounterScopeKHR
    -> PerformanceCounterScopeKHR -> IO ())
-> Storable PerformanceCounterScopeKHR
forall b. Ptr b -> Int -> IO PerformanceCounterScopeKHR
forall b. Ptr b -> Int -> PerformanceCounterScopeKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> IO ()
$cpoke :: Ptr PerformanceCounterScopeKHR
-> PerformanceCounterScopeKHR -> IO ()
peek :: Ptr PerformanceCounterScopeKHR -> IO PerformanceCounterScopeKHR
$cpeek :: Ptr PerformanceCounterScopeKHR -> IO PerformanceCounterScopeKHR
pokeByteOff :: Ptr b -> Int -> PerformanceCounterScopeKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PerformanceCounterScopeKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO PerformanceCounterScopeKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PerformanceCounterScopeKHR
pokeElemOff :: Ptr PerformanceCounterScopeKHR
-> Int -> PerformanceCounterScopeKHR -> IO ()
$cpokeElemOff :: Ptr PerformanceCounterScopeKHR
-> Int -> PerformanceCounterScopeKHR -> IO ()
peekElemOff :: Ptr PerformanceCounterScopeKHR
-> Int -> IO PerformanceCounterScopeKHR
$cpeekElemOff :: Ptr PerformanceCounterScopeKHR
-> Int -> IO PerformanceCounterScopeKHR
alignment :: PerformanceCounterScopeKHR -> Int
$calignment :: PerformanceCounterScopeKHR -> Int
sizeOf :: PerformanceCounterScopeKHR -> Int
$csizeOf :: PerformanceCounterScopeKHR -> Int
Storable, PerformanceCounterScopeKHR
PerformanceCounterScopeKHR -> Zero PerformanceCounterScopeKHR
forall a. a -> Zero a
zero :: PerformanceCounterScopeKHR
$czero :: PerformanceCounterScopeKHR
Zero)

-- | 'PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR' - the performance counter
-- scope is a single complete command buffer.
pattern $bPERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR :: PerformanceCounterScopeKHR
$mPERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR = PerformanceCounterScopeKHR 0
-- | 'PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR' - the performance counter
-- scope is zero or more complete render passes. The performance query
-- containing the performance counter /must/ begin and end outside a render
-- pass instance.
pattern $bPERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR :: PerformanceCounterScopeKHR
$mPERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR = PerformanceCounterScopeKHR 1
-- | 'PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR' - the performance counter scope
-- is zero or more commands.
pattern $bPERFORMANCE_COUNTER_SCOPE_COMMAND_KHR :: PerformanceCounterScopeKHR
$mPERFORMANCE_COUNTER_SCOPE_COMMAND_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
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 :: Int -> PerformanceCounterScopeKHR -> ShowS
showsPrec p :: Int
p = \case
    PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR"
    PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR"
    PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR"
    PerformanceCounterScopeKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PerformanceCounterScopeKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read PerformanceCounterScopeKHR where
  readPrec :: ReadPrec PerformanceCounterScopeKHR
readPrec = ReadPrec PerformanceCounterScopeKHR
-> ReadPrec PerformanceCounterScopeKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PerformanceCounterScopeKHR)]
-> ReadPrec PerformanceCounterScopeKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR", PerformanceCounterScopeKHR -> ReadPrec PerformanceCounterScopeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR)
                            , ("PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR", PerformanceCounterScopeKHR -> ReadPrec PerformanceCounterScopeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR)
                            , ("PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR", PerformanceCounterScopeKHR -> ReadPrec PerformanceCounterScopeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR)]
                     ReadPrec PerformanceCounterScopeKHR
-> ReadPrec PerformanceCounterScopeKHR
-> ReadPrec PerformanceCounterScopeKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PerformanceCounterScopeKHR
-> ReadPrec PerformanceCounterScopeKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PerformanceCounterScopeKHR")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       PerformanceCounterScopeKHR -> ReadPrec PerformanceCounterScopeKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PerformanceCounterScopeKHR
PerformanceCounterScopeKHR Int32
v)))


-- | VkPerformanceCounterUnitKHR - Supported counter unit types
--
-- = See Also
--
-- 'PerformanceCounterKHR'
newtype PerformanceCounterUnitKHR = PerformanceCounterUnitKHR Int32
  deriving newtype (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
(PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> Eq PerformanceCounterUnitKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c/= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
== :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c== :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
Eq, Eq PerformanceCounterUnitKHR
Eq PerformanceCounterUnitKHR =>
(PerformanceCounterUnitKHR
 -> PerformanceCounterUnitKHR -> Ordering)
-> (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> (PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool)
-> (PerformanceCounterUnitKHR
    -> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR)
-> (PerformanceCounterUnitKHR
    -> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR)
-> Ord PerformanceCounterUnitKHR
PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Ordering
PerformanceCounterUnitKHR
-> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PerformanceCounterUnitKHR
-> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR
$cmin :: PerformanceCounterUnitKHR
-> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR
max :: PerformanceCounterUnitKHR
-> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR
$cmax :: PerformanceCounterUnitKHR
-> PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR
>= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c>= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
> :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c> :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
<= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c<= :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
< :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
$c< :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Bool
compare :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Ordering
$ccompare :: PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> Ordering
$cp1Ord :: Eq PerformanceCounterUnitKHR
Ord, Ptr b -> Int -> IO PerformanceCounterUnitKHR
Ptr b -> Int -> PerformanceCounterUnitKHR -> IO ()
Ptr PerformanceCounterUnitKHR -> IO PerformanceCounterUnitKHR
Ptr PerformanceCounterUnitKHR
-> Int -> IO PerformanceCounterUnitKHR
Ptr PerformanceCounterUnitKHR
-> Int -> PerformanceCounterUnitKHR -> IO ()
Ptr PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> IO ()
PerformanceCounterUnitKHR -> Int
(PerformanceCounterUnitKHR -> Int)
-> (PerformanceCounterUnitKHR -> Int)
-> (Ptr PerformanceCounterUnitKHR
    -> Int -> IO PerformanceCounterUnitKHR)
-> (Ptr PerformanceCounterUnitKHR
    -> Int -> PerformanceCounterUnitKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PerformanceCounterUnitKHR)
-> (forall b. Ptr b -> Int -> PerformanceCounterUnitKHR -> IO ())
-> (Ptr PerformanceCounterUnitKHR -> IO PerformanceCounterUnitKHR)
-> (Ptr PerformanceCounterUnitKHR
    -> PerformanceCounterUnitKHR -> IO ())
-> Storable PerformanceCounterUnitKHR
forall b. Ptr b -> Int -> IO PerformanceCounterUnitKHR
forall b. Ptr b -> Int -> PerformanceCounterUnitKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> IO ()
$cpoke :: Ptr PerformanceCounterUnitKHR -> PerformanceCounterUnitKHR -> IO ()
peek :: Ptr PerformanceCounterUnitKHR -> IO PerformanceCounterUnitKHR
$cpeek :: Ptr PerformanceCounterUnitKHR -> IO PerformanceCounterUnitKHR
pokeByteOff :: Ptr b -> Int -> PerformanceCounterUnitKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PerformanceCounterUnitKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO PerformanceCounterUnitKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PerformanceCounterUnitKHR
pokeElemOff :: Ptr PerformanceCounterUnitKHR
-> Int -> PerformanceCounterUnitKHR -> IO ()
$cpokeElemOff :: Ptr PerformanceCounterUnitKHR
-> Int -> PerformanceCounterUnitKHR -> IO ()
peekElemOff :: Ptr PerformanceCounterUnitKHR
-> Int -> IO PerformanceCounterUnitKHR
$cpeekElemOff :: Ptr PerformanceCounterUnitKHR
-> Int -> IO PerformanceCounterUnitKHR
alignment :: PerformanceCounterUnitKHR -> Int
$calignment :: PerformanceCounterUnitKHR -> Int
sizeOf :: PerformanceCounterUnitKHR -> Int
$csizeOf :: PerformanceCounterUnitKHR -> Int
Storable, PerformanceCounterUnitKHR
PerformanceCounterUnitKHR -> Zero PerformanceCounterUnitKHR
forall a. a -> Zero a
zero :: PerformanceCounterUnitKHR
$czero :: PerformanceCounterUnitKHR
Zero)

-- | 'PERFORMANCE_COUNTER_UNIT_GENERIC_KHR' - the performance counter unit is
-- a generic data point.
pattern $bPERFORMANCE_COUNTER_UNIT_GENERIC_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_GENERIC_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_GENERIC_KHR = PerformanceCounterUnitKHR 0
-- | 'PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR' - the performance counter unit
-- is a percentage (%).
pattern $bPERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR = PerformanceCounterUnitKHR 1
-- | 'PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR' - the performance counter
-- unit is a value of nanoseconds (ns).
pattern $bPERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR = PerformanceCounterUnitKHR 2
-- | 'PERFORMANCE_COUNTER_UNIT_BYTES_KHR' - the performance counter unit is a
-- value of bytes.
pattern $bPERFORMANCE_COUNTER_UNIT_BYTES_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_BYTES_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_BYTES_KHR = PerformanceCounterUnitKHR 3
-- | 'PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR' - the performance
-- counter unit is a value of bytes\/s.
pattern $bPERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR = PerformanceCounterUnitKHR 4
-- | 'PERFORMANCE_COUNTER_UNIT_KELVIN_KHR' - the performance counter unit is
-- a temperature reported in Kelvin.
pattern $bPERFORMANCE_COUNTER_UNIT_KELVIN_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_KELVIN_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_KELVIN_KHR = PerformanceCounterUnitKHR 5
-- | 'PERFORMANCE_COUNTER_UNIT_WATTS_KHR' - the performance counter unit is a
-- value of watts (W).
pattern $bPERFORMANCE_COUNTER_UNIT_WATTS_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_WATTS_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_WATTS_KHR = PerformanceCounterUnitKHR 6
-- | 'PERFORMANCE_COUNTER_UNIT_VOLTS_KHR' - the performance counter unit is a
-- value of volts (V).
pattern $bPERFORMANCE_COUNTER_UNIT_VOLTS_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_VOLTS_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_VOLTS_KHR = PerformanceCounterUnitKHR 7
-- | 'PERFORMANCE_COUNTER_UNIT_AMPS_KHR' - the performance counter unit is a
-- value of amps (A).
pattern $bPERFORMANCE_COUNTER_UNIT_AMPS_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_AMPS_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_AMPS_KHR = PerformanceCounterUnitKHR 8
-- | 'PERFORMANCE_COUNTER_UNIT_HERTZ_KHR' - the performance counter unit is a
-- value of hertz (Hz).
pattern $bPERFORMANCE_COUNTER_UNIT_HERTZ_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_HERTZ_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_UNIT_HERTZ_KHR = PerformanceCounterUnitKHR 9
-- | 'PERFORMANCE_COUNTER_UNIT_CYCLES_KHR' - the performance counter unit is
-- a value of cycles.
pattern $bPERFORMANCE_COUNTER_UNIT_CYCLES_KHR :: PerformanceCounterUnitKHR
$mPERFORMANCE_COUNTER_UNIT_CYCLES_KHR :: forall r.
PerformanceCounterUnitKHR -> (Void# -> r) -> (Void# -> r) -> r
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 :: Int -> PerformanceCounterUnitKHR -> ShowS
showsPrec p :: Int
p = \case
    PERFORMANCE_COUNTER_UNIT_GENERIC_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_GENERIC_KHR"
    PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR"
    PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR"
    PERFORMANCE_COUNTER_UNIT_BYTES_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_BYTES_KHR"
    PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR"
    PERFORMANCE_COUNTER_UNIT_KELVIN_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_KELVIN_KHR"
    PERFORMANCE_COUNTER_UNIT_WATTS_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_WATTS_KHR"
    PERFORMANCE_COUNTER_UNIT_VOLTS_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_VOLTS_KHR"
    PERFORMANCE_COUNTER_UNIT_AMPS_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_AMPS_KHR"
    PERFORMANCE_COUNTER_UNIT_HERTZ_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_HERTZ_KHR"
    PERFORMANCE_COUNTER_UNIT_CYCLES_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_UNIT_CYCLES_KHR"
    PerformanceCounterUnitKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PerformanceCounterUnitKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read PerformanceCounterUnitKHR where
  readPrec :: ReadPrec PerformanceCounterUnitKHR
readPrec = ReadPrec PerformanceCounterUnitKHR
-> ReadPrec PerformanceCounterUnitKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PerformanceCounterUnitKHR)]
-> ReadPrec PerformanceCounterUnitKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PERFORMANCE_COUNTER_UNIT_GENERIC_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_GENERIC_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_BYTES_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_BYTES_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_KELVIN_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_KELVIN_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_WATTS_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_WATTS_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_VOLTS_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_VOLTS_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_AMPS_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_AMPS_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_HERTZ_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_HERTZ_KHR)
                            , ("PERFORMANCE_COUNTER_UNIT_CYCLES_KHR", PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_CYCLES_KHR)]
                     ReadPrec PerformanceCounterUnitKHR
-> ReadPrec PerformanceCounterUnitKHR
-> ReadPrec PerformanceCounterUnitKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PerformanceCounterUnitKHR
-> ReadPrec PerformanceCounterUnitKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PerformanceCounterUnitKHR")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       PerformanceCounterUnitKHR -> ReadPrec PerformanceCounterUnitKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PerformanceCounterUnitKHR
PerformanceCounterUnitKHR Int32
v)))


-- | VkPerformanceCounterStorageKHR - Supported counter storage types
--
-- = See Also
--
-- 'PerformanceCounterKHR'
newtype PerformanceCounterStorageKHR = PerformanceCounterStorageKHR Int32
  deriving newtype (PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
(PerformanceCounterStorageKHR
 -> PerformanceCounterStorageKHR -> Bool)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> Bool)
-> Eq PerformanceCounterStorageKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c/= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
== :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c== :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
Eq, Eq PerformanceCounterStorageKHR
Eq PerformanceCounterStorageKHR =>
(PerformanceCounterStorageKHR
 -> PerformanceCounterStorageKHR -> Ordering)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> Bool)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> Bool)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> Bool)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> Bool)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR)
-> (PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR)
-> Ord PerformanceCounterStorageKHR
PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Ordering
PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR
$cmin :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR
max :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR
$cmax :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> PerformanceCounterStorageKHR
>= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c>= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
> :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c> :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
<= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c<= :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
< :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
$c< :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Bool
compare :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Ordering
$ccompare :: PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> Ordering
$cp1Ord :: Eq PerformanceCounterStorageKHR
Ord, Ptr b -> Int -> IO PerformanceCounterStorageKHR
Ptr b -> Int -> PerformanceCounterStorageKHR -> IO ()
Ptr PerformanceCounterStorageKHR -> IO PerformanceCounterStorageKHR
Ptr PerformanceCounterStorageKHR
-> Int -> IO PerformanceCounterStorageKHR
Ptr PerformanceCounterStorageKHR
-> Int -> PerformanceCounterStorageKHR -> IO ()
Ptr PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> IO ()
PerformanceCounterStorageKHR -> Int
(PerformanceCounterStorageKHR -> Int)
-> (PerformanceCounterStorageKHR -> Int)
-> (Ptr PerformanceCounterStorageKHR
    -> Int -> IO PerformanceCounterStorageKHR)
-> (Ptr PerformanceCounterStorageKHR
    -> Int -> PerformanceCounterStorageKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO PerformanceCounterStorageKHR)
-> (forall b.
    Ptr b -> Int -> PerformanceCounterStorageKHR -> IO ())
-> (Ptr PerformanceCounterStorageKHR
    -> IO PerformanceCounterStorageKHR)
-> (Ptr PerformanceCounterStorageKHR
    -> PerformanceCounterStorageKHR -> IO ())
-> Storable PerformanceCounterStorageKHR
forall b. Ptr b -> Int -> IO PerformanceCounterStorageKHR
forall b. Ptr b -> Int -> PerformanceCounterStorageKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> IO ()
$cpoke :: Ptr PerformanceCounterStorageKHR
-> PerformanceCounterStorageKHR -> IO ()
peek :: Ptr PerformanceCounterStorageKHR -> IO PerformanceCounterStorageKHR
$cpeek :: Ptr PerformanceCounterStorageKHR -> IO PerformanceCounterStorageKHR
pokeByteOff :: Ptr b -> Int -> PerformanceCounterStorageKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PerformanceCounterStorageKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO PerformanceCounterStorageKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PerformanceCounterStorageKHR
pokeElemOff :: Ptr PerformanceCounterStorageKHR
-> Int -> PerformanceCounterStorageKHR -> IO ()
$cpokeElemOff :: Ptr PerformanceCounterStorageKHR
-> Int -> PerformanceCounterStorageKHR -> IO ()
peekElemOff :: Ptr PerformanceCounterStorageKHR
-> Int -> IO PerformanceCounterStorageKHR
$cpeekElemOff :: Ptr PerformanceCounterStorageKHR
-> Int -> IO PerformanceCounterStorageKHR
alignment :: PerformanceCounterStorageKHR -> Int
$calignment :: PerformanceCounterStorageKHR -> Int
sizeOf :: PerformanceCounterStorageKHR -> Int
$csizeOf :: PerformanceCounterStorageKHR -> Int
Storable, PerformanceCounterStorageKHR
PerformanceCounterStorageKHR -> Zero PerformanceCounterStorageKHR
forall a. a -> Zero a
zero :: PerformanceCounterStorageKHR
$czero :: PerformanceCounterStorageKHR
Zero)

-- | 'PERFORMANCE_COUNTER_STORAGE_INT32_KHR' - the performance counter
-- storage is a 32-bit signed integer.
pattern $bPERFORMANCE_COUNTER_STORAGE_INT32_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_INT32_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_STORAGE_INT32_KHR = PerformanceCounterStorageKHR 0
-- | 'PERFORMANCE_COUNTER_STORAGE_INT64_KHR' - the performance counter
-- storage is a 64-bit signed integer.
pattern $bPERFORMANCE_COUNTER_STORAGE_INT64_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_INT64_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_STORAGE_INT64_KHR = PerformanceCounterStorageKHR 1
-- | 'PERFORMANCE_COUNTER_STORAGE_UINT32_KHR' - the performance counter
-- storage is a 32-bit unsigned integer.
pattern $bPERFORMANCE_COUNTER_STORAGE_UINT32_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_UINT32_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_STORAGE_UINT32_KHR = PerformanceCounterStorageKHR 2
-- | 'PERFORMANCE_COUNTER_STORAGE_UINT64_KHR' - the performance counter
-- storage is a 64-bit unsigned integer.
pattern $bPERFORMANCE_COUNTER_STORAGE_UINT64_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_UINT64_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_STORAGE_UINT64_KHR = PerformanceCounterStorageKHR 3
-- | 'PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR' - the performance counter
-- storage is a 32-bit floating-point.
pattern $bPERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR = PerformanceCounterStorageKHR 4
-- | 'PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR' - the performance counter
-- storage is a 64-bit floating-point.
pattern $bPERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR :: PerformanceCounterStorageKHR
$mPERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR :: forall r.
PerformanceCounterStorageKHR -> (Void# -> r) -> (Void# -> r) -> r
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 :: Int -> PerformanceCounterStorageKHR -> ShowS
showsPrec p :: Int
p = \case
    PERFORMANCE_COUNTER_STORAGE_INT32_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_INT32_KHR"
    PERFORMANCE_COUNTER_STORAGE_INT64_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_INT64_KHR"
    PERFORMANCE_COUNTER_STORAGE_UINT32_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_UINT32_KHR"
    PERFORMANCE_COUNTER_STORAGE_UINT64_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_UINT64_KHR"
    PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR"
    PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR"
    PerformanceCounterStorageKHR x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PerformanceCounterStorageKHR " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)

instance Read PerformanceCounterStorageKHR where
  readPrec :: ReadPrec PerformanceCounterStorageKHR
readPrec = ReadPrec PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PerformanceCounterStorageKHR)]
-> ReadPrec PerformanceCounterStorageKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PERFORMANCE_COUNTER_STORAGE_INT32_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_INT32_KHR)
                            , ("PERFORMANCE_COUNTER_STORAGE_INT64_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_INT64_KHR)
                            , ("PERFORMANCE_COUNTER_STORAGE_UINT32_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_UINT32_KHR)
                            , ("PERFORMANCE_COUNTER_STORAGE_UINT64_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_UINT64_KHR)
                            , ("PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR)
                            , ("PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR", PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR)]
                     ReadPrec PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PerformanceCounterStorageKHR")
                       Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
                       PerformanceCounterStorageKHR
-> ReadPrec PerformanceCounterStorageKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PerformanceCounterStorageKHR
PerformanceCounterStorageKHR Int32
v)))


-- | VkPerformanceCounterDescriptionFlagBitsKHR - Bitmask specifying usage
-- behavior for a counter
--
-- = See Also
--
-- 'PerformanceCounterDescriptionFlagsKHR'
newtype PerformanceCounterDescriptionFlagBitsKHR = PerformanceCounterDescriptionFlagBitsKHR Flags
  deriving newtype (PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
(PerformanceCounterDescriptionFlagsKHR
 -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> Eq PerformanceCounterDescriptionFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c/= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
== :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c== :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
Eq, Eq PerformanceCounterDescriptionFlagsKHR
Eq PerformanceCounterDescriptionFlagsKHR =>
(PerformanceCounterDescriptionFlagsKHR
 -> PerformanceCounterDescriptionFlagsKHR -> Ordering)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR)
-> Ord PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Ordering
PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$cmin :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
max :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$cmax :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
>= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c>= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
> :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c> :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
<= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c<= :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
< :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
$c< :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Bool
compare :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Ordering
$ccompare :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> Ordering
$cp1Ord :: Eq PerformanceCounterDescriptionFlagsKHR
Ord, Ptr b -> Int -> IO PerformanceCounterDescriptionFlagsKHR
Ptr b -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
Ptr PerformanceCounterDescriptionFlagsKHR
-> IO PerformanceCounterDescriptionFlagsKHR
Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> IO PerformanceCounterDescriptionFlagsKHR
Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
Ptr PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> IO ()
PerformanceCounterDescriptionFlagsKHR -> Int
(PerformanceCounterDescriptionFlagsKHR -> Int)
-> (PerformanceCounterDescriptionFlagsKHR -> Int)
-> (Ptr PerformanceCounterDescriptionFlagsKHR
    -> Int -> IO PerformanceCounterDescriptionFlagsKHR)
-> (Ptr PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ())
-> (forall b.
    Ptr b -> Int -> IO PerformanceCounterDescriptionFlagsKHR)
-> (forall b.
    Ptr b -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ())
-> (Ptr PerformanceCounterDescriptionFlagsKHR
    -> IO PerformanceCounterDescriptionFlagsKHR)
-> (Ptr PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR -> IO ())
-> Storable PerformanceCounterDescriptionFlagsKHR
forall b. Ptr b -> Int -> IO PerformanceCounterDescriptionFlagsKHR
forall b.
Ptr b -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> IO ()
$cpoke :: Ptr PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR -> IO ()
peek :: Ptr PerformanceCounterDescriptionFlagsKHR
-> IO PerformanceCounterDescriptionFlagsKHR
$cpeek :: Ptr PerformanceCounterDescriptionFlagsKHR
-> IO PerformanceCounterDescriptionFlagsKHR
pokeByteOff :: Ptr b -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
$cpokeByteOff :: forall b.
Ptr b -> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO PerformanceCounterDescriptionFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PerformanceCounterDescriptionFlagsKHR
pokeElemOff :: Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
$cpokeElemOff :: Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR -> IO ()
peekElemOff :: Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> IO PerformanceCounterDescriptionFlagsKHR
$cpeekElemOff :: Ptr PerformanceCounterDescriptionFlagsKHR
-> Int -> IO PerformanceCounterDescriptionFlagsKHR
alignment :: PerformanceCounterDescriptionFlagsKHR -> Int
$calignment :: PerformanceCounterDescriptionFlagsKHR -> Int
sizeOf :: PerformanceCounterDescriptionFlagsKHR -> Int
$csizeOf :: PerformanceCounterDescriptionFlagsKHR -> Int
Storable, PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR
-> Zero PerformanceCounterDescriptionFlagsKHR
forall a. a -> Zero a
zero :: PerformanceCounterDescriptionFlagsKHR
$czero :: PerformanceCounterDescriptionFlagsKHR
Zero, Eq PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR
Eq PerformanceCounterDescriptionFlagsKHR =>
(PerformanceCounterDescriptionFlagsKHR
 -> PerformanceCounterDescriptionFlagsKHR
 -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> PerformanceCounterDescriptionFlagsKHR
-> (Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR -> Int -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR -> Maybe Int)
-> (PerformanceCounterDescriptionFlagsKHR -> Int)
-> (PerformanceCounterDescriptionFlagsKHR -> Bool)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR
    -> Int -> PerformanceCounterDescriptionFlagsKHR)
-> (PerformanceCounterDescriptionFlagsKHR -> Int)
-> Bits PerformanceCounterDescriptionFlagsKHR
Int -> PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR -> Bool
PerformanceCounterDescriptionFlagsKHR -> Int
PerformanceCounterDescriptionFlagsKHR -> Maybe Int
PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR -> Int -> Bool
PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: PerformanceCounterDescriptionFlagsKHR -> Int
$cpopCount :: PerformanceCounterDescriptionFlagsKHR -> Int
rotateR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$crotateR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
rotateL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$crotateL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
unsafeShiftR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cunsafeShiftR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
shiftR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cshiftR :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
unsafeShiftL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cunsafeShiftL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
shiftL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cshiftL :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
isSigned :: PerformanceCounterDescriptionFlagsKHR -> Bool
$cisSigned :: PerformanceCounterDescriptionFlagsKHR -> Bool
bitSize :: PerformanceCounterDescriptionFlagsKHR -> Int
$cbitSize :: PerformanceCounterDescriptionFlagsKHR -> Int
bitSizeMaybe :: PerformanceCounterDescriptionFlagsKHR -> Maybe Int
$cbitSizeMaybe :: PerformanceCounterDescriptionFlagsKHR -> Maybe Int
testBit :: PerformanceCounterDescriptionFlagsKHR -> Int -> Bool
$ctestBit :: PerformanceCounterDescriptionFlagsKHR -> Int -> Bool
complementBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$ccomplementBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
clearBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cclearBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
setBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$csetBit :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
bit :: Int -> PerformanceCounterDescriptionFlagsKHR
$cbit :: Int -> PerformanceCounterDescriptionFlagsKHR
zeroBits :: PerformanceCounterDescriptionFlagsKHR
$czeroBits :: PerformanceCounterDescriptionFlagsKHR
rotate :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$crotate :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
shift :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
$cshift :: PerformanceCounterDescriptionFlagsKHR
-> Int -> PerformanceCounterDescriptionFlagsKHR
complement :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$ccomplement :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
xor :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$cxor :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
.|. :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$c.|. :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
.&. :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$c.&. :: PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
-> PerformanceCounterDescriptionFlagsKHR
$cp1Bits :: Eq PerformanceCounterDescriptionFlagsKHR
Bits)

-- | 'PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR' specifies
-- that recording the counter /may/ have a noticeable performance impact.
pattern $bPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR :: PerformanceCounterDescriptionFlagsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR :: forall r.
PerformanceCounterDescriptionFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = PerformanceCounterDescriptionFlagBitsKHR 0x00000001
-- | 'PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR' specifies
-- that concurrently recording the counter while other submitted command
-- buffers are running /may/ impact the accuracy of the recording.
pattern $bPERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR :: PerformanceCounterDescriptionFlagsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR :: forall r.
PerformanceCounterDescriptionFlagsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = PerformanceCounterDescriptionFlagBitsKHR 0x00000002

type PerformanceCounterDescriptionFlagsKHR = PerformanceCounterDescriptionFlagBitsKHR

instance Show PerformanceCounterDescriptionFlagBitsKHR where
  showsPrec :: Int -> PerformanceCounterDescriptionFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
    PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR"
    PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR -> String -> ShowS
showString "PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR"
    PerformanceCounterDescriptionFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PerformanceCounterDescriptionFlagBitsKHR 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("queueFamilyIndex" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)

instance Read PerformanceCounterDescriptionFlagBitsKHR where
  readPrec :: ReadPrec PerformanceCounterDescriptionFlagsKHR
readPrec = ReadPrec PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PerformanceCounterDescriptionFlagsKHR)]
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR", PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterDescriptionFlagsKHR
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR)
                            , ("PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR", PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure PerformanceCounterDescriptionFlagsKHR
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR)]
                     ReadPrec PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PerformanceCounterDescriptionFlagBitsKHR")
                       "queueFamilyIndex" ::: Word32
v <- ReadPrec ("queueFamilyIndex" ::: Word32)
-> ReadPrec ("queueFamilyIndex" ::: Word32)
forall a. ReadPrec a -> ReadPrec a
step ReadPrec ("queueFamilyIndex" ::: Word32)
forall a. Read a => ReadPrec a
readPrec
                       PerformanceCounterDescriptionFlagsKHR
-> ReadPrec PerformanceCounterDescriptionFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("queueFamilyIndex" ::: Word32)
-> PerformanceCounterDescriptionFlagsKHR
PerformanceCounterDescriptionFlagBitsKHR "queueFamilyIndex" ::: Word32
v)))


-- | VkAcquireProfilingLockFlagBitsKHR - Reserved for future use
--
-- = See Also
--
-- 'AcquireProfilingLockFlagsKHR'
newtype AcquireProfilingLockFlagBitsKHR = AcquireProfilingLockFlagBitsKHR Flags
  deriving newtype (AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
(AcquireProfilingLockFlagsKHR
 -> AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> Bool)
-> Eq AcquireProfilingLockFlagsKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c/= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
== :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c== :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
Eq, Eq AcquireProfilingLockFlagsKHR
Eq AcquireProfilingLockFlagsKHR =>
(AcquireProfilingLockFlagsKHR
 -> AcquireProfilingLockFlagsKHR -> Ordering)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> Ord AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Ordering
AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$cmin :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
max :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$cmax :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
>= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c>= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
> :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c> :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
<= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c<= :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
< :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
$c< :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Bool
compare :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Ordering
$ccompare :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> Ordering
$cp1Ord :: Eq AcquireProfilingLockFlagsKHR
Ord, Ptr b -> Int -> IO AcquireProfilingLockFlagsKHR
Ptr b -> Int -> AcquireProfilingLockFlagsKHR -> IO ()
Ptr AcquireProfilingLockFlagsKHR -> IO AcquireProfilingLockFlagsKHR
Ptr AcquireProfilingLockFlagsKHR
-> Int -> IO AcquireProfilingLockFlagsKHR
Ptr AcquireProfilingLockFlagsKHR
-> Int -> AcquireProfilingLockFlagsKHR -> IO ()
Ptr AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> IO ()
AcquireProfilingLockFlagsKHR -> Int
(AcquireProfilingLockFlagsKHR -> Int)
-> (AcquireProfilingLockFlagsKHR -> Int)
-> (Ptr AcquireProfilingLockFlagsKHR
    -> Int -> IO AcquireProfilingLockFlagsKHR)
-> (Ptr AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO AcquireProfilingLockFlagsKHR)
-> (forall b.
    Ptr b -> Int -> AcquireProfilingLockFlagsKHR -> IO ())
-> (Ptr AcquireProfilingLockFlagsKHR
    -> IO AcquireProfilingLockFlagsKHR)
-> (Ptr AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> IO ())
-> Storable AcquireProfilingLockFlagsKHR
forall b. Ptr b -> Int -> IO AcquireProfilingLockFlagsKHR
forall b. Ptr b -> Int -> AcquireProfilingLockFlagsKHR -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> IO ()
$cpoke :: Ptr AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> IO ()
peek :: Ptr AcquireProfilingLockFlagsKHR -> IO AcquireProfilingLockFlagsKHR
$cpeek :: Ptr AcquireProfilingLockFlagsKHR -> IO AcquireProfilingLockFlagsKHR
pokeByteOff :: Ptr b -> Int -> AcquireProfilingLockFlagsKHR -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> AcquireProfilingLockFlagsKHR -> IO ()
peekByteOff :: Ptr b -> Int -> IO AcquireProfilingLockFlagsKHR
$cpeekByteOff :: forall b. Ptr b -> Int -> IO AcquireProfilingLockFlagsKHR
pokeElemOff :: Ptr AcquireProfilingLockFlagsKHR
-> Int -> AcquireProfilingLockFlagsKHR -> IO ()
$cpokeElemOff :: Ptr AcquireProfilingLockFlagsKHR
-> Int -> AcquireProfilingLockFlagsKHR -> IO ()
peekElemOff :: Ptr AcquireProfilingLockFlagsKHR
-> Int -> IO AcquireProfilingLockFlagsKHR
$cpeekElemOff :: Ptr AcquireProfilingLockFlagsKHR
-> Int -> IO AcquireProfilingLockFlagsKHR
alignment :: AcquireProfilingLockFlagsKHR -> Int
$calignment :: AcquireProfilingLockFlagsKHR -> Int
sizeOf :: AcquireProfilingLockFlagsKHR -> Int
$csizeOf :: AcquireProfilingLockFlagsKHR -> Int
Storable, AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR -> Zero AcquireProfilingLockFlagsKHR
forall a. a -> Zero a
zero :: AcquireProfilingLockFlagsKHR
$czero :: AcquireProfilingLockFlagsKHR
Zero, Eq AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR
Eq AcquireProfilingLockFlagsKHR =>
(AcquireProfilingLockFlagsKHR
 -> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> AcquireProfilingLockFlagsKHR
-> (Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR -> Int -> Bool)
-> (AcquireProfilingLockFlagsKHR -> Maybe Int)
-> (AcquireProfilingLockFlagsKHR -> Int)
-> (AcquireProfilingLockFlagsKHR -> Bool)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR
    -> Int -> AcquireProfilingLockFlagsKHR)
-> (AcquireProfilingLockFlagsKHR -> Int)
-> Bits AcquireProfilingLockFlagsKHR
Int -> AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR -> Bool
AcquireProfilingLockFlagsKHR -> Int
AcquireProfilingLockFlagsKHR -> Maybe Int
AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR -> Int -> Bool
AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: AcquireProfilingLockFlagsKHR -> Int
$cpopCount :: AcquireProfilingLockFlagsKHR -> Int
rotateR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$crotateR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
rotateL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$crotateL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
unsafeShiftR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cunsafeShiftR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
shiftR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cshiftR :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
unsafeShiftL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cunsafeShiftL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
shiftL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cshiftL :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
isSigned :: AcquireProfilingLockFlagsKHR -> Bool
$cisSigned :: AcquireProfilingLockFlagsKHR -> Bool
bitSize :: AcquireProfilingLockFlagsKHR -> Int
$cbitSize :: AcquireProfilingLockFlagsKHR -> Int
bitSizeMaybe :: AcquireProfilingLockFlagsKHR -> Maybe Int
$cbitSizeMaybe :: AcquireProfilingLockFlagsKHR -> Maybe Int
testBit :: AcquireProfilingLockFlagsKHR -> Int -> Bool
$ctestBit :: AcquireProfilingLockFlagsKHR -> Int -> Bool
complementBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$ccomplementBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
clearBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cclearBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
setBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$csetBit :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
bit :: Int -> AcquireProfilingLockFlagsKHR
$cbit :: Int -> AcquireProfilingLockFlagsKHR
zeroBits :: AcquireProfilingLockFlagsKHR
$czeroBits :: AcquireProfilingLockFlagsKHR
rotate :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$crotate :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
shift :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
$cshift :: AcquireProfilingLockFlagsKHR -> Int -> AcquireProfilingLockFlagsKHR
complement :: AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$ccomplement :: AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
xor :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$cxor :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
.|. :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$c.|. :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
.&. :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$c.&. :: AcquireProfilingLockFlagsKHR
-> AcquireProfilingLockFlagsKHR -> AcquireProfilingLockFlagsKHR
$cp1Bits :: Eq AcquireProfilingLockFlagsKHR
Bits)



type AcquireProfilingLockFlagsKHR = AcquireProfilingLockFlagBitsKHR

instance Show AcquireProfilingLockFlagBitsKHR where
  showsPrec :: Int -> AcquireProfilingLockFlagsKHR -> ShowS
showsPrec p :: Int
p = \case
    AcquireProfilingLockFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "AcquireProfilingLockFlagBitsKHR 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ("queueFamilyIndex" ::: Word32) -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex "queueFamilyIndex" ::: Word32
x)

instance Read AcquireProfilingLockFlagBitsKHR where
  readPrec :: ReadPrec AcquireProfilingLockFlagsKHR
readPrec = ReadPrec AcquireProfilingLockFlagsKHR
-> ReadPrec AcquireProfilingLockFlagsKHR
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec AcquireProfilingLockFlagsKHR)]
-> ReadPrec AcquireProfilingLockFlagsKHR
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose []
                     ReadPrec AcquireProfilingLockFlagsKHR
-> ReadPrec AcquireProfilingLockFlagsKHR
-> ReadPrec AcquireProfilingLockFlagsKHR
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
                     Int
-> ReadPrec AcquireProfilingLockFlagsKHR
-> ReadPrec AcquireProfilingLockFlagsKHR
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
                       Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "AcquireProfilingLockFlagBitsKHR")
                       "queueFamilyIndex" ::: Word32
v <- ReadPrec ("queueFamilyIndex" ::: Word32)
-> ReadPrec ("queueFamilyIndex" ::: Word32)
forall a. ReadPrec a -> ReadPrec a
step ReadPrec ("queueFamilyIndex" ::: Word32)
forall a. Read a => ReadPrec a
readPrec
                       AcquireProfilingLockFlagsKHR
-> ReadPrec AcquireProfilingLockFlagsKHR
forall (f :: * -> *) a. Applicative f => a -> f a
pure (("queueFamilyIndex" ::: Word32) -> AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagBitsKHR "queueFamilyIndex" ::: Word32
v)))


type KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_KHR_PERFORMANCE_QUERY_SPEC_VERSION"
pattern KHR_PERFORMANCE_QUERY_SPEC_VERSION :: forall a . Integral a => a
pattern $bKHR_PERFORMANCE_QUERY_SPEC_VERSION :: a
$mKHR_PERFORMANCE_QUERY_SPEC_VERSION :: forall r a. Integral a => a -> (Void# -> r) -> (Void# -> r) -> r
KHR_PERFORMANCE_QUERY_SPEC_VERSION = 1


type KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"

-- No documentation found for TopLevel "VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME"
pattern KHR_PERFORMANCE_QUERY_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $bKHR_PERFORMANCE_QUERY_EXTENSION_NAME :: a
$mKHR_PERFORMANCE_QUERY_EXTENSION_NAME :: forall r a.
(Eq a, IsString a) =>
a -> (Void# -> r) -> (Void# -> r) -> r
KHR_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_KHR_performance_query"