Merge pull request #64 from kvark/sub-layout

Expose get_image_subresource_layout
This commit is contained in:
Maik Klein 2018-05-24 08:29:23 +02:00 committed by GitHub
commit 6a323a1382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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();