From a8081bc21d3e30cd70038ffd652d810d7a212273 Mon Sep 17 00:00:00 2001 From: msiglreith Date: Fri, 11 Aug 2017 14:12:25 +0200 Subject: [PATCH 1/2] Add depth stencil image clearing command --- ash/src/device.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ash/src/device.rs b/ash/src/device.rs index 04002a1..3b60761 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -475,6 +475,24 @@ pub trait DeviceV1_0 { ); } + unsafe fn cmd_clear_depth_stencil_image( + &self, + command_buffer: vk::CommandBuffer, + image: vk::Image, + image_layout: vk::ImageLayout, + clear_depth_stencil_value: &vk::ClearDepthStencilValue, + ranges: &[vk::ImageSubresourceRange], + ) { + self.fp_v1_0().cmd_clear_depth_stencil_image( + command_buffer, + image, + image_layout, + clear_depth_stencil_value, + ranges.len() as vk::uint32_t, + ranges.as_ptr(), + ); + } + unsafe fn cmd_draw_indexed( &self, command_buffer: vk::CommandBuffer, From 5b43266338d4518df64678ccf28c5ec688bbe536 Mon Sep 17 00:00:00 2001 From: msiglreith Date: Fri, 11 Aug 2017 15:57:55 +0200 Subject: [PATCH 2/2] Add image resolve command --- ash/src/device.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index 3b60761..3d399d6 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -266,6 +266,26 @@ pub trait DeviceV1_0 { } } + unsafe fn cmd_resolve_image( + &self, + command_buffer: vk::CommandBuffer, + src_image: vk::Image, + src_image_layout: vk::ImageLayout, + dst_image: vk::Image, + dst_image_layout: vk::ImageLayout, + regions: &[vk::ImageResolve], + ) { + self.fp_v1_0().cmd_resolve_image( + command_buffer, + src_image, + src_image_layout, + dst_image, + dst_image_layout, + regions.len() as u32, + regions.as_ptr(), + ); + } + unsafe fn cmd_copy_buffer( &self, command_buffer: vk::CommandBuffer, @@ -273,7 +293,6 @@ pub trait DeviceV1_0 { dst_buffer: vk::Buffer, regions: &[vk::BufferCopy], ) { - self.fp_v1_0().cmd_copy_buffer( command_buffer, src_buffer,