diff --git a/ash/src/device.rs b/ash/src/device.rs index 67bd43a..d4ccf86 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -100,6 +100,7 @@ impl<'r> Device<'r> { self.device_fn.destroy_semaphore(self.handle, semaphore, ptr::null()); } } + pub fn device_wait_idle(&self) -> VkResult<()> { unsafe { let err_code = self.device_fn.device_wait_idle(self.handle); @@ -123,6 +124,7 @@ impl<'r> Device<'r> { } } } + pub fn reset_fences(&self, fences: &[vk::Fence]) -> VkResult<()> { unsafe { let err_code = self.device_fn @@ -180,6 +182,7 @@ impl<'r> Device<'r> { self.device_fn.cmd_end_render_pass(command_buffer); } } + pub fn cmd_draw(&self, command_buffer: vk::CommandBuffer, vertex_count: vk::uint32_t, @@ -203,6 +206,7 @@ impl<'r> Device<'r> { viewports.as_ptr()); } } + pub fn acquire_next_image_khr(&self, swapchain: vk::SwapchainKHR, timeout: vk::uint64_t, @@ -224,6 +228,7 @@ impl<'r> Device<'r> { } } } + pub fn create_semaphore(&self, create_info: &vk::SemaphoreCreateInfo) -> VkResult { @@ -258,6 +263,7 @@ impl<'r> Device<'r> { } } } + pub fn create_buffer(&self, create_info: &vk::BufferCreateInfo) -> VkResult { unsafe { let mut buffer = mem::uninitialized(); @@ -443,6 +449,7 @@ impl<'r> Device<'r> { } } } + pub fn queue_submit(&self, queue: vk::Queue, submits: &[vk::SubmitInfo], @@ -474,6 +481,7 @@ impl<'r> Device<'r> { } } } + pub fn get_swapchain_images_khr(&self, swapchain: vk::SwapchainKHR) -> VkResult> { @@ -507,6 +515,7 @@ impl<'r> Device<'r> { } } } + pub fn create_command_pool(&self, create_info: &vk::CommandPoolCreateInfo) -> VkResult { @@ -520,6 +529,7 @@ impl<'r> Device<'r> { } } } + pub fn create_swapchain_khr(&self, create_info: &vk::SwapchainCreateInfoKHR) -> VkResult { diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 65c672b..82b7aa8 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -24,11 +24,13 @@ impl<'r> Instance<'r> { _lifetime: ::std::marker::PhantomData, } } + pub fn destroy_instance(&self) { unsafe { self.instance_fn.destroy_instance(self.handle, ptr::null()); } } + pub fn destroy_debug_report_callback_ext(&self, debug: vk::DebugReportCallbackEXT) { unsafe { self.instance_fn.destroy_debug_report_callback_ext(self.handle, debug, ptr::null()); @@ -51,6 +53,7 @@ impl<'r> Instance<'r> { } } } + pub fn get_physical_device_memory_properties(&self, physical_device: vk::PhysicalDevice) -> vk::PhysicalDeviceMemoryProperties { @@ -85,6 +88,7 @@ impl<'r> Instance<'r> { } } } + pub fn get_physical_device_surface_capabilities_khr(&self, physical_device: vk::PhysicalDevice, surface: vk::SurfaceKHR) @@ -131,6 +135,7 @@ impl<'r> Instance<'r> { self.instance_fn.destroy_surface_khr(self.handle, surface, ptr::null()); } } + pub fn create_xlib_surface_khr(&self, create_info: &vk::XlibSurfaceCreateInfoKHR) -> VkResult { @@ -145,6 +150,7 @@ impl<'r> Instance<'r> { } } + pub fn get_physical_device_surface_support_khr(&self, physical_device: vk::PhysicalDevice, queue_index: vk::uint32_t, @@ -159,8 +165,8 @@ impl<'r> Instance<'r> { &mut b); b > 0 } - } + pub fn get_physical_device_queue_family_properties(&self, physical_device: vk::PhysicalDevice) -> Vec {