KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 648 forks source link

Fixes for timeline semaphore #1065

Closed bryce-young-mobica closed 5 months ago

bryce-young-mobica commented 5 months ago

Description

Reworked the timeline semaphore sample to prevent it crashing on Windows.

The only obvious trigger for the crash that I could observe was the main thread calling "vkDeviceWaitIdle" whilst the compute thread was in "wait_timeline_gpu". To avoid this, I removed the "wait/signal_timeline_gpu" calls (opting to attach the "VkTimelineSemaphoreSubmitInfo" to the queue submissions instead), and restructured the compute/graphics work stages to prevent the compute thread running ahead and submitting (potentially blocking) work.

Fixes #588

Tested on Windows Tested with shared queue for compute and graphics

General Checklist:

Please ensure the following points are checked:

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

SaschaWillems commented 3 months ago

Any update on this? Would be great to have that sample properly work on Windows.

bryce-young-mobica commented 3 months ago

Sorry for the delay. I made the changes you suggested, and opened a new PR here: https://github.com/KhronosGroup/Vulkan-Samples/pull/1125 (didn't see the reopen option until after I'd created it).