Return VkResult<bool> from get_fence_status (#246)

Makes it easier not to ignore actual errors.
This commit is contained in:
Benjamin Saunders 2019-11-03 10:18:14 -08:00 committed by Maik Klein
parent 7a997f1b52
commit 21c65096e0

View file

@ -1670,10 +1670,11 @@ pub trait DeviceV1_0 {
}
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkGetFenceStatus.html>"]
unsafe fn get_fence_status(&self, fence: vk::Fence) -> VkResult<()> {
unsafe fn get_fence_status(&self, fence: vk::Fence) -> VkResult<bool> {
let err_code = self.fp_v1_0().get_fence_status(self.handle(), fence);
match err_code {
vk::Result::SUCCESS => Ok(()),
vk::Result::SUCCESS => Ok(true),
vk::Result::NOT_READY => Ok(false),
_ => Err(err_code),
}
}