C Specification
To query the number of current faults and obtain the fault data, call vkGetFaultData.
// Provided by VKSC_VERSION_1_0
VkResult vkGetFaultData(
VkDevice device,
VkFaultQueryBehavior faultQueryBehavior,
VkBool32* pUnrecordedFaults,
uint32_t* pFaultCount,
VkFaultData* pFaults);
Parameters
-
deviceis the logical device to obtain faults from. -
faultQueryBehavioris a VkFaultQueryBehavior that specifies the types of faults to obtain from the implementation, and how those faults should be handled. -
pUnrecordedFaultsis a return boolean that specifies if the logged fault information is incomplete and does not contain entries for all faults that have been detected by the implementation and may be reported via vkGetFaultData. -
pFaultCountis a pointer to an integer that specifies the number of fault entries. -
pFaultsis eitherNULLor a pointer to an array ofpFaultCountVkFaultData structures to be updated with the recorded fault data.
Description
Access to fault data is internally synchronized, meaning vkGetFaultData can be called from multiple threads simultaneously.
The implementation must not record more than maxQueryFaultCount faults to be reported by vkGetFaultData.
pUnrecordedFaults is VK_TRUE if the implementation has detected
one or more faults since the last successful retrieval of fault data using
this command, but was unable to record fault information for all faults.
Otherwise, pUnrecordedFaults is VK_FALSE.
If pFaults is NULL, then the number of faults with the specified
faultQueryBehavior characteristics associated with device is
returned in pFaultCount, and pUnrecordedFaults is set as
indicated above.
Otherwise, pFaultCount must point to a variable set by the
application to the number of elements in the pFaults array, and on
return the variable is overwritten with the number of faults actually
written to pFaults.
If pFaultCount is less than the number of recorded device faults
with the specified faultQueryBehavior characteristics, at most
pFaultCount faults will be written, and VK_INCOMPLETE will be
returned instead of VK_SUCCESS, to indicate that not all the available
faults were returned.
If VK_SUCCESS is returned, the fault information stored by the
implementation for the faults that were returned will be handled as
specified by faultQueryBehavior.
Otherwise, the stored fault information is not modified.
For each filled pFaults entry, if pNext is not NULL, the
implementation will fill in any implementation-specific structures
applicable to that fault that are included in the pNext chain.
|
Note
|
In order to simplify the application logic, an application could have a
static allocation sized to |
If
VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations
is VK_TRUE, vkGetFaultData must not return
VK_ERROR_OUT_OF_HOST_MEMORY.
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.