Merge pull request #26 from msiglreith/clear_ds

Add ds clear and image resolve commands
This commit is contained in:
Maik Klein 2017-08-12 20:23:28 +02:00 committed by GitHub
commit 6f0f0a7903

View file

@ -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( unsafe fn cmd_copy_buffer(
&self, &self,
command_buffer: vk::CommandBuffer, command_buffer: vk::CommandBuffer,
@ -273,7 +293,6 @@ pub trait DeviceV1_0 {
dst_buffer: vk::Buffer, dst_buffer: vk::Buffer,
regions: &[vk::BufferCopy], regions: &[vk::BufferCopy],
) { ) {
self.fp_v1_0().cmd_copy_buffer( self.fp_v1_0().cmd_copy_buffer(
command_buffer, command_buffer,
src_buffer, src_buffer,
@ -475,6 +494,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( unsafe fn cmd_draw_indexed(
&self, &self,
command_buffer: vk::CommandBuffer, command_buffer: vk::CommandBuffer,