Class INTELPerformanceQuery
- java.lang.Object
-
- org.lwjgl.vulkan.INTELPerformanceQuery
-
public class INTELPerformanceQuery extends java.lang.ObjectThis 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 GPA (https://software.intel.com/en-us/gpa) make use of this extension and the metrics-discovery library to present the data in a human readable way.
Example Code
// A previously created device VkDevice device; // A queue from from device VkQueue queue; VkInitializePerformanceApiInfoINTEL performanceApiInfoIntel = { VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL, NULL, NULL }; vkInitializePerformanceApiINTEL( device, &performanceApiInfoIntel); VkQueryPoolCreateInfoINTEL 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.- Name String
VK_INTEL_performance_query- Extension Type
- Device extension
- Registered Extension Number
- 211
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Contact
- Lionel Landwerlin llandwerlin
- Last Modified Date
- 2018-05-16
- IP Status
- No known IP claims.
- Contributors
- Lionel Landwerlin, Intel
- Piotr Maciejewski, Intel
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnvkAcquirePerformanceConfigurationINTEL(VkDevice device, long pAcquireInfo, long pConfiguration)Unsafe version of:AcquirePerformanceConfigurationINTELstatic intnvkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, long pMarkerInfo)Unsafe version of:CmdSetPerformanceMarkerINTELstatic intnvkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, long pOverrideInfo)Unsafe version of:CmdSetPerformanceOverrideINTELstatic intnvkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, long pMarkerInfo)Unsafe version of:CmdSetPerformanceStreamMarkerINTELstatic intnvkGetPerformanceParameterINTEL(VkDevice device, int parameter, long pValue)Unsafe version of:GetPerformanceParameterINTELstatic intnvkInitializePerformanceApiINTEL(VkDevice device, long pInitializeInfo)Unsafe version of:InitializePerformanceApiINTELstatic intvkAcquirePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, long[] pConfiguration)Array version of:AcquirePerformanceConfigurationINTELstatic intvkAcquirePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, java.nio.LongBuffer pConfiguration)Acquire the performance query capability.static intvkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, VkPerformanceMarkerInfoINTEL pMarkerInfo)Markers.static intvkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, VkPerformanceOverrideInfoINTEL pOverrideInfo)Performance override settings.static intvkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, VkPerformanceStreamMarkerInfoINTEL pMarkerInfo)Markers.static intvkGetPerformanceParameterINTEL(VkDevice device, int parameter, VkPerformanceValueINTEL pValue)Query performance capabilities of the device.static intvkInitializePerformanceApiINTEL(VkDevice device, VkInitializePerformanceApiInfoINTEL pInitializeInfo)Initialize a device for performance queries.static intvkQueueSetPerformanceConfigurationINTEL(VkQueue queue, long configuration)Set a performance query.static intvkReleasePerformanceConfigurationINTEL(VkDevice device, long configuration)Release a configuration to capture performance data.static voidvkUninitializePerformanceApiINTEL(VkDevice device)Uninitialize a device for performance queries.
-
-
-
Field Detail
-
VK_INTEL_PERFORMANCE_QUERY_SPEC_VERSION
The extension specification version.
-
VK_INTEL_PERFORMANCE_QUERY_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL, VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL, VK_STRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTEL, VK_STRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTEL, VK_STRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTEL, VK_STRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL
ExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTELSTRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTELSTRUCTURE_TYPE_PERFORMANCE_MARKER_INFO_INTELSTRUCTURE_TYPE_PERFORMANCE_STREAM_MARKER_INFO_INTELSTRUCTURE_TYPE_PERFORMANCE_OVERRIDE_INFO_INTELSTRUCTURE_TYPE_PERFORMANCE_CONFIGURATION_ACQUIRE_INFO_INTEL
-
VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL
ExtendsVkQueryType.
-
VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL
ExtendsVkObjectType.
-
VK_PERFORMANCE_CONFIGURATION_TYPE_COMMAND_QUEUE_METRICS_DISCOVERY_ACTIVATED_INTEL
VkPerformanceConfigurationTypeINTEL - Type of performance configurationSee Also
-
VK_QUERY_POOL_SAMPLING_MODE_MANUAL_INTEL
VkQueryPoolSamplingModeINTEL - Enum specifying how performance queries should be capturedDescription
QUERY_POOL_SAMPLING_MODE_MANUAL_INTELis the default mode in which the application callsCmdBeginQueryandCmdEndQueryto record performance data.
See Also
-
VK_PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTEL, VK_PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTEL
VkPerformanceOverrideTypeINTEL - Performance override typeDescription
PERFORMANCE_OVERRIDE_TYPE_NULL_HARDWARE_INTELturns all rendering operations into noop.PERFORMANCE_OVERRIDE_TYPE_FLUSH_GPU_CACHES_INTELstalls the stream of commands until all previously emitted commands have completed and all caches been flushed and invalidated.
See Also
-
VK_PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTEL, VK_PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTEL
VkPerformanceParameterTypeINTEL - Parameters that can be queriedDescription
PERFORMANCE_PARAMETER_TYPE_HW_COUNTERS_SUPPORTED_INTELhas a boolean result which tells whether hardware counters can be captured.PERFORMANCE_PARAMETER_TYPE_STREAM_MARKER_VALID_BITS_INTELhas a 32 bits integer result which tells how many bits can be written into theVkPerformanceValueINTELvalue.
See Also
-
VK_PERFORMANCE_VALUE_TYPE_UINT32_INTEL, VK_PERFORMANCE_VALUE_TYPE_UINT64_INTEL, VK_PERFORMANCE_VALUE_TYPE_FLOAT_INTEL, VK_PERFORMANCE_VALUE_TYPE_BOOL_INTEL, VK_PERFORMANCE_VALUE_TYPE_STRING_INTEL
VkPerformanceValueTypeINTEL - Type of the parameters that can be queriedSee Also
Enum values:
-
-
Method Detail
-
nvkInitializePerformanceApiINTEL
public static int nvkInitializePerformanceApiINTEL(VkDevice device, long pInitializeInfo)
Unsafe version of:InitializePerformanceApiINTEL
-
vkInitializePerformanceApiINTEL
public static int vkInitializePerformanceApiINTEL(VkDevice device, VkInitializePerformanceApiInfoINTEL pInitializeInfo)
Initialize a device for performance queries.C Specification
Prior to creating a performance query pool, initialize the device for performance queries with the call:
VkResult vkInitializePerformanceApiINTEL( VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo);Valid Usage (Implicit)
devicemust be a validVkDevicehandlepInitializeInfomust be a valid pointer to a validVkInitializePerformanceApiInfoINTELstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device used for the queries.pInitializeInfo- a pointer to the initialization parameters.
-
vkUninitializePerformanceApiINTEL
public static void vkUninitializePerformanceApiINTEL(VkDevice device)
Uninitialize a device for performance queries.C Specification
Once performance query operations have completed, uninitalize the device for performance queries with the call:
void vkUninitializePerformanceApiINTEL( VkDevice device);Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- Parameters:
device- the logical device used for the queries.
-
nvkCmdSetPerformanceMarkerINTEL
public static int nvkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, long pMarkerInfo)
Unsafe version of:CmdSetPerformanceMarkerINTEL
-
vkCmdSetPerformanceMarkerINTEL
public static int vkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, VkPerformanceMarkerInfoINTEL pMarkerInfo)
Markers.C Specification
To help associate query results with a particular point at which an application emitted commands, markers can be set into the command buffers with the call:
VkResult vkCmdSetPerformanceMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo);Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepMarkerInfomust be a valid pointer to a validVkPerformanceMarkerInfoINTELstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to the
VkCommandPoolthatcommandBufferwas 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
- On success, this command returns
- On failure, this command returns
See Also
-
nvkCmdSetPerformanceStreamMarkerINTEL
public static int nvkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, long pMarkerInfo)
Unsafe version of:CmdSetPerformanceStreamMarkerINTEL
-
vkCmdSetPerformanceStreamMarkerINTEL
public static int vkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, VkPerformanceStreamMarkerInfoINTEL pMarkerInfo)
Markers.C Specification
When monitoring the behavior of an application wihtin the dataset generated by the entire set of applications running on the system, it is useful to identify draw calls within a potentially huge amount of performance data. To do so, application can generate stream markers that will be used to trace back a particular draw call with a particular performance data item.
VkResult vkCmdSetPerformanceStreamMarkerINTEL( VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo);Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepMarkerInfomust be a valid pointer to a validVkPerformanceStreamMarkerInfoINTELstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to the
VkCommandPoolthatcommandBufferwas 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
- On success, this command returns
- On failure, this command returns
See Also
-
nvkCmdSetPerformanceOverrideINTEL
public static int nvkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, long pOverrideInfo)
Unsafe version of:CmdSetPerformanceOverrideINTEL
-
vkCmdSetPerformanceOverrideINTEL
public static int vkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, VkPerformanceOverrideInfoINTEL pOverrideInfo)
Performance override settings.C Specification
Some applications might want measure the effect of a set of commands with a different settings. It is possible to override a particular settings using :
VkResult vkCmdSetPerformanceOverrideINTEL( VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo);Valid Usage
pOverrideInfomust not be used with aVkPerformanceOverrideTypeINTELthat is not reported available byvkGetPerformanceParameterINTEL.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepOverrideInfomust be a valid pointer to a validVkPerformanceOverrideInfoINTELstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, compute, or transfer operations
Host Synchronization
- Host access to the
VkCommandPoolthatcommandBufferwas 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
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
commandBuffer- the command buffer where the override takes place.pOverrideInfo- a pointer to aVkPerformanceOverrideInfoINTELselecting the parameter to override.
-
nvkAcquirePerformanceConfigurationINTEL
public static int nvkAcquirePerformanceConfigurationINTEL(VkDevice device, long pAcquireInfo, long pConfiguration)
Unsafe version of:AcquirePerformanceConfigurationINTEL
-
vkAcquirePerformanceConfigurationINTEL
public static int vkAcquirePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, java.nio.LongBuffer pConfiguration)
Acquire the performance query capability.C Specification
To acquire a device performance configuration, call:
VkResult vkAcquirePerformanceConfigurationINTEL( VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration);Valid Usage (Implicit)
devicemust be a validVkDevicehandlepAcquireInfomust be a valid pointer to a validVkPerformanceConfigurationAcquireInfoINTELstructurepConfigurationmust be a valid pointer to aVkPerformanceConfigurationINTELhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that the performance query commands will be submitted to.pAcquireInfo- a pointer toVkPerformanceConfigurationAcquireInfoINTEL.pConfiguration- a pointer to aVkPerformanceConfigurationINTELhandle in which the resulting configuration object is returned.
-
vkReleasePerformanceConfigurationINTEL
public static int vkReleasePerformanceConfigurationINTEL(VkDevice device, long configuration)
Release a configuration to capture performance data.C Specification
To release a device performance configuration, call:
VkResult vkReleasePerformanceConfigurationINTEL( VkDevice device, VkPerformanceConfigurationINTEL configuration);Valid Usage
configurationmust not be released before all command buffers submitted while the configuration was set are in pending state.
Valid Usage (Implicit)
devicemust be a validVkDevicehandleconfigurationmust be a validVkPerformanceConfigurationINTELhandleconfigurationmust have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the device associated to the configuration object to release.configuration- the configuration object to release.
-
vkQueueSetPerformanceConfigurationINTEL
public static int vkQueueSetPerformanceConfigurationINTEL(VkQueue queue, long configuration)
Set a performance query.C Specification
To set a performance configuration, call:
VkResult vkQueueSetPerformanceConfigurationINTEL( VkQueue queue, VkPerformanceConfigurationINTEL configuration);Valid Usage (Implicit)
queuemust be a validVkQueuehandleconfigurationmust be a validVkPerformanceConfigurationINTELhandle- Both of
configuration, andqueuemust have been created, allocated, or retrieved from the sameVkDevice
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type - - Any - Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
queue- the queue on which the configuration will be used.configuration- the configuration to use.
-
nvkGetPerformanceParameterINTEL
public static int nvkGetPerformanceParameterINTEL(VkDevice device, int parameter, long pValue)
Unsafe version of:GetPerformanceParameterINTEL
-
vkGetPerformanceParameterINTEL
public static int vkGetPerformanceParameterINTEL(VkDevice device, int parameter, VkPerformanceValueINTEL pValue)
Query performance capabilities of the device.C Specification
Some performance query features of a device can be discovered with the call:
VkResult vkGetPerformanceParameterINTEL( VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue);Valid Usage (Implicit)
devicemust be a validVkDevicehandleparametermust be a validVkPerformanceParameterTypeINTELvaluepValuemust be a valid pointer to aVkPerformanceValueINTELstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device to query.parameter- the parameter to query.pValue- points to an instance of theVkPerformanceValueINTELstructure in which the type and value of the parameter are returned.
-
vkAcquirePerformanceConfigurationINTEL
public static int vkAcquirePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationAcquireInfoINTEL pAcquireInfo, long[] pConfiguration)
Array version of:AcquirePerformanceConfigurationINTEL
-
-