gscept/nebula

Frame script automatic cross-queue sync

Opened this issue · 0 comments

Currently, in order to sync between queues you need to setup an explicit synchronization. But considering we know how resources are accessed we shouldn't need to do this manually.

This would require each resource to be tracked per queue, and whenever a queue switch happens, a semaphore AND a barrier gets inserted. With this, we can also handle queue ownership handovers as well, reducing our concurrently shared resources substantially.

It would also need to handle dependencies between frames, for example imagine a resource is used on the graphics queue from the previous frame, and needs to be on compute the next, then a semaphore is needed between graphics and compute.

This would also mean removing the "wait_for_queue" and "wait_for_submission" hints in the frame script, as they are no longer needed.