HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_INTEL_performance_query

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

Ratification Status

Not ratified

Extension and Version Dependencies

None

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 an 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

New Structures

New Unions

New Enums

New Enum Constants

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

No cross-references are available

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.

  • 17 types
  • 10 values
  • Packagevulkan-3.27
  • Exports41
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_INTEL_performance_query.hs
valueinitializePerformanceApiINTEL
  1. :: MonadIO io
  2. => Device

    device is the logical device used for the queries.

    device must be a valid Device handle

  3. -> "initializeInfo" ::: InitializePerformanceApiInfoINTEL

    pInitializeInfo is a pointer to a InitializePerformanceApiInfoINTEL structure specifying initialization parameters.

    pInitializeInfo must be a valid pointer to a valid InitializePerformanceApiInfoINTEL structure

  4. -> io ()
#

vkCmdSetPerformanceMarkerINTEL - Markers

Description

The last marker set onto a command buffer before the end of a query will be part of the query result.

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT

Action State

Conditional Rendering

vkCmdSetPerformanceMarkerINTEL is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_INTEL_performance_query, CommandBuffer, PerformanceMarkerInfoINTEL

valuecmdSetPerformanceStreamMarkerINTEL
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is a CommandBuffer into which a stream marker is added.

  3. -> PerformanceStreamMarkerInfoINTEL

    pMarkerInfo is a pointer to a PerformanceStreamMarkerInfoINTEL structure describing the marker to insert.

  4. -> io ()
#

vkCmdSetPerformanceStreamMarkerINTEL - Markers

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT

Action State

Conditional Rendering

vkCmdSetPerformanceStreamMarkerINTEL is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_INTEL_performance_query, CommandBuffer, PerformanceStreamMarkerInfoINTEL

valuecmdSetPerformanceOverrideINTEL
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer where the override takes place.

  3. -> PerformanceOverrideInfoINTEL

    pOverrideInfo is a pointer to a PerformanceOverrideInfoINTEL structure selecting the parameter to override.

  4. -> io ()
#

vkCmdSetPerformanceOverrideINTEL - Performance override settings

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT

State

Conditional Rendering

vkCmdSetPerformanceOverrideINTEL is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_INTEL_performance_query, CommandBuffer, PerformanceOverrideInfoINTEL

valueacquirePerformanceConfigurationINTEL
  1. :: MonadIO io
  2. => Device

    device is the logical device that the performance query commands will be submitted to.

    device must be a valid Device handle

  3. -> PerformanceConfigurationAcquireInfoINTEL

    pAcquireInfo is a pointer to a PerformanceConfigurationAcquireInfoINTEL structure, specifying the performance configuration to acquire.

    pAcquireInfo must be a valid pointer to a valid PerformanceConfigurationAcquireInfoINTEL structure

  4. -> io PerformanceConfigurationINTEL
#
valuereleasePerformanceConfigurationINTEL
  1. :: MonadIO io
  2. => Device

    device is the device associated to the configuration object to release.

  3. -> PerformanceConfigurationINTEL

    configuration is the configuration object to release.

  4. -> 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 valid Device handle

  • If configuration is not NULL_HANDLE, configuration must be a valid PerformanceConfigurationINTEL handle

  • If configuration is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to configuration must be externally synchronized

Return Codes

Success
Failure

See Also

VK_INTEL_performance_query, Device, PerformanceConfigurationINTEL

valuequeueSetPerformanceConfigurationINTEL
  1. :: MonadIO io
  2. => Queue

    queue is the queue on which the configuration will be used.

  3. -> PerformanceConfigurationINTEL

    configuration is the configuration to use.

  4. -> io ()
#

vkQueueSetPerformanceConfigurationINTEL - Set a performance query

Valid Usage (Implicit)

  • queue must be a valid Queue handle

Host Synchronization

Command Properties

'

Return Codes

Success
Failure

See Also

VK_INTEL_performance_query, PerformanceConfigurationINTEL, Queue

valuegetPerformanceParameterINTEL
  1. :: MonadIO io
  2. => Device

    device is the logical device to query.

    device must be a valid Device handle

  3. -> PerformanceParameterTypeINTEL

    parameter is the parameter to query.

    parameter must be a valid PerformanceParameterTypeINTEL value

  4. -> io PerformanceValueINTEL
#

VkPerformanceValueINTEL - Container for value and types of parameters that can be queried

See Also

VK_INTEL_performance_query, PerformanceValueDataINTEL, PerformanceValueTypeINTEL, getPerformanceParameterINTEL

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkInitializePerformanceApiInfoINTEL - Structure specifying parameters of initialize of the device

Valid Usage (Implicit)

See Also

VK_INTEL_performance_query, StructureType, initializePerformanceApiINTEL

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

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.

Structure Chaining

Extends the structure

See Also

VK_INTEL_performance_query, QueryPoolSamplingModeINTEL, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPerformanceMarkerInfoINTEL - Structure specifying performance markers

Valid Usage (Implicit)

See Also

VK_INTEL_performance_query, StructureType, cmdSetPerformanceMarkerINTEL

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPerformanceStreamMarkerInfoINTEL - Structure specifying stream performance markers

Valid Usage

Valid Usage (Implicit)

  • pNext must be NULL

See Also

VK_INTEL_performance_query, StructureType, cmdSetPerformanceStreamMarkerINTEL

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPerformanceOverrideInfoINTEL - Performance override information

Valid Usage (Implicit)

See Also

VK_INTEL_performance_query, Bool32, PerformanceOverrideTypeINTEL, StructureType, cmdSetPerformanceOverrideINTEL

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPerformanceConfigurationAcquireInfoINTEL - Acquire a configuration to capture performance data

Valid Usage (Implicit)

See Also

VK_INTEL_performance_query, PerformanceConfigurationTypeINTEL, StructureType, acquirePerformanceConfigurationINTEL

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPerformanceConfigurationTypeINTEL - Type of performance configuration

See Also

VK_INTEL_performance_query, PerformanceConfigurationAcquireInfoINTEL

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype QueryPoolSamplingModeINTEL
#

VkQueryPoolSamplingModeINTEL - Enum specifying how performance queries should be captured

Description

See Also

VK_INTEL_performance_query, QueryPoolPerformanceQueryCreateInfoINTEL

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype PerformanceOverrideTypeINTEL
#

VkPerformanceOverrideTypeINTEL - Performance override type

Description

See Also

VK_INTEL_performance_query, PerformanceOverrideInfoINTEL

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype PerformanceParameterTypeINTEL
#

VkPerformanceParameterTypeINTEL - Parameters that can be queried

Description

See Also

VK_INTEL_performance_query, getPerformanceParameterINTEL

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype PerformanceValueTypeINTEL
#

VkPerformanceValueTypeINTEL - Type of the parameters that can be queried

See Also

VK_INTEL_performance_query, PerformanceValueINTEL

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype PerformanceConfigurationINTEL
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …