[vulkan] Add header for handling platform compatibility

bug: 111137294

Change-Id: Id102ab84b53dd6f4a39a21de1776e8b9b6df74a5
diff --git a/system/vulkan_enc/goldfish_vk_deepcopy_guest.h b/system/vulkan_enc/goldfish_vk_deepcopy_guest.h
index f84ed2c..0090b0a 100644
--- a/system/vulkan_enc/goldfish_vk_deepcopy_guest.h
+++ b/system/vulkan_enc/goldfish_vk_deepcopy_guest.h
@@ -27,6 +27,8 @@
 #include <vulkan/vulkan.h>
 
 
+#include "vk_platform_compat.h"
+
 #include "android/base/Pool.h"
 using android::base::Pool;
 // Stuff we are not going to use but if included,
diff --git a/system/vulkan_enc/goldfish_vk_extension_structs_guest.h b/system/vulkan_enc/goldfish_vk_extension_structs_guest.h
index d71f93f..5ec01ab 100644
--- a/system/vulkan_enc/goldfish_vk_extension_structs_guest.h
+++ b/system/vulkan_enc/goldfish_vk_extension_structs_guest.h
@@ -27,6 +27,7 @@
 #include <vulkan/vulkan.h>
 
 
+#include "vk_platform_compat.h"
 // Stuff we are not going to use but if included,
 // will cause compile errors. These are Android Vulkan
 // required extensions, but the approach will be to
diff --git a/system/vulkan_enc/goldfish_vk_handlemap_guest.h b/system/vulkan_enc/goldfish_vk_handlemap_guest.h
index 0c55cf8..1a732d0 100644
--- a/system/vulkan_enc/goldfish_vk_handlemap_guest.h
+++ b/system/vulkan_enc/goldfish_vk_handlemap_guest.h
@@ -27,6 +27,8 @@
 #include <vulkan/vulkan.h>
 
 
+#include "vk_platform_compat.h"
+
 #include "VulkanHandleMapping.h"
 // Stuff we are not going to use but if included,
 // will cause compile errors. These are Android Vulkan
diff --git a/system/vulkan_enc/goldfish_vk_marshaling_guest.h b/system/vulkan_enc/goldfish_vk_marshaling_guest.h
index aebb3a5..e36f8c8 100644
--- a/system/vulkan_enc/goldfish_vk_marshaling_guest.h
+++ b/system/vulkan_enc/goldfish_vk_marshaling_guest.h
@@ -27,6 +27,8 @@
 #include <vulkan/vulkan.h>
 
 
+#include "vk_platform_compat.h"
+
 #include "goldfish_vk_marshaling_guest.h"
 #include "VulkanStream.h"
 
diff --git a/system/vulkan_enc/vk_platform_compat.h b/system/vulkan_enc/vk_platform_compat.h
new file mode 100644
index 0000000..e182bac
--- /dev/null
+++ b/system/vulkan_enc/vk_platform_compat.h
@@ -0,0 +1,30 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+#pragma once
+
+#include <vulkan/vulkan.h>
+
+#if VK_HEADER_VERSION < 76
+
+typedef struct VkBaseOutStructure {
+    VkStructureType               sType;
+    struct VkBaseOutStructure*    pNext;
+} VkBaseOutStructure;
+
+typedef struct VkBaseInStructure {
+    VkStructureType                    sType;
+    const struct VkBaseInStructure*    pNext;
+} VkBaseInStructure;
+
+#endif // VK_HEADER_VERSION < 76