+void VulkanProgram::set_vulkan_object_name() const
+{
+#ifdef DEBUG
+ const VulkanFunctions &vk = device.get_functions();
+
+ string layout_name = debug_name+" [layout]";
+
+ VkDebugUtilsObjectNameInfoEXT name_info = { };
+ name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;
+ name_info.objectType = VK_OBJECT_TYPE_PIPELINE_LAYOUT;
+ name_info.objectHandle = reinterpret_cast<uint64_t>(layout_handle);
+ name_info.pObjectName = layout_name.c_str();
+ vk.SetDebugUtilsObjectName(name_info);
+
+ name_info.objectType = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT;
+ for(unsigned i=0; i<desc_set_layout_handles.size(); ++i)
+ {
+ layout_name = format("%s [layout:%d]", debug_name, i);
+ name_info.objectHandle = reinterpret_cast<uint64_t>(desc_set_layout_handles[i]);
+ name_info.pObjectName = layout_name.c_str();
+ vk.SetDebugUtilsObjectName(name_info);
+ }
+#endif
+}
+