Function Pointer

PFN_vkFaultCallbackFunction

Fault Callback Function

The function pointer PFN_vkFaultCallbackFunction is defined as:

typedef void (VKAPI_PTR *PFN_vkFaultCallbackFunction)(
    VkBool32                                    unrecordedFaults,
    uint32_t                                    faultCount,
    const VkFaultData*                          pFaults);
  • unrecordedFaults is a boolean that specifies if the supplied fault information is incomplete and does not contain entries for all faults that have been detected by the implementation and may be reported via PFN_vkFaultCallbackFunction since the last call to this callback.
  • faultCount will contain the number of reported faults in the array pointed to by pFaults.
  • pFaults will point to an array of faultCount
    VkFaultData structures containing the fault information.

An implementation must only make calls to pfnFaultCallback during the execution of an API command. An implementation must only make calls into the application-provided fault callback from the same thread that called the API command. The implementation should not synchronize calls to the callback. If synchronization is needed, the callback must provide it.

The fault callback must not call any Vulkan commands.

It is implementation-dependent whether faults reported by this callback are also reported via vkGetFaultData, but each unique fault will be reported by at most one callback.