{-# language CPP #-}
-- | = Name
--
-- VK_KHR_performance_query - device extension
--
-- == VK_KHR_performance_query
--
-- [__Name String__]
--     @VK_KHR_performance_query@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     117
--
-- [__Revision__]
--     1
--
-- [__Extension and Version Dependencies__]
--
--     -   Requires Vulkan 1.0
--
--     -   Requires @VK_KHR_get_physical_device_properties2@
--
-- [__Special Use__]
--
--     -   <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#extendingvulkan-compatibility-specialuse Developer tools>
--
-- [__Contact__]
--
--     -   Alon Or-bach
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_KHR_performance_query:%20&body=@alonorbach%20 >
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2019-10-08
--
-- [__IP Status__]
--     No known IP claims.
--
-- [__Contributors__]
--
--     -   Jesse Barker, Unity Technologies
--
--     -   Kenneth Benzie, Codeplay
--
--     -   Jan-Harald Fredriksen, ARM
--
--     -   Jeff Leger, Qualcomm
--
--     -   Jesse Hall, Google
--
--     -   Tobias Hector, AMD
--
--     -   Neil Henning, Codeplay
--
--     -   Baldur Karlsson
--
--     -   Lionel Landwerlin, Intel
--
--     -   Peter Lohrmann, AMD
--
--     -   Alon Or-bach, Samsung
--
--     -   Daniel Rakos, AMD
--
--     -   Niklas Smedberg, Unity Technologies
--
--     -   Igor Ostrowski, Intel
--
-- == Description
--
-- The @VK_KHR_performance_query@ extension adds a mechanism to allow
-- querying of performance counters for use in applications and by
-- profiling tools.
--
-- Each queue family /may/ expose counters that /can/ be enabled on a queue
-- of that family. We extend 'Vulkan.Core10.Enums.QueryType.QueryType' to
-- add a new query type for performance queries, and chain a structure on
-- 'Vulkan.Core10.Query.QueryPoolCreateInfo' to specify the performance
-- queries to enable.
--
-- == New Commands
--
-- -   'acquireProfilingLockKHR'
--
-- -   'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR'
--
-- -   'getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR'
--
-- -   'releaseProfilingLockKHR'
--
-- == New Structures
--
-- -   'AcquireProfilingLockInfoKHR'
--
-- -   'PerformanceCounterDescriptionKHR'
--
-- -   'PerformanceCounterKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDevicePerformanceQueryFeaturesKHR'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDevicePerformanceQueryPropertiesKHR'
--
-- -   Extending 'Vulkan.Core10.Query.QueryPoolCreateInfo':
--
--     -   'QueryPoolPerformanceCreateInfoKHR'
--
-- -   Extending 'Vulkan.Core10.Queue.SubmitInfo':
--
--     -   'PerformanceQuerySubmitInfoKHR'
--
-- == New Unions
--
-- -   'PerformanceCounterResultKHR'
--
-- == New Enums
--
-- -   'AcquireProfilingLockFlagBitsKHR'
--
-- -   'PerformanceCounterDescriptionFlagBitsKHR'
--
-- -   'PerformanceCounterScopeKHR'
--
-- -   'PerformanceCounterStorageKHR'
--
-- -   'PerformanceCounterUnitKHR'
--
-- == New Bitmasks
--
-- -   'AcquireProfilingLockFlagsKHR'
--
-- -   'PerformanceCounterDescriptionFlagsKHR'
--
-- == New Enum Constants
--
-- -   'KHR_PERFORMANCE_QUERY_EXTENSION_NAME'
--
-- -   'KHR_PERFORMANCE_QUERY_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.QueryType.QueryType':
--
--     -   'Vulkan.Core10.Enums.QueryType.QUERY_TYPE_PERFORMANCE_QUERY_KHR'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PERFORMANCE_COUNTER_DESCRIPTION_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PERFORMANCE_COUNTER_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_FEATURES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_PERFORMANCE_QUERY_PROPERTIES_KHR'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR'
--
-- == Issues
--
-- 1) Should this extension include a mechanism to begin a query in command
-- buffer /A/ and end the query in command buffer /B/?
--
-- __RESOLVED__ No - queries are tied to command buffer creation and thus
-- have to be encapsulated within a single command buffer.
--
-- 2) Should this extension include a mechanism to begin and end queries
-- globally on the queue, not using the existing command buffer commands?
--
-- __RESOLVED__ No - for the same reasoning as the resolution of 1).
--
-- 3) Should this extension expose counters that require multiple passes?
--
-- __RESOLVED__ Yes - users should re-submit a command buffer with the same
-- commands in it multiple times, specifying the pass to count as the query
-- parameter in VkPerformanceQuerySubmitInfoKHR.
--
-- 4) How to handle counters across parallel workloads?
--
-- __RESOLVED__ In the spirit of Vulkan, a counter description flag
-- 'PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR' denotes
-- that the accuracy of a counter result is affected by parallel workloads.
--
-- 5) How to handle secondary command buffers?
--
-- __RESOLVED__ Secondary command buffers inherit any counter pass index
-- specified in the parent primary command buffer. Note: this is no longer
-- an issue after change from issue 10 resolution
--
-- 6) What commands does the profiling lock have to be held for?
--
-- __RESOLVED__ For any command buffer that is being queried with a
-- performance query pool, the profiling lock /must/ be held while that
-- command buffer is in the /recording/, /executable/, or /pending state/.
--
-- 7) Should we support
-- 'Vulkan.Core10.CommandBufferBuilding.cmdCopyQueryPoolResults'?
--
-- __RESOLVED__ Yes.
--
-- 8) Should we allow performance queries to interact with multiview?
--
-- __RESOLVED__ Yes, but the performance queries must be performed once for
-- each pass per view.
--
-- 9) Should a @queryCount > 1@ be usable for performance queries?
--
-- __RESOLVED__ Yes. Some vendors will have costly performance counter
-- query pool creation, and would rather if a certain set of counters were
-- to be used multiple times that a @queryCount > 1@ can be used to
-- amortize the instantiation cost.
--
-- 10) Should we introduce an indirect mechanism to set the counter pass
-- index?
--
-- __RESOLVED__ Specify the counter pass index at submit time instead to
-- avoid requiring re-recording of command buffers when multiple counter
-- passes needed.
--
-- == Examples
--
-- The following example shows how to find what performance counters a
-- queue family supports, setup a query pool to record these performance
-- counters, how to add the query pool to the command buffer to record
-- information, and how to get the results from the query pool.
--
-- > // A previously created physical device
-- > VkPhysicalDevice physicalDevice;
-- >
-- > // One of the queue families our device supports
-- > uint32_t queueFamilyIndex;
-- >
-- > uint32_t counterCount;
-- >
-- > // Get the count of counters supported
-- > vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
-- >   physicalDevice,
-- >   queueFamilyIndex,
-- >   &counterCount,
-- >   NULL,
-- >   NULL);
-- >
-- > VkPerformanceCounterKHR* counters =
-- >   malloc(sizeof(VkPerformanceCounterKHR) * counterCount);
-- > VkPerformanceCounterDescriptionKHR* counterDescriptions =
-- >   malloc(sizeof(VkPerformanceCounterDescriptionKHR) * counterCount);
-- >
-- > // Get the counters supported
-- > vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
-- >   physicalDevice,
-- >   queueFamilyIndex,
-- >   &counterCount,
-- >   counters,
-- >   counterDescriptions);
-- >
-- > // Try to enable the first 8 counters
-- > uint32_t enabledCounters[8];
-- >
-- > const uint32_t enabledCounterCount = min(counterCount, 8));
-- >
-- > for (uint32_t i = 0; i < enabledCounterCount; i++) {
-- >   enabledCounters[i] = i;
-- > }
-- >
-- > // A previously created device that had the performanceCounterQueryPools feature
-- > // set to VK_TRUE
-- > VkDevice device;
-- >
-- > VkQueryPoolPerformanceCreateInfoKHR performanceQueryCreateInfo = {
-- >   VK_STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR,
-- >   NULL,
-- >
-- >   // Specify the queue family that this performance query is performed on
-- >   queueFamilyIndex,
-- >
-- >   // The number of counters to enable
-- >   enabledCounterCount,
-- >
-- >   // The array of indices of counters to enable
-- >   enabledCounters
-- > };
-- >
-- >
-- > // Get the number of passes our counters will require.
-- > uint32_t numPasses;
-- >
-- > vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(
-- >   physicalDevice,
-- >   &performanceQueryCreateInfo,
-- >   &numPasses);
-- >
-- > VkQueryPoolCreateInfo queryPoolCreateInfo = {
-- >   VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO,
-- >   &performanceQueryCreateInfo,
-- >   0,
-- >
-- >   // Using our new query type here
-- >   VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR,
-- >
-- >   1,
-- >
-- >   0
-- > };
-- >
-- > VkQueryPool queryPool;
-- >
-- > VkResult result = vkCreateQueryPool(
-- >   device,
-- >   &queryPoolCreateInfo,
-- >   NULL,
-- >   &queryPool);
-- >
-- > assert(VK_SUCCESS == result);
-- >
-- > // A queue from queueFamilyIndex
-- > VkQueue queue;
-- >
-- > // A command buffer we want to record counters on
-- > VkCommandBuffer commandBuffer;
-- >
-- > VkCommandBufferBeginInfo commandBufferBeginInfo = {
-- >   VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
-- >   NULL,
-- >   0,
-- >   NULL
-- > };
-- >
-- > VkAcquireProfilingLockInfoKHR lockInfo = {
-- >   VK_STRUCTURE_TYPE_ACQUIRE_PROFILING_LOCK_INFO_KHR,
-- >   NULL,
-- >   0,
-- >   UINT64_MAX // Wait forever for the lock
-- > };
-- >
-- > // Acquire the profiling lock before we record command buffers
-- > // that will use performance queries
-- >
-- > result = vkAcquireProfilingLockKHR(device, &lockInfo);
-- >
-- > assert(VK_SUCCESS == result);
-- >
-- > result = vkBeginCommandBuffer(commandBuffer, &commandBufferBeginInfo);
-- >
-- > assert(VK_SUCCESS == result);
-- >
-- > vkCmdResetQueryPool(
-- >   commandBuffer,
-- >   queryPool,
-- >   0,
-- >   1);
-- >
-- > vkCmdBeginQuery(
-- >   commandBuffer,
-- >   queryPool,
-- >   0,
-- >   0);
-- >
-- > // Perform the commands you want to get performance information on
-- > // ...
-- >
-- > // Perform a barrier to ensure all previous commands were complete before
-- > // ending the query
-- > vkCmdPipelineBarrier(commandBuffer,
-- >   VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
-- >   VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
-- >   0,
-- >   0,
-- >   NULL,
-- >   0,
-- >   NULL,
-- >   0,
-- >   NULL);
-- >
-- > vkCmdEndQuery(
-- >   commandBuffer,
-- >   queryPool,
-- >   0);
-- >
-- > result = vkEndCommandBuffer(commandBuffer);
-- >
-- > assert(VK_SUCCESS == result);
-- >
-- > for (uint32_t counterPass = 0; counterPass < numPasses; counterPass++) {
-- >
-- >   VkPerformanceQuerySubmitInfoKHR performanceQuerySubmitInfo = {
-- >     VK_STRUCTURE_TYPE_PERFORMANCE_QUERY_SUBMIT_INFO_KHR,
-- >     NULL,
-- >     counterPass
-- >   };
-- >
-- >
-- >   // Submit the command buffer and wait for its completion
-- >   // ...
-- > }
-- >
-- > // Release the profiling lock after the command buffer is no longer in the
-- > // pending state.
-- > vkReleaseProfilingLockKHR(device);
-- >
-- > result = vkResetCommandBuffer(commandBuffer, 0);
-- >
-- > assert(VK_SUCCESS == result);
-- >
-- > // Create an array to hold the results of all counters
-- > VkPerformanceCounterResultKHR* recordedCounters = malloc(
-- >   sizeof(VkPerformanceCounterResultKHR) * enabledCounterCount);
-- >
-- > result = vkGetQueryPoolResults(
-- >   device,
-- >   queryPool,
-- >   0,
-- >   1,
-- >   sizeof(VkPerformanceCounterResultKHR) * enabledCounterCount,
-- >   recordedCounters,
-- >   sizeof(VkPerformanceCounterResultKHR),
-- >   NULL);
-- >
-- > // recordedCounters is filled with our counters, we'll look at one for posterity
-- > switch (counters[0].storage) {
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_INT32:
-- >     // use recordCounters[0].int32 to get at the counter result!
-- >     break;
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_INT64:
-- >     // use recordCounters[0].int64 to get at the counter result!
-- >     break;
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_UINT32:
-- >     // use recordCounters[0].uint32 to get at the counter result!
-- >     break;
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_UINT64:
-- >     // use recordCounters[0].uint64 to get at the counter result!
-- >     break;
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT32:
-- >     // use recordCounters[0].float32 to get at the counter result!
-- >     break;
-- >   case VK_PERFORMANCE_COUNTER_STORAGE_FLOAT64:
-- >     // use recordCounters[0].float64 to get at the counter result!
-- >     break;
-- > }
--
-- == Version History
--
-- -   Revision 1, 2019-10-08
--
-- = See Also
--
-- 'AcquireProfilingLockFlagBitsKHR', 'AcquireProfilingLockFlagsKHR',
-- 'AcquireProfilingLockInfoKHR',
-- 'PerformanceCounterDescriptionFlagBitsKHR',
-- 'PerformanceCounterDescriptionFlagsKHR',
-- 'PerformanceCounterDescriptionKHR', 'PerformanceCounterKHR',
-- 'PerformanceCounterResultKHR', 'PerformanceCounterScopeKHR',
-- 'PerformanceCounterStorageKHR', 'PerformanceCounterUnitKHR',
-- 'PerformanceQuerySubmitInfoKHR',
-- 'PhysicalDevicePerformanceQueryFeaturesKHR',
-- 'PhysicalDevicePerformanceQueryPropertiesKHR',
-- 'QueryPoolPerformanceCreateInfoKHR', 'acquireProfilingLockKHR',
-- 'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR',
-- 'getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR',
-- 'releaseProfilingLockKHR'
--
-- = Document Notes
--
-- For more information, see the
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_performance_query Vulkan Specification>
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_KHR_performance_query  ( enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR
                                                   , getPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
                                                   , acquireProfilingLockKHR
                                                   , releaseProfilingLockKHR
                                                   , pattern QUERY_SCOPE_COMMAND_BUFFER_KHR
                                                   , pattern QUERY_SCOPE_RENDER_PASS_KHR
                                                   , pattern QUERY_SCOPE_COMMAND_KHR
                                                   , pattern PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR
                                                   , pattern PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR
                                                   , 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
                                                                                 , ..
                                                                                 )
                                                   , PerformanceCounterDescriptionFlagsKHR
                                                   , PerformanceCounterDescriptionFlagBitsKHR( PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR
                                                                                             , PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR
                                                                                             , ..
                                                                                             )
                                                   , AcquireProfilingLockFlagsKHR
                                                   , AcquireProfilingLockFlagBitsKHR(..)
                                                   , 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 Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
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.Show (showString)
import GHC.Show (showsPrec)
import Numeric (showHex)
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 Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.Bits (Bits)
import Data.Bits (FiniteBits)
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.Generics (Generic)
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 GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Word (Word8)
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.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (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.FundamentalTypes (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.FundamentalTypes (Flags)
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.Core10.APIConstants (UUID_SIZE)
import Vulkan.Exception (VulkanException(..))
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
--
-- = 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)
--
-- -   #VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounterCount-parameter#
--     @pCounterCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   #VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounters-parameter#
--     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
--
-- -   #VUID-vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR-pCounterDescriptions-parameter#
--     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@ is the handle to the physical device whose queue family
                                                                 -- performance query counter properties will be queried.
                                                                 PhysicalDevice
                                                              -> -- | @queueFamilyIndex@ is the index into the queue family of the physical
                                                                 -- device we want to get properties for.
                                                                 ("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
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" (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
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR" (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
--
-- = 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@ is the handle to the physical device whose queue family
                                                         -- performance query counter properties will be queried.
                                                         --
                                                         -- #VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-physicalDevice-parameter#
                                                         -- @physicalDevice@ /must/ be a valid
                                                         -- 'Vulkan.Core10.Handles.PhysicalDevice' handle
                                                         PhysicalDevice
                                                      -> -- | @pPerformanceQueryCreateInfo@ is a pointer to a
                                                         -- 'QueryPoolPerformanceCreateInfoKHR' of the performance query that is to
                                                         -- be created.
                                                         --
                                                         -- #VUID-vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR-pPerformanceQueryCreateInfo-parameter#
                                                         -- @pPerformanceQueryCreateInfo@ /must/ be a valid pointer to a valid
                                                         -- 'QueryPoolPerformanceCreateInfoKHR' structure
                                                         ("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
$ String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR" (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
--
-- = 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.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.TIMEOUT'
--
-- = See Also
--
-- 'AcquireProfilingLockInfoKHR', 'Vulkan.Core10.Handles.Device'
acquireProfilingLockKHR :: forall io
                         . (MonadIO io)
                        => -- | @device@ is the logical device to profile.
                           --
                           -- #VUID-vkAcquireProfilingLockKHR-device-parameter# @device@ /must/ be a
                           -- valid 'Vulkan.Core10.Handles.Device' handle
                           Device
                        -> -- | @pInfo@ is a pointer to a 'AcquireProfilingLockInfoKHR' structure which
                           -- contains information about how the profiling is to be acquired.
                           --
                           -- #VUID-vkAcquireProfilingLockKHR-pInfo-parameter# @pInfo@ /must/ be a
                           -- valid pointer to a valid 'AcquireProfilingLockInfoKHR' structure
                           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
$ String -> IO Result -> IO Result
forall a. String -> IO a -> IO a
traceAroundEvent "vkAcquireProfilingLockKHR" (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
--
-- == Valid Usage
--
-- -   #VUID-vkReleaseProfilingLockKHR-device-03235# The profiling lock of
--     @device@ /must/ have been held via a previous successful call to
--     'acquireProfilingLockKHR'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkReleaseProfilingLockKHR-device-parameter# @device@ /must/ be
--     a valid 'Vulkan.Core10.Handles.Device' handle
--
-- = See Also
--
-- 'Vulkan.Core10.Handles.Device'
releaseProfilingLockKHR :: forall io
                         . (MonadIO io)
                        => -- | @device@ is the logical device to cease profiling on.
                           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
  String -> IO () -> IO ()
forall a. String -> IO a -> IO a
traceAroundEvent "vkReleaseProfilingLockKHR" (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
$ ()


-- No documentation found for TopLevel "VK_QUERY_SCOPE_COMMAND_BUFFER_KHR"
pattern $bQUERY_SCOPE_COMMAND_BUFFER_KHR :: PerformanceCounterScopeKHR
$mQUERY_SCOPE_COMMAND_BUFFER_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
QUERY_SCOPE_COMMAND_BUFFER_KHR = PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR


-- No documentation found for TopLevel "VK_QUERY_SCOPE_RENDER_PASS_KHR"
pattern $bQUERY_SCOPE_RENDER_PASS_KHR :: PerformanceCounterScopeKHR
$mQUERY_SCOPE_RENDER_PASS_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
QUERY_SCOPE_RENDER_PASS_KHR = PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR


-- No documentation found for TopLevel "VK_QUERY_SCOPE_COMMAND_KHR"
pattern $bQUERY_SCOPE_COMMAND_KHR :: PerformanceCounterScopeKHR
$mQUERY_SCOPE_COMMAND_KHR :: forall r.
PerformanceCounterScopeKHR -> (Void# -> r) -> (Void# -> r) -> r
QUERY_SCOPE_COMMAND_KHR = PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR


-- No documentation found for TopLevel "VK_PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR"
pattern $bPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR :: PerformanceCounterDescriptionFlagBitsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR :: forall r.
PerformanceCounterDescriptionFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_KHR = PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR


-- No documentation found for TopLevel "VK_PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR"
pattern $bPERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR :: PerformanceCounterDescriptionFlagBitsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR :: forall r.
PerformanceCounterDescriptionFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_KHR = PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR


-- | VkPhysicalDevicePerformanceQueryFeaturesKHR - Structure describing
-- performance query support for an implementation
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePerformanceQueryFeaturesKHR = PhysicalDevicePerformanceQueryFeaturesKHR
  { -- | #features-performanceCounterQueryPools# @performanceCounterQueryPools@
    -- indicates whether the implementation supports performance counter query
    -- pools.
    PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
performanceCounterQueryPools :: Bool
  , -- | #features-performanceCounterMultipleQueryPools#
    -- @performanceCounterMultipleQueryPools@ indicates whether the
    -- implementation supports using multiple performance query pools in a
    -- primary command buffer and secondary command buffers executed within it.
    PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
performanceCounterMultipleQueryPools :: Bool
  }
  deriving (Typeable, PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
(PhysicalDevicePerformanceQueryFeaturesKHR
 -> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool)
-> (PhysicalDevicePerformanceQueryFeaturesKHR
    -> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool)
-> Eq PhysicalDevicePerformanceQueryFeaturesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
$c/= :: PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
== :: PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
$c== :: PhysicalDevicePerformanceQueryFeaturesKHR
-> PhysicalDevicePerformanceQueryFeaturesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePerformanceQueryFeaturesKHR)
#endif
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.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDevicePerformanceQueryPropertiesKHR = PhysicalDevicePerformanceQueryPropertiesKHR
  { -- | @allowCommandBufferQueryCopies@ is 'Vulkan.Core10.FundamentalTypes.TRUE'
    -- if the performance query pools are allowed to be used with
    -- 'Vulkan.Core10.CommandBufferBuilding.cmdCopyQueryPoolResults'.
    PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
allowCommandBufferQueryCopies :: Bool }
  deriving (Typeable, PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
(PhysicalDevicePerformanceQueryPropertiesKHR
 -> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool)
-> (PhysicalDevicePerformanceQueryPropertiesKHR
    -> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool)
-> Eq PhysicalDevicePerformanceQueryPropertiesKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
$c/= :: PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
== :: PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
$c== :: PhysicalDevicePerformanceQueryPropertiesKHR
-> PhysicalDevicePerformanceQueryPropertiesKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDevicePerformanceQueryPropertiesKHR)
#endif
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)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PerformanceCounterKHR)
#endif
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
-> PerformanceCounterDescriptionFlagBitsKHR
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)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PerformanceCounterDescriptionKHR)
#endif
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 PerformanceCounterDescriptionFlagBitsKHR
-> PerformanceCounterDescriptionFlagBitsKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr PerformanceCounterDescriptionFlagBitsKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 16 :: Ptr PerformanceCounterDescriptionFlagsKHR)) (PerformanceCounterDescriptionFlagBitsKHR
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
    PerformanceCounterDescriptionFlagBitsKHR
flags <- Ptr PerformanceCounterDescriptionFlagBitsKHR
-> IO PerformanceCounterDescriptionFlagBitsKHR
forall a. Storable a => Ptr a -> IO a
peek @PerformanceCounterDescriptionFlagsKHR (("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR
p ("pCounterDescriptions" ::: Ptr PerformanceCounterDescriptionKHR)
-> Int -> Ptr PerformanceCounterDescriptionFlagBitsKHR
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
$ PerformanceCounterDescriptionFlagBitsKHR
-> ByteString
-> ByteString
-> ByteString
-> PerformanceCounterDescriptionKHR
PerformanceCounterDescriptionKHR
             PerformanceCounterDescriptionFlagBitsKHR
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 = PerformanceCounterDescriptionFlagBitsKHR
-> ByteString
-> ByteString
-> ByteString
-> PerformanceCounterDescriptionKHR
PerformanceCounterDescriptionKHR
           PerformanceCounterDescriptionFlagBitsKHR
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
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-queueFamilyIndex-03236#
--     @queueFamilyIndex@ /must/ be a valid queue family index of the
--     device
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-performanceCounterQueryPools-03237#
--     The
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#features-performanceCounterQueryPools performanceCounterQueryPools>
--     feature /must/ be enabled
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-03321#
--     Each element of @pCounterIndices@ /must/ be in the range of counters
--     reported by
--     'enumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR' for
--     the queue family specified in @queueFamilyIndex@
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_CREATE_INFO_KHR'
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-pCounterIndices-parameter#
--     @pCounterIndices@ /must/ be a valid pointer to an array of
--     @counterIndexCount@ @uint32_t@ values
--
-- -   #VUID-VkQueryPoolPerformanceCreateInfoKHR-counterIndexCount-arraylength#
--     @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)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (QueryPoolPerformanceCreateInfoKHR)
#endif
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@ is reserved for future use.
    --
    -- #VUID-VkAcquireProfilingLockInfoKHR-flags-zerobitmask# @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, AcquireProfilingLockInfoKHR -> AcquireProfilingLockInfoKHR -> Bool
(AcquireProfilingLockInfoKHR
 -> AcquireProfilingLockInfoKHR -> Bool)
-> (AcquireProfilingLockInfoKHR
    -> AcquireProfilingLockInfoKHR -> Bool)
-> Eq AcquireProfilingLockInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcquireProfilingLockInfoKHR -> AcquireProfilingLockInfoKHR -> Bool
$c/= :: AcquireProfilingLockInfoKHR -> AcquireProfilingLockInfoKHR -> Bool
== :: AcquireProfilingLockInfoKHR -> AcquireProfilingLockInfoKHR -> Bool
$c== :: AcquireProfilingLockInfoKHR -> AcquireProfilingLockInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (AcquireProfilingLockInfoKHR)
#endif
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@ specifies which counter pass index is active.
    --
    -- #VUID-VkPerformanceQuerySubmitInfoKHR-counterPassIndex-03221#
    -- @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, PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> Bool
(PerformanceQuerySubmitInfoKHR
 -> PerformanceQuerySubmitInfoKHR -> Bool)
-> (PerformanceQuerySubmitInfoKHR
    -> PerformanceQuerySubmitInfoKHR -> Bool)
-> Eq PerformanceQuerySubmitInfoKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> Bool
$c/= :: PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> Bool
== :: PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> Bool
$c== :: PerformanceQuerySubmitInfoKHR
-> PerformanceQuerySubmitInfoKHR -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PerformanceQuerySubmitInfoKHR)
#endif
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 #-}

conNamePerformanceCounterScopeKHR :: String
conNamePerformanceCounterScopeKHR :: String
conNamePerformanceCounterScopeKHR = "PerformanceCounterScopeKHR"

enumPrefixPerformanceCounterScopeKHR :: String
enumPrefixPerformanceCounterScopeKHR :: String
enumPrefixPerformanceCounterScopeKHR = "PERFORMANCE_COUNTER_SCOPE_"

showTablePerformanceCounterScopeKHR :: [(PerformanceCounterScopeKHR, String)]
showTablePerformanceCounterScopeKHR :: [(PerformanceCounterScopeKHR, String)]
showTablePerformanceCounterScopeKHR =
  [ (PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, "COMMAND_BUFFER_KHR")
  , (PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR   , "RENDER_PASS_KHR")
  , (PerformanceCounterScopeKHR
PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR       , "COMMAND_KHR")
  ]

instance Show PerformanceCounterScopeKHR where
  showsPrec :: Int -> PerformanceCounterScopeKHR -> ShowS
showsPrec = String
-> [(PerformanceCounterScopeKHR, String)]
-> String
-> (PerformanceCounterScopeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PerformanceCounterScopeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPerformanceCounterScopeKHR
                            [(PerformanceCounterScopeKHR, String)]
showTablePerformanceCounterScopeKHR
                            String
conNamePerformanceCounterScopeKHR
                            (\(PerformanceCounterScopeKHR x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read PerformanceCounterScopeKHR where
  readPrec :: ReadPrec PerformanceCounterScopeKHR
readPrec = String
-> [(PerformanceCounterScopeKHR, String)]
-> String
-> (Int32 -> PerformanceCounterScopeKHR)
-> ReadPrec PerformanceCounterScopeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPerformanceCounterScopeKHR
                          [(PerformanceCounterScopeKHR, String)]
showTablePerformanceCounterScopeKHR
                          String
conNamePerformanceCounterScopeKHR
                          Int32 -> PerformanceCounterScopeKHR
PerformanceCounterScopeKHR


-- | 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 #-}

conNamePerformanceCounterUnitKHR :: String
conNamePerformanceCounterUnitKHR :: String
conNamePerformanceCounterUnitKHR = "PerformanceCounterUnitKHR"

enumPrefixPerformanceCounterUnitKHR :: String
enumPrefixPerformanceCounterUnitKHR :: String
enumPrefixPerformanceCounterUnitKHR = "PERFORMANCE_COUNTER_UNIT_"

showTablePerformanceCounterUnitKHR :: [(PerformanceCounterUnitKHR, String)]
showTablePerformanceCounterUnitKHR :: [(PerformanceCounterUnitKHR, String)]
showTablePerformanceCounterUnitKHR =
  [ (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_GENERIC_KHR         , "GENERIC_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_PERCENTAGE_KHR      , "PERCENTAGE_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_NANOSECONDS_KHR     , "NANOSECONDS_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_BYTES_KHR           , "BYTES_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_BYTES_PER_SECOND_KHR, "BYTES_PER_SECOND_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_KELVIN_KHR          , "KELVIN_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_WATTS_KHR           , "WATTS_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_VOLTS_KHR           , "VOLTS_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_AMPS_KHR            , "AMPS_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_HERTZ_KHR           , "HERTZ_KHR")
  , (PerformanceCounterUnitKHR
PERFORMANCE_COUNTER_UNIT_CYCLES_KHR          , "CYCLES_KHR")
  ]

instance Show PerformanceCounterUnitKHR where
  showsPrec :: Int -> PerformanceCounterUnitKHR -> ShowS
showsPrec = String
-> [(PerformanceCounterUnitKHR, String)]
-> String
-> (PerformanceCounterUnitKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PerformanceCounterUnitKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPerformanceCounterUnitKHR
                            [(PerformanceCounterUnitKHR, String)]
showTablePerformanceCounterUnitKHR
                            String
conNamePerformanceCounterUnitKHR
                            (\(PerformanceCounterUnitKHR x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read PerformanceCounterUnitKHR where
  readPrec :: ReadPrec PerformanceCounterUnitKHR
readPrec = String
-> [(PerformanceCounterUnitKHR, String)]
-> String
-> (Int32 -> PerformanceCounterUnitKHR)
-> ReadPrec PerformanceCounterUnitKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPerformanceCounterUnitKHR
                          [(PerformanceCounterUnitKHR, String)]
showTablePerformanceCounterUnitKHR
                          String
conNamePerformanceCounterUnitKHR
                          Int32 -> PerformanceCounterUnitKHR
PerformanceCounterUnitKHR


-- | 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 #-}

conNamePerformanceCounterStorageKHR :: String
conNamePerformanceCounterStorageKHR :: String
conNamePerformanceCounterStorageKHR = "PerformanceCounterStorageKHR"

enumPrefixPerformanceCounterStorageKHR :: String
enumPrefixPerformanceCounterStorageKHR :: String
enumPrefixPerformanceCounterStorageKHR = "PERFORMANCE_COUNTER_STORAGE_"

showTablePerformanceCounterStorageKHR :: [(PerformanceCounterStorageKHR, String)]
showTablePerformanceCounterStorageKHR :: [(PerformanceCounterStorageKHR, String)]
showTablePerformanceCounterStorageKHR =
  [ (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_INT32_KHR  , "INT32_KHR")
  , (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_INT64_KHR  , "INT64_KHR")
  , (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_UINT32_KHR , "UINT32_KHR")
  , (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_UINT64_KHR , "UINT64_KHR")
  , (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_FLOAT32_KHR, "FLOAT32_KHR")
  , (PerformanceCounterStorageKHR
PERFORMANCE_COUNTER_STORAGE_FLOAT64_KHR, "FLOAT64_KHR")
  ]

instance Show PerformanceCounterStorageKHR where
  showsPrec :: Int -> PerformanceCounterStorageKHR -> ShowS
showsPrec = String
-> [(PerformanceCounterStorageKHR, String)]
-> String
-> (PerformanceCounterStorageKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PerformanceCounterStorageKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPerformanceCounterStorageKHR
                            [(PerformanceCounterStorageKHR, String)]
showTablePerformanceCounterStorageKHR
                            String
conNamePerformanceCounterStorageKHR
                            (\(PerformanceCounterStorageKHR x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read PerformanceCounterStorageKHR where
  readPrec :: ReadPrec PerformanceCounterStorageKHR
readPrec = String
-> [(PerformanceCounterStorageKHR, String)]
-> String
-> (Int32 -> PerformanceCounterStorageKHR)
-> ReadPrec PerformanceCounterStorageKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPerformanceCounterStorageKHR
                          [(PerformanceCounterStorageKHR, String)]
showTablePerformanceCounterStorageKHR
                          String
conNamePerformanceCounterStorageKHR
                          Int32 -> PerformanceCounterStorageKHR
PerformanceCounterStorageKHR


type PerformanceCounterDescriptionFlagsKHR = PerformanceCounterDescriptionFlagBitsKHR

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

-- | 'PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR'
-- specifies that recording the counter /may/ have a noticeable performance
-- impact.
pattern $bPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR :: PerformanceCounterDescriptionFlagBitsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR :: forall r.
PerformanceCounterDescriptionFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR =
  PerformanceCounterDescriptionFlagBitsKHR 0x00000001
-- | 'PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_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_BIT_KHR :: PerformanceCounterDescriptionFlagBitsKHR
$mPERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR :: forall r.
PerformanceCounterDescriptionFlagBitsKHR
-> (Void# -> r) -> (Void# -> r) -> r
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR =
  PerformanceCounterDescriptionFlagBitsKHR 0x00000002

conNamePerformanceCounterDescriptionFlagBitsKHR :: String
conNamePerformanceCounterDescriptionFlagBitsKHR :: String
conNamePerformanceCounterDescriptionFlagBitsKHR = "PerformanceCounterDescriptionFlagBitsKHR"

enumPrefixPerformanceCounterDescriptionFlagBitsKHR :: String
enumPrefixPerformanceCounterDescriptionFlagBitsKHR :: String
enumPrefixPerformanceCounterDescriptionFlagBitsKHR = "PERFORMANCE_COUNTER_DESCRIPTION_"

showTablePerformanceCounterDescriptionFlagBitsKHR :: [(PerformanceCounterDescriptionFlagBitsKHR, String)]
showTablePerformanceCounterDescriptionFlagBitsKHR :: [(PerformanceCounterDescriptionFlagBitsKHR, String)]
showTablePerformanceCounterDescriptionFlagBitsKHR =
  [ (PerformanceCounterDescriptionFlagBitsKHR
PERFORMANCE_COUNTER_DESCRIPTION_PERFORMANCE_IMPACTING_BIT_KHR, "PERFORMANCE_IMPACTING_BIT_KHR")
  , (PerformanceCounterDescriptionFlagBitsKHR
PERFORMANCE_COUNTER_DESCRIPTION_CONCURRENTLY_IMPACTED_BIT_KHR, "CONCURRENTLY_IMPACTED_BIT_KHR")
  ]

instance Show PerformanceCounterDescriptionFlagBitsKHR where
  showsPrec :: Int -> PerformanceCounterDescriptionFlagBitsKHR -> ShowS
showsPrec = String
-> [(PerformanceCounterDescriptionFlagBitsKHR, String)]
-> String
-> (PerformanceCounterDescriptionFlagBitsKHR
    -> "queueFamilyIndex" ::: Word32)
-> (("queueFamilyIndex" ::: Word32) -> ShowS)
-> Int
-> PerformanceCounterDescriptionFlagBitsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPerformanceCounterDescriptionFlagBitsKHR
                            [(PerformanceCounterDescriptionFlagBitsKHR, String)]
showTablePerformanceCounterDescriptionFlagBitsKHR
                            String
conNamePerformanceCounterDescriptionFlagBitsKHR
                            (\(PerformanceCounterDescriptionFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
                            (\x :: "queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString "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 PerformanceCounterDescriptionFlagBitsKHR
readPrec = String
-> [(PerformanceCounterDescriptionFlagBitsKHR, String)]
-> String
-> (("queueFamilyIndex" ::: Word32)
    -> PerformanceCounterDescriptionFlagBitsKHR)
-> ReadPrec PerformanceCounterDescriptionFlagBitsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPerformanceCounterDescriptionFlagBitsKHR
                          [(PerformanceCounterDescriptionFlagBitsKHR, String)]
showTablePerformanceCounterDescriptionFlagBitsKHR
                          String
conNamePerformanceCounterDescriptionFlagBitsKHR
                          ("queueFamilyIndex" ::: Word32)
-> PerformanceCounterDescriptionFlagBitsKHR
PerformanceCounterDescriptionFlagBitsKHR


type AcquireProfilingLockFlagsKHR = AcquireProfilingLockFlagBitsKHR

-- | 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, Bits AcquireProfilingLockFlagsKHR
Bits AcquireProfilingLockFlagsKHR =>
(AcquireProfilingLockFlagsKHR -> Int)
-> (AcquireProfilingLockFlagsKHR -> Int)
-> (AcquireProfilingLockFlagsKHR -> Int)
-> FiniteBits AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagsKHR -> Int
forall b.
Bits b =>
(b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b
countTrailingZeros :: AcquireProfilingLockFlagsKHR -> Int
$ccountTrailingZeros :: AcquireProfilingLockFlagsKHR -> Int
countLeadingZeros :: AcquireProfilingLockFlagsKHR -> Int
$ccountLeadingZeros :: AcquireProfilingLockFlagsKHR -> Int
finiteBitSize :: AcquireProfilingLockFlagsKHR -> Int
$cfiniteBitSize :: AcquireProfilingLockFlagsKHR -> Int
$cp1FiniteBits :: Bits AcquireProfilingLockFlagsKHR
FiniteBits)



conNameAcquireProfilingLockFlagBitsKHR :: String
conNameAcquireProfilingLockFlagBitsKHR :: String
conNameAcquireProfilingLockFlagBitsKHR = "AcquireProfilingLockFlagBitsKHR"

enumPrefixAcquireProfilingLockFlagBitsKHR :: String
enumPrefixAcquireProfilingLockFlagBitsKHR :: String
enumPrefixAcquireProfilingLockFlagBitsKHR = ""

showTableAcquireProfilingLockFlagBitsKHR :: [(AcquireProfilingLockFlagBitsKHR, String)]
showTableAcquireProfilingLockFlagBitsKHR :: [(AcquireProfilingLockFlagsKHR, String)]
showTableAcquireProfilingLockFlagBitsKHR = []

instance Show AcquireProfilingLockFlagBitsKHR where
  showsPrec :: Int -> AcquireProfilingLockFlagsKHR -> ShowS
showsPrec = String
-> [(AcquireProfilingLockFlagsKHR, String)]
-> String
-> (AcquireProfilingLockFlagsKHR -> "queueFamilyIndex" ::: Word32)
-> (("queueFamilyIndex" ::: Word32) -> ShowS)
-> Int
-> AcquireProfilingLockFlagsKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixAcquireProfilingLockFlagBitsKHR
                            [(AcquireProfilingLockFlagsKHR, String)]
showTableAcquireProfilingLockFlagBitsKHR
                            String
conNameAcquireProfilingLockFlagBitsKHR
                            (\(AcquireProfilingLockFlagBitsKHR x :: "queueFamilyIndex" ::: Word32
x) -> "queueFamilyIndex" ::: Word32
x)
                            (\x :: "queueFamilyIndex" ::: Word32
x -> String -> ShowS
showString "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 = String
-> [(AcquireProfilingLockFlagsKHR, String)]
-> String
-> (("queueFamilyIndex" ::: Word32)
    -> AcquireProfilingLockFlagsKHR)
-> ReadPrec AcquireProfilingLockFlagsKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixAcquireProfilingLockFlagBitsKHR
                          [(AcquireProfilingLockFlagsKHR, String)]
showTableAcquireProfilingLockFlagBitsKHR
                          String
conNameAcquireProfilingLockFlagBitsKHR
                          ("queueFamilyIndex" ::: Word32) -> AcquireProfilingLockFlagsKHR
AcquireProfilingLockFlagBitsKHR


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"