Skip to content

dzn: Use the vk_sync_binary abstraction

Boris Brezillon requested to merge bbrezillon/mesa:dzn-sync-fix into main

D3D12 fences are capable of handling binary operations, but the current dzn_sync implementation doesn't match vk_sync expectations when sync objects are used to back semaphores. In that case, the wait operation is supposed to set the sync object back to an unsignaled state after the wait succeeded, but there's no way of knowing what the sync object is used for, and this implicit-reset behavior is not expected on fence objects, which also use the sync primitive. That means we currently have a semaphore implementation that works only once, and, as soon as the semaphore object has been signaled it stays in a signaled state until it's destroyed.

We could extend the sync framework to pass an implicit-reset-after-wait flag, but, given no one else seems to need that, it's probably simpler to drop the binary sync capability and rely on the binary-on-top-of-timeline emulation provided by the core.

Found while working on !16200 (merged).

/cc @kusma @jenatali @jekstrand

Merge request reports