gfxstream guest: Add vkGetLinearImageLayout2GOOGLE
See host change (aosp/1997493) for details.
Bug: fxbug.dev/94188
Change-Id: I1a6798a387032c09c06871d5bbe6198559495a22
diff --git a/system/vulkan_enc/func_table.cpp b/system/vulkan_enc/func_table.cpp
index 8664cec..a267ffb 100644
--- a/system/vulkan_enc/func_table.cpp
+++ b/system/vulkan_enc/func_table.cpp
@@ -8479,6 +8479,31 @@
auto vkEnc = ResourceTracker::getThreadLocalEncoder();
vkEnc->vkGetLinearImageLayoutGOOGLE(device, format, pOffset, pRowPitchAlignment, true /* do lock */);
}
+static void entry_vkGetLinearImageLayout2GOOGLE(
+ VkDevice device,
+ const VkImageCreateInfo* pCreateInfo,
+ VkDeviceSize* pOffset,
+ VkDeviceSize* pRowPitchAlignment)
+{
+ AEMU_SCOPED_TRACE("vkGetLinearImageLayout2GOOGLE");
+ auto vkEnc = ResourceTracker::getThreadLocalEncoder();
+ vkEnc->vkGetLinearImageLayout2GOOGLE(device, pCreateInfo, pOffset, pRowPitchAlignment, true /* do lock */);
+}
+static void dynCheck_entry_vkGetLinearImageLayout2GOOGLE(
+ VkDevice device,
+ const VkImageCreateInfo* pCreateInfo,
+ VkDeviceSize* pOffset,
+ VkDeviceSize* pRowPitchAlignment)
+{
+ auto resources = ResourceTracker::get();
+ if (!resources->hasDeviceExtension(device, "VK_GOOGLE_gfxstream"))
+ {
+ sOnInvalidDynamicallyCheckedCall("vkGetLinearImageLayout2GOOGLE", "VK_GOOGLE_gfxstream");
+ }
+ AEMU_SCOPED_TRACE("vkGetLinearImageLayout2GOOGLE");
+ auto vkEnc = ResourceTracker::getThreadLocalEncoder();
+ vkEnc->vkGetLinearImageLayout2GOOGLE(device, pCreateInfo, pOffset, pRowPitchAlignment, true /* do lock */);
+}
static void entry_vkQueueFlushCommandsGOOGLE(
VkQueue queue,
VkCommandBuffer commandBuffer,
@@ -11331,6 +11356,10 @@
{
return nullptr;
}
+ if (!strcmp(name, "vkGetLinearImageLayout2GOOGLE"))
+ {
+ return nullptr;
+ }
if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
{
return nullptr;
@@ -13917,6 +13946,10 @@
{
return (void*)dynCheck_entry_vkGetLinearImageLayoutGOOGLE;
}
+ if (!strcmp(name, "vkGetLinearImageLayout2GOOGLE"))
+ {
+ return (void*)dynCheck_entry_vkGetLinearImageLayout2GOOGLE;
+ }
if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
{
bool hasExt = resources->hasInstanceExtension(instance, "VK_GOOGLE_gfxstream");
@@ -16664,6 +16697,11 @@
bool hasExt = resources->hasDeviceExtension(device, "VK_GOOGLE_gfxstream");
return hasExt ? (void*)entry_vkGetLinearImageLayoutGOOGLE : nullptr;
}
+ if (!strcmp(name, "vkGetLinearImageLayout2GOOGLE"))
+ {
+ bool hasExt = resources->hasDeviceExtension(device, "VK_GOOGLE_gfxstream");
+ return hasExt ? (void*)entry_vkGetLinearImageLayout2GOOGLE : nullptr;
+ }
if (!strcmp(name, "vkQueueFlushCommandsGOOGLE"))
{
bool hasExt = resources->hasDeviceExtension(device, "VK_GOOGLE_gfxstream");