From 991a1140181779abec9d42f8a30dbf2353058927 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 6 Sep 2017 10:06:25 -0400 Subject: [PATCH] Added cmd_fill_buffer and cmd_update_buffer --- ash/Cargo.toml | 2 +- ash/src/device.rs | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 29e489c..dd42f8d 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.18.3" +version = "0.18.4" authors = ["maik klein "] description = "Vulkan bindings for Rust" license = "MIT" diff --git a/ash/src/device.rs b/ash/src/device.rs index 9cd0538..1156b7a 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -286,6 +286,39 @@ pub trait DeviceV1_0 { ); } + unsafe fn cmd_fill_buffer( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + size: vk::DeviceSize, + data: vk::uint32_t, + ) { + self.fp_v1_0().cmd_fill_buffer( + command_buffer, + buffer, + offset, + size, + data, + ); + } + + unsafe fn cmd_update_buffer( + &self, + command_buffer: vk::CommandBuffer, + buffer: vk::Buffer, + offset: vk::DeviceSize, + data: &[u8], + ) { + self.fp_v1_0().cmd_update_buffer( + command_buffer, + buffer, + offset, + data.len() as u64, + data.as_ptr() as _, + ); + } + unsafe fn cmd_copy_buffer( &self, command_buffer: vk::CommandBuffer,