pub fn name_vulkan_object<Name, Handle>(
        &self,
        name: Name,
        object_type: vk::ObjectType,
        handle: &Handle,
    ) -> Result<()>
    where
        Handle: vk::Handle + Copy,
        Name: Into<String>,
    {
        let cname = CString::new(name.into()).unwrap();
        let name_info = vk::DebugUtilsObjectNameInfoEXT {
            object_type,
            p_object_name: cname.as_ptr(),
            object_handle: handle.as_raw(),
            ..Default::default()
        };

        unsafe {
            self.instance.debug.debug_utils_set_object_name(
                self.logical_device.handle(),
                &name_info,
            )?;
        }

        Ok(())
    }
/// Give a debug name for a vulkan object owned by this device.
///
/// Whatever name is provided here will show up in the debug logs if there
/// are any issues detected by the validation layers.
Give a debug name for a vulkan object owned by this device.
Whatever name is provided here will show up in the debug logs if there
are any issues detected by the validation layers.
Give a debug name for a vulkan object owned by this device . Whatever name is provided here will show up in the debug logs if there are any issues detected by the validation layers .
pub fn name_vulkan_object<Name, Handle>(
        &self,
        name: Name,
        object_type: vk::ObjectType,
        handle: &Handle,
    ) -> Result<()>
    where
        Handle: vk::Handle + Copy,
        Name: Into<String>,
    {
        let cname = CString::new(name.into()).unwrap();
        let name_info = vk::DebugUtilsObjectNameInfoEXT {
            object_type,
            p_object_name: cname.as_ptr(),
            object_handle: handle.as_raw(),
            ..Default::default()
        };
        unsafe {
            self.instance.debug.debug_utils_set_object_name(
                self.logical_device.handle(),
                &name_info,
            )?;
        }
        Ok(())
    }
pub fn name_vulkan_object < Name , Handle > ( & self , name : Name , object_type : vk :: ObjectType , handle : & Handle , ) -> Result < ( ) > where Handle : vk :: Handle + Copy , Name : Into < String > , { let cname = CString :: new ( name . into ( ) ) . unwrap ( ) ; let name_info = vk :: DebugUtilsObjectNameInfoEXT { object_type , p_object_name : cname . as_ptr ( ) , object_handle : handle . as_raw ( ) , .. Default :: default ( ) } ; unsafe { self . instance . debug . debug_utils_set_object_name ( self . logical_device . handle ( ) , & name_info , ) ? ; } Ok ( ( ) ) }
Give a debug name for a vulkan object owned by this device.
Give a debug name for a vulkan object owned by this device .
&self
name
Name
object_type
vk::ObjectType
handle
&Handle