Fixing synchronization problem between descriptor sets and command buffers

This commit is contained in:
Dynamitos
2020-11-03 01:18:30 +01:00
parent 799ba20d49
commit 65caae9e21
24 changed files with 203 additions and 58 deletions
@@ -3,6 +3,7 @@
#include "VulkanGraphicsEnums.h"
#include "VulkanGraphics.h"
#include "VulkanInitializer.h"
#include "VulkanCommandBuffer.h"
using namespace Seele;
using namespace Seele::Vulkan;
@@ -204,6 +205,10 @@ void DescriptorSet::writeChanges()
{
if (writeDescriptors.size() > 0)
{
if(currentlyBound != nullptr)
{
currentlyBound->getManager()->waitForCommands(currentlyBound);
}
vkUpdateDescriptorSets(graphics->getDevice(), writeDescriptors.size(), writeDescriptors.data(), 0, nullptr);
writeDescriptors.clear();
imageInfos.clear();