docs(vulkan): clarify safety contract for DeviceShared::set_object_name (#8055)

* docs(vulkan): clarify safety contract for `DeviceShared::set_object_name`
This commit is contained in:
Erich Gubler authored and GitHub committed 2025-08-20 08:22:35 -07:00
1 parent 9aaed2c0cc
commit 57d89b4a4f
1 file changed
+11 -1
+11 -1
View File
@@ -27,7 +27,17 @@ impl super::DeviceShared {
///
/// # Safety
///
/// It must be valid to set `object`'s debug name
/// This method inherits the safety contract from [`vkSetDebugUtilsObjectName`]. In particular:
///
/// - `object` must be a valid handle for one of the following:
/// - An instance-level object from the same instance as this device.
/// - A physical-device-level object that descends from the same physical device as this
/// device.
/// - A device-level object that descends from this device.
/// - `object` must be externally synchronized—only the calling thread should access it during
/// this call.
///
/// [`vkSetDebugUtilsObjectName`]: https://registry.khronos.org/vulkan/specs/latest/man/html/vkSetDebugUtilsObjectNameEXT.html
pub(super) unsafe fn set_object_name(&self, object: impl vk::Handle, name: &str) {
let Some(extension) = self.extension_fns.debug_utils.as_ref() else {
return;