Class EXTDebugReport
- java.lang.Object
-
- org.lwjgl.vulkan.EXTDebugReport
-
public class EXTDebugReport extends java.lang.ObjectDue to the nature of the Vulkan interface, there is very little error information available to the developer/application. By enabling optional validation layers and using the Debug Report extension a developer has much more detailed feedback on the application's use of Vulkan.This extension adds two entrypoints (
CreateDebugReportCallbackEXT,DestroyDebugReportCallbackEXT) and an extension structure that together define a way for layers and the implementation to call back to the application for events of interest to the application.Using the
VK_EXT_debug_reportextension allows an application to register multiple callbacks with the validation layers. Some callbacks may log the information to a file, others may cause a debug break point or other application defined behavior. An application can register callbacks even when no validation layers are enabled, but they will only be called for loader and, if implemented, driver events.To capture issues found while creating an instance an application can link a
VkDebugReportCallbackCreateInfoEXTstructure to thepNextelement of theVkInstanceCreateInfostructure given toCreateInstance. This callback is only valid for the duration of thevkCreateInstancecall. UseCreateDebugReportCallbackEXTto create persistent callback objects.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intvkCreateDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, long[] pCallback)Array version of:CreateDebugReportCallbackEXTstatic intvkCreateDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pCallback)Registers a callback.static voidvkDebugReportMessageEXT(VkInstance instance, int flags, int objectType, long object, long location, int messageCode, java.nio.ByteBuffer pLayerPrefix, java.nio.ByteBuffer pMessage)Injects a custom message into the debug stream.static voidvkDebugReportMessageEXT(VkInstance instance, int flags, int objectType, long object, long location, int messageCode, java.lang.CharSequence pLayerPrefix, java.lang.CharSequence pMessage)Injects a custom message into the debug stream.static voidvkDestroyDebugReportCallbackEXT(VkInstance instance, long callback, VkAllocationCallbacks pAllocator)Destroys aVkDebugReportCallbackEXT.
-
-
-
Field Detail
-
VK_EXT_DEBUG_REPORT_SPEC_VERSION
public static final int VK_EXT_DEBUG_REPORT_SPEC_VERSION
The extension specification version.- See Also:
- Constant Field Values
-
VK_EXT_DEBUG_REPORT_EXTENSION_NAME
public static final java.lang.String VK_EXT_DEBUG_REPORT_EXTENSION_NAME
The extension name.- See Also:
- Constant Field Values
-
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
public static final int VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
VkStructureType- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT
public static final int VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT
VkDebugReportObjectTypeEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_ERROR_NONE_EXT
public static final int VK_DEBUG_REPORT_ERROR_NONE_EXT
VkDebugReportErrorEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT
public static final int VK_DEBUG_REPORT_ERROR_CALLBACK_REF_EXT
VkDebugReportErrorEXT- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_INFORMATION_BIT_EXT
public static final int VK_DEBUG_REPORT_INFORMATION_BIT_EXT
Indicates an informational message such as resource details that may be handy when debugging an application.- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_WARNING_BIT_EXT
public static final int VK_DEBUG_REPORT_WARNING_BIT_EXT
Indicates an unexpected use.E.g. Not destroying objects prior to destroying the containing object or potential inconsistencies between descriptor set layout and the layout in the corresponding shader, etc.
- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT
public static final int VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT
Indicates a potentially non-optimal use of Vulkan.E.g. using
vkCmdClearImagewhen a RenderPassload_opwould have worked.- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_ERROR_BIT_EXT
public static final int VK_DEBUG_REPORT_ERROR_BIT_EXT
Indicates an error that may cause undefined results, including an application crash.- See Also:
- Constant Field Values
-
VK_DEBUG_REPORT_DEBUG_BIT_EXT
public static final int VK_DEBUG_REPORT_DEBUG_BIT_EXT
Indicates diagnostic information from the loader and layers.- See Also:
- Constant Field Values
-
VK_ERROR_VALIDATION_FAILED_EXT
public static final int VK_ERROR_VALIDATION_FAILED_EXT
VkResult- See Also:
- Constant Field Values
-
-
Method Detail
-
vkCreateDebugReportCallbackEXT
public static int vkCreateDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pCallback)
Registers a callback.For each
VkDebugReportCallbackEXTthat is created the flags determine when that function is called.A callback will be made for issues that match any bit set in its flags. The callback will come directly from the component that detected the event, unless some other layer intercepts the calls for its own purposes (filter them in different way, log to system error log, etc.)
An application may receive multiple callbacks if multiple
VkDebugReportCallbackEXTobjects were created. A callback will always be executed in the same thread as the originating Vulkan call. A callback may be called from multiple threads simultaneously (if the application is making Vulkan calls from multiple threads).Valid Usage
instancemust be a validVkInstancehandlepCreateInfomust be a pointer to a validVkDebugReportCallbackCreateInfoEXTstructure- If
pAllocatoris notNULL,pAllocatormust be a pointer to a validVkAllocationCallbacksstructure pCallbackmust be a pointer to aVkDebugReportCallbackEXThandle
- Parameters:
instance- the instance the callback will be logged onpCreateInfo- points to aVkDebugReportCallbackCreateInfoEXTstructure which defines the conditions under which this callback will be calledpAllocator- controls host memory allocationpCallback- a pointer to record the sname:VkDebugReportCallbackEXT object created
-
vkDestroyDebugReportCallbackEXT
public static void vkDestroyDebugReportCallbackEXT(VkInstance instance, long callback, VkAllocationCallbacks pAllocator)
Destroys aVkDebugReportCallbackEXT.Valid Usage
instancemust be a validVkInstancehandlecallbackmust be a validVkDebugReportCallbackEXThandle- If
pAllocatoris notNULL,pAllocatormust be a pointer to a validVkAllocationCallbacksstructure callbackmust have been created, allocated or retrieved frominstance- If
VkAllocationCallbackswere provided wheninstancewas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided wheninstancewas created,pAllocatormust beNULL
Host Synchronization
- Host access to
callbackmust be externally synchronized
- Parameters:
instance- the instance where the callback was createdcallback- theVkDebugReportCallbackEXTobject to destroypAllocator- controls host memory allocation
-
vkDebugReportMessageEXT
public static void vkDebugReportMessageEXT(VkInstance instance, int flags, int objectType, long object, long location, int messageCode, java.nio.ByteBuffer pLayerPrefix, java.nio.ByteBuffer pMessage)
Injects a custom message into the debug stream.Valid Usage
instancemust be a validVkInstancehandleflagsmust be a valid combination ofVkDebugReportFlagBitsEXTvaluesflagsmust not be 0objectTypemust be a validVkDebugReportObjectTypeEXTvaluepLayerPrefixmust be a pointer to a validpMessagemust be a pointer to a validinstancemust be a validVkInstancehandleflagsmust be a combination of one or more ofVkDebugReportFlagBitsEXTobjTypemust be one ofVkDebugReportObjectTypeEXT,DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXTifobjectisNULLobjectmay be a {apiname} objectpLayerPrefixmust be aNULLterminated string.pMsgmust be aNULLterminated string.
The call will propagate through the layers and cause a callback to the application. The parameters are passed on to the callback in addition to the
pUserDatavalue that was defined at the time the callback was registered.- Parameters:
instance- the instance the callback will be logged onflags- indicates theVkDebugReportFlagBitsEXTthat triggered this callback. One of:DEBUG_REPORT_INFORMATION_BIT_EXTDEBUG_REPORT_WARNING_BIT_EXTDEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXTDEBUG_REPORT_ERROR_BIT_EXTDEBUG_REPORT_DEBUG_BIT_EXTobjectType- the type of object being used / created at the time the event was triggered. One of:object- the object where the issue was detected.objectmay beNULL_HANDLEif there is no object associated with the event.location- a component (layer, driver, loader) defined value that indicates the "location" of the trigger. This is an optional value.messageCode- a layer defined value indicating what test triggered this callbackpLayerPrefix- abbreviation of the component making the callbackpMessage- a null terminated string detailing the trigger conditions
-
vkDebugReportMessageEXT
public static void vkDebugReportMessageEXT(VkInstance instance, int flags, int objectType, long object, long location, int messageCode, java.lang.CharSequence pLayerPrefix, java.lang.CharSequence pMessage)
Injects a custom message into the debug stream.Valid Usage
instancemust be a validVkInstancehandleflagsmust be a valid combination ofVkDebugReportFlagBitsEXTvaluesflagsmust not be 0objectTypemust be a validVkDebugReportObjectTypeEXTvaluepLayerPrefixmust be a pointer to a validpMessagemust be a pointer to a validinstancemust be a validVkInstancehandleflagsmust be a combination of one or more ofVkDebugReportFlagBitsEXTobjTypemust be one ofVkDebugReportObjectTypeEXT,DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXTifobjectisNULLobjectmay be a {apiname} objectpLayerPrefixmust be aNULLterminated string.pMsgmust be aNULLterminated string.
The call will propagate through the layers and cause a callback to the application. The parameters are passed on to the callback in addition to the
pUserDatavalue that was defined at the time the callback was registered.- Parameters:
instance- the instance the callback will be logged onflags- indicates theVkDebugReportFlagBitsEXTthat triggered this callback. One of:DEBUG_REPORT_INFORMATION_BIT_EXTDEBUG_REPORT_WARNING_BIT_EXTDEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXTDEBUG_REPORT_ERROR_BIT_EXTDEBUG_REPORT_DEBUG_BIT_EXTobjectType- the type of object being used / created at the time the event was triggered. One of:object- the object where the issue was detected.objectmay beNULL_HANDLEif there is no object associated with the event.location- a component (layer, driver, loader) defined value that indicates the "location" of the trigger. This is an optional value.messageCode- a layer defined value indicating what test triggered this callbackpLayerPrefix- abbreviation of the component making the callbackpMessage- a null terminated string detailing the trigger conditions
-
vkCreateDebugReportCallbackEXT
public static int vkCreateDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackCreateInfoEXT pCreateInfo, VkAllocationCallbacks pAllocator, long[] pCallback)
Array version of:CreateDebugReportCallbackEXT
-
-