[Vulkan v2] Frames and fences

This commit is contained in:
Triang3l
2019-08-08 23:58:02 +03:00
parent 5744e6ba38
commit 001120605b
5 changed files with 135 additions and 8 deletions

View File

@@ -27,6 +27,17 @@ inline bool DestroyAndNullHandle(F* destroy_function, T& handle) {
return false;
}
template <typename F, typename T>
inline bool DestroyAndNullHandle(F* destroy_function, VkDevice device,
T& handle) {
if (handle != VK_NULL_HANDLE) {
destroy_function(device, handle, nullptr);
handle = VK_NULL_HANDLE;
return true;
}
return false;
}
} // namespace util
} // namespace vk
} // namespace ui