Information about a particular shader that has been compiled as part of a pipeline object can be extracted by calling:
VkResult vkGetShaderInfoAMD( VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo);
deviceis the device that created
pipelineis the target of the query.
shaderStageidentifies the particular shader within the pipeline about which information is being queried.
infoTypedescribes what kind of information is being queried.
pInfoSizeis a pointer to a value related to the amount of data the query returns, as described below.
pInfois either NULL or a pointer to a buffer.
NULL, then the maximum size of the information that can
be retrieved about the shader, in bytes, is returned in
pInfoSize must point to a variable set by the user to the
size of the buffer, in bytes, pointed to by
pInfo, and on return the
variable is overwritten with the amount of data actually written to
pInfoSize is less than the maximum size that can be retrieved by
the pipeline cache, then at most
pInfoSize bytes will be written to
vkGetShaderInfoAMD will return
Not all information is available for every shader and implementations may
not support all kinds of information for any shader.
When a certain type of information is unavailable, the function returns
If information is successfully and fully queried, the function will return
VK_SHADER_INFO_TYPE_STATISTICS_AMD, an instance of
VkShaderStatisticsInfoAMD will be written to the buffer pointed to by
This structure will be populated with statistics regarding the physical
device resources used by that shader along with other miscellaneous
information and is described in further detail below.
a pointer to a UTF-8 null-terminated string containing human-readable
The exact formatting and contents of the disassembly string are
The formatting and contents of all other types of information, including
VK_SHADER_INFO_TYPE_BINARY_AMD, are left to the vendor
and are not further specified by this extension.
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.
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.