introduce per-context fencing
In Vulkan, each context (i.e., VkInstance) is independent from one another. This is actually true for OpenGL as well, and two GL fences from different GL contexts do not necessarily signal in the order they are submitted. There is a common desire to support per-context fencing.
Fences in Vulkan are not just per-context though. They are also per-VkDevice and per-VkQueue. This MR uses an opaque uint64_t
to identify the queue, similar to how an opaque uint64_t
is used to identify the blob.
As always, the new public APIs are guarded by VIRGL_RENDERER_UNSTABLE_APIS
until kernel uapi and virtio-gpu protocol are worked out.
This MR is extracted from !412 (merged) and is cleaned up. The cleanup might introduce some new bugs. I will do more testing tomorrow.