Expose get_image_subresource_layout

This commit is contained in:
Dzmitry Malyshau 2018-05-23 19:04:36 -04:00
parent 28bf5b6ed7
commit 678ccc99c3
2 changed files with 14 additions and 1 deletions

View file

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

View file

@ -1331,6 +1331,19 @@ pub trait DeviceV1_0 {
} }
} }
fn get_image_subresource_layout(
&self,
image: vk::Image,
subresource: vk::ImageSubresource,
) -> vk::SubresourceLayout {
unsafe {
let mut layout = mem::uninitialized();
self.fp_v1_0()
.get_image_subresource_layout(self.handle(), image, &subresource, &mut layout);
layout
}
}
fn get_image_memory_requirements(&self, image: vk::Image) -> vk::MemoryRequirements { fn get_image_memory_requirements(&self, image: vk::Image) -> vk::MemoryRequirements {
unsafe { unsafe {
let mut mem_req = mem::uninitialized(); let mut mem_req = mem::uninitialized();