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