C Specification

The VkFaultCallbackInfo structure is defined as:

// Provided by VKSC_VERSION_1_0
typedef struct VkFaultCallbackInfo {
    VkStructureType                sType;
    const void*                    pNext;
    uint32_t                       faultCount;
    VkFaultData*                   pFaults;
    PFN_vkFaultCallbackFunction    pfnFaultCallback;
} VkFaultCallbackInfo;

Members

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or pointer to a structure extending this structure.

  • faultCount is the number of reported faults in the array pointed to by pFaults.

  • pFaults is either NULL or a pointer to an array of faultCount VkFaultData structures.

  • pfnFaultCallback is a function pointer to the fault handler function that will be called by the implementation when a fault occurs.

Description

If provided, the implementation may make use of the pFaults array to return fault data to the application when using the fault callback.

Note

Prior to Vulkan SC 1.0.11, the application was required to provide the pFaults array for fault callback data. This proved to be unwieldy for both applications and implementations and it was made optional as of version 1.0.11. It is expected that most implementations will ignore this and use stack or other preallocated memory for fault callback parameters.

If provided, the application memory referenced by pFaults must remain accessible throughout the lifetime of the logical device that was created with this structure.

Note

The memory pointed to by pFaults will be updated by the implementation and should not be used or accessed by the application outside of the fault handling function pointed to by pfnFaultCallback. This restriction also applies to any implementation-specific structure chained to an element of pFaults by pNext.

It is expected that implementations will maintain separate storage for fault information and populate the array pointed to by pFaults ahead of calling the fault callback function.

Valid Usage
Valid Usage (Implicit)
  • VUID-VkFaultCallbackInfo-sType-sType
    sType must be VK_STRUCTURE_TYPE_FAULT_CALLBACK_INFO

  • VUID-VkFaultCallbackInfo-pFaults-parameter
    If faultCount is not 0, and pFaults is not NULL, pFaults must be a valid pointer to an array of faultCount VkFaultData structures

  • VUID-VkFaultCallbackInfo-pfnFaultCallback-parameter
    pfnFaultCallback must be a valid PFN_vkFaultCallbackFunction value

See Also

Document Notes

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0