Example #1
0
 /// <summary>
 /// Attach arbitrary data to an object.
 /// <para>
 /// In addition to setting a name for an object, debugging and validation layers may have
 /// uses for additional binary data on a per-object basis that has no other place in the
 /// Vulkan API. For example, a <see cref="ShaderModule"/> could have additional debugging
 /// data attached to it to aid in offline shader tracing.
 /// </para>
 /// </summary>
 /// <param name="device">The device that created the object.</param>
 /// <param name="tagInfo">Specifies the parameters of the tag to attach to the object.</param>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public static void DebugMarkerSetObjectTagExt(this Device device, DebugMarkerObjectTagInfoExt tagInfo)
 {
     fixed(byte *tagPtr = tagInfo.Tag)
     {
         tagInfo.ToNative(out DebugMarkerObjectTagInfoExt.Native nativeTagInfo, tagPtr);
         vkDebugMarkerSetObjectTagEXT(device)(device, &nativeTagInfo);
     }
 }
Example #2
0
        /// <summary>
        /// Attach arbitrary data to an object.
        /// <para>
        /// In addition to setting a name for an object, debugging and validation layers may have
        /// uses for additional binary data on a per-object basis that has no other place in the
        /// Vulkan API. For example, a <see cref="ShaderModule"/> could have additional debugging
        /// data attached to it to aid in offline shader tracing.
        /// </para>
        /// </summary>
        /// <param name="device">The device that created the object.</param>
        /// <param name="tagInfo">Specifies the parameters of the tag to attach to the object.</param>
        /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
        public static void DebugMarkerSetObjectTagExt(this Device device, DebugMarkerObjectTagInfoExt tagInfo)
        {
            var proc = device.GetProc <DebugMarkerSetObjectTagExtDelegate>("vkDebugMarkerSetObjectTagEXT");

            fixed(byte *tagPtr = tagInfo.Tag)
            {
                tagInfo.ToNative(out DebugMarkerObjectTagInfoExt.Native nativeTagInfo, tagPtr);
                proc(device, &nativeTagInfo);
            }
        }