From f0b29696cbdd7b8882cf3f0d9f5aadcac43d2451 Mon Sep 17 00:00:00 2001 From: Itai Date: Sun, 14 May 2017 13:16:12 +0300 Subject: [PATCH] Add create_pipeline_cache and destroy_pipeline_cache --- ash/src/device.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ash/src/device.rs b/ash/src/device.rs index 9067ef2..791a9f7 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -91,6 +91,15 @@ pub trait DeviceV1_0 { allocation_callbacks.as_raw_ptr()); } + unsafe fn destroy_pipeline_cache(&self, + pipeline_cache: vk::PipelineCache, + allocation_callbacks: Option<&vk::AllocationCallbacks>) { + self.fp_v1_0() + .destroy_pipeline_cache(self.handle(), + pipeline_cache, + allocation_callbacks.as_raw_ptr()); + } + unsafe fn destroy_buffer(&self, buffer: vk::Buffer, allocation_callbacks: Option<&vk::AllocationCallbacks>) { @@ -544,6 +553,22 @@ pub trait DeviceV1_0 { } } + unsafe fn create_pipeline_cache(&self, + create_info: &vk::PipelineCacheCreateInfo, + allocation_callbacks: Option<&vk::AllocationCallbacks>) + -> VkResult { + let mut pipeline_cache = mem::uninitialized(); + let err_code = self.fp_v1_0() + .create_pipeline_cache(self.handle(), + create_info, allocation_callbacks.as_raw_ptr(), + &mut pipeline_cache); + + match err_code { + vk::Result::Success => Ok(pipeline_cache), + _ => Err(err_code), + } + } + unsafe fn map_memory(&self, memory: vk::DeviceMemory, offset: vk::DeviceSize,