1<?xml version="1.0" encoding="UTF-8"?>
2<registry>
3    <comment>
4Copyright (C) 2023 The Android Open Source Project
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17    </comment>
18
19    <comment>
20This file, vk_gfxstream.xml, is the Vulkan API Registry for gfxstream
21specific entries.
22    </comment>
23        <types comment="Vulkan type definitions">
24        <!-- b/295587347 VkNativeBufferANDROID diverged from upstream -->
25        <type category="struct" name="VkNativeBufferANDROID" structextends="VkImageCreateInfo">
26            <member values="VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID"><type>VkStructureType</type> <name>sType</name></member>
27            <member optional="true">const <type>void</type>* <name>pNext</name></member>
28            <member noautovalidity="true">const <type>uint32_t</type>* <name>handle</name></member>
29            <member><type>int</type> <name>stride</name></member>
30            <member><type>int</type> <name>format</name></member>
31            <member><type>int</type> <name>usage</name></member>
32            <member><type>VkNativeBufferUsage2ANDROID</type> <name>usage2</name></member>
33        </type>
34        <type category="struct" name="VkImportColorBufferGOOGLE" structextends="VkMemoryAllocateInfo">
35            <member values="VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE"><type>VkStructureType</type> <name>sType</name></member>
36            <member><type>void</type>*                  <name>pNext</name></member>
37            <member><type>uint32_t</type>   <name>colorBuffer</name></member>
38        </type>
39        <type category="struct" name="VkImportBufferGOOGLE" structextends="VkMemoryAllocateInfo">
40            <member values="VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE"><type>VkStructureType</type> <name>sType</name></member>
41            <member><type>void</type>*                  <name>pNext</name></member>
42            <member><type>uint32_t</type>   <name>buffer</name></member>
43        </type>
44        <type category="struct" name="VkCreateBlobGOOGLE" structextends="VkMemoryAllocateInfo">
45            <member values="VK_STRUCTURE_TYPE_CREATE_BLOB_GOOGLE"><type>VkStructureType</type> <name>sType</name></member>
46            <member><type>void</type>*                  <name>pNext</name></member>
47            <member><type>uint32_t</type>   <name>blobMem</name></member>
48            <member><type>uint32_t</type>   <name>blobFlags</name></member>
49            <member><type>uint64_t</type>   <name>blobId</name></member>
50        </type>
51    </types>
52
53    <commands comment="Vulkan command definitions">
54        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY,VK_ERROR_MEMORY_MAP_FAILED">
55            <proto><type>VkResult</type> <name>vkMapMemoryIntoAddressSpaceGOOGLE</name></proto>
56            <param><type>VkDevice</type> <name>device</name></param>
57            <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
58            <param optional="false,true"><type>uint64_t</type>* <name>pAddress</name></param>
59        </command>
60        <command>
61            <proto><type>void</type> <name>vkUpdateDescriptorSetWithTemplateSizedGOOGLE</name></proto>
62            <param><type>VkDevice</type> <name>device</name></param>
63            <param externsync="true"><type>VkDescriptorSet</type> <name>descriptorSet</name></param>
64            <param><type>VkDescriptorUpdateTemplate</type> <name>descriptorUpdateTemplate</name></param>
65            <param><type>uint32_t</type> <name>imageInfoCount</name></param>
66            <param><type>uint32_t</type> <name>bufferInfoCount</name></param>
67            <param><type>uint32_t</type> <name>bufferViewCount</name></param>
68            <param optional="true" len="imageInfoCount">const <type>uint32_t</type>* <name>pImageInfoEntryIndices</name></param>
69            <param optional="true" len="bufferInfoCount">const <type>uint32_t</type>* <name>pBufferInfoEntryIndices</name></param>
70            <param optional="true" len="bufferViewCount">const <type>uint32_t</type>* <name>pBufferViewEntryIndices</name></param>
71            <param optional="true" len="imageInfoCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfos</name></param>
72            <param optional="true" len="bufferInfoCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfos</name></param>
73            <param optional="true" len="bufferViewCount">const <type>VkBufferView</type>* <name>pBufferViews</name></param>
74        </command>
75        <command>
76            <proto><type>void</type> <name>vkUpdateDescriptorSetWithTemplateSized2GOOGLE</name></proto>
77            <param><type>VkDevice</type> <name>device</name></param>
78            <param externsync="true"><type>VkDescriptorSet</type> <name>descriptorSet</name></param>
79            <param><type>VkDescriptorUpdateTemplate</type> <name>descriptorUpdateTemplate</name></param>
80            <param><type>uint32_t</type> <name>imageInfoCount</name></param>
81            <param><type>uint32_t</type> <name>bufferInfoCount</name></param>
82            <param><type>uint32_t</type> <name>bufferViewCount</name></param>
83            <param><type>uint32_t</type> <name>inlineUniformBlockCount</name></param>
84            <param optional="true" len="imageInfoCount">const <type>uint32_t</type>* <name>pImageInfoEntryIndices</name></param>
85            <param optional="true" len="bufferInfoCount">const <type>uint32_t</type>* <name>pBufferInfoEntryIndices</name></param>
86            <param optional="true" len="bufferViewCount">const <type>uint32_t</type>* <name>pBufferViewEntryIndices</name></param>
87            <param optional="true" len="imageInfoCount">const <type>VkDescriptorImageInfo</type>* <name>pImageInfos</name></param>
88            <param optional="true" len="bufferInfoCount">const <type>VkDescriptorBufferInfo</type>* <name>pBufferInfos</name></param>
89            <param optional="true" len="bufferViewCount">const <type>VkBufferView</type>* <name>pBufferViews</name></param>
90            <param optional="true" len="inlineUniformBlockCount">const <type>uint8_t</type>* <name>pInlineUniformBlockData</name></param>
91        </command>
92        <command>
93            <proto><type>void</type> <name>vkBeginCommandBufferAsyncGOOGLE</name></proto>
94            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
95            <param>const <type>VkCommandBufferBeginInfo</type>* <name>pBeginInfo</name></param>
96            <implicitexternsyncparams>
97                <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
98            </implicitexternsyncparams>
99        </command>
100        <command>
101            <proto><type>void</type> <name>vkEndCommandBufferAsyncGOOGLE</name></proto>
102            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
103            <implicitexternsyncparams>
104                <param>the sname:VkCommandPool that pname:commandBuffer was allocated from</param>
105            </implicitexternsyncparams>
106        </command>
107        <command>
108            <proto><type>void</type> <name>vkResetCommandBufferAsyncGOOGLE</name></proto>
109            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
110            <param optional="true"><type>VkCommandBufferResetFlags</type> <name>flags</name></param>
111        </command>
112        <command>
113            <proto><type>void</type> <name>vkCommandBufferHostSyncGOOGLE</name></proto>
114            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
115            <param><type>uint32_t</type> <name>needHostSync</name></param>
116            <param><type>uint32_t</type> <name>sequenceNumber</name></param>
117        </command>
118        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
119            <proto><type>VkResult</type> <name>vkCreateImageWithRequirementsGOOGLE</name></proto>
120            <param><type>VkDevice</type> <name>device</name></param>
121            <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param>
122            <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
123            <param><type>VkImage</type>* <name>pImage</name></param>
124            <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
125        </command>
126        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
127            <proto><type>VkResult</type> <name>vkCreateBufferWithRequirementsGOOGLE</name></proto>
128            <param><type>VkDevice</type> <name>device</name></param>
129            <param>const <type>VkBufferCreateInfo</type>* <name>pCreateInfo</name></param>
130            <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
131            <param><type>VkBuffer</type>* <name>pBuffer</name></param>
132            <param><type>VkMemoryRequirements</type>* <name>pMemoryRequirements</name></param>
133        </command>
134        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
135            <proto><type>VkResult</type> <name>vkGetMemoryHostAddressInfoGOOGLE</name></proto>
136            <param><type>VkDevice</type> <name>device</name></param>
137            <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
138            <param optional="false,true"><type>uint64_t</type>* <name>pAddress</name></param>
139            <param optional="false,true"><type>uint64_t</type>* <name>pSize</name></param>
140            <param optional="false,true"><type>uint64_t</type>* <name>pHostmemId</name></param>
141        </command>
142        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY,VK_ERROR_OUT_OF_DEVICE_MEMORY">
143            <proto><type>VkResult</type> <name>vkFreeMemorySyncGOOGLE</name></proto>
144            <param><type>VkDevice</type> <name>device</name></param>
145            <param optional="true" externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
146            <param optional="true">const <type>VkAllocationCallbacks</type>* <name>pAllocator</name></param>
147        </command>
148        <command>
149            <proto><type>void</type> <name>vkQueueHostSyncGOOGLE</name></proto>
150            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
151            <param><type>uint32_t</type> <name>needHostSync</name></param>
152            <param><type>uint32_t</type> <name>sequenceNumber</name></param>
153        </command>
154        <command>
155            <proto><type>void</type> <name>vkQueueSubmitAsyncGOOGLE</name></proto>
156            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
157            <param optional="true"><type>uint32_t</type> <name>submitCount</name></param>
158            <param len="submitCount" externsync="pSubmits[].pWaitSemaphores[],pSubmits[].pSignalSemaphores[]">const <type>VkSubmitInfo</type>* <name>pSubmits</name></param>
159            <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
160        </command>
161        <command>
162            <proto><type>void</type> <name>vkQueueSubmitAsync2GOOGLE</name></proto>
163            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
164            <param optional="true"><type>uint32_t</type> <name>submitCount</name></param>
165            <param len="submitCount" externsync="pSubmits[].pWaitSemaphores[],pSubmits[].pSignalSemaphores[]">const <type>VkSubmitInfo2</type>* <name>pSubmits</name></param>
166            <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
167        </command>
168        <command>
169            <proto><type>void</type> <name>vkQueueWaitIdleAsyncGOOGLE</name></proto>
170            <param><type>VkQueue</type> <name>queue</name></param>
171        </command>
172        <command queues="sparse_binding">
173            <proto><type>void</type> <name>vkQueueBindSparseAsyncGOOGLE</name></proto>
174            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
175            <param optional="true"><type>uint32_t</type> <name>bindInfoCount</name></param>
176            <param len="bindInfoCount" externsync="pBindInfo[].pWaitSemaphores[],pBindInfo[].pSignalSemaphores[],pBindInfo[].pBufferBinds[].buffer,pBindInfo[].pImageOpaqueBinds[].image,pBindInfo[].pImageBinds[].image">const <type>VkBindSparseInfo</type>* <name>pBindInfo</name></param>
177            <param optional="true" externsync="true"><type>VkFence</type> <name>fence</name></param>
178        </command>
179        <command>
180            <proto><type>void</type> <name>vkGetLinearImageLayoutGOOGLE</name></proto>
181            <param><type>VkDevice</type> <name>device</name></param>
182            <param><type>VkFormat</type> <name>format</name></param>
183            <param><type>VkDeviceSize</type>* <name>pOffset</name></param>
184            <param><type>VkDeviceSize</type>* <name>pRowPitchAlignment</name></param>
185        </command>
186        <command>
187            <proto><type>void</type> <name>vkGetLinearImageLayout2GOOGLE</name></proto>
188            <param><type>VkDevice</type> <name>device</name></param>
189            <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param>
190            <param><type>VkDeviceSize</type>* <name>pOffset</name></param>
191            <param><type>VkDeviceSize</type>* <name>pRowPitchAlignment</name></param>
192        </command>
193        <command>
194            <proto><type>void</type> <name>vkQueueFlushCommandsGOOGLE</name></proto>
195            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
196            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
197            <param><type>VkDeviceSize</type> <name>dataSize</name></param>
198            <param len="dataSize">const <type>void</type>* <name>pData</name></param>
199        </command>
200        <command successcodes="VK_SUCCESS" errorcodes="VK_ERROR_OUT_OF_HOST_MEMORY">
201            <proto><type>VkResult</type> <name>vkGetBlobGOOGLE</name></proto>
202            <param><type>VkDevice</type> <name>device</name></param>
203            <param externsync="true"><type>VkDeviceMemory</type> <name>memory</name></param>
204        </command>
205        <command>
206            <proto><type>void</type> <name>vkQueueCommitDescriptorSetUpdatesGOOGLE</name></proto>
207            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
208            <param externsync="true"><type>uint32_t</type> <name>descriptorPoolCount</name></param>
209            <param len="descriptorPoolCount" externsync="true">const <type>VkDescriptorPool</type>* <name>pDescriptorPools</name></param>
210            <param externsync="true"><type>uint32_t</type> <name>descriptorSetCount</name></param>
211            <param len="descriptorSetCount" externsync="true">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></param>
212            <param len="descriptorSetCount" externsync="true">const <type>uint64_t</type>* <name>pDescriptorSetPoolIds</name></param>
213            <param len="descriptorSetCount" externsync="true">const <type>uint32_t</type>* <name>pDescriptorSetWhichPool</name></param>
214            <param len="descriptorSetCount" externsync="true">const <type>uint32_t</type>* <name>pDescriptorSetPendingAllocation</name></param>
215            <param len="descriptorSetCount" externsync="true">const <type>uint32_t</type>* <name>pDescriptorWriteStartingIndices</name></param>
216            <param externsync="true"><type>uint32_t</type> <name>pendingDescriptorWriteCount</name></param>
217            <param len="pendingDescriptorWriteCount" externsync="true">const <type>VkWriteDescriptorSet</type>* <name>pPendingDescriptorWrites</name></param>
218        </command>
219        <command>
220            <proto><type>void</type> <name>vkCollectDescriptorPoolIdsGOOGLE</name></proto>
221            <param><type>VkDevice</type> <name>device</name></param>
222            <param externsync="true"><type>VkDescriptorPool</type> <name>descriptorPool</name></param>
223            <param optiona="false,true"><type>uint32_t</type>* <name>pPoolIdCount</name></param>
224            <param optional="true" len="pPoolIdCount"><type>uint64_t</type>* <name>pPoolIds</name></param>
225        </command>
226        <command>
227            <proto><type>void</type> <name>vkQueueSignalReleaseImageANDROIDAsyncGOOGLE</name></proto>
228            <param><type>VkQueue</type> <name>queue</name></param>
229            <param optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></param>
230            <param noautovalidity="true" len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></param>
231            <param><type>VkImage</type> <name>image</name></param>
232        </command>
233        <command>
234            <proto><type>VkResult</type> <name>vkQueueSignalReleaseImageANDROID</name></proto>
235            <param><type>VkQueue</type> <name>queue</name></param>
236            <param optional="true"><type>uint32_t</type> <name>waitSemaphoreCount</name></param>
237            <param noautovalidity="true" len="waitSemaphoreCount">const <type>VkSemaphore</type>* <name>pWaitSemaphores</name></param>
238            <param><type>VkImage</type> <name>image</name></param>
239            <param><type>int</type>* <name>pNativeFenceFd</name></param>
240        </command>
241        <command>
242            <proto><type>void</type> <name>vkQueueFlushCommandsFromAuxMemoryGOOGLE</name></proto>
243            <param externsync="true"><type>VkQueue</type> <name>queue</name></param>
244            <param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
245            <param><type>VkDeviceMemory</type> <name>deviceMemory</name></param>
246            <param><type>VkDeviceSize</type> <name>dataOffset</name></param>
247            <param><type>VkDeviceSize</type> <name>dataSize</name></param>
248        </command>
249        <command>
250            <proto><type>void</type> <name>vkGetMTLDeviceMVK</name></proto>
251            <param><type>VkPhysicalDevice</type> <name>physicalDevice</name></param>
252            <param><type>void</type>** <name>pMTLDevice</name></param>
253        </command>
254        <command successcodes="VK_SUCCESS">
255            <proto><type>VkResult</type> <name>vkSetMTLTextureMVK</name></proto>
256            <param><type>VkImage</type> <name>image</name></param>
257            <param><type>void</type>* <name>mtlTexture</name></param>
258        </command>
259        <command>
260            <proto><type>void</type> <name>vkGetMTLTextureMVK</name></proto>
261            <param><type>VkImage</type> <name>image</name></param>
262            <param><type>void</type>** <name>pMTLTexture</name></param>
263        </command>
264        <command>
265            <proto><type>void</type> <name>vkGetMTLBufferMVK</name></proto>
266            <param><type>VkBuffer</type> <name>buffer</name></param>
267            <param><type>void</type>** <name>pMTLBuffer</name></param>
268        </command>
269        <command successcodes="VK_SUCCESS">
270            <proto><type>VkResult</type> <name>vkUseIOSurfaceMVK</name></proto>
271            <param><type>VkImage</type> <name>image</name></param>
272            <param><type>void</type>* <name>ioSurface</name></param>
273        </command>
274        <command>
275            <proto><type>void</type> <name>vkGetIOSurfaceMVK</name></proto>
276            <param><type>VkImage</type> <name>image</name></param>
277            <param><type>void</type>**  <name>pIOSurface</name></param>
278        </command>
279    </commands>
280    <extensions comment="Vulkan extension interface definitions">
281        <extension name="VK_ANDROID_native_buffer" supported="vulkan"/>
282        <extension name="VK_GOOGLE_gfxstream" number="386" author="GOOGLE" contact="Lingfeng Yang @frank,Roman Kiryanov @rkir,Yilong Li @liyl_google" supported="vulkan" type="instance">
283            <require>
284                <enum value="0"                                             name="VK_GOOGLE_GFXSTREAM_SPEC_VERSION"/>
285                <enum value="386"                                           name="VK_GOOGLE_GFXSTREAM_NUMBER"/>
286                <enum value="&quot;VK_GOOGLE_gfxstream&quot;"               name="VK_GOOGLE_GFXSTREAM_EXTENSION_NAME"/>
287                <enum offset="0" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE"/>
288                <enum offset="1" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE"/>
289                <enum offset="2" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_CREATE_BLOB_GOOGLE"/>
290                <type name="VkImportColorBufferGOOGLE"/>
291                <type name="VkImportBufferGOOGLE"/>
292                <type name="VkCreateBlobGOOGLE"/>
293                <command name="vkMapMemoryIntoAddressSpaceGOOGLE"/>
294                <command name="vkUpdateDescriptorSetWithTemplateSizedGOOGLE"/>
295                <command name="vkBeginCommandBufferAsyncGOOGLE"/>
296                <command name="vkEndCommandBufferAsyncGOOGLE"/>
297                <command name="vkResetCommandBufferAsyncGOOGLE"/>
298                <command name="vkCommandBufferHostSyncGOOGLE"/>
299                <command name="vkCreateImageWithRequirementsGOOGLE"/>
300                <command name="vkCreateBufferWithRequirementsGOOGLE"/>
301                <command name="vkGetMemoryHostAddressInfoGOOGLE"/>
302                <command name="vkFreeMemorySyncGOOGLE"/>
303                <command name="vkQueueHostSyncGOOGLE"/>
304                <command name="vkQueueSubmitAsyncGOOGLE"/>
305                <command name="vkQueueWaitIdleAsyncGOOGLE"/>
306                <command name="vkQueueBindSparseAsyncGOOGLE"/>
307                <command name="vkGetLinearImageLayoutGOOGLE"/>
308                <command name="vkGetLinearImageLayout2GOOGLE"/>
309                <command name="vkQueueFlushCommandsGOOGLE"/>
310                <command name="vkQueueCommitDescriptorSetUpdatesGOOGLE"/>
311                <command name="vkCollectDescriptorPoolIdsGOOGLE"/>
312                <command name="vkQueueSignalReleaseImageANDROIDAsyncGOOGLE"/>
313                <command name="vkQueueFlushCommandsFromAuxMemoryGOOGLE"/>
314                <command name="vkGetBlobGOOGLE"/>
315                <command name="vkUpdateDescriptorSetWithTemplateSized2GOOGLE"/>
316                <command name="vkQueueSubmitAsync2GOOGLE"/>
317            </require>
318        </extension>
319        <extension name="VK_MVK_moltenvk" supported="vulkan">
320            <require>
321                <command name="vkGetMTLDeviceMVK"/>
322                <command name="vkSetMTLTextureMVK"/>
323                <command name="vkGetMTLTextureMVK"/>
324                <command name="vkGetMTLBufferMVK"/>
325                <command name="vkUseIOSurfaceMVK"/>
326                <command name="vkGetIOSurfaceMVK"/>
327            </require>
328        </extension>
329    </extensions>
330</registry>