vulkan-3.6: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_AMD_shader_info

Synopsis

Documentation

getShaderInfoAMD Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the device that created pipeline.

-> Pipeline

pipeline is the target of the query.

-> ShaderStageFlagBits

shaderStage identifies the particular shader within the pipeline about which information is being queried.

-> ShaderInfoTypeAMD

infoType describes 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 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 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 getShaderInfoAMD will return INCOMPLETE.

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 UTF-8 null-terminated 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.

Valid Usage (Implicit)

  • device must be a valid Device handle
  • pipeline must be a valid Pipeline handle
  • shaderStage must be a valid ShaderStageFlagBits value
  • infoType must be a valid ShaderInfoTypeAMD value
  • pInfoSize must be a valid pointer to a size_t value
  • If the value referenced by pInfoSize is not 0, and pInfo is not NULL, pInfo must be a valid pointer to an array of pInfoSize bytes
  • pipeline must have been created, allocated, or retrieved from device

Return Codes

Success
Failure

See Also

Device, Pipeline, ShaderInfoTypeAMD, ShaderStageFlagBits

data ShaderResourceUsageAMD Source #

VkShaderResourceUsageAMD - Resource usage information about a particular shader within a pipeline

See Also

ShaderStatisticsInfoAMD

Constructors

ShaderResourceUsageAMD 

Fields

Instances

Instances details
Eq ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Show ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Generic ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Associated Types

type Rep ShaderResourceUsageAMD :: Type -> Type #

Storable ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

FromCStruct ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

ToCStruct ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Zero ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

type Rep ShaderResourceUsageAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

type Rep ShaderResourceUsageAMD = D1 ('MetaData "ShaderResourceUsageAMD" "Vulkan.Extensions.VK_AMD_shader_info" "vulkan-3.6-inplace" 'False) (C1 ('MetaCons "ShaderResourceUsageAMD" 'PrefixI 'True) ((S1 ('MetaSel ('Just "numUsedVgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "numUsedSgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "ldsSizePerLocalWorkGroup") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: (S1 ('MetaSel ('Just "ldsUsageSizeInBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "scratchMemUsageInBytes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)))))

data ShaderStatisticsInfoAMD Source #

VkShaderStatisticsInfoAMD - Statistical information about a particular shader within a pipeline

Description

Some implementations may merge multiple logical shader stages together in a single shader. In such cases, shaderStageMask will contain a bitmask of all of the stages that are active within that shader. Consequently, if specifying those stages as input to getShaderInfoAMD, the same output information may be returned for all such shader stage queries.

The number of available VGPRs and SGPRs (numAvailableVgprs and numAvailableSgprs respectively) are the shader-addressable subset of physical registers that is given as a limit to the compiler for register assignment. These values may further be limited by implementations due to performance optimizations where register pressure is a bottleneck.

See Also

ShaderResourceUsageAMD, ShaderStageFlags

Constructors

ShaderStatisticsInfoAMD 

Fields

Instances

Instances details
Show ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Generic ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Associated Types

type Rep ShaderStatisticsInfoAMD :: Type -> Type #

FromCStruct ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

ToCStruct ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Zero ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

type Rep ShaderStatisticsInfoAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

type Rep ShaderStatisticsInfoAMD = D1 ('MetaData "ShaderStatisticsInfoAMD" "Vulkan.Extensions.VK_AMD_shader_info" "vulkan-3.6-inplace" 'False) (C1 ('MetaCons "ShaderStatisticsInfoAMD" 'PrefixI 'True) ((S1 ('MetaSel ('Just "shaderStageMask") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ShaderStageFlags) :*: (S1 ('MetaSel ('Just "resourceUsage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ShaderResourceUsageAMD) :*: S1 ('MetaSel ('Just "numPhysicalVgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32))) :*: ((S1 ('MetaSel ('Just "numPhysicalSgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "numAvailableVgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "numAvailableSgprs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "computeWorkGroupSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Word32, Word32, Word32))))))

newtype ShaderInfoTypeAMD Source #

VkShaderInfoTypeAMD - Enum specifying which type of shader info to query

See Also

getShaderInfoAMD

Constructors

ShaderInfoTypeAMD Int32 

Bundled Patterns

pattern SHADER_INFO_TYPE_STATISTICS_AMD :: ShaderInfoTypeAMD

SHADER_INFO_TYPE_STATISTICS_AMD specifies that device resources used by a shader will be queried.

pattern SHADER_INFO_TYPE_BINARY_AMD :: ShaderInfoTypeAMD

SHADER_INFO_TYPE_BINARY_AMD specifies that implementation-specific information will be queried.

pattern SHADER_INFO_TYPE_DISASSEMBLY_AMD :: ShaderInfoTypeAMD

SHADER_INFO_TYPE_DISASSEMBLY_AMD specifies that human-readable dissassembly of a shader.

Instances

Instances details
Eq ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Ord ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Read ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Show ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Storable ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

Zero ShaderInfoTypeAMD Source # 
Instance details

Defined in Vulkan.Extensions.VK_AMD_shader_info

pattern AMD_SHADER_INFO_SPEC_VERSION :: forall a. Integral a => a Source #

type AMD_SHADER_INFO_EXTENSION_NAME = "VK_AMD_shader_info" Source #

pattern AMD_SHADER_INFO_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #