1 typealias SetDebugUtilsObjectNameExt = fn 2 (device : VkDevice) 3 * (name_info : ptr DebugUtilsObjectNameInfoExt) -> Result 4 5 typealias CmdBeginDebugUtilsLabelExt = fn 6 (command_buffer : VkCommandBuffer) 7 * (label_info : ptr DebugUtilsLabelExt) -> Unit 8 9 typealias CmdEndDebugUtilsLabelExt = fn (command_buffer : VkCommandBuffer) -> Unit 10 11 let draw_command_begin_label_color (instance 12 command_buffer 13 label_name : String 14 color : Vector4) = 15 let proc_name = "vkCmdBeginDebugUtilsLabelEXT" 16 let proc_address = vk/get_instance_proc_addr instance proc_name 17 let f = proc_address as CmdBeginDebugUtilsLabelExt 18 19 let c_label_name @owner = label_name.to_c_string 20 let label = DebugUtilsLabelExt 21 type = StructureType/DebugUtilsLabelExt 22 next = null 23 label_name = c_label_name 24 color = [color.x, color.y, color.z, color.w] 25 26 f command_buffer label@ptr 27 28 def begin_label (label_name : String) = 29 let command_buffer : CommandBuffer @auto 30 31 draw_command_begin_label_color command_buffer.instance.object 32 command_buffer.object 33 label_name (Vector4 1 1 1 1) 34 35 def end_label = 36 let command_buffer : CommandBuffer @auto 37 38 let proc_name = "vkCmdEndDebugUtilsLabelEXT" 39 let proc_address = vk/get_instance_proc_addr command_buffer.instance.object 40 proc_name 41 42 let f = proc_address as CmdEndDebugUtilsLabelExt 43 44 f command_buffer.object 45 46 def set_name (object_type : ObjectType 47 id : u64 48 name : String) = 49 let instance : Instance @auto 50 51 let proc_name = "vkSetDebugUtilsObjectNameEXT" 52 let proc_address = vk/get_instance_proc_addr instance.object proc_name 53 let f = proc_address as SetDebugUtilsObjectNameExt 54 55 let object_name @owner = name.to_c_string 56 let name_info = DebugUtilsObjectNameInfoExt 57 type = StructureType/DebugUtilsObjectNameInfoExt 58 next = null 59 =object_type 60 object_handle = id 61 =object_name 62 63 f instance.device name_info@ptr 64