From b84a7f58e25e66bb806e95b05a20f0a06ad8ddd4 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 11 Oct 2017 21:07:16 -0400 Subject: [PATCH] Added CreateBufferView --- ash/Cargo.toml | 2 +- ash/src/device.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ash/Cargo.toml b/ash/Cargo.toml index ab775fb..40837a5 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.19.0" +version = "0.19.1" authors = ["maik klein "] description = "Vulkan bindings for Rust" license = "MIT" diff --git a/ash/src/device.rs b/ash/src/device.rs index a69d8a1..66fc81f 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -1135,6 +1135,24 @@ pub trait DeviceV1_0 { } } + unsafe fn create_buffer_view( + &self, + create_info: &vk::BufferViewCreateInfo, + allocation_callbacks: Option<&vk::AllocationCallbacks>, + ) -> VkResult { + let mut buffer_view = mem::uninitialized(); + let err_code = self.fp_v1_0().create_buffer_view( + self.handle(), + create_info, + allocation_callbacks.as_raw_ptr(), + &mut buffer_view, + ); + match err_code { + vk::Result::Success => Ok(buffer_view), + _ => Err(err_code), + } + } + unsafe fn create_image_view( &self, create_info: &vk::ImageViewCreateInfo,