Fixing synchronization problem between descriptor sets and command buffers

This commit is contained in:
Dynamitos committed 2020-11-03 01:18:30 +01:00
1 parent 799ba20d49
commit 65caae9e21
24 files changed
+203 -58

No files matched your search

@@ -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();