KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
739 stars 398 forks source link

sync: False-positives in Granite samples when timeline semaphores are used #7600

Open artem-lunarg opened 6 months ago

artem-lunarg commented 6 months ago

The scope of this issue is restricted to two samples from the Granite renderer (https://github.com/Themaister/Granite): gltf-viewer-simple and latency-test.

These samples are good examples of synchronization validation false positives due to missing timeline semaphore support. The above samples run error-free when binary semaphores are used.

context.cpp: ext.vk12_features.timelineSemaphore = VK_FALSE can be used to enable binary semaphores.

@HansKristian-Work for your visibility

devshgraphicsprogramming commented 3 months ago

Btw I have a pretty nice repro of latched submits multithreaded_histogram.zip on future values

artem-lunarg commented 3 months ago

thanks @devshgraphicsprogramming!

devshgraphicsprogramming commented 3 months ago

Source is here btw: https://github.com/Devsh-Graphics-Programming/Nabla-Examples-and-Tests/blob/master/07_StagingAndMultipleQueues/main.cpp

devshgraphicsprogramming commented 3 months ago

This code change silences the validation layer (if I treat every GPU as I'd treat Intel): https://github.com/Devsh-Graphics-Programming/Nabla-Examples-and-Tests/commit/4e48f0b27213fae6ce032bae4ff2ff0622921afc

Basially my code is a repro for validation layers choking on timeline semaphores + out-of-order-submits to different queues

devshgraphicsprogramming commented 3 months ago

Funny thing, renderdoc chokes on this usage as well, but it actually freezes up completely.

I guess its because its not been coded to be able to defer a capture until later after a submission.

imrodriguezro commented 1 month ago

Hi! out of curiosity, do you guys have a rough estimate of when these false-positives related to timeline semaphores will be fixed?

artem-lunarg commented 1 month ago

Hi @imrodriguezro, actually we have some estimates. Syncval timelines semaphores support won't be available in the next SDK (later this month) but it will be in the SDK after that. The implementation should land in the main branch somewhere in August, so it will be possible to test this before the autumn SDK too.

imrodriguezro commented 1 month ago

thanks for the info @artem-lunarg 👍