File tree Expand file tree Collapse file tree
examples/graphicspipelinelibrary Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,15 +414,20 @@ class VulkanExample: public VulkanExampleBase
414414
415415 // Create first pipeline using a background thread
416416 std::thread pipelineGenerationThread (&VulkanExample::threadFn, this );
417- pipelineGenerationThread.detach ();
417+
418+ // Stall in benchmark mode until pipeline creation is finished to measure work more consistently
419+ if (benchmark.active )
420+ pipelineGenerationThread.join ();
421+ else
422+ pipelineGenerationThread.detach ();
418423
419424 prepared = true ;
420425 }
421426
422427 void buildCommandBuffer ()
423428 {
424429 VkCommandBuffer cmdBuffer = drawCmdBuffers[currentBuffer];
425-
430+
426431 VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo ();
427432
428433 VkClearValue clearValues[2 ]{};
You can’t perform that action at this time.
0 commit comments