computecloth - fixed problem with uniform buffer data update synchronization.

This commit is contained in:
Pawel Lapinski 2018-04-16 10:56:04 +02:00
parent 24009fa0aa
commit 3ffc279c97

View file

@ -694,6 +694,12 @@ public:
void draw() void draw()
{ {
VkSubmitInfo computeSubmitInfo = vks::initializers::submitInfo();
computeSubmitInfo.commandBufferCount = 1;
computeSubmitInfo.pCommandBuffers = &compute.commandBuffers[readSet];
VK_CHECK_RESULT( vkQueueSubmit( compute.queue, 1, &computeSubmitInfo, compute.fence ) );
// Submit graphics commands // Submit graphics commands
VulkanExampleBase::prepareFrame(); VulkanExampleBase::prepareFrame();
@ -705,12 +711,6 @@ public:
vkWaitForFences(device, 1, &compute.fence, VK_TRUE, UINT64_MAX); vkWaitForFences(device, 1, &compute.fence, VK_TRUE, UINT64_MAX);
vkResetFences(device, 1, &compute.fence); vkResetFences(device, 1, &compute.fence);
VkSubmitInfo computeSubmitInfo = vks::initializers::submitInfo();
computeSubmitInfo.commandBufferCount = 1;
computeSubmitInfo.pCommandBuffers = &compute.commandBuffers[readSet];
VK_CHECK_RESULT(vkQueueSubmit(compute.queue, 1, &computeSubmitInfo, compute.fence));
} }
void prepare() void prepare()