From e77fdf574cde5f9a295a5e4162bdff87e9f99c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Oko=C5=84ski?= Date: Sun, 17 Dec 2017 16:52:43 +0100 Subject: [PATCH] Add DebugMarker Markers functionality --- ash/src/extensions/debug_marker.rs | 31 ++++++++++++++++++++++++++++++ ash/src/vk.rs | 20 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/ash/src/extensions/debug_marker.rs b/ash/src/extensions/debug_marker.rs index 19743e1..64705e4 100644 --- a/ash/src/extensions/debug_marker.rs +++ b/ash/src/extensions/debug_marker.rs @@ -44,4 +44,35 @@ impl DebugMarker { _ => Err(err_code) } } + + pub unsafe fn cmd_debug_marker_begin_ext( + &self, + command_buffer: vk::CommandBuffer, + marker_info: &vk::DebugMarkerMarkerInfoEXT + ) { + self.debug_marker_fn.cmd_debug_marker_begin_ext( + command_buffer, + marker_info + ); + } + + pub unsafe fn cmd_debug_marker_end_ext( + &self, + command_buffer: vk::CommandBuffer, + ) { + self.debug_marker_fn.cmd_debug_marker_end_ext( + command_buffer, + ); + } + + pub unsafe fn cmd_debug_marker_insert_ext( + &self, + command_buffer: vk::CommandBuffer, + marker_info: &vk::DebugMarkerMarkerInfoEXT + ) { + self.debug_marker_fn.cmd_debug_marker_insert_ext( + command_buffer, + marker_info + ); + } } diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 1c2a45f..91d4194 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -2538,6 +2538,14 @@ pub mod types { pub p_object_name: *const c_char, } + #[repr(C)] + pub struct DebugMarkerMarkerInfoEXT { + pub s_type: StructureType, + pub p_next: *const c_void, + pub p_marker_name: *const c_char, + pub color: [f32; 4] + } + #[repr(C)] pub struct DebugReportCallbackCreateInfoEXT { pub s_type: StructureType, @@ -2773,6 +2781,7 @@ pub mod types { DisplayModeCreateInfoKhr = 1000002000, DisplaySurfaceCreateInfoKhr = 1000002001, DebugMarkerObjectNameInfoEXT = 1000022000, + DebugMarkerMarkerInfoEXT = 1000022002, DebugReportCallbackCreateInfoExt = 1000011000, IOSSurfaceCreateInfoMvk = 1000122000, MacOSSurfaceCreateInfoMvk = 1000123000, @@ -5000,6 +5009,17 @@ pub mod cmds { device: Device, p_name_info: *const DebugMarkerObjectNameInfoEXT, ) -> Result; + "vkCmdDebugMarkerBeginEXT", cmd_debug_marker_begin_ext( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, + ) -> (); + "vkCmdDebugMarkerEndEXT", cmd_debug_marker_end_ext( + command_buffer: CommandBuffer, + ) -> (); + "vkCmdDebugMarkerInsertEXT", cmd_debug_marker_insert_ext( + command_buffer: CommandBuffer, + p_marker_info: *const DebugMarkerMarkerInfoEXT, + ) -> (); } vk_functions!{ DebugReportFn,