HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_AMD_gpa_interface

Name

VK_AMD_gpa_interface - device extension

VK_AMD_gpa_interface

Name String

VK_AMD_gpa_interface

Extension Type

Device extension

Registered Extension Number

134

Revision

1

Ratification Status

Not ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

Contact
Extension Proposal

VK_AMD_gpa_interface

Other Extension Metadata

Last Modified Date

2026-05-01

IP Status

No known IP claims.

Contributors
  • Stu Smith, AMD

  • Tobias Hector, AMD

  • Noah Fredriks, AMD

  • Peter Lohrmann, AMD

  • Maciej Dziuban, AMD

Description

This extension adds GPU Performance API (GPA) interface support for accessing GPU global performance counters, streaming performance monitors (SPM), and thread traces (SQTT), on AMD Radeon™ GPUs.

New Object Types

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

Version History

  • Revision 1, 2026-05-01 (Stu Smith)

    • Initial revision

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

  • 19 types
  • 13 values
  • Packagevulkan-3.27
  • Exports109
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_AMD_gpa_interface.hs
valuecreateGpaSessionAMD
  1. :: MonadIO io
  2. => Device

    device is the logical device that creates the GPA session object.

  3. -> GpaSessionCreateInfoAMD

    pCreateInfo is a pointer to a GpaSessionCreateInfoAMD structure containing information about how the GPA session object is to be created.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io GpaSessionAMD
#

vkCreateGpaSessionAMD - Create a new GPA session object

Valid Usage (Implicit)

  • device must be a valid Device handle

  • pCreateInfo must be a valid pointer to a valid GpaSessionCreateInfoAMD structure

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • pGpaSession must be a valid pointer to a GpaSessionAMD handle

  • The device must have been created with at least 1 queue

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, AllocationCallbacks, Device, GpaSessionAMD, GpaSessionCreateInfoAMD

valuedestroyGpaSessionAMD
  1. :: MonadIO io
  2. => Device

    device is the logical device that destroys the GPA session.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session to destroy.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io ()
#

vkDestroyGpaSessionAMD - Destroy a GPA session object

Valid Usage

  • All submitted commands that refer to gpaSession must have completed execution

Valid Usage (Implicit)

  • device must be a valid Device handle

  • If gpaSession is not NULL_HANDLE, gpaSession must be a valid GpaSessionAMD handle

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • If gpaSession is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to gpaSession must be externally synchronized

See Also

VK_AMD_gpa_interface, AllocationCallbacks, Device, GpaSessionAMD

valuesetGpaDeviceClockModeAMD
  1. :: MonadIO io
  2. => Device

    device is the logical device that sets the clocks.

  3. -> io GpaDeviceClockModeInfoAMD
#

vkSetGpaDeviceClockModeAMD - Setting a device clock

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, Device, GpaDeviceClockModeInfoAMD

valuecmdBeginGpaSessionAMD
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session to begin.

  4. -> io ()
#

vkCmdBeginGpaSessionAMD - Begin a GPA session

Valid Usage

  • If gpaSession has been used previously to begin and end a session, resetGpaSessionAMD must have first been called

Valid Usage (Implicit)

  • gpaSession must be a valid GpaSessionAMD handle

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations

  • This command must not be called between suspended render pass instances

  • This command must only be called outside of a video coding scope

  • Both of commandBuffer, and gpaSession must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdBeginGpaSessionAMD is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, CommandBuffer, GpaSessionAMD

valuecmdEndGpaSessionAMD
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session to end.

  4. -> io ()
#

vkCmdEndGpaSessionAMD - End a GPA session

Valid Usage

Valid Usage (Implicit)

  • gpaSession must be a valid GpaSessionAMD handle

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations

  • This command must not be called between suspended render pass instances

  • This command must only be called outside of a video coding scope

  • Both of commandBuffer, and gpaSession must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdEndGpaSessionAMD is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, CommandBuffer, GpaSessionAMD

valuecmdBeginGpaSampleAMD
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session to record the sample.

  4. -> GpaSampleBeginInfoAMD

    pGpaSampleBeginInfo is a pointer to a GpaSampleBeginInfoAMD structure describing the sample parameters.

  5. -> io ("sampleID" ::: Word32)
#

vkCmdBeginGpaSampleAMD - Beginning a sample

Valid Usage (Implicit)

  • gpaSession must be a valid GpaSessionAMD handle

  • pGpaSampleBeginInfo must be a valid pointer to a valid GpaSampleBeginInfoAMD structure

  • pSampleID must be a valid pointer to a uint32_t value

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations

  • This command must not be called between suspended render pass instances

  • This command must only be called outside of a video coding scope

  • Both of commandBuffer, and gpaSession must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdBeginGpaSampleAMD is not affected by conditional rendering

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, CommandBuffer, GpaSampleBeginInfoAMD, GpaSessionAMD

valuecmdEndGpaSampleAMD
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session that is recording the sample.

  4. -> "sampleID" ::: Word32

    sampleID is a unique sample ID returned by a previous call to cmdBeginGpaSampleAMD.

  5. -> io ()
#

vkCmdEndGpaSampleAMD - Ending a sample

Valid Usage (Implicit)

  • gpaSession must be a valid GpaSessionAMD handle

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations

  • This command must not be called between suspended render pass instances

  • This command must only be called outside of a video coding scope

  • Both of commandBuffer, and gpaSession must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action State

Conditional Rendering

vkCmdEndGpaSampleAMD is not affected by conditional rendering

See Also

VK_AMD_gpa_interface, CommandBuffer, GpaSessionAMD

valuegetGpaSessionStatusAMD
  1. :: MonadIO io
  2. => Device

    device is the logical device that sets the clocks.

    device must be a valid Device handle

  3. -> GpaSessionAMD

    gpaSession is the session whose status is queried.

    gpaSession must be a valid GpaSessionAMD handle

    gpaSession must have been created, allocated, or retrieved from device

  4. -> io ()
#
valuegetGpaSessionResultsAMD
  1. :: MonadIO io
  2. => Device

    device is the logical device that sets the clocks.

  3. -> GpaSessionAMD

    gpaSession is the session whose results are queried.

  4. -> "sampleID" ::: Word32

    sampleID is the sample ID, returned by cmdBeginGpaSampleAMD, whose results are to be queried.

  5. -> "data" ::: Ptr ()

    pData is either NULL or a pointer to an array of pSizeInBytes bytes where the results will be written.

  6. -> io ("sizeInBytes" ::: Word64)
#

vkGetGpaSessionResultsAMD - Getting the status of a GPA session

Valid Usage (Implicit)

  • device must be a valid Device handle

  • gpaSession must be a valid GpaSessionAMD handle

  • pSizeInBytes must be a valid pointer to a size_t value

  • If pData is not NULL, pData must be a valid pointer to an array of pSizeInBytes bytes

  • If pData is not NULL, the value referenced by pSizeInBytes must be greater than 0

  • gpaSession must have been created, allocated, or retrieved from device

Return Codes

Success
Failure

See Also

VK_AMD_gpa_interface, Device, GpaSessionAMD

valuecmdCopyGpaSessionResultsAMD
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer into which the command will be recorded.

  3. -> GpaSessionAMD

    gpaSession is the handle of the GPA session that is the destination of the copy.

  4. -> io ()
#

vkCmdCopyGpaSessionResultsAMD - Copying GPA session results

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer Levels

Render Pass Scope

Video Coding Scope

Supported Queue Types

Command Type

Primary Secondary

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT

Action State

Conditional Rendering

vkCmdCopyGpaSessionResultsAMD is not affected by conditional rendering

See Also

VK_AMD_gpa_interface, CommandBuffer, GpaSessionAMD

VkGpaPerfBlockPropertiesAMD - Structure describing GPU performance API block properties for a physical device

Members

The members of the GpaPerfBlockPropertiesAMD structure describe the following:

Description

If the GpaPerfBlockPropertiesAMD structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_AMD_gpa_interface, GpaPerfBlockAMD, GpaPerfBlockPropertiesFlagsAMD, PhysicalDeviceGpaPropertiesAMD

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceGpaFeaturesAMD - Structure describing support for GPU performance API

Description

If the PhysicalDeviceGpaFeaturesAMD structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceGpaFeaturesAMD, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Structure Chaining

Extends the structures

See Also

VK_AMD_gpa_interface, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceGpaPropertiesAMD - Structure describing GPU performance API properties for a physical device

Members

The members of the PhysicalDeviceGpaPropertiesAMD structure describe the following:

Description

If the PhysicalDeviceGpaPropertiesAMD structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Structure Chaining

Extends the structure

See Also

VK_AMD_gpa_interface, DeviceSize, GpaPerfBlockPropertiesAMD, PhysicalDeviceGpaPropertiesFlagsAMD, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceGpaProperties2AMD - Structure describing additional GPU performance API properties for a physical device

Members

The members of the PhysicalDeviceGpaProperties2AMD structure describe the following:

Description

If the PhysicalDeviceGpaProperties2AMD structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Structure Chaining

Extends the structure

See Also

VK_AMD_gpa_interface, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata GpaPerfCounterAMD
#

VkGpaPerfCounterAMD - Structure specifying parameters of a GPA sample

Valid Usage (Implicit)

See Also

VK_AMD_gpa_interface, GpaPerfBlockAMD, GpaSampleBeginInfoAMD

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGpaSampleBeginInfoAMD - Structure specifying parameters of a GPA sample

Valid Usage

Valid Usage (Implicit)

  • pNext must be NULL

  • sampleType must be a valid GpaSampleTypeAMD value

  • sqShaderMask must be a valid combination of GpaSqShaderStageFlagBitsAMD values

  • sqShaderMask must not be 0

  • pPerfCounters must be a valid pointer to an array of perfCounterCount valid GpaPerfCounterAMD structures

  • timingPreSample must be a valid combination of PipelineStageFlagBits values

  • timingPreSample must not be 0

  • timingPostSample must be a valid combination of PipelineStageFlagBits values

  • timingPostSample must not be 0

  • perfCounterCount must be greater than 0

See Also

VK_AMD_gpa_interface, Bool32, DeviceSize, GpaPerfCounterAMD, GpaSampleTypeAMD, GpaSqShaderStageFlagsAMD, PipelineStageFlags, StructureType, cmdBeginGpaSampleAMD

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkGpaDeviceClockModeInfoAMD - Structure containing returned clock ratios or clock mode to set

Description

If clockMode is GPA_DEVICE_CLOCK_MODE_QUERY_AMD, memoryClockRatioToPeak and engineClockRatioToPeak are filled with the ratios of their current values to their maximums respectively, otherwise they are left unchanged.

Valid Usage (Implicit)

See Also

VK_AMD_gpa_interface, GpaDeviceClockModeAMD, StructureType, setGpaDeviceClockModeAMD

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGpaDeviceGetClockInfoAMD - Structure containing returned clock ratios or clock mode to set

Valid Usage (Implicit)

See Also

VK_AMD_gpa_interface, StructureType, getGpaDeviceClockInfoAMD

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGpaSessionCreateInfoAMD - Structure specifying parameters of a newly created GPA session

Description

When sampling counters inside secondary command buffers, repeated invocations of the same secondary command buffer causes the previous results to be overwritten. To avoid this a GPA session object’s memory layout can be cloned for use with multiple secondary invocations by specifying its handle in secondaryCopySource, allowing the new GPA session object to be the target of a copy using cmdCopyGpaSessionResultsAMD.

Valid Usage (Implicit)

See Also

VK_AMD_gpa_interface, GpaSessionAMD, StructureType, createGpaSessionAMD

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGpaPerfBlockPropertiesFlagsAMD - Reserved for future use

Description

GpaPerfBlockPropertiesFlagsAMD is a bitmask type for setting GPA performance block property flags, but is currently reserved for future use.

See Also

VK_AMD_gpa_interface, Flags, GpaPerfBlockPropertiesAMD

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …

VkPhysicalDeviceGpaPropertiesFlagsAMD - Reserved for future use

Description

PhysicalDeviceGpaPropertiesFlagsAMD is a bitmask type for setting physical device GPA property flags, but is currently reserved for future use.

See Also

VK_AMD_gpa_interface, Flags, PhysicalDeviceGpaPropertiesAMD

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype GpaSqShaderStageFlagBitsAMD
#

VkGpaSqShaderStageFlagBitsAMD - Bitmask specifying GPU shader stage to sample

Description

See Also

VK_AMD_gpa_interface, GpaSqShaderStageFlagsAMD

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype GpaPerfBlockAMD
#

VkGpaPerfBlockAMD - Enum providing performance counter types

See Also

VK_AMD_gpa_interface, GpaPerfBlockPropertiesAMD, GpaPerfCounterAMD

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype GpaSampleTypeAMD
#

VkGpaSampleTypeAMD - Enum providing the sample type

Description

  • GPA_SAMPLE_TYPE_CUMULATIVE_AMD specifies that one 64-bit result will be returned per global performance counter, representing the cumulative delta for that counter over the sample period. Cumulative samples must begin and end in the same command buffer.

  • GPA_SAMPLE_TYPE_TRACE_AMD specifies that a buffer will be filled with SQTT results data in RGP file format, and/or streaming performance monitor data. Trace samples may span multiple command buffers.

  • GPA_SAMPLE_TYPE_TIMING_AMD specifies that two 64-bit results will be recorded to gather timestamp data.

See Also

VK_AMD_gpa_interface, GpaSampleBeginInfoAMD

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype GpaDeviceClockModeAMD
#

VkGpaDeviceClockModeAMD - Enum providing the clock mode or query

Description

  • GPA_DEVICE_CLOCK_MODE_QUERY_AMD specifies that the current clock values should be queried, with no new values set.

  • GPA_DEVICE_CLOCK_MODE_PROFILING_AMD specifies that clocks are set to a constant amount which is known to be power and thermal sustainable. The engine/memory clock ratio will be kept the same as much as possible.

  • GPA_DEVICE_CLOCK_MODE_MIN_MEMORY_AMD specifies that the memory clock is set to the lowest available level and the engine clock is set to a thermal and power sustainable level.

  • GPA_DEVICE_CLOCK_MODE_MIN_ENGINE_AMD specifies that the engine clock is set to the lowest available level and the memory clock is set to a thermal and power sustainable level.

  • GPA_DEVICE_CLOCK_MODE_PEAK_AMD specifies that the clocks set to maximum when possible and fans set to maximum. Under power and thermal constraints device will clock down.

See Also

VK_AMD_gpa_interface, GpaDeviceClockModeInfoAMD

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype GpaSessionAMD
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …