xref: /aosp_15_r20/external/mesa3d/src/gfxstream/guest/vulkan_enc/goldfish_vk_extension_structs_guest.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 // Copyright (C) 2018 The Android Open Source Project
2 // Copyright (C) 2018 Google Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 // Autogenerated module goldfish_vk_extension_structs_guest
17 //
18 // (header) generated by scripts/genvk.py -registry ../../vulkan/registry/vk.xml -registryGfxstream
19 // xml/vk_gfxstream.xml cereal -o /tmp/
20 //
21 // Please do not modify directly;
22 // re-run mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh,
23 // or directly from Python by defining:
24 // VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml
25 // VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py
26 // CEREAL_OUTPUT_DIR: Where to put the generated sources.
27 //
28 // python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o
29 // $CEREAL_OUTPUT_DIR
30 //
31 #pragma once
32 #include <vulkan/vulkan.h>
33 
34 #include "goldfish_vk_private_defs.h"
35 #include "vk_android_native_buffer_gfxstream.h"
36 #include "vk_platform_compat.h"
37 #include "vulkan_gfxstream.h"
38 // Stuff we are not going to use but if included,
39 // will cause compile errors. These are Android Vulkan
40 // required extensions, but the approach will be to
41 // implement them completely on the guest side.
42 #undef VK_KHR_android_surface
43 #undef VK_ANDROID_external_memory_android_hardware_buffer
44 
45 namespace gfxstream {
46 namespace vk {
47 
48 uint32_t goldfish_vk_struct_type(const void* structExtension);
49 
50 size_t goldfish_vk_extension_struct_size(VkStructureType rootType, const void* structExtension);
51 
52 size_t goldfish_vk_extension_struct_size_with_stream_features(uint32_t streamFeatures,
53                                                               VkStructureType rootType,
54                                                               const void* structExtension);
55 
56 }  // namespace vk
57 }  // namespace gfxstream
58