engine3d-dev / engine3d

Open-source game engine to be used for developing games
Apache License 2.0
1 stars 3 forks source link

Vulkan Abstraction - Change from VkWaitIdle to VkFence #16

Closed SpinnerX closed 2 months ago

SpinnerX commented 2 months ago

Overview

Currently our vulkan abstraction layer uses vkQueueWaitIdle. Might be better for using VkFence for various reasons from what I've learned. This is something that I would eventually want to look into.

Reasons

Stack Overflow - Here is the link for more information https://stackoverflow.com/questions/39537176/in-what-situations-is-vkfence-better-than-vkqueuewaitidle-for-vkqueuesubmit

SpinnerX commented 2 months ago

For right now im closing this because it has already been added as part of synchronization integrations into the Vulkan abstraction layer/

VkFence is a much finer grained solution then vkQueueWaitIdle. Since VkFence allows to wait on tasks without having them needing to be submitted first.

Allowing flexibility in how we wait for specific threads to finish with tasks. Which can also allow your CPU to be open for doing other tasks while finishing it's current task prior to submission.