Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
VK_INTEL_performance_query - device extension
VK_INTEL_performance_query
- Name String
VK_INTEL_performance_query
- Extension Type
- Device extension
- Registered Extension Number
- 211
- Revision
- 2
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Special Use
- Contact
Other Extension Metadata
- Last Modified Date
- 2018-05-16
- IP Status
- No known IP claims.
- Contributors
- Lionel Landwerlin, Intel
- Piotr Maciejewski, Intel
Description
This extension allows an application to capture performance data to be interpreted by a external application or library.
Such a library is available at : https://github.com/intel/metrics-discovery
Performance analysis tools such as Graphics Performance Analyzers make use of this extension and the metrics-discovery library to present the data in a human readable way.
New Object Types
New Commands
cmdSetPerformanceMarkerINTEL
cmdSetPerformanceOverrideINTEL
cmdSetPerformanceStreamMarkerINTEL
getPerformanceParameterINTEL
initializePerformanceApiINTEL
queueSetPerformanceConfigurationINTEL
releasePerformanceConfigurationINTEL
uninitializePerformanceApiINTEL
New Structures
PerformanceConfigurationAcquireInfoINTEL
PerformanceMarkerInfoINTEL
PerformanceOverrideInfoINTEL
PerformanceStreamMarkerInfoINTEL
PerformanceValueINTEL
Extending
QueryPoolCreateInfo
:
New Unions
New Enums
PerformanceOverrideTypeINTEL
PerformanceParameterTypeINTEL
PerformanceValueTypeINTEL
QueryPoolSamplingModeINTEL
New Enum Constants
INTEL_PERFORMANCE_QUERY_SPEC_VERSION
Extending
ObjectType
:Extending
QueryType
:Extending
StructureType
:STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL
STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL
STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL
STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL
STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL
STRUCTURE_TYPE_QUERY_POOL_PERFORMANCE_QUERY_CREATE_INFO_INTEL
Example Code
// A previously created device VkDevice device; // A queue derived from the device VkQueue queue; VkInitializePerformanceApiInfoINTEL performanceApiInfoIntel = { VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL, NULL, NULL }; vkInitializePerformanceApiINTEL( device, &performanceApiInfoIntel); VkQueryPoolPerformanceQueryCreateInfoINTEL queryPoolIntel = { VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL, NULL, VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL, }; VkQueryPoolCreateInfo queryPoolCreateInfo = { VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, &queryPoolIntel, 0, VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL, 1, 0 }; VkQueryPool queryPool; VkResult result = vkCreateQueryPool( device, &queryPoolCreateInfo, NULL, &queryPool); assert(VK_SUCCESS == result); // A command buffer we want to record counters on VkCommandBuffer commandBuffer; VkCommandBufferBeginInfo commandBufferBeginInfo = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, NULL, VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, NULL }; 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); VkPerformanceConfigurationAcquireInfoINTEL performanceConfigurationAcquireInfo = { VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL, NULL, VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL }; VkPerformanceConfigurationINTEL performanceConfigurationIntel; result = vkAcquirePerformanceConfigurationINTEL( device, &performanceConfigurationAcquireInfo, &performanceConfigurationIntel); vkQueueSetPerformanceConfigurationINTEL(queue, performanceConfigurationIntel); assert(VK_SUCCESS == result); // Submit the command buffer and wait for its completion // ... result = vkReleasePerformanceConfigurationINTEL( device, performanceConfigurationIntel); assert(VK_SUCCESS == result); // Get the report size from metrics-discovery's QueryReportSize result = vkGetQueryPoolResults( device, queryPool, 0, 1, QueryReportSize, data, QueryReportSize, 0); assert(VK_SUCCESS == result); // The data can then be passed back to metrics-discovery from which // human readable values can be queried.
Version History
Revision 2, 2020-03-06 (Lionel Landwerlin)
- Rename VkQueryPoolCreateInfoINTEL in VkQueryPoolPerformanceQueryCreateInfoINTEL
Revision 1, 2018-05-16 (Lionel Landwerlin)
- Initial revision
See Also
InitializePerformanceApiInfoINTEL
,
PerformanceConfigurationAcquireInfoINTEL
,
PerformanceConfigurationINTEL
,
PerformanceConfigurationTypeINTEL
, PerformanceMarkerInfoINTEL
,
PerformanceOverrideInfoINTEL
, PerformanceOverrideTypeINTEL
,
PerformanceParameterTypeINTEL
, PerformanceStreamMarkerInfoINTEL
,
PerformanceValueDataINTEL
, PerformanceValueINTEL
,
PerformanceValueTypeINTEL
, QueryPoolCreateInfoINTEL
,
QueryPoolPerformanceQueryCreateInfoINTEL
,
QueryPoolSamplingModeINTEL
, acquirePerformanceConfigurationINTEL
,
cmdSetPerformanceMarkerINTEL
, cmdSetPerformanceOverrideINTEL
,
cmdSetPerformanceStreamMarkerINTEL
, getPerformanceParameterINTEL
,
initializePerformanceApiINTEL
,
queueSetPerformanceConfigurationINTEL
,
releasePerformanceConfigurationINTEL
,
uninitializePerformanceApiINTEL
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- initializePerformanceApiINTEL :: forall io. MonadIO io => Device -> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) -> io ()
- uninitializePerformanceApiINTEL :: forall io. MonadIO io => Device -> io ()
- cmdSetPerformanceMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceMarkerInfoINTEL -> io ()
- cmdSetPerformanceStreamMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> io ()
- cmdSetPerformanceOverrideINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceOverrideInfoINTEL -> io ()
- acquirePerformanceConfigurationINTEL :: forall io. MonadIO io => Device -> PerformanceConfigurationAcquireInfoINTEL -> io PerformanceConfigurationINTEL
- releasePerformanceConfigurationINTEL :: forall io. MonadIO io => Device -> PerformanceConfigurationINTEL -> io ()
- queueSetPerformanceConfigurationINTEL :: forall io. MonadIO io => Queue -> PerformanceConfigurationINTEL -> io ()
- getPerformanceParameterINTEL :: forall io. MonadIO io => Device -> PerformanceParameterTypeINTEL -> io PerformanceValueINTEL
- pattern STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL :: StructureType
- data PerformanceValueINTEL = PerformanceValueINTEL {}
- data InitializePerformanceApiInfoINTEL = InitializePerformanceApiInfoINTEL {}
- data QueryPoolPerformanceQueryCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL {}
- data PerformanceMarkerInfoINTEL = PerformanceMarkerInfoINTEL {}
- data PerformanceStreamMarkerInfoINTEL = PerformanceStreamMarkerInfoINTEL {}
- data PerformanceOverrideInfoINTEL = PerformanceOverrideInfoINTEL {}
- data PerformanceConfigurationAcquireInfoINTEL = PerformanceConfigurationAcquireInfoINTEL {}
- data PerformanceValueDataINTEL
- peekPerformanceValueDataINTEL :: PerformanceValueTypeINTEL -> Ptr PerformanceValueDataINTEL -> IO PerformanceValueDataINTEL
- newtype PerformanceConfigurationTypeINTEL where
- newtype QueryPoolSamplingModeINTEL where
- newtype PerformanceOverrideTypeINTEL where
- newtype PerformanceParameterTypeINTEL where
- newtype PerformanceValueTypeINTEL where
- PerformanceValueTypeINTEL Int32
- pattern PERFORMANCE_VALUE_TYPE_UINT32_INTEL :: PerformanceValueTypeINTEL
- pattern PERFORMANCE_VALUE_TYPE_UINT64_INTEL :: PerformanceValueTypeINTEL
- pattern PERFORMANCE_VALUE_TYPE_FLOAT_INTEL :: PerformanceValueTypeINTEL
- pattern PERFORMANCE_VALUE_TYPE_BOOL_INTEL :: PerformanceValueTypeINTEL
- pattern PERFORMANCE_VALUE_TYPE_STRING_INTEL :: PerformanceValueTypeINTEL
- type QueryPoolCreateInfoINTEL = QueryPoolPerformanceQueryCreateInfoINTEL
- type INTEL_PERFORMANCE_QUERY_SPEC_VERSION = 2
- pattern INTEL_PERFORMANCE_QUERY_SPEC_VERSION :: forall a. Integral a => a
- type INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query"
- pattern INTEL_PERFORMANCE_QUERY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype PerformanceConfigurationINTEL = PerformanceConfigurationINTEL Word64
Documentation
initializePerformanceApiINTEL Source #
:: forall io. MonadIO io | |
=> Device |
|
-> ("initializeInfo" ::: InitializePerformanceApiInfoINTEL) |
|
-> io () |
vkInitializePerformanceApiINTEL - Initialize a device for performance queries
Return Codes
See Also
uninitializePerformanceApiINTEL Source #
:: forall io. MonadIO io | |
=> Device |
|
-> io () |
vkUninitializePerformanceApiINTEL - Uninitialize a device for performance queries
Valid Usage (Implicit)
See Also
cmdSetPerformanceMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceMarkerInfoINTEL -> io () Source #
vkCmdSetPerformanceMarkerINTEL - Markers
Parameters
The last marker set onto a command buffer before the end of a query will be part of the query result.
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pMarkerInfo
must be a valid pointer to a validPerformanceMarkerInfoINTEL
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
Primary Secondary | Both | Graphics Compute Transfer |
Return Codes
See Also
cmdSetPerformanceStreamMarkerINTEL :: forall io. MonadIO io => CommandBuffer -> PerformanceStreamMarkerInfoINTEL -> io () Source #
vkCmdSetPerformanceStreamMarkerINTEL - Markers
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pMarkerInfo
must be a valid pointer to a validPerformanceStreamMarkerInfoINTEL
structure -
commandBuffer
must be in the recording state -
The
CommandPool
thatcommandBuffer
was allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
Primary Secondary | Both | Graphics Compute Transfer |
Return Codes
See Also
cmdSetPerformanceOverrideINTEL Source #
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> PerformanceOverrideInfoINTEL |
|
-> io () |
vkCmdSetPerformanceOverrideINTEL - Performance override settings
Valid Usage
-
pOverrideInfo
must not be used with aPerformanceOverrideTypeINTEL
that is not reported available bygetPerformanceParameterINTEL
Valid Usage (Implicit)
-
commandBuffer
must be a validCommandBuffer
handle
-
pOverrideInfo
must be a valid pointer to a validPerformanceOverrideInfoINTEL
structure -
commandBuffer
must be in the recording state - The
CommandPool
thatcommandBuffer
was allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
Primary Secondary | Both | Graphics Compute Transfer |
Return Codes
See Also
acquirePerformanceConfigurationINTEL Source #
:: forall io. MonadIO io | |
=> Device |
|
-> PerformanceConfigurationAcquireInfoINTEL |
|
-> io PerformanceConfigurationINTEL |
vkAcquirePerformanceConfigurationINTEL - Acquire the performance query capability
Return Codes
See Also
Device
,
PerformanceConfigurationAcquireInfoINTEL
,
PerformanceConfigurationINTEL
releasePerformanceConfigurationINTEL Source #
:: forall io. MonadIO io | |
=> Device |
|
-> PerformanceConfigurationINTEL |
|
-> io () |
vkReleasePerformanceConfigurationINTEL - Release a configuration to capture performance data
Valid Usage
-
configuration
must not be released before all command buffers submitted while the configuration was set are in pending state
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
If
configuration
is notNULL_HANDLE
,configuration
must be a validPerformanceConfigurationINTEL
handle -
If
configuration
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
configuration
must be externally synchronized
Return Codes
See Also
queueSetPerformanceConfigurationINTEL Source #
:: forall io. MonadIO io | |
=> Queue |
|
-> PerformanceConfigurationINTEL |
|
-> io () |
vkQueueSetPerformanceConfigurationINTEL - Set a performance query
Valid Usage (Implicit)
-
queue
must be a validQueue
handle
-
configuration
must be a validPerformanceConfigurationINTEL
handle - Both of
configuration
, andqueue
must have been created, allocated, or retrieved from the sameDevice
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
- | - | Any | - |
Return Codes
See Also
getPerformanceParameterINTEL Source #
:: forall io. MonadIO io | |
=> Device |
|
-> PerformanceParameterTypeINTEL |
|
-> io PerformanceValueINTEL |
vkGetPerformanceParameterINTEL - Query performance capabilities of the device
Return Codes
See Also
Device
, PerformanceParameterTypeINTEL
,
PerformanceValueINTEL
data PerformanceValueINTEL Source #
VkPerformanceValueINTEL - Container for value and types of parameters that can be queried
Valid Usage (Implicit)
-
type
must be a validPerformanceValueTypeINTEL
value
- If
type
isPERFORMANCE_VALUE_TYPE_STRING_INTEL
, thevalueString
member ofdata
must be a null-terminated UTF-8 string
See Also
PerformanceValueDataINTEL
, PerformanceValueTypeINTEL
,
getPerformanceParameterINTEL
PerformanceValueINTEL | |
|
Instances
Show PerformanceValueINTEL Source # | |
Defined in Vulkan.Extensions.VK_INTEL_performance_query showsPrec :: Int -> PerformanceValueINTEL -> ShowS # show :: PerformanceValueINTEL -> String # showList :: [PerformanceValueINTEL] -> ShowS # | |
FromCStruct PerformanceValueINTEL Source # | |
ToCStruct PerformanceValueINTEL Source # | |
Defined in Vulkan.Extensions.VK_INTEL_performance_query withCStruct :: PerformanceValueINTEL -> (Ptr PerformanceValueINTEL -> IO b) -> IO b Source # pokeCStruct :: Ptr PerformanceValueINTEL -> PerformanceValueINTEL -> IO b -> IO b Source # withZeroCStruct :: (Ptr PerformanceValueINTEL -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PerformanceValueINTEL -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero PerformanceValueINTEL Source # | |
data InitializePerformanceApiInfoINTEL Source #
VkInitializePerformanceApiInfoINTEL - Structure specifying parameters of initialize of the device
Valid Usage (Implicit)
See Also
Instances
data QueryPoolPerformanceQueryCreateInfoINTEL Source #
VkQueryPoolPerformanceQueryCreateInfoINTEL - Structure specifying parameters to create a pool of performance queries
Members
To create a pool for Intel performance queries, set
QueryPoolCreateInfo
::queryType
to
QUERY_TYPE_PERFORMANCE_QUERY_INTEL
and
add a QueryPoolPerformanceQueryCreateInfoINTEL
structure to the
pNext
chain of the QueryPoolCreateInfo
structure.
Valid Usage (Implicit)
See Also
QueryPoolPerformanceQueryCreateInfoINTEL | |
|
Instances
data PerformanceMarkerInfoINTEL Source #
VkPerformanceMarkerInfoINTEL - Structure specifying performance markers
Valid Usage (Implicit)
See Also
Instances
data PerformanceStreamMarkerInfoINTEL Source #
VkPerformanceStreamMarkerInfoINTEL - Structure specifying stream performance markers
Valid Usage
- The value
written by the application into
marker
must only used the valid bits as reported bygetPerformanceParameterINTEL
with thePERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL
See Also
Instances
data PerformanceOverrideInfoINTEL Source #
VkPerformanceOverrideInfoINTEL - Performance override info
Valid Usage (Implicit)
See Also
Bool32
, PerformanceOverrideTypeINTEL
,
StructureType
,
cmdSetPerformanceOverrideINTEL
PerformanceOverrideInfoINTEL | |
|
Instances
data PerformanceConfigurationAcquireInfoINTEL Source #
VkPerformanceConfigurationAcquireInfoINTEL - Acquire a configuration to capture performance data
Valid Usage (Implicit)
See Also
PerformanceConfigurationTypeINTEL
,
StructureType
,
acquirePerformanceConfigurationINTEL
PerformanceConfigurationAcquireInfoINTEL | |
|
Instances
data PerformanceValueDataINTEL Source #
Instances
Show PerformanceValueDataINTEL Source # | |
Defined in Vulkan.Extensions.VK_INTEL_performance_query showsPrec :: Int -> PerformanceValueDataINTEL -> ShowS # show :: PerformanceValueDataINTEL -> String # showList :: [PerformanceValueDataINTEL] -> ShowS # | |
ToCStruct PerformanceValueDataINTEL Source # | |
Defined in Vulkan.Extensions.VK_INTEL_performance_query withCStruct :: PerformanceValueDataINTEL -> (Ptr PerformanceValueDataINTEL -> IO b) -> IO b Source # pokeCStruct :: Ptr PerformanceValueDataINTEL -> PerformanceValueDataINTEL -> IO b -> IO b Source # withZeroCStruct :: (Ptr PerformanceValueDataINTEL -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PerformanceValueDataINTEL -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero PerformanceValueDataINTEL Source # | |
peekPerformanceValueDataINTEL :: PerformanceValueTypeINTEL -> Ptr PerformanceValueDataINTEL -> IO PerformanceValueDataINTEL Source #
newtype PerformanceConfigurationTypeINTEL Source #
VkPerformanceConfigurationTypeINTEL - Type of performance configuration
See Also
pattern PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL :: PerformanceConfigurationTypeINTEL |
Instances
newtype QueryPoolSamplingModeINTEL Source #
VkQueryPoolSamplingModeINTEL - Enum specifying how performance queries should be captured
See Also
pattern QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL :: QueryPoolSamplingModeINTEL |
|
Instances
newtype PerformanceOverrideTypeINTEL Source #
pattern PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL :: PerformanceOverrideTypeINTEL |
|
pattern PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL :: PerformanceOverrideTypeINTEL |
|
Instances
newtype PerformanceParameterTypeINTEL Source #
VkPerformanceParameterTypeINTEL - Parameters that can be queried
See Also
pattern PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL :: PerformanceParameterTypeINTEL |
|
pattern PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL :: PerformanceParameterTypeINTEL |
|
Instances
newtype PerformanceValueTypeINTEL Source #
VkPerformanceValueTypeINTEL - Type of the parameters that can be queried
See Also
Instances
type INTEL_PERFORMANCE_QUERY_SPEC_VERSION = 2 Source #
pattern INTEL_PERFORMANCE_QUERY_SPEC_VERSION :: forall a. Integral a => a Source #
type INTEL_PERFORMANCE_QUERY_EXTENSION_NAME = "VK_INTEL_performance_query" Source #
pattern INTEL_PERFORMANCE_QUERY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype PerformanceConfigurationINTEL Source #
VkPerformanceConfigurationINTEL - Device configuration for performance queries
See Also
acquirePerformanceConfigurationINTEL
,
queueSetPerformanceConfigurationINTEL
,
releasePerformanceConfigurationINTEL