Merge pull request #34 from kvark/buffer-view

Added CreateBufferView
This commit is contained in:
Maik Klein 2017-10-12 11:17:47 +02:00 committed by GitHub
commit 1b39f34e02
2 changed files with 19 additions and 1 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "ash"
version = "0.19.0"
version = "0.19.1"
authors = ["maik klein <maikklein@googlemail.com>"]
description = "Vulkan bindings for Rust"
license = "MIT"

View file

@ -1135,6 +1135,24 @@ pub trait DeviceV1_0 {
}
}
unsafe fn create_buffer_view(
&self,
create_info: &vk::BufferViewCreateInfo,
allocation_callbacks: Option<&vk::AllocationCallbacks>,
) -> VkResult<vk::BufferView> {
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,