Merge pull request #463 from Ekzuzy/computecloth

Computecloth - fixed problem with synchronization of uniform buffer data updates
This commit is contained in:
Sascha Willems 2018-04-27 18:31:37 +02:00 committed by GitHub
commit 0efc16b149
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -692,6 +692,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();
@ -703,12 +709,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()