diff options
Diffstat (limited to 'stream-servers/SyncThread.h')
-rw-r--r-- | stream-servers/SyncThread.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stream-servers/SyncThread.h b/stream-servers/SyncThread.h index 0e58f8c9..521dda0d 100644 --- a/stream-servers/SyncThread.h +++ b/stream-servers/SyncThread.h @@ -53,6 +53,10 @@ enum SyncThreadOpCode { // and timeline handle. // A fence FD object / Zircon eventpair in the guest is signaled. SYNC_THREAD_WAIT_VK = 4, + // Command to wait on the presentation the given VkImage. + SYNC_THREAD_WAIT_VK_QSRI = 5, + // Command that consists only of a callback. + SYNC_THREAD_GENERAL = 6, }; struct SyncThreadCmd { @@ -65,6 +69,7 @@ struct SyncThreadCmd { union { FenceSync* fenceSync = nullptr; VkFence vkFence; + VkImage vkImage; }; uint64_t timeline = 0; @@ -111,6 +116,10 @@ public: // For use with virtio-gpu and async fence completion callback. This is async like triggerWait, but takes a fence completion callback instead of incrementing some timeline directly. void triggerWaitWithCompletionCallback(FenceSync* fenceSync, FenceCompletionCallback); void triggerWaitVkWithCompletionCallback(VkFence fenceHandle, FenceCompletionCallback); + void triggerWaitVkQsriWithCompletionCallback(VkImage image, FenceCompletionCallback); + void triggerWaitVkQsriBlockedNoTimeline(VkImage image); + + void triggerGeneral(FenceCompletionCallback); // |cleanup|: for use with destructors and other cleanup functions. // it destroys the sync context and exits the sync thread. @@ -152,6 +161,8 @@ private: void doSyncContextInit(SyncThreadCmd* cmd); void doSyncWait(SyncThreadCmd* cmd); int doSyncWaitVk(SyncThreadCmd* cmd); + int doSyncWaitVkQsri(SyncThreadCmd* cmd); + int doSyncGeneral(SyncThreadCmd* cmd); void doSyncBlockedWaitNoTimeline(SyncThreadCmd* cmd); void doExit(SyncThreadCmd* cmd); |