xref: /aosp_15_r20/external/angle/extensions/ANGLE_external_objects_fuchsia.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_external_objects_fuchsia
4
5Name Strings
6
7    GL_ANGLE_memory_object_fuchsia
8    GL_ANGLE_semaphore_fuchsia
9
10Contributors
11
12    Michael Spang, Google
13
14Contact
15
16    Michael Spang, Google (spang 'at' google.com)
17
18Status
19
20    Draft
21
22Version
23
24    Last Modified Date: Feb 19, 2020
25    Revision: 1
26
27Number
28
29    TBD
30
31Dependencies
32
33    Written against the OpenGL 4.5 and OpenGL ES 3.2 specifications
34
35    GL_ANGLE_memory_object_fuchsia requires GL_EXT_memory_object
36
37    GL_ANGLE_semaphore_fuchsia requires GL_EXT_semaphore
38
39Overview
40
41    Building upon the OpenGL memory object and semaphore framework
42    defined in EXT_external_objects, this extension enables an OpenGL
43    application to import a memory object or semaphore from Zircon
44    external handles.
45
46New Procedures and Functions
47
48    If the GL_ANGLE_memory_object_fuchsia string is reported, the following
49    commands are added:
50
51    void ImportMemoryZirconHandleANGLE(uint memory,
52                                       uint64 size,
53                                       enum handleType,
54                                       uint handle);
55
56    If the GL_ANGLE_semaphore_fuchsia string is reported, the following commands
57    are added:
58
59    void ImportSemaphoreZirconHandleANGLE(uint semaphore,
60                                          enum handleType,
61                                          uint handle);
62
63
64New Tokens
65
66    If the GL_ANGLE_memory_object_fuchsia string is reported, the following
67    tokens are added:
68
69    Accepted by the <handleType> parameter of ImportMemoryZirconHandleANGLE().
70
71        HANDLE_TYPE_ZIRCON_VMO_ANGLE               0x93AE
72
73    If the GL_ANGLE_semaphore_fuchsia string is reported, the following
74    tokens are added:
75
76    Accepted by the <handleType> parameter of ImportSemaphoreZirconHandleANGLE().
77
78        HANDLE_TYPE_ZIRCON_EVENT_ANGLE             0x93AF
79
80Additions to Chapter 4 of the OpenGL 4.5 Specification (Event Model)
81
82    Add the following entry to table 4.2 "Commands for importing
83    external semaphore handles."
84
85        | Handle Type                    | Import command                   |
86        +--------------------------------+----------------------------------+
87        | HANDLE_TYPE_ZIRCON_EVENT_ANGLE | ImportSemaphoreZirconHandleANGLE |
88        +--------------------------------+----------------------------------+
89
90    Replace the paragraph in section 4.2.1 beginning "External handles
91    are often defined..." with the following
92
93        The command
94
95            ImportSemaphoreZirconHandleANGLE(uint semaphore,
96                                             enum handleType,
97                                             uint handle);
98
99        imports a semaphore from the zircon handle <handle>.  What type of
100        handle <handle> refers to is determined by <handleType>.  A successful
101        import operation transfers ownership of <handle> to the GL
102        implementation, and performing any operation on <handle> in the
103        application after an import results in undefined behavior.
104
105Additions to Chapter 6 of the OpenGL 4.5 Specification (Memory Objects)
106
107    Add the following entry to table 6.2 "Commands for importing
108    external memory handles."
109
110        | Handle Type                  | Import command                |
111        +------------------------------+-------------------------------+
112        | HANDLE_TYPE_ZIRCON_VMO_ANGLE | ImportMemoryZirconHandleANGLE |
113        +------------------------------+-------------------------------+
114
115    Replace the paragraph in section 6.1 beginning "External handles are
116    often defined..." with the following
117
118        The command
119
120            void ImportMemoryZirconHandleANGLE(uint memory,
121                                               uint64 size,
122                                               enum handleType,
123                                               uint handle);
124
125        imports a memory object of length <size> from the handle
126        <handle>.  What type of object <handle> refers to is determined by
127        <handleType>.  A successful import operation transfers ownership
128        of <handle> to the GL implementation, and performing any operation on
129        <handle> in the application after an import results in undefined
130        behavior.
131
132Revision History
133
134    Revision 1, 2020-02-19 (Michael Spang)
135        - Initial draft based closely on EXT_external_objects_fd.
136