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

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_device_fault

Name

VK_EXT_device_fault - device extension

VK_EXT_device_fault

Name String

VK_EXT_device_fault

Extension Type

Device extension

Registered Extension Number

342

Revision

2

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

Deprecation State
Contact
Extension Proposal

VK_EXT_device_fault

Other Extension Metadata

Last Modified Date

2021-03-10

IP Status

No known IP claims.

Contributors
  • Ralph Potter, Samsung

  • Stuart Smith, AMD

  • Jan-Harald Fredriksen, ARM

  • Mark Bellamy, ARM

  • Andrew Ellem, Google

  • Alex Walters, IMG

  • Jeff Bolz, NVIDIA

  • Baldur Karlsson, Valve

Description

Device loss can be triggered by a variety of issues, including invalid API usage, implementation errors, or hardware failures.

This extension introduces a new command: getDeviceFaultInfoEXT, which may be called subsequent to a ERROR_DEVICE_LOST error code having been returned by the implementation. This command allows developers to query for additional information on GPU faults which may have caused device loss, and to generate binary crash dumps, which may be loaded into external tools for further diagnosis.

New Commands

New Structures

New Enums

New Enum Constants

Version History

  • Revision 2, 2023-04-05 (Ralph Potter)

    • Restored two missing members to the XML definition of VkDeviceFaultVendorBinaryHeaderVersionOneEXT. No functional change to the specification.

  • Revision 1, 2020-10-19 (Ralph Potter)

    • 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.

  • 15 types
  • 1 value
  • Packagevulkan-3.27
  • Exports33
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_device_fault.hs
valuegetDeviceFaultInfoEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device from which to query the diagnostic fault information.

  3. -> io (Result, DeviceFaultCountsEXT, DeviceFaultInfoEXT)
#

vkGetDeviceFaultInfoEXT - Reports fault information for the specified device

Description

If pFaultInfo is NULL, then the counts of corresponding additional fault information structures available are returned in the addressInfoCount and vendorInfoCount members of pFaultCounts. Additionally, the size of any vendor-specific binary crash dump is returned in the vendorBinarySize member of pFaultCounts.

If pFaultInfo is not NULL, pFaultCounts must point to a DeviceFaultCountsEXT structure with each structure count or size member (addressInfoCount, vendorInfoCount, vendorBinarySize) set by the application to the number of elements in the corresponding output array member of pFaultInfo (pAddressInfos and pVendorInfos), or to the size of the output buffer in bytes (pVendorBinaryData). On return, each structure count member is overwritten with the number of structures actually written to the corresponding output array member of pFaultInfo. Similarly, vendorBinarySize is overwritten with the number of bytes actually written to the pVendorBinaryData member of pFaultInfo.

If the vendor-specific crash dumps feature is not enabled, then implementations must set pFaultCounts->vendorBinarySize to zero and must not modify pFaultInfo->pVendorBinaryData.

If any pFaultCounts structure count member is less than the number of corresponding fault properties available, at most structure count (addressInfoCount, vendorInfoCount) elements will be written to the associated pFaultInfo output array. Similarly, if vendorBinarySize is less than the size in bytes of the available crash dump data, at most vendorBinarySize elements will be written to pVendorBinaryData.

If pFaultInfo is NULL, then subsequent calls to getDeviceFaultInfoEXT for the same device must return identical values in the addressInfoCount, vendorInfoCount and vendorBinarySize members of pFaultCounts.

If pFaultInfo is not NULL, then subsequent calls to getDeviceFaultInfoEXT for the same device must return identical values in the output members of pFaultInfo (pAddressInfos, pVendorInfos, pVendorBinaryData), up to the limits described by the structure count and buffer size members of pFaultCounts (addressInfoCount, vendorInfoCount, vendorBinarySize). If the sizes of the output members of pFaultInfo increase for a subsequent call to getDeviceFaultInfoEXT, then supplementary information may be returned in the additional available space.

If any pFaultCounts structure count member is smaller than the number of corresponding fault properties available, or if pFaultCounts->vendorBinarySize is smaller than the size in bytes of the generated binary crash dump data, INCOMPLETE will be returned instead of SUCCESS, to indicate that not all the available properties were returned.

If pFaultCounts->vendorBinarySize is less than what is necessary to store the binary crash dump header, nothing will be written to pFaultInfo->pVendorBinaryData and zero will be written to pFaultCounts->vendorBinarySize.

Valid Usage

  • device must be in the lost state

  • If the value referenced by pFaultCounts->addressInfoCount is not 0, and pFaultInfo->pAddressInfos is not NULL, pFaultInfo->pAddressInfos must be a valid pointer to an array of pFaultCounts->addressInfoCount DeviceFaultAddressInfoEXT structures

  • If the value referenced by pFaultCounts->vendorInfoCount is not 0, and pFaultInfo->pVendorInfos is not NULL, pFaultInfo->pVendorInfos must be a valid pointer to an array of pFaultCounts->vendorInfoCount DeviceFaultVendorInfoEXT structures

  • If the value referenced by pFaultCounts->vendorBinarySize is not 0, and pFaultInfo->pVendorBinaryData is not NULL, pFaultInfo->pVendorBinaryData must be a valid pointer to an array of pFaultCounts->vendorBinarySize bytes

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

VK_EXT_device_fault, Device, DeviceFaultCountsEXT, DeviceFaultInfoEXT

VkPhysicalDeviceFaultFeaturesEXT - Structure indicating support for device fault reporting

Members

This structure describes the following features:

Description

If the PhysicalDeviceFaultFeaturesEXT 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 PhysicalDeviceFaultFeaturesEXT, 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_EXT_device_fault, Bool32, StructureType

Constructors

  • PhysicalDeviceFaultFeaturesEXT
    • deviceFault :: Bool

      deviceFault indicates that the implementation supports the reporting of device fault information.

    • deviceFaultVendorBinary :: Bool

      deviceFaultVendorBinary indicates that the implementation supports the generation of vendor-specific binary crash dumps. These may provide additional information when imported into vendor-specific external tools.

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

VkDeviceFaultCountsEXT - Structure specifying device fault information

Valid Usage (Implicit)

See Also

VK_EXT_device_fault, DeviceSize, StructureType, getDeviceFaultInfoEXT

Constructors

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

VkDeviceFaultInfoEXT - Structure specifying device fault information

Description

An implementation should populate as many members of DeviceFaultInfoEXT as possible, given the information available at the time of the fault and the constraints of the implementation itself.

Due to hardware limitations, pAddressInfos describes ranges of GPU virtual address space, rather than precise addresses. The precise memory address accessed or the precise value of the instruction pointer must lie within the region described.

Each element of pAddressInfos describes either:

  • A memory access which may have triggered a page fault and may have contributed to device loss

  • The value of an active instruction pointer at the time a fault occurred. This value may be indicative of the active pipeline or shader at the time of device loss

Comparison of the GPU virtual addresses described by pAddressInfos to GPU virtual address ranges reported by the VK_EXT_device_address_binding_report extension may allow applications to correlate between these addresses and Vulkan objects. Applications should be aware that these addresses may also correspond to resources internal to an implementation, which will not be reported via the VK_EXT_device_address_binding_report extension.

Valid Usage (Implicit)

See Also

VK_EXT_device_fault, DeviceFaultAddressInfoKHR, DeviceFaultVendorInfoKHR, StructureType, getDeviceFaultInfoEXT

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

VkDeviceFaultAddressInfoKHR - Structure specifying GPU virtual address information

Description

The combination of reportedAddress and addressPrecision allow the possible range of addresses to be calculated, such that:

lower_address = (pInfo->reportedAddress & ~(pInfo->addressPrecision-1))
upper_address = (pInfo->reportedAddress |  (pInfo->addressPrecision-1))

It is valid for the reportedAddress to contain a more precise address than indicated by addressPrecision. In this case, the value of reportedAddress should be treated as an additional hint as to the value of the address that triggered the page fault, or to the value of an instruction pointer.

See Also

VK_EXT_device_fault, VK_KHR_device_fault, DeviceAddress, DeviceFaultAddressTypeKHR, DeviceFaultInfoEXT, DeviceFaultInfoKHR, DeviceSize

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkDeviceFaultVendorInfoKHR - Structure specifying vendor-specific fault information

See Also

VK_EXT_device_fault, VK_KHR_device_fault, DeviceFaultInfoEXT, DeviceFaultInfoKHR

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

VkDeviceFaultVendorBinaryHeaderVersionOneKHR - Structure describing the layout of the vendor binary crash dump header

Description

Unlike most structures declared by the Vulkan API, all fields of this structure are written with the least significant byte first, regardless of host byte-order.

The C language specification does not define the packing of structure members. This layout assumes tight structure member packing, with members laid out in the order listed in the structure, and the intended size of the structure is 56 bytes. If a compiler produces code that diverges from that pattern, applications must employ another method to set values at the correct offsets.

Valid Usage (Implicit)

See Also

VK_EXT_device_fault, VK_KHR_device_fault, DeviceFaultVendorBinaryHeaderVersionKHR

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero
newtypenewtype DeviceFaultAddressTypeKHR
#

VkDeviceFaultAddressTypeKHR - Page fault access types

Description

The instruction pointer values recorded may not identify the specific instruction(s) that triggered the fault. The relationship between the instruction pointer reported and triggering instruction will be vendor-specific.

See Also

VK_EXT_device_fault, VK_KHR_device_fault, DeviceFaultAddressInfoKHR

Instances6Eq, Ord, Read, Show, Storable, Zero

VkDeviceFaultVendorBinaryHeaderVersionKHR - Encode vendor binary crash dump version

Description

See Also

VK_EXT_device_fault, VK_KHR_device_fault, DeviceFaultVendorBinaryHeaderVersionOneKHR, getDeviceFaultInfoEXT

Instances6Eq, Ord, Read, Show, Storable, Zero