xref: /aosp_15_r20/external/angle/extensions/EGL_ANGLE_device_vulkan.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_device_vulkan
4
5Name Strings
6
7    EGL_ANGLE_device_vulkan
8
9Contributors
10
11    Peng Huang  (penghuang 'at' google.com)
12
13Contact
14
15    Peng Huang  (penghuang 'at' google.com)
16
17Status
18
19    Draft
20
21Version
22
23    Version 1, Oct 28, 2021
24
25Number
26
27    EGL Extension #XXX
28
29Extension Type
30
31    EGL device extension
32
33Dependencies
34
35    This extension is written against the language of EGL 1.5 as
36    modified by EGL_EXT_device_query.
37
38    EGL_EXT_device_query is required.
39
40Overview
41
42    ANGLE has the ability to run GPU commands on a native Vulkan device.
43    This extension defines a mapping from an EGL device to a Vulkan
44    device, after it's queried from an EGL display.
45
46IP Status
47
48    No known claims.
49
50New Types
51
52    None.
53
54New Procedures and Functions
55
56    None.
57
58New Tokens
59
60    Accepted as a queried <attribute> in eglQueryDeviceAttribEXT:
61
62        EGL_VULKAN_VERSION_ANGLE             0x34A8
63        EGL_VULKAN_INSTANCE_ANGLE            0x34A9
64        EGL_VULKAN_INSTANCE_EXTENSIONS_ANGLE 0x34AA
65        EGL_VULKAN_PHYSICAL_DEVICE_ANGLE     0x34AB
66        EGL_VULKAN_DEVICE_ANGLE              0x34AC
67        EGL_VULKAN_DEVICE_EXTENSIONS_ANGLE   0x34AD
68        EGL_VULKAN_FEATURES_ANGLE            0x34AE
69        EGL_VULKAN_QUEUE_ANGLE               0x34AF
70        EGL_VULKAN_QUEUE_FAMILIY_INDEX_ANGLE 0x34D0
71        EGL_VULKAN_GET_INSTANCE_PROC_ADDR    0x34D1
72
73Add a new section 2.1.3 (Vulkan Devices) after 2.1.2 (Devices)
74
75    Somewhat analogous to an EGL device, a Vulkan device establishes a
76    namespace for Vulkan operations. In the Vulkan APIs, such devices are
77    represented by pointers. For more details, see the Vulkan
78    documentation.
79
80Changes to section 3.2 (Devices)
81
82    Replace the paragraph immediately following the prototype for
83    eglQueryDeviceAttribEXT:
84
85    <attribute> may be EGL_VULKAN_VERSION_ANGLE.
86    On success, EGL_TRUE is returned, and the Vulkan versionbcorresponding to
87    the EGL device is returned in <value>. If the EGL device is not currently
88    associated with a Vulkan device and <attribute> is EGL_VULKAN_VERSION_ANGLE,
89    EGL_BAD_ATTRIBUTE is returned, and <value> is left unchanged.
90
91    <attribute> may be EGL_VULKAN_INSTANCE_ANGLE.
92    On success, EGL_TRUE is returned, and a valid Vulkan instance handle
93    VkInstance corresponding to the EGL device is returned in <value>.
94    This handle is compatible with Vulkan API functions. If the EGL device is
95    not currently associated with a Vulkan device and <attribute> is
96    EGL_VULKAN_INSTANCE_ANGLE, EGL_BAD_ATTRIBUTE is returned, and <value> is
97    left unchanged.
98
99    <attribute> may be EGL_VULKAN_INSTANCE_EXTENSIONS_ANGLE.
100    On success, EGL_TRUE is returned, and a pointer to a null terminated static
101    string array is returned in <value>. The array contains enabled Vulkan
102    instance extensions for the Vulkan device used by the display.
103    If the EGL device is not currently associated with a Vulkan device and
104    <attribute> is EGL_VULKAN_INSTANCE_EXTENSIONS_ANGLE, EGL_BAD_ATTRIBUTE is
105    returned, and <value> is left unchanged.
106
107    <attribute> may be EGL_VULKAN_PHYSICAL_DEVICE_ANGLE.
108    On success, EGL_TRUE is returned, and a valid Vulkan physical device handle
109    VkPhysicalDevice corresponding to the EGL device is returned in <value>.
110    This handle is compatible with Vulkan API functions. If the EGL device is
111    not currently associated with a Vulkan device and <attribute> is
112    EGL_VULKAN_PHYSICAL_DEVICE_ANGLE, EGL_BAD_ATTRIBUTE is returned,
113    and <value> is left unchanged.
114
115    <attribute> may be EGL_VULKAN_DEVICE_ANGLE.
116    On success, EGL_TRUE is returned, and a valid Vulkan device handle VkDevice
117    corresponding to the EGL device is returned in <value>. This handle is
118    compatible with Vulkan API functions. If the EGL device is not currently
119    associated with a Vulkan device and <attribute> is EGL_VULKAN_DEVICE_ANGLE,
120    EGL_BAD_ATTRIBUTE is returned, and <value> is left unchanged.
121
122    <attribute> may be EGL_VULKAN_DEVICE_EXTENSIONS_ANGLE.
123    On success, EGL_TRUE is returned, and a pointer to a null terminated static
124    string array is returned in <value>. The array contains enabled Vulkan
125    device extensions for the Vulkan device used by the display. If the EGL
126    device is not currently associated with a Vulkan device and <attribute> is
127    EGL_VULKAN_DEVICE_EXTENSIONS_ANGLE, EGL_BAD_ATTRIBUTE is returned, and
128    <value> is left unchanged.
129
130    <attribute> may be EGL_VULKAN_FEATURES_ANGLE.
131    On success, EGL_TRUE is returned, and a pointer to a static
132    VkPhysicalDeviceFeatures2KHR struct is returned in <value>. The structure
133    contains enabled Vulkan device features for the Vulkan device used by the
134    display. If the EGL device is not currently associated with a Vulkan device
135    and <attribute> is EGL_VULKAN_FEATURES_ANGLE, EGL_BAD_ATTRIBUTE is returned,
136    and <value> is left unchanged.
137
138    <attribute> may be EGL_VULKAN_QUEUE_ANGLE.
139    On success, EGL_TRUE is returned, and a valid Vulkan device queue handle
140    VkQueue corresponding to the EGL device is returned in <value>. This handle
141    is compatible with Vulkan API functions. If the EGL device is not currently
142    associated with a Vulkan device and <attribute> is EGL_VULKAN_QUEUE_ANGLE,
143    EGL_BAD_ATTRIBUTE is returned, and <value> is left unchanged.
144
145    <attribute> may be EGL_VULKAN_QUEUE_FAMILIY_INDEX_ANGLE.
146    On success, EGL_TRUE is returned, and the Vulkan queue familiy index
147    corresponding to the EGL device is returned in <value>. If the EGL device
148    is not currently associated with a Vulkan device and <attribute> is
149    EGL_VULKAN_QUEUE_FAMILIY_INDEX_ANGLE, EGL_BAD_ATTRIBUTE is returned, and
150    <value> is left unchanged.
151
152    <attribute> may be EGL_VULKAN_GET_INSTANCE_PROC_ADDR.
153    On success, EGL_TRUE is returned, and the vkGetInstanceProcAddr function
154    pointer corresponding to the EGL device is returned in <value>. If the EGL
155    device is not currently associated with a Vulkan device and <attribute> is
156    EGL_VULKAN_GET_INSTANCE_PROC_ADDR, EGL_BAD_ATTRIBUTE is returned, and
157    <value> is left unchanged.
158
159Issues
160
161    None
162
163Revision History
164
165    Version 1, Oct 28, 2021 (Peng Huang)
166        - Initial Draft