vkCreateDebugUtilsMessengerEXT(3)

Name

vkCreateDebugUtilsMessengerEXT - Create a debug messenger object

C Specification

A debug messenger triggers a debug callback with a debug message when an event of interest occurs. To create a debug messenger which will trigger a debug callback, call:

// Provided by VK_EXT_debug_utils
VkResult vkCreateDebugUtilsMessengerEXT(
    VkInstance                                  instance,
    const VkDebugUtilsMessengerCreateInfoEXT*   pCreateInfo,
    const VkAllocationCallbacks*                pAllocator,
    VkDebugUtilsMessengerEXT*                   pMessenger);

Parameters

  • instance is the instance the messenger will be used with.

  • pCreateInfo is a pointer to a VkDebugUtilsMessengerCreateInfoEXT structure containing the callback pointer, as well as defining conditions under which this messenger will trigger the callback.

  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  • pMessenger is a pointer to a VkDebugUtilsMessengerEXT handle in which the created object is returned.

Description

Valid Usage (Implicit)
  • VUID-vkCreateDebugUtilsMessengerEXT-instance-parameter
    instance must be a valid VkInstance handle

  • VUID-vkCreateDebugUtilsMessengerEXT-pCreateInfo-parameter
    pCreateInfo must be a valid pointer to a valid VkDebugUtilsMessengerCreateInfoEXT structure

  • VUID-vkCreateDebugUtilsMessengerEXT-pAllocator-parameter
    If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

  • VUID-vkCreateDebugUtilsMessengerEXT-pMessenger-parameter
    pMessenger must be a valid pointer to a VkDebugUtilsMessengerEXT handle

Return Codes
Success
  • VK_SUCCESS

Failure
  • VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_UNKNOWN

  • VK_ERROR_VALIDATION_FAILED

The application must ensure that vkCreateDebugUtilsMessengerEXT is not executed in parallel with any Vulkan command that is also called with instance or child of instance as the dispatchable argument.

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.