vkSetDebugUtilsObjectNameEXTVkDevice
vkSetDebugUtilsObjectNameEXT is a function in the Vulkan API provided by the VK_EXT_debug_utils extension. It allows an application to assign a human-readable name to a Vulkan object to improve debugging, profiling, and tooling readability. The named objects appear in validation messages, crash reports, and graphics debugging tools that support the extension.
The function signature is VkResult vkSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo). It takes a device handle and
VkDebugUtilsObjectNameInfoEXT contains:
- sType and pNext for structure chaining.
- objectType, a VkObjectType value describing the type of the object (for example, VK_OBJECT_TYPE_BUFFER or VK_OBJECT_TYPE_SHADER_MODULE).
- objectHandle, the 64‑bit handle value of the object being named.
- pObjectName, a null‑terminated UTF-8 string with the desired name.
- VK_EXT_debug_utils must be enabled on the device, and the function pointer must be loaded (typically via
- pObjectName must be a valid string; objectHandle corresponds to the actual object created or retrieved in
- The function returns VK_SUCCESS on success. If the extension is not present or not enabled, or
Naming objects is optional and primarily aids developers during debugging and performance analysis.