mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
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:
parent
9aaed2c0cc
commit
57d89b4a4f
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user