From 678ccc99c3be580ab3a844bdc9df394951902d6b Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 23 May 2018 19:04:36 -0400 Subject: [PATCH] Expose get_image_subresource_layout --- ash/Cargo.toml | 2 +- ash/src/device.rs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 85c4ed9..9a30726 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ash" -version = "0.24.1" +version = "0.24.2" authors = ["maik klein "] description = "Vulkan bindings for Rust" license = "MIT" diff --git a/ash/src/device.rs b/ash/src/device.rs index cbc05c5..9126735 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -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 { unsafe { let mut mem_req = mem::uninitialized();