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 VkDecoder
17 //
18 // (header) generated by codegen/vulkan/vulkan-docs-next/scripts/genvk.py -registry
19 // codegen/vulkan/vulkan-docs-next/xml/vk.xml -registryGfxstream
20 // codegen/vulkan/vulkan-docs-next/xml/vk_gfxstream.xml cereal -o host/vulkan/cereal
21 //
22 // Please do not modify directly;
23 // re-run gfxstream-protocols/scripts/generate-vulkan-sources.sh,
24 // or directly from Python by defining:
25 // VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml
26 // VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py
27 // CEREAL_OUTPUT_DIR: Where to put the generated sources.
28 //
29 // python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o
30 // $CEREAL_OUTPUT_DIR
31 //
32 #pragma once
33 #include <vulkan/vulkan.h>
34 
35 #include <memory>
36 
37 #include "ProcessResources.h"
38 #include "VkDecoderContext.h"
39 #include "vk_android_native_buffer_gfxstream.h"
40 #include "vulkan_gfxstream.h"
41 
42 namespace android {
43 namespace base {
44 class BumpPool;
45 }  // namespace base
46 }  // namespace android
47 
48 namespace gfxstream {
49 class IOStream;
50 }  // namespace gfxstream
51 
52 namespace gfxstream {
53 namespace vk {
54 
55 class VkDecoder {
56    public:
57     VkDecoder();
58     ~VkDecoder();
59     void setForSnapshotLoad(bool forSnapshotLoad);
60     size_t decode(void* buf, size_t bufsize, IOStream* stream,
61                   const ProcessResources* processResources, const VkDecoderContext&);
62 
63    private:
64     class Impl;
65     std::unique_ptr<Impl> mImpl;
66 };
67 
68 }  // namespace vk
69 }  // namespace gfxstream
70 
71 #ifdef VK_VERSION_1_0
72 #endif
73 #ifdef VK_VERSION_1_1
74 #endif
75 #ifdef VK_VERSION_1_2
76 #endif
77 #ifdef VK_VERSION_1_3
78 #endif
79 #ifdef VK_KHR_surface
80 #endif
81 #ifdef VK_KHR_swapchain
82 #endif
83 #ifdef VK_KHR_xcb_surface
84 #endif
85 #ifdef VK_KHR_android_surface
86 #endif
87 #ifdef VK_KHR_win32_surface
88 #endif
89 #ifdef VK_KHR_dynamic_rendering
90 #endif
91 #ifdef VK_KHR_get_physical_device_properties2
92 #endif
93 #ifdef VK_KHR_maintenance1
94 #endif
95 #ifdef VK_KHR_external_memory_capabilities
96 #endif
97 #ifdef VK_KHR_external_memory
98 #endif
99 #ifdef VK_KHR_external_memory_win32
100 #endif
101 #ifdef VK_KHR_external_memory_fd
102 #endif
103 #ifdef VK_KHR_external_semaphore_capabilities
104 #endif
105 #ifdef VK_KHR_external_semaphore
106 #endif
107 #ifdef VK_KHR_external_semaphore_win32
108 #endif
109 #ifdef VK_KHR_external_semaphore_fd
110 #endif
111 #ifdef VK_KHR_shader_float16_int8
112 #endif
113 #ifdef VK_KHR_incremental_present
114 #endif
115 #ifdef VK_KHR_descriptor_update_template
116 #endif
117 #ifdef VK_KHR_imageless_framebuffer
118 #endif
119 #ifdef VK_KHR_create_renderpass2
120 #endif
121 #ifdef VK_KHR_external_fence_capabilities
122 #endif
123 #ifdef VK_KHR_external_fence
124 #endif
125 #ifdef VK_KHR_external_fence_fd
126 #endif
127 #ifdef VK_KHR_maintenance2
128 #endif
129 #ifdef VK_KHR_dedicated_allocation
130 #endif
131 #ifdef VK_KHR_storage_buffer_storage_class
132 #endif
133 #ifdef VK_KHR_get_memory_requirements2
134 #endif
135 #ifdef VK_KHR_image_format_list
136 #endif
137 #ifdef VK_KHR_sampler_ycbcr_conversion
138 #endif
139 #ifdef VK_KHR_bind_memory2
140 #endif
141 #ifdef VK_KHR_maintenance3
142 #endif
143 #ifdef VK_KHR_shader_subgroup_extended_types
144 #endif
145 #ifdef VK_KHR_vulkan_memory_model
146 #endif
147 #ifdef VK_KHR_shader_terminate_invocation
148 #endif
149 #ifdef VK_KHR_buffer_device_address
150 #endif
151 #ifdef VK_KHR_pipeline_executable_properties
152 #endif
153 #ifdef VK_KHR_shader_integer_dot_product
154 #endif
155 #ifdef VK_KHR_shader_non_semantic_info
156 #endif
157 #ifdef VK_KHR_synchronization2
158 #endif
159 #ifdef VK_KHR_zero_initialize_workgroup_memory
160 #endif
161 #ifdef VK_KHR_copy_commands2
162 #endif
163 #ifdef VK_KHR_format_feature_flags2
164 #endif
165 #ifdef VK_KHR_maintenance4
166 #endif
167 #ifdef VK_KHR_maintenance5
168 #endif
169 #ifdef VK_ANDROID_native_buffer
170 #endif
171 #ifdef VK_EXT_transform_feedback
172 #endif
173 #ifdef VK_AMD_gpu_shader_half_float
174 #endif
175 #ifdef VK_EXT_texture_compression_astc_hdr
176 #endif
177 #ifdef VK_EXT_depth_clip_enable
178 #endif
179 #ifdef VK_EXT_swapchain_colorspace
180 #endif
181 #ifdef VK_MVK_moltenvk
182 #endif
183 #ifdef VK_EXT_queue_family_foreign
184 #endif
185 #ifdef VK_EXT_debug_utils
186 #endif
187 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
188 #endif
189 #ifdef VK_EXT_inline_uniform_block
190 #endif
191 #ifdef VK_EXT_shader_stencil_export
192 #endif
193 #ifdef VK_EXT_vertex_attribute_divisor
194 #endif
195 #ifdef VK_EXT_pipeline_creation_feedback
196 #endif
197 #ifdef VK_NV_shader_subgroup_partitioned
198 #endif
199 #ifdef VK_EXT_metal_surface
200 #endif
201 #ifdef VK_EXT_fragment_density_map
202 #endif
203 #ifdef VK_EXT_scalar_block_layout
204 #endif
205 #ifdef VK_EXT_subgroup_size_control
206 #endif
207 #ifdef VK_EXT_tooling_info
208 #endif
209 #ifdef VK_EXT_validation_features
210 #endif
211 #ifdef VK_EXT_provoking_vertex
212 #endif
213 #ifdef VK_EXT_line_rasterization
214 #endif
215 #ifdef VK_EXT_index_type_uint8
216 #endif
217 #ifdef VK_EXT_extended_dynamic_state
218 #endif
219 #ifdef VK_EXT_host_image_copy
220 #endif
221 #ifdef VK_EXT_swapchain_maintenance1
222 #endif
223 #ifdef VK_EXT_shader_demote_to_helper_invocation
224 #endif
225 #ifdef VK_EXT_texel_buffer_alignment
226 #endif
227 #ifdef VK_EXT_device_memory_report
228 #endif
229 #ifdef VK_EXT_robustness2
230 #endif
231 #ifdef VK_EXT_custom_border_color
232 #endif
233 #ifdef VK_EXT_private_data
234 #endif
235 #ifdef VK_EXT_pipeline_creation_cache_control
236 #endif
237 #ifdef VK_EXT_metal_objects
238 #endif
239 #ifdef VK_EXT_graphics_pipeline_library
240 #endif
241 #ifdef VK_EXT_ycbcr_2plane_444_formats
242 #endif
243 #ifdef VK_EXT_image_robustness
244 #endif
245 #ifdef VK_EXT_image_compression_control
246 #endif
247 #ifdef VK_EXT_4444_formats
248 #endif
249 #ifdef VK_EXT_primitive_topology_list_restart
250 #endif
251 #ifdef VK_EXT_extended_dynamic_state2
252 #endif
253 #ifdef VK_GOOGLE_gfxstream
254 #endif
255 #ifdef VK_EXT_load_store_op_none
256 #endif
257 #ifdef VK_EXT_image_compression_control_swapchain
258 #endif
259 #ifdef VK_QNX_external_memory_screen_buffer
260 #endif
261