gfxstream: use standard Vulkan headers and new auto-gen flow
This modifies gfxstream to use standard Vulkan headers,
and updates to 1.3.269.
Previously, the headers were mostly standard, but added in
vk_android_native_buffer into vulkan_core.h. That breaks down
when using auto-gen scripts from outside gfxstream, which will
happen in a subsequent patchset.
For vk_native_buffer_android, we can simply provide a
vk_android_native_buffer_gfxstream.h.
Long-term, vk_native_buffer_android.h should be deprecated in
favor of VK_ANDROID_external_memory_android_hardware_buffer, in
Android's libvulkan and elsewhere.
For the Vulkan headers, the new procedure is generate them in the
directions found here in the following repos:
https://github.com/KhronosGroup/Vulkan-Headers
https://github.com/KhronosGroup/Vulkan-Hpp
Those headers can be copied over using cp. For gfxstream encoder
+ decoders, that's still generated via ./generate-gfxstream-vulkan.sh
The only catch is you must use the same vk.xml for Vulkan-Headers,
Vulkan-Hpp, and for the cereal generator. The recommended flow
is use whatever the xml is in Vulkan-Headers ToT and copy to
Vulkan-Hpp and cerealgenerator.py before running those scripts.
The End2End tests that relied on vk_android_native_buffer were
also modified. Long-term, the AHB extension could be used
instead of ANB for tests.
BUG=310206667
TEST=launch_cvd --gpu_mode=gfxstream_guest_angle
Change-Id: Ib43d8555cf37a9e9a7189ec7597f78f12cd53b5d
diff --git a/host/vulkan/VkSubDecoder.cpp b/host/vulkan/VkSubDecoder.cpp
index b18596e..69eab14 100644
--- a/host/vulkan/VkSubDecoder.cpp
+++ b/host/vulkan/VkSubDecoder.cpp
@@ -15,9 +15,9 @@
// Autogenerated module VkSubDecoder
//
-// (impl) generated by codegen/vulkan/vulkan-docs/scripts/genvk.py -registry
-// codegen/vulkan/vulkan-docs/xml/vk.xml -registryGfxstream
-// codegen/vulkan/vulkan-docs/xml/vk_gfxstream.xml cereal -o host/vulkan/cereal
+// (impl) generated by codegen/vulkan/vulkan-docs-next/scripts/genvk.py -registry
+// codegen/vulkan/vulkan-docs-next/xml/vk.xml -registryGfxstream
+// codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml cereal -o host/vulkan/cereal
//
// Please do not modify directly;
// re-run gfxstream-protocols/scripts/generate-vulkan-sources.sh,
@@ -2454,6 +2454,29 @@
#endif
#ifdef VK_KHR_maintenance4
#endif
+#ifdef VK_KHR_maintenance5
+ case OP_vkCmdBindIndexBuffer2KHR: {
+ android::base::beginTrace("vkCmdBindIndexBuffer2KHR subdecode");
+ VkBuffer buffer;
+ VkDeviceSize offset;
+ VkDeviceSize size;
+ VkIndexType indexType;
+ uint64_t cgen_var_0;
+ memcpy((uint64_t*)&cgen_var_0, *readStreamPtrPtr, 1 * 8);
+ *readStreamPtrPtr += 1 * 8;
+ *(VkBuffer*)&buffer = (VkBuffer)unbox_VkBuffer((VkBuffer)(*&cgen_var_0));
+ memcpy((VkDeviceSize*)&offset, *readStreamPtrPtr, sizeof(VkDeviceSize));
+ *readStreamPtrPtr += sizeof(VkDeviceSize);
+ memcpy((VkDeviceSize*)&size, *readStreamPtrPtr, sizeof(VkDeviceSize));
+ *readStreamPtrPtr += sizeof(VkDeviceSize);
+ memcpy((VkIndexType*)&indexType, *readStreamPtrPtr, sizeof(VkIndexType));
+ *readStreamPtrPtr += sizeof(VkIndexType);
+ vk->vkCmdBindIndexBuffer2KHR((VkCommandBuffer)dispatchHandle, buffer, offset, size,
+ indexType);
+ android::base::endTrace();
+ break;
+ }
+#endif
#ifdef VK_ANDROID_native_buffer
#endif
#ifdef VK_EXT_transform_feedback
@@ -2979,6 +3002,8 @@
break;
}
#endif
+#ifdef VK_EXT_host_image_copy
+#endif
#ifdef VK_EXT_swapchain_maintenance1
#endif
#ifdef VK_EXT_shader_demote_to_helper_invocation