getShaderInfoAMD :: MonadIO io=> Devicedeviceis the device that createdpipeline.-> Pipelinepipelineis the target of the query.-> ShaderStageFlagBitsshaderStageis a ShaderStageFlagBits specifying the particular shader within the pipeline about which information is being queried.-> ShaderInfoTypeAMDinfoTypedescribes what kind of information is being queried.-> io (Result,"info"
::: ByteString)
vkGetShaderInfoAMD - Get information about a shader in a pipeline
Description
If pInfo is NULL, then the maximum size of the information that
can be retrieved about the shader, in bytes, is returned in
pInfoSize. Otherwise, pInfoSize must point to a variable set by
the application 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 pInfo. If pInfoSize is less than the
maximum size that can be retrieved by the pipeline cache, then at most
pInfoSize bytes will be written to pInfo, and
INCOMPLETE will be returned, instead of
SUCCESS, to indicate that not all required
of the pipeline cache was returned.
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 ERROR_FEATURE_NOT_PRESENT.
If information is successfully and fully queried, the function will return SUCCESS.
For infoType SHADER_INFO_TYPE_STATISTICS_AMD, a
ShaderStatisticsInfoAMD structure will be written to the buffer
pointed to by pInfo. 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.
For infoType SHADER_INFO_TYPE_DISASSEMBLY_AMD, pInfo is a pointer
to a null-terminated UTF-8 string containing human-readable disassembly.
The exact formatting and contents of the disassembly string are
vendor-specific.
The formatting and contents of all other types of information, including
infoType SHADER_INFO_TYPE_BINARY_AMD, are left to the vendor and are
not further specified by this extension.
This query does not behave consistently with the behavior described in Opaque Binary Data Results, for historical reasons.
If the amount of data available is larger than the passed pInfoSize,
the query returns up to the size of the passed buffer, and signals
overflow with a INCOMPLETE success status
instead of returning a
ERROR_NOT_ENOUGH_SPACE_KHR error status.
Valid Usage (Implicit)
devicemust be a valid Device handle
pipelinemust be a valid Pipeline handleshaderStagemust be a valid ShaderStageFlagBits valueinfoTypemust be a valid ShaderInfoTypeAMD valuepInfoSizemust be a valid pointer to asize_tvalueIf the value referenced by
pInfoSizeis not0, andpInfois notNULL,pInfomust be a valid pointer to an array ofpInfoSizebytespipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_AMD_shader_info, Device, Pipeline, ShaderInfoTypeAMD, ShaderStageFlagBits