[22/n] ResourceTracker: add part where we flush pending commands
For VkQueueSubmitWithCommands. Also take the protocol codegen at this
point.
Bug: 177241396
Change-Id: Ica4218048a77a0ae93e67ff41912c8ef249277fe
diff --git a/system/vulkan_enc/func_table.cpp b/system/vulkan_enc/func_table.cpp
index d40fdd9..588ea53 100644
--- a/system/vulkan_enc/func_table.cpp
+++ b/system/vulkan_enc/func_table.cpp
@@ -5334,6 +5334,18 @@
vkEnc->vkGetIOSurfaceMVK(image, pIOSurface, true /* do lock */);
}
#endif
+#ifdef VK_GOOGLE_queue_submit_with_commands
+static void entry_vkQueueFlushCommandsGOOGLE(
+ VkQueue queue,
+ VkCommandBuffer commandBuffer,
+ VkDeviceSize dataSize,
+ const void* pData)
+{
+ AEMU_SCOPED_TRACE("vkQueueFlushCommandsGOOGLE");
+ auto vkEnc = ResourceTracker::getQueueEncoder(queue);
+ vkEnc->vkQueueFlushCommandsGOOGLE(queue, commandBuffer, dataSize, pData, true /* do lock */);
+}
+#endif
void* goldfish_vulkan_get_proc_address(const char* name){
#ifdef VK_VERSION_1_0
if (!strcmp(name, "vkCreateInstance"))
@@ -6841,6 +6853,12 @@
return nullptr;
}
#endif
+#ifdef VK_GOOGLE_queue_submit_with_commands
+ if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
+ {
+ return nullptr;
+ }
+#endif
return nullptr;
}
void* goldfish_vulkan_get_instance_proc_address(VkInstance instance, const char* name){
@@ -8455,6 +8473,13 @@
return hasExt ? (void*)entry_vkGetIOSurfaceMVK : nullptr;
}
#endif
+#ifdef VK_GOOGLE_queue_submit_with_commands
+ if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
+ {
+ bool hasExt = resources->hasInstanceExtension(instance, "VK_GOOGLE_queue_submit_with_commands");
+ return hasExt ? (void*)entry_vkQueueFlushCommandsGOOGLE : nullptr;
+ }
+#endif
return nullptr;
}
void* goldfish_vulkan_get_device_proc_address(VkDevice device, const char* name){
@@ -10141,6 +10166,13 @@
return hasExt ? (void*)entry_vkGetIOSurfaceMVK : nullptr;
}
#endif
+#ifdef VK_GOOGLE_queue_submit_with_commands
+ if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
+ {
+ bool hasExt = resources->hasDeviceExtension(device, "VK_GOOGLE_queue_submit_with_commands");
+ return hasExt ? (void*)entry_vkQueueFlushCommandsGOOGLE : nullptr;
+ }
+#endif
return nullptr;
}