vkCmdBeginShaderInstrumentationARM(3)
C Specification
To begin shader instrumentation, call:
// Provided by VK_ARM_shader_instrumentation
void vkCmdBeginShaderInstrumentationARM(
VkCommandBuffer commandBuffer,
VkShaderInstrumentationARM instrumentation);
Parameters
-
commandBufferis the command buffer into which this command will be recorded. -
instrumentationis the handle of the shader instrumentation object that will capture the metrics.
Description
After beginning shader instrumentation, shader instrumentation is considered active within the command buffer it was called in until shader instrumentation is ended.
The shader instrumentation object has an implicit result index where the
per-shader metrics will be written.
The result index is set to 0 when the object is created by calling
vkCreateShaderInstrumentationARM, and incremented by 1 for each
draw, dispatch, and ray tracing command recorded while the shader
instrumentation object is active.
The result index is also incremented by 1 when
vkCmdExecuteGeneratedCommandsEXT is recorded.
While shader instrumentation is active, instrumented shaders write to the instrumentation object. These writes must be synchronized using the instrumented shader’s stage with access mask VK_ACCESS_2_SHADER_WRITE_BIT. If no instrumentation object is bound, writes are discarded.
If a command buffer is submitted multiple times, the shader instrumented metrics for all submissions will be aggregated in the instrumentation object, unless the metrics are cleared between submissions.
Document Notes
For more information, see the Vulkan Specification.
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.