Merge "Mark VK_MVK_moltenvk extension as supported on vulkan" into main

GitOrigin-RevId: b845b34f9e00539fda3643e69304821f7ebff731
Change-Id: Ie2c3803e451be310fcbe8ca0585e23c79f891d69
diff --git a/codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml b/codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml
index 469ca84..249f34f 100644
--- a/codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml
+++ b/codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml
@@ -316,7 +316,7 @@
                 <command name="vkQueueSubmitAsync2GOOGLE"/>
             </require>
         </extension>
-        <extension name="VK_MVK_moltenvk">
+        <extension name="VK_MVK_moltenvk" supported="vulkan">
             <require>
                 <command name="vkGetMTLDeviceMVK"/>
                 <command name="vkSetMTLTextureMVK"/>
diff --git a/guest/vulkan_enc/VkEncoder.cpp b/guest/vulkan_enc/VkEncoder.cpp
index f2016ff..2676527 100644
--- a/guest/vulkan_enc/VkEncoder.cpp
+++ b/guest/vulkan_enc/VkEncoder.cpp
@@ -33182,6 +33182,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/VkEncoder.h b/guest/vulkan_enc/VkEncoder.h
index 7dc984c..9e6ae70 100644
--- a/guest/vulkan_enc/VkEncoder.h
+++ b/guest/vulkan_enc/VkEncoder.h
@@ -923,6 +923,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/func_table.cpp b/guest/vulkan_enc/func_table.cpp
index e1e4199..9b69722 100644
--- a/guest/vulkan_enc/func_table.cpp
+++ b/guest/vulkan_enc/func_table.cpp
@@ -4473,6 +4473,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_counting_guest.cpp b/guest/vulkan_enc/goldfish_vk_counting_guest.cpp
index 4b8e35f..9499e0a 100644
--- a/guest/vulkan_enc/goldfish_vk_counting_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_counting_guest.cpp
@@ -32,7 +32,6 @@
 
 #include "goldfish_vk_counting_guest.h"
 
-#include <cstdlib>
 #include <cstring>
 
 #include "goldfish_vk_extension_structs_guest.h"
@@ -6447,6 +6446,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_counting_guest.h b/guest/vulkan_enc/goldfish_vk_counting_guest.h
index dd230c5..ad21e53 100644
--- a/guest/vulkan_enc/goldfish_vk_counting_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_counting_guest.h
@@ -1524,6 +1524,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_deepcopy_guest.cpp b/guest/vulkan_enc/goldfish_vk_deepcopy_guest.cpp
index 6fbf0c8..2158881 100644
--- a/guest/vulkan_enc/goldfish_vk_deepcopy_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_deepcopy_guest.cpp
@@ -7445,6 +7445,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_deepcopy_guest.h b/guest/vulkan_enc/goldfish_vk_deepcopy_guest.h
index 1cbe53e..2c310f0 100644
--- a/guest/vulkan_enc/goldfish_vk_deepcopy_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_deepcopy_guest.h
@@ -1667,6 +1667,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_extension_structs_guest.cpp b/guest/vulkan_enc/goldfish_vk_extension_structs_guest.cpp
index 5fda3bc..6a93dad 100644
--- a/guest/vulkan_enc/goldfish_vk_extension_structs_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_extension_structs_guest.cpp
@@ -144,6 +144,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_extension_structs_guest.h b/guest/vulkan_enc/goldfish_vk_extension_structs_guest.h
index 47cee8e..4324d69 100644
--- a/guest/vulkan_enc/goldfish_vk_extension_structs_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_extension_structs_guest.h
@@ -164,6 +164,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_marshaling_guest.cpp b/guest/vulkan_enc/goldfish_vk_marshaling_guest.cpp
index 60da264..d86db4b 100644
--- a/guest/vulkan_enc/goldfish_vk_marshaling_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_marshaling_guest.cpp
@@ -12064,6 +12064,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_marshaling_guest.h b/guest/vulkan_enc/goldfish_vk_marshaling_guest.h
index b981ce8..e4bd6cc 100644
--- a/guest/vulkan_enc/goldfish_vk_marshaling_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_marshaling_guest.h
@@ -3168,6 +3168,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp b/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp
index 5653772..3c64162 100644
--- a/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.cpp
@@ -8123,6 +8123,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.h b/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.h
index 1e95bbe..52221c5 100644
--- a/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_reserved_marshaling_guest.h
@@ -1697,6 +1697,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_transform_guest.cpp b/guest/vulkan_enc/goldfish_vk_transform_guest.cpp
index e94e7a4..627af46 100644
--- a/guest/vulkan_enc/goldfish_vk_transform_guest.cpp
+++ b/guest/vulkan_enc/goldfish_vk_transform_guest.cpp
@@ -6912,6 +6912,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/guest/vulkan_enc/goldfish_vk_transform_guest.h b/guest/vulkan_enc/goldfish_vk_transform_guest.h
index df6f98a..68a3989 100644
--- a/guest/vulkan_enc/goldfish_vk_transform_guest.h
+++ b/guest/vulkan_enc/goldfish_vk_transform_guest.h
@@ -2681,6 +2681,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/VkDecoder.cpp b/host/vulkan/VkDecoder.cpp
index c8d8347..25ce474 100644
--- a/host/vulkan/VkDecoder.cpp
+++ b/host/vulkan/VkDecoder.cpp
@@ -18270,6 +18270,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/VkDecoder.h b/host/vulkan/VkDecoder.h
index 7de4bb5..a13aac8 100644
--- a/host/vulkan/VkDecoder.h
+++ b/host/vulkan/VkDecoder.h
@@ -178,6 +178,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/VkDecoderSnapshot.cpp b/host/vulkan/VkDecoderSnapshot.cpp
index fe27e07..50e0ad8 100644
--- a/host/vulkan/VkDecoderSnapshot.cpp
+++ b/host/vulkan/VkDecoderSnapshot.cpp
@@ -1999,6 +1999,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/VkDecoderSnapshot.h b/host/vulkan/VkDecoderSnapshot.h
index 9271eee..200d926 100644
--- a/host/vulkan/VkDecoderSnapshot.h
+++ b/host/vulkan/VkDecoderSnapshot.h
@@ -1320,6 +1320,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/VkSubDecoder.cpp b/host/vulkan/VkSubDecoder.cpp
index 0d87393..b5035ee 100644
--- a/host/vulkan/VkSubDecoder.cpp
+++ b/host/vulkan/VkSubDecoder.cpp
@@ -2728,6 +2728,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_deepcopy.cpp b/host/vulkan/cereal/common/goldfish_vk_deepcopy.cpp
index eb7330e..69c1a36 100644
--- a/host/vulkan/cereal/common/goldfish_vk_deepcopy.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_deepcopy.cpp
@@ -7652,6 +7652,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_deepcopy.h b/host/vulkan/cereal/common/goldfish_vk_deepcopy.h
index e1145cb..76dfda7 100644
--- a/host/vulkan/cereal/common/goldfish_vk_deepcopy.h
+++ b/host/vulkan/cereal/common/goldfish_vk_deepcopy.h
@@ -1691,6 +1691,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_dispatch.cpp b/host/vulkan/cereal/common/goldfish_vk_dispatch.cpp
index cdf0027..ffff721 100644
--- a/host/vulkan/cereal/common/goldfish_vk_dispatch.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_dispatch.cpp
@@ -149,6 +149,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
@@ -966,6 +968,14 @@
     out->vkGetScreenBufferPropertiesQNX =
         (PFN_vkGetScreenBufferPropertiesQNX)dlSymFunc(lib, "vkGetScreenBufferPropertiesQNX");
 #endif
+#ifdef VK_MVK_moltenvk
+    out->vkGetMTLDeviceMVK = (PFN_vkGetMTLDeviceMVK)dlSymFunc(lib, "vkGetMTLDeviceMVK");
+    out->vkSetMTLTextureMVK = (PFN_vkSetMTLTextureMVK)dlSymFunc(lib, "vkSetMTLTextureMVK");
+    out->vkGetMTLTextureMVK = (PFN_vkGetMTLTextureMVK)dlSymFunc(lib, "vkGetMTLTextureMVK");
+    out->vkGetMTLBufferMVK = (PFN_vkGetMTLBufferMVK)dlSymFunc(lib, "vkGetMTLBufferMVK");
+    out->vkUseIOSurfaceMVK = (PFN_vkUseIOSurfaceMVK)dlSymFunc(lib, "vkUseIOSurfaceMVK");
+    out->vkGetIOSurfaceMVK = (PFN_vkGetIOSurfaceMVK)dlSymFunc(lib, "vkGetIOSurfaceMVK");
+#endif
 }
 
 void init_vulkan_dispatch_from_instance(VulkanDispatch* vk, VkInstance instance,
diff --git a/host/vulkan/cereal/common/goldfish_vk_dispatch.h b/host/vulkan/cereal/common/goldfish_vk_dispatch.h
index 477ef7c..a8df073 100644
--- a/host/vulkan/cereal/common/goldfish_vk_dispatch.h
+++ b/host/vulkan/cereal/common/goldfish_vk_dispatch.h
@@ -492,6 +492,14 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+    PFN_vkGetMTLDeviceMVK vkGetMTLDeviceMVK;
+    PFN_vkSetMTLTextureMVK vkSetMTLTextureMVK;
+    PFN_vkGetMTLTextureMVK vkGetMTLTextureMVK;
+    PFN_vkGetMTLBufferMVK vkGetMTLBufferMVK;
+    PFN_vkUseIOSurfaceMVK vkUseIOSurfaceMVK;
+    PFN_vkGetIOSurfaceMVK vkGetIOSurfaceMVK;
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_extension_structs.cpp b/host/vulkan/cereal/common/goldfish_vk_extension_structs.cpp
index 211d997..afaf914 100644
--- a/host/vulkan/cereal/common/goldfish_vk_extension_structs.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_extension_structs.cpp
@@ -144,6 +144,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_extension_structs.h b/host/vulkan/cereal/common/goldfish_vk_extension_structs.h
index ffd6954..2ee4c7d 100644
--- a/host/vulkan/cereal/common/goldfish_vk_extension_structs.h
+++ b/host/vulkan/cereal/common/goldfish_vk_extension_structs.h
@@ -158,6 +158,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_marshaling.cpp b/host/vulkan/cereal/common/goldfish_vk_marshaling.cpp
index d7a10cd..9ccacba 100644
--- a/host/vulkan/cereal/common/goldfish_vk_marshaling.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_marshaling.cpp
@@ -15512,6 +15512,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_marshaling.h b/host/vulkan/cereal/common/goldfish_vk_marshaling.h
index 3ceea95..a756d70 100644
--- a/host/vulkan/cereal/common/goldfish_vk_marshaling.h
+++ b/host/vulkan/cereal/common/goldfish_vk_marshaling.h
@@ -3191,6 +3191,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.cpp b/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.cpp
index f2bce07..bd53dbe 100644
--- a/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.cpp
@@ -11970,6 +11970,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.h b/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.h
index 5454c2e..cb2fccc 100644
--- a/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.h
+++ b/host/vulkan/cereal/common/goldfish_vk_reserved_marshaling.h
@@ -1686,6 +1686,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_transform.cpp b/host/vulkan/cereal/common/goldfish_vk_transform.cpp
index ce06af8..abe33e5 100644
--- a/host/vulkan/cereal/common/goldfish_vk_transform.cpp
+++ b/host/vulkan/cereal/common/goldfish_vk_transform.cpp
@@ -7122,6 +7122,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils
diff --git a/host/vulkan/cereal/common/goldfish_vk_transform.h b/host/vulkan/cereal/common/goldfish_vk_transform.h
index 19ed86c..0245420 100644
--- a/host/vulkan/cereal/common/goldfish_vk_transform.h
+++ b/host/vulkan/cereal/common/goldfish_vk_transform.h
@@ -2800,6 +2800,8 @@
 #endif
 #ifdef VK_EXT_swapchain_colorspace
 #endif
+#ifdef VK_MVK_moltenvk
+#endif
 #ifdef VK_EXT_queue_family_foreign
 #endif
 #ifdef VK_EXT_debug_utils