Branch
Hash :
b380ed1f
Author :
Date :
2024-02-14T09:31:26
Vulkan: Add EGL_ANGLE_global_fence_sync Chrome has an implicit assumption that due to context virtualization, signaling a fence in one context results in synchronization with _all_ contexts that have previously made submissions. This is not per EGL spec, but the functionality is easily implementable in the Vulkan backend. In the Vulkan backend, each context is given its own "timeline" of submissions (tracked by serials associated with "indices"). The required functionality is implemented through a new EGL fence sync object whose sole difference is that it synchronizes with all the existing timelines rather than the one of the current context. Bug: b/318721705 Change-Id: I6c45d065e592d0d4ed627ce9695196b1086d5021 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5297396 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
Name
ANGLE_global_fence_sync
Name Strings
EGL_ANGLE_global_fence_sync
Contributors
Shahbaz Youssefi, Google
Contacts
Shahbaz Youssefi, Google (syoussefi 'at' google.com)
Status
Draft
Version
Version 1, 2024-02-13
Number
EGL Extensions XXX
Extension Type
EGL display extension
Dependencies
This extension is written against the wording of the EGL 1.5
Specification.
Overview
This extension enables the creation of EGL fence sync objects that
synchronize with all past submissions of all contexts. Normally, if two
contexts make submissions, even on the same thread, the inserted fence sync
only guarantees synchronization with the submissions from the context in
which the fence was inserted. With the new fence sync type introduced by
this extension, the application can synchronize with both contexts in this
example using a single fence.
New Types
None.
New Procedures and Functions
None.
New Tokens
Accepted by the <type> parameter of eglCreateSync, and returned
in <value> when eglGetSyncAttrib is called with <attribute>
EGL_SYNC_TYPE:
EGL_SYNC_GLOBAL_FENCE_ANGLE 0x34DE
Additions to the EGL Specification
Add the following after the second paragraph of Section 3.8.1.1 (Creating
Fence Sync Objects),
"If <type> is EGL_SYNC_GLOBAL_FENCE_ANGLE, behavior is identical to
EGL_SYNC_FENCE except that synchronization is additionally done with all
previously submitted commands by all contexts."
In the Errors of eglCreateSync, replace all instances of "If type is
EGL_SYNC_FENCE" with "If type is EGL_SYNC_FENCE or
EGL_SYNC_GLOBAL_FENCE_ANGLE".
Issues
None.
Revision History
Version 1, 2024-02-13
- Initial draft