@@ -562,7 +562,7 @@ class VulkanExample : public VulkanExampleBase
562
562
VK_CHECK_RESULT (vkAllocateCommandBuffers (device, &cmdBufAllocateInfo, &compute.commandBuffer ));
563
563
564
564
// Fence for compute CB sync
565
- VkFenceCreateInfo fenceCreateInfo = vks::initializers::fenceCreateInfo (VK_FENCE_CREATE_SIGNALED_BIT );
565
+ VkFenceCreateInfo fenceCreateInfo = vks::initializers::fenceCreateInfo ();
566
566
VK_CHECK_RESULT (vkCreateFence (device, &fenceCreateInfo, nullptr , &compute.fence ));
567
567
568
568
// Build a single command buffer containing the compute dispatch commands
@@ -604,15 +604,15 @@ class VulkanExample : public VulkanExampleBase
604
604
{
605
605
// Submit compute commands
606
606
// Use a fence to ensure that compute command buffer has finished executing before using it again
607
- vkWaitForFences (device, 1 , &compute.fence , VK_TRUE, UINT64_MAX);
608
- vkResetFences (device, 1 , &compute.fence );
609
-
610
607
VkSubmitInfo computeSubmitInfo = vks::initializers::submitInfo ();
611
608
computeSubmitInfo.commandBufferCount = 1 ;
612
609
computeSubmitInfo.pCommandBuffers = &compute.commandBuffer ;
613
610
614
611
VK_CHECK_RESULT (vkQueueSubmit (compute.queue , 1 , &computeSubmitInfo, compute.fence ));
615
612
613
+ vkWaitForFences (device, 1 , &compute.fence , VK_TRUE, UINT64_MAX);
614
+ vkResetFences (device, 1 , &compute.fence );
615
+
616
616
VulkanExampleBase::prepareFrame ();
617
617
618
618
// Command buffer to be submitted to the queue
0 commit comments