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
17 //
18 // (impl) 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
33 #include "goldfish_vk_extension_structs.h"
34 namespace gfxstream {
35 namespace vk {
36
37 #ifdef VK_VERSION_1_0
38 #endif
39 #ifdef VK_VERSION_1_1
40 #endif
41 #ifdef VK_VERSION_1_2
42 #endif
43 #ifdef VK_VERSION_1_3
44 #endif
45 #ifdef VK_KHR_surface
46 #endif
47 #ifdef VK_KHR_swapchain
48 #endif
49 #ifdef VK_KHR_xcb_surface
50 #endif
51 #ifdef VK_KHR_android_surface
52 #endif
53 #ifdef VK_KHR_win32_surface
54 #endif
55 #ifdef VK_KHR_dynamic_rendering
56 #endif
57 #ifdef VK_KHR_get_physical_device_properties2
58 #endif
59 #ifdef VK_KHR_maintenance1
60 #endif
61 #ifdef VK_KHR_external_memory_capabilities
62 #endif
63 #ifdef VK_KHR_external_memory
64 #endif
65 #ifdef VK_KHR_external_memory_win32
66 #endif
67 #ifdef VK_KHR_external_memory_fd
68 #endif
69 #ifdef VK_KHR_external_semaphore_capabilities
70 #endif
71 #ifdef VK_KHR_external_semaphore
72 #endif
73 #ifdef VK_KHR_external_semaphore_win32
74 #endif
75 #ifdef VK_KHR_external_semaphore_fd
76 #endif
77 #ifdef VK_KHR_shader_float16_int8
78 #endif
79 #ifdef VK_KHR_incremental_present
80 #endif
81 #ifdef VK_KHR_descriptor_update_template
82 #endif
83 #ifdef VK_KHR_imageless_framebuffer
84 #endif
85 #ifdef VK_KHR_create_renderpass2
86 #endif
87 #ifdef VK_KHR_external_fence_capabilities
88 #endif
89 #ifdef VK_KHR_external_fence
90 #endif
91 #ifdef VK_KHR_external_fence_fd
92 #endif
93 #ifdef VK_KHR_maintenance2
94 #endif
95 #ifdef VK_KHR_dedicated_allocation
96 #endif
97 #ifdef VK_KHR_storage_buffer_storage_class
98 #endif
99 #ifdef VK_KHR_get_memory_requirements2
100 #endif
101 #ifdef VK_KHR_image_format_list
102 #endif
103 #ifdef VK_KHR_sampler_ycbcr_conversion
104 #endif
105 #ifdef VK_KHR_bind_memory2
106 #endif
107 #ifdef VK_KHR_maintenance3
108 #endif
109 #ifdef VK_KHR_shader_subgroup_extended_types
110 #endif
111 #ifdef VK_KHR_vulkan_memory_model
112 #endif
113 #ifdef VK_KHR_shader_terminate_invocation
114 #endif
115 #ifdef VK_KHR_buffer_device_address
116 #endif
117 #ifdef VK_KHR_pipeline_executable_properties
118 #endif
119 #ifdef VK_KHR_shader_integer_dot_product
120 #endif
121 #ifdef VK_KHR_shader_non_semantic_info
122 #endif
123 #ifdef VK_KHR_synchronization2
124 #endif
125 #ifdef VK_KHR_zero_initialize_workgroup_memory
126 #endif
127 #ifdef VK_KHR_copy_commands2
128 #endif
129 #ifdef VK_KHR_format_feature_flags2
130 #endif
131 #ifdef VK_KHR_maintenance4
132 #endif
133 #ifdef VK_KHR_maintenance5
134 #endif
135 #ifdef VK_ANDROID_native_buffer
136 #endif
137 #ifdef VK_EXT_transform_feedback
138 #endif
139 #ifdef VK_AMD_gpu_shader_half_float
140 #endif
141 #ifdef VK_EXT_texture_compression_astc_hdr
142 #endif
143 #ifdef VK_EXT_depth_clip_enable
144 #endif
145 #ifdef VK_EXT_swapchain_colorspace
146 #endif
147 #ifdef VK_MVK_moltenvk
148 #endif
149 #ifdef VK_EXT_queue_family_foreign
150 #endif
151 #ifdef VK_EXT_debug_utils
152 #endif
153 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
154 #endif
155 #ifdef VK_EXT_inline_uniform_block
156 #endif
157 #ifdef VK_EXT_shader_stencil_export
158 #endif
159 #ifdef VK_EXT_vertex_attribute_divisor
160 #endif
161 #ifdef VK_EXT_pipeline_creation_feedback
162 #endif
163 #ifdef VK_NV_shader_subgroup_partitioned
164 #endif
165 #ifdef VK_EXT_metal_surface
166 #endif
167 #ifdef VK_EXT_fragment_density_map
168 #endif
169 #ifdef VK_EXT_scalar_block_layout
170 #endif
171 #ifdef VK_EXT_subgroup_size_control
172 #endif
173 #ifdef VK_EXT_tooling_info
174 #endif
175 #ifdef VK_EXT_validation_features
176 #endif
177 #ifdef VK_EXT_provoking_vertex
178 #endif
179 #ifdef VK_EXT_line_rasterization
180 #endif
181 #ifdef VK_EXT_index_type_uint8
182 #endif
183 #ifdef VK_EXT_extended_dynamic_state
184 #endif
185 #ifdef VK_EXT_host_image_copy
186 #endif
187 #ifdef VK_EXT_swapchain_maintenance1
188 #endif
189 #ifdef VK_EXT_shader_demote_to_helper_invocation
190 #endif
191 #ifdef VK_EXT_texel_buffer_alignment
192 #endif
193 #ifdef VK_EXT_device_memory_report
194 #endif
195 #ifdef VK_EXT_robustness2
196 #endif
197 #ifdef VK_EXT_custom_border_color
198 #endif
199 #ifdef VK_EXT_private_data
200 #endif
201 #ifdef VK_EXT_pipeline_creation_cache_control
202 #endif
203 #ifdef VK_EXT_metal_objects
204 #endif
205 #ifdef VK_EXT_graphics_pipeline_library
206 #endif
207 #ifdef VK_EXT_ycbcr_2plane_444_formats
208 #endif
209 #ifdef VK_EXT_image_robustness
210 #endif
211 #ifdef VK_EXT_image_compression_control
212 #endif
213 #ifdef VK_EXT_4444_formats
214 #endif
215 #ifdef VK_EXT_primitive_topology_list_restart
216 #endif
217 #ifdef VK_EXT_extended_dynamic_state2
218 #endif
219 #ifdef VK_GOOGLE_gfxstream
220 #endif
221 #ifdef VK_EXT_load_store_op_none
222 #endif
223 #ifdef VK_EXT_image_compression_control_swapchain
224 #endif
225 #ifdef VK_QNX_external_memory_screen_buffer
226 #endif
goldfish_vk_struct_type(const void * structExtension)227 uint32_t goldfish_vk_struct_type(const void* structExtension) {
228 const uint32_t asStructType = *(reinterpret_cast<const uint32_t*>(structExtension));
229 return asStructType;
230 }
231
goldfish_vk_extension_struct_size(VkStructureType rootType,const void * structExtension)232 size_t goldfish_vk_extension_struct_size(VkStructureType rootType, const void* structExtension) {
233 if (!structExtension) {
234 return (size_t)0;
235 }
236 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension);
237 switch (structType) {
238 #ifdef VK_VERSION_1_0
239 case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: {
240 return sizeof(VkShaderModuleCreateInfo);
241 }
242 #endif
243 #ifdef VK_VERSION_1_1
244 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: {
245 return sizeof(VkPhysicalDeviceSubgroupProperties);
246 }
247 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
248 return sizeof(VkPhysicalDevice16BitStorageFeatures);
249 }
250 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
251 return sizeof(VkMemoryDedicatedRequirements);
252 }
253 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: {
254 return sizeof(VkMemoryDedicatedAllocateInfo);
255 }
256 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: {
257 return sizeof(VkMemoryAllocateFlagsInfo);
258 }
259 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: {
260 return sizeof(VkDeviceGroupRenderPassBeginInfo);
261 }
262 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: {
263 return sizeof(VkDeviceGroupCommandBufferBeginInfo);
264 }
265 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: {
266 return sizeof(VkDeviceGroupSubmitInfo);
267 }
268 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: {
269 return sizeof(VkDeviceGroupBindSparseInfo);
270 }
271 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: {
272 return sizeof(VkBindBufferMemoryDeviceGroupInfo);
273 }
274 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: {
275 return sizeof(VkBindImageMemoryDeviceGroupInfo);
276 }
277 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: {
278 return sizeof(VkDeviceGroupDeviceCreateInfo);
279 }
280 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
281 return sizeof(VkPhysicalDeviceFeatures2);
282 }
283 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: {
284 return sizeof(VkPhysicalDevicePointClippingProperties);
285 }
286 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: {
287 return sizeof(VkRenderPassInputAttachmentAspectCreateInfo);
288 }
289 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: {
290 return sizeof(VkImageViewUsageCreateInfo);
291 }
292 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: {
293 return sizeof(VkPipelineTessellationDomainOriginStateCreateInfo);
294 }
295 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: {
296 return sizeof(VkRenderPassMultiviewCreateInfo);
297 }
298 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
299 return sizeof(VkPhysicalDeviceMultiviewFeatures);
300 }
301 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: {
302 return sizeof(VkPhysicalDeviceMultiviewProperties);
303 }
304 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: {
305 return sizeof(VkPhysicalDeviceVariablePointersFeatures);
306 }
307 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: {
308 return sizeof(VkPhysicalDeviceProtectedMemoryFeatures);
309 }
310 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: {
311 return sizeof(VkPhysicalDeviceProtectedMemoryProperties);
312 }
313 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: {
314 return sizeof(VkProtectedSubmitInfo);
315 }
316 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: {
317 return sizeof(VkSamplerYcbcrConversionInfo);
318 }
319 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: {
320 return sizeof(VkBindImagePlaneMemoryInfo);
321 }
322 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: {
323 return sizeof(VkImagePlaneMemoryRequirementsInfo);
324 }
325 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
326 return sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures);
327 }
328 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: {
329 return sizeof(VkSamplerYcbcrConversionImageFormatProperties);
330 }
331 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: {
332 return sizeof(VkPhysicalDeviceExternalImageFormatInfo);
333 }
334 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: {
335 return sizeof(VkExternalImageFormatProperties);
336 }
337 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: {
338 return sizeof(VkPhysicalDeviceIDProperties);
339 }
340 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: {
341 return sizeof(VkExternalMemoryImageCreateInfo);
342 }
343 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: {
344 return sizeof(VkExternalMemoryBufferCreateInfo);
345 }
346 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: {
347 return sizeof(VkExportMemoryAllocateInfo);
348 }
349 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: {
350 return sizeof(VkExportFenceCreateInfo);
351 }
352 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: {
353 return sizeof(VkExportSemaphoreCreateInfo);
354 }
355 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: {
356 return sizeof(VkPhysicalDeviceMaintenance3Properties);
357 }
358 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
359 return sizeof(VkPhysicalDeviceShaderDrawParametersFeatures);
360 }
361 #endif
362 #ifdef VK_VERSION_1_2
363 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: {
364 return sizeof(VkPhysicalDeviceVulkan11Features);
365 }
366 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: {
367 return sizeof(VkPhysicalDeviceVulkan11Properties);
368 }
369 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: {
370 return sizeof(VkPhysicalDeviceVulkan12Features);
371 }
372 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: {
373 return sizeof(VkPhysicalDeviceVulkan12Properties);
374 }
375 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: {
376 return sizeof(VkImageFormatListCreateInfo);
377 }
378 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
379 return sizeof(VkPhysicalDevice8BitStorageFeatures);
380 }
381 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: {
382 return sizeof(VkPhysicalDeviceDriverProperties);
383 }
384 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: {
385 return sizeof(VkPhysicalDeviceShaderAtomicInt64Features);
386 }
387 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: {
388 return sizeof(VkPhysicalDeviceShaderFloat16Int8Features);
389 }
390 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: {
391 return sizeof(VkPhysicalDeviceFloatControlsProperties);
392 }
393 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: {
394 return sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfo);
395 }
396 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: {
397 return sizeof(VkPhysicalDeviceDescriptorIndexingFeatures);
398 }
399 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: {
400 return sizeof(VkPhysicalDeviceDescriptorIndexingProperties);
401 }
402 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: {
403 return sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfo);
404 }
405 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: {
406 return sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupport);
407 }
408 case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: {
409 return sizeof(VkSubpassDescriptionDepthStencilResolve);
410 }
411 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: {
412 return sizeof(VkPhysicalDeviceDepthStencilResolveProperties);
413 }
414 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: {
415 return sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures);
416 }
417 case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: {
418 return sizeof(VkImageStencilUsageCreateInfo);
419 }
420 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: {
421 return sizeof(VkSamplerReductionModeCreateInfo);
422 }
423 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: {
424 return sizeof(VkPhysicalDeviceSamplerFilterMinmaxProperties);
425 }
426 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: {
427 return sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures);
428 }
429 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: {
430 return sizeof(VkPhysicalDeviceImagelessFramebufferFeatures);
431 }
432 case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: {
433 return sizeof(VkFramebufferAttachmentsCreateInfo);
434 }
435 case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: {
436 return sizeof(VkRenderPassAttachmentBeginInfo);
437 }
438 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: {
439 return sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures);
440 }
441 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: {
442 return sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures);
443 }
444 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: {
445 return sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures);
446 }
447 case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: {
448 return sizeof(VkAttachmentReferenceStencilLayout);
449 }
450 case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: {
451 return sizeof(VkAttachmentDescriptionStencilLayout);
452 }
453 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
454 return sizeof(VkPhysicalDeviceHostQueryResetFeatures);
455 }
456 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: {
457 return sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures);
458 }
459 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: {
460 return sizeof(VkPhysicalDeviceTimelineSemaphoreProperties);
461 }
462 case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: {
463 return sizeof(VkSemaphoreTypeCreateInfo);
464 }
465 case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: {
466 return sizeof(VkTimelineSemaphoreSubmitInfo);
467 }
468 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: {
469 return sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures);
470 }
471 case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: {
472 return sizeof(VkBufferOpaqueCaptureAddressCreateInfo);
473 }
474 case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: {
475 return sizeof(VkMemoryOpaqueCaptureAddressAllocateInfo);
476 }
477 #endif
478 #ifdef VK_VERSION_1_3
479 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: {
480 return sizeof(VkPhysicalDeviceVulkan13Features);
481 }
482 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: {
483 return sizeof(VkPhysicalDeviceVulkan13Properties);
484 }
485 case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: {
486 return sizeof(VkPipelineCreationFeedbackCreateInfo);
487 }
488 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: {
489 return sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures);
490 }
491 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: {
492 return sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures);
493 }
494 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: {
495 return sizeof(VkPhysicalDevicePrivateDataFeatures);
496 }
497 case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: {
498 return sizeof(VkDevicePrivateDataCreateInfo);
499 }
500 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: {
501 return sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures);
502 }
503 case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: {
504 return sizeof(VkMemoryBarrier2);
505 }
506 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: {
507 return sizeof(VkPhysicalDeviceSynchronization2Features);
508 }
509 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: {
510 return sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures);
511 }
512 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: {
513 return sizeof(VkPhysicalDeviceImageRobustnessFeatures);
514 }
515 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: {
516 return sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures);
517 }
518 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: {
519 return sizeof(VkPhysicalDeviceSubgroupSizeControlProperties);
520 }
521 case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: {
522 return sizeof(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo);
523 }
524 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: {
525 return sizeof(VkPhysicalDeviceInlineUniformBlockFeatures);
526 }
527 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: {
528 return sizeof(VkPhysicalDeviceInlineUniformBlockProperties);
529 }
530 case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: {
531 return sizeof(VkWriteDescriptorSetInlineUniformBlock);
532 }
533 case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: {
534 return sizeof(VkDescriptorPoolInlineUniformBlockCreateInfo);
535 }
536 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {
537 return sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures);
538 }
539 case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: {
540 return sizeof(VkPipelineRenderingCreateInfo);
541 }
542 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: {
543 return sizeof(VkPhysicalDeviceDynamicRenderingFeatures);
544 }
545 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: {
546 return sizeof(VkCommandBufferInheritanceRenderingInfo);
547 }
548 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: {
549 return sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures);
550 }
551 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: {
552 return sizeof(VkPhysicalDeviceShaderIntegerDotProductProperties);
553 }
554 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: {
555 return sizeof(VkPhysicalDeviceTexelBufferAlignmentProperties);
556 }
557 case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: {
558 return sizeof(VkFormatProperties3);
559 }
560 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: {
561 return sizeof(VkPhysicalDeviceMaintenance4Features);
562 }
563 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: {
564 return sizeof(VkPhysicalDeviceMaintenance4Properties);
565 }
566 #endif
567 #ifdef VK_KHR_swapchain
568 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: {
569 return sizeof(VkImageSwapchainCreateInfoKHR);
570 }
571 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: {
572 return sizeof(VkBindImageMemorySwapchainInfoKHR);
573 }
574 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: {
575 return sizeof(VkDeviceGroupPresentInfoKHR);
576 }
577 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: {
578 return sizeof(VkDeviceGroupSwapchainCreateInfoKHR);
579 }
580 #endif
581 #ifdef VK_KHR_dynamic_rendering
582 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: {
583 return sizeof(VkRenderingFragmentShadingRateAttachmentInfoKHR);
584 }
585 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: {
586 return sizeof(VkRenderingFragmentDensityMapAttachmentInfoEXT);
587 }
588 case VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD: {
589 return sizeof(VkAttachmentSampleCountInfoAMD);
590 }
591 case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX: {
592 return sizeof(VkMultiviewPerViewAttributesInfoNVX);
593 }
594 #endif
595 #ifdef VK_KHR_incremental_present
596 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: {
597 return sizeof(VkPresentRegionsKHR);
598 }
599 #endif
600 #ifdef VK_KHR_pipeline_executable_properties
601 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: {
602 return sizeof(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
603 }
604 #endif
605 #ifdef VK_KHR_synchronization2
606 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV: {
607 return sizeof(VkQueueFamilyCheckpointProperties2NV);
608 }
609 #endif
610 #ifdef VK_KHR_maintenance5
611 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: {
612 return sizeof(VkPhysicalDeviceMaintenance5FeaturesKHR);
613 }
614 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR: {
615 return sizeof(VkPhysicalDeviceMaintenance5PropertiesKHR);
616 }
617 case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR: {
618 return sizeof(VkPipelineCreateFlags2CreateInfoKHR);
619 }
620 case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR: {
621 return sizeof(VkBufferUsageFlags2CreateInfoKHR);
622 }
623 #endif
624 #ifdef VK_ANDROID_native_buffer
625 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: {
626 return sizeof(VkNativeBufferANDROID);
627 }
628 #endif
629 #ifdef VK_EXT_transform_feedback
630 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: {
631 return sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT);
632 }
633 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: {
634 return sizeof(VkPhysicalDeviceTransformFeedbackPropertiesEXT);
635 }
636 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: {
637 return sizeof(VkPipelineRasterizationStateStreamCreateInfoEXT);
638 }
639 #endif
640 #ifdef VK_EXT_depth_clip_enable
641 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: {
642 return sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT);
643 }
644 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: {
645 return sizeof(VkPipelineRasterizationDepthClipStateCreateInfoEXT);
646 }
647 #endif
648 #ifdef VK_EXT_debug_utils
649 case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: {
650 return sizeof(VkDebugUtilsObjectNameInfoEXT);
651 }
652 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: {
653 return sizeof(VkDebugUtilsMessengerCreateInfoEXT);
654 }
655 #endif
656 #ifdef VK_EXT_vertex_attribute_divisor
657 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
658 return sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT);
659 }
660 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: {
661 return sizeof(VkPipelineVertexInputDivisorStateCreateInfoEXT);
662 }
663 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
664 return sizeof(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT);
665 }
666 #endif
667 #ifdef VK_EXT_fragment_density_map
668 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: {
669 switch (rootType) {
670 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
671 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
672 break;
673 }
674 case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: {
675 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
676 break;
677 }
678 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
679 return sizeof(VkImportColorBufferGOOGLE);
680 break;
681 }
682 default: {
683 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
684 break;
685 }
686 }
687 }
688 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT: {
689 switch (rootType) {
690 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2: {
691 return sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT);
692 break;
693 }
694 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
695 return sizeof(VkCreateBlobGOOGLE);
696 break;
697 }
698 default: {
699 return sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT);
700 break;
701 }
702 }
703 }
704 case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: {
705 switch (rootType) {
706 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: {
707 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
708 break;
709 }
710 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2: {
711 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
712 break;
713 }
714 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
715 return sizeof(VkImportBufferGOOGLE);
716 break;
717 }
718 default: {
719 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
720 break;
721 }
722 }
723 }
724 #endif
725 #ifdef VK_EXT_validation_features
726 case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: {
727 return sizeof(VkValidationFeaturesEXT);
728 }
729 #endif
730 #ifdef VK_EXT_provoking_vertex
731 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: {
732 return sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT);
733 }
734 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: {
735 return sizeof(VkPhysicalDeviceProvokingVertexPropertiesEXT);
736 }
737 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: {
738 return sizeof(VkPipelineRasterizationProvokingVertexStateCreateInfoEXT);
739 }
740 #endif
741 #ifdef VK_EXT_line_rasterization
742 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: {
743 return sizeof(VkPhysicalDeviceLineRasterizationFeaturesEXT);
744 }
745 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT: {
746 return sizeof(VkPhysicalDeviceLineRasterizationPropertiesEXT);
747 }
748 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT: {
749 return sizeof(VkPipelineRasterizationLineStateCreateInfoEXT);
750 }
751 #endif
752 #ifdef VK_EXT_index_type_uint8
753 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
754 return sizeof(VkPhysicalDeviceIndexTypeUint8FeaturesEXT);
755 }
756 #endif
757 #ifdef VK_EXT_extended_dynamic_state
758 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: {
759 return sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT);
760 }
761 #endif
762 #ifdef VK_EXT_host_image_copy
763 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT: {
764 return sizeof(VkPhysicalDeviceHostImageCopyFeaturesEXT);
765 }
766 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT: {
767 return sizeof(VkPhysicalDeviceHostImageCopyPropertiesEXT);
768 }
769 case VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT: {
770 return sizeof(VkSubresourceHostMemcpySizeEXT);
771 }
772 case VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT: {
773 return sizeof(VkHostImageCopyDevicePerformanceQueryEXT);
774 }
775 #endif
776 #ifdef VK_EXT_swapchain_maintenance1
777 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: {
778 return sizeof(VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT);
779 }
780 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: {
781 return sizeof(VkSwapchainPresentFenceInfoEXT);
782 }
783 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: {
784 return sizeof(VkSwapchainPresentModesCreateInfoEXT);
785 }
786 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT: {
787 return sizeof(VkSwapchainPresentModeInfoEXT);
788 }
789 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: {
790 return sizeof(VkSwapchainPresentScalingCreateInfoEXT);
791 }
792 #endif
793 #ifdef VK_EXT_texel_buffer_alignment
794 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: {
795 return sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT);
796 }
797 #endif
798 #ifdef VK_EXT_device_memory_report
799 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: {
800 return sizeof(VkPhysicalDeviceDeviceMemoryReportFeaturesEXT);
801 }
802 case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: {
803 return sizeof(VkDeviceDeviceMemoryReportCreateInfoEXT);
804 }
805 #endif
806 #ifdef VK_EXT_robustness2
807 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
808 return sizeof(VkPhysicalDeviceRobustness2FeaturesEXT);
809 }
810 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: {
811 return sizeof(VkPhysicalDeviceRobustness2PropertiesEXT);
812 }
813 #endif
814 #ifdef VK_EXT_custom_border_color
815 case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: {
816 return sizeof(VkSamplerCustomBorderColorCreateInfoEXT);
817 }
818 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: {
819 return sizeof(VkPhysicalDeviceCustomBorderColorPropertiesEXT);
820 }
821 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: {
822 return sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT);
823 }
824 #endif
825 #ifdef VK_EXT_graphics_pipeline_library
826 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: {
827 return sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT);
828 }
829 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: {
830 return sizeof(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT);
831 }
832 case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: {
833 return sizeof(VkGraphicsPipelineLibraryCreateInfoEXT);
834 }
835 #endif
836 #ifdef VK_EXT_ycbcr_2plane_444_formats
837 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: {
838 return sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT);
839 }
840 #endif
841 #ifdef VK_EXT_image_compression_control
842 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: {
843 return sizeof(VkPhysicalDeviceImageCompressionControlFeaturesEXT);
844 }
845 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT: {
846 return sizeof(VkImageCompressionControlEXT);
847 }
848 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT: {
849 return sizeof(VkImageCompressionPropertiesEXT);
850 }
851 #endif
852 #ifdef VK_EXT_4444_formats
853 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
854 return sizeof(VkPhysicalDevice4444FormatsFeaturesEXT);
855 }
856 #endif
857 #ifdef VK_EXT_primitive_topology_list_restart
858 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: {
859 return sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT);
860 }
861 #endif
862 #ifdef VK_EXT_extended_dynamic_state2
863 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: {
864 return sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT);
865 }
866 #endif
867 #ifdef VK_GOOGLE_gfxstream
868 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: {
869 return sizeof(VkImportColorBufferGOOGLE);
870 }
871 case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE: {
872 return sizeof(VkImportBufferGOOGLE);
873 }
874 case VK_STRUCTURE_TYPE_CREATE_BLOB_GOOGLE: {
875 return sizeof(VkCreateBlobGOOGLE);
876 }
877 #endif
878 #ifdef VK_EXT_image_compression_control_swapchain
879 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: {
880 return sizeof(VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT);
881 }
882 #endif
883 default: {
884 fprintf(stderr, "Unhandled Vulkan structure type %d, aborting.\n", structType);
885 GFXSTREAM_ABORT(::emugl::FatalError(::emugl::ABORT_REASON_OTHER));
886 return (size_t)0;
887 }
888 }
889 }
890
goldfish_vk_extension_struct_size_with_stream_features(uint32_t streamFeatures,VkStructureType rootType,const void * structExtension)891 size_t goldfish_vk_extension_struct_size_with_stream_features(uint32_t streamFeatures,
892 VkStructureType rootType,
893 const void* structExtension) {
894 if (!structExtension) {
895 return (size_t)0;
896 }
897 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension);
898 switch (structType) {
899 #ifdef VK_VERSION_1_0
900 case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: {
901 return sizeof(VkShaderModuleCreateInfo);
902 }
903 #endif
904 #ifdef VK_VERSION_1_1
905 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: {
906 return sizeof(VkPhysicalDeviceSubgroupProperties);
907 }
908 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
909 return sizeof(VkPhysicalDevice16BitStorageFeatures);
910 }
911 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
912 return sizeof(VkMemoryDedicatedRequirements);
913 }
914 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: {
915 return sizeof(VkMemoryDedicatedAllocateInfo);
916 }
917 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: {
918 return sizeof(VkMemoryAllocateFlagsInfo);
919 }
920 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: {
921 return sizeof(VkDeviceGroupRenderPassBeginInfo);
922 }
923 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: {
924 return sizeof(VkDeviceGroupCommandBufferBeginInfo);
925 }
926 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: {
927 return sizeof(VkDeviceGroupSubmitInfo);
928 }
929 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: {
930 return sizeof(VkDeviceGroupBindSparseInfo);
931 }
932 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: {
933 return sizeof(VkBindBufferMemoryDeviceGroupInfo);
934 }
935 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: {
936 return sizeof(VkBindImageMemoryDeviceGroupInfo);
937 }
938 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: {
939 return sizeof(VkDeviceGroupDeviceCreateInfo);
940 }
941 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
942 return sizeof(VkPhysicalDeviceFeatures2);
943 }
944 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: {
945 return sizeof(VkPhysicalDevicePointClippingProperties);
946 }
947 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: {
948 return sizeof(VkRenderPassInputAttachmentAspectCreateInfo);
949 }
950 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: {
951 return sizeof(VkImageViewUsageCreateInfo);
952 }
953 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: {
954 return sizeof(VkPipelineTessellationDomainOriginStateCreateInfo);
955 }
956 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: {
957 return sizeof(VkRenderPassMultiviewCreateInfo);
958 }
959 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
960 return sizeof(VkPhysicalDeviceMultiviewFeatures);
961 }
962 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: {
963 return sizeof(VkPhysicalDeviceMultiviewProperties);
964 }
965 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: {
966 return sizeof(VkPhysicalDeviceVariablePointersFeatures);
967 }
968 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: {
969 return sizeof(VkPhysicalDeviceProtectedMemoryFeatures);
970 }
971 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: {
972 return sizeof(VkPhysicalDeviceProtectedMemoryProperties);
973 }
974 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: {
975 return sizeof(VkProtectedSubmitInfo);
976 }
977 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: {
978 return sizeof(VkSamplerYcbcrConversionInfo);
979 }
980 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: {
981 return sizeof(VkBindImagePlaneMemoryInfo);
982 }
983 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: {
984 return sizeof(VkImagePlaneMemoryRequirementsInfo);
985 }
986 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
987 return sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures);
988 }
989 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: {
990 return sizeof(VkSamplerYcbcrConversionImageFormatProperties);
991 }
992 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: {
993 return sizeof(VkPhysicalDeviceExternalImageFormatInfo);
994 }
995 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: {
996 return sizeof(VkExternalImageFormatProperties);
997 }
998 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: {
999 return sizeof(VkPhysicalDeviceIDProperties);
1000 }
1001 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: {
1002 return sizeof(VkExternalMemoryImageCreateInfo);
1003 }
1004 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: {
1005 return sizeof(VkExternalMemoryBufferCreateInfo);
1006 }
1007 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: {
1008 return sizeof(VkExportMemoryAllocateInfo);
1009 }
1010 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: {
1011 return sizeof(VkExportFenceCreateInfo);
1012 }
1013 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: {
1014 return sizeof(VkExportSemaphoreCreateInfo);
1015 }
1016 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: {
1017 return sizeof(VkPhysicalDeviceMaintenance3Properties);
1018 }
1019 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
1020 return sizeof(VkPhysicalDeviceShaderDrawParametersFeatures);
1021 }
1022 #endif
1023 #ifdef VK_VERSION_1_2
1024 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: {
1025 return sizeof(VkPhysicalDeviceVulkan11Features);
1026 }
1027 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: {
1028 return sizeof(VkPhysicalDeviceVulkan11Properties);
1029 }
1030 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: {
1031 return sizeof(VkPhysicalDeviceVulkan12Features);
1032 }
1033 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: {
1034 return sizeof(VkPhysicalDeviceVulkan12Properties);
1035 }
1036 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: {
1037 return sizeof(VkImageFormatListCreateInfo);
1038 }
1039 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
1040 return sizeof(VkPhysicalDevice8BitStorageFeatures);
1041 }
1042 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: {
1043 return sizeof(VkPhysicalDeviceDriverProperties);
1044 }
1045 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: {
1046 return sizeof(VkPhysicalDeviceShaderAtomicInt64Features);
1047 }
1048 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: {
1049 if (streamFeatures & VULKAN_STREAM_FEATURE_SHADER_FLOAT16_INT8_BIT) {
1050 return sizeof(VkPhysicalDeviceShaderFloat16Int8Features);
1051 } else {
1052 return 0;
1053 }
1054 }
1055 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: {
1056 return sizeof(VkPhysicalDeviceFloatControlsProperties);
1057 }
1058 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: {
1059 return sizeof(VkDescriptorSetLayoutBindingFlagsCreateInfo);
1060 }
1061 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: {
1062 return sizeof(VkPhysicalDeviceDescriptorIndexingFeatures);
1063 }
1064 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: {
1065 return sizeof(VkPhysicalDeviceDescriptorIndexingProperties);
1066 }
1067 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: {
1068 return sizeof(VkDescriptorSetVariableDescriptorCountAllocateInfo);
1069 }
1070 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: {
1071 return sizeof(VkDescriptorSetVariableDescriptorCountLayoutSupport);
1072 }
1073 case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: {
1074 return sizeof(VkSubpassDescriptionDepthStencilResolve);
1075 }
1076 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: {
1077 return sizeof(VkPhysicalDeviceDepthStencilResolveProperties);
1078 }
1079 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: {
1080 return sizeof(VkPhysicalDeviceScalarBlockLayoutFeatures);
1081 }
1082 case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: {
1083 return sizeof(VkImageStencilUsageCreateInfo);
1084 }
1085 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: {
1086 return sizeof(VkSamplerReductionModeCreateInfo);
1087 }
1088 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: {
1089 return sizeof(VkPhysicalDeviceSamplerFilterMinmaxProperties);
1090 }
1091 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: {
1092 return sizeof(VkPhysicalDeviceVulkanMemoryModelFeatures);
1093 }
1094 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: {
1095 return sizeof(VkPhysicalDeviceImagelessFramebufferFeatures);
1096 }
1097 case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: {
1098 return sizeof(VkFramebufferAttachmentsCreateInfo);
1099 }
1100 case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: {
1101 return sizeof(VkRenderPassAttachmentBeginInfo);
1102 }
1103 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: {
1104 return sizeof(VkPhysicalDeviceUniformBufferStandardLayoutFeatures);
1105 }
1106 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: {
1107 return sizeof(VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures);
1108 }
1109 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: {
1110 return sizeof(VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures);
1111 }
1112 case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: {
1113 return sizeof(VkAttachmentReferenceStencilLayout);
1114 }
1115 case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: {
1116 return sizeof(VkAttachmentDescriptionStencilLayout);
1117 }
1118 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
1119 return sizeof(VkPhysicalDeviceHostQueryResetFeatures);
1120 }
1121 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: {
1122 return sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures);
1123 }
1124 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: {
1125 return sizeof(VkPhysicalDeviceTimelineSemaphoreProperties);
1126 }
1127 case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: {
1128 return sizeof(VkSemaphoreTypeCreateInfo);
1129 }
1130 case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: {
1131 return sizeof(VkTimelineSemaphoreSubmitInfo);
1132 }
1133 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: {
1134 return sizeof(VkPhysicalDeviceBufferDeviceAddressFeatures);
1135 }
1136 case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: {
1137 return sizeof(VkBufferOpaqueCaptureAddressCreateInfo);
1138 }
1139 case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: {
1140 return sizeof(VkMemoryOpaqueCaptureAddressAllocateInfo);
1141 }
1142 #endif
1143 #ifdef VK_VERSION_1_3
1144 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: {
1145 return sizeof(VkPhysicalDeviceVulkan13Features);
1146 }
1147 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: {
1148 return sizeof(VkPhysicalDeviceVulkan13Properties);
1149 }
1150 case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: {
1151 return sizeof(VkPipelineCreationFeedbackCreateInfo);
1152 }
1153 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: {
1154 return sizeof(VkPhysicalDeviceShaderTerminateInvocationFeatures);
1155 }
1156 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: {
1157 return sizeof(VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures);
1158 }
1159 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: {
1160 return sizeof(VkPhysicalDevicePrivateDataFeatures);
1161 }
1162 case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: {
1163 return sizeof(VkDevicePrivateDataCreateInfo);
1164 }
1165 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: {
1166 return sizeof(VkPhysicalDevicePipelineCreationCacheControlFeatures);
1167 }
1168 case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: {
1169 return sizeof(VkMemoryBarrier2);
1170 }
1171 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: {
1172 return sizeof(VkPhysicalDeviceSynchronization2Features);
1173 }
1174 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: {
1175 return sizeof(VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures);
1176 }
1177 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: {
1178 return sizeof(VkPhysicalDeviceImageRobustnessFeatures);
1179 }
1180 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: {
1181 return sizeof(VkPhysicalDeviceSubgroupSizeControlFeatures);
1182 }
1183 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: {
1184 return sizeof(VkPhysicalDeviceSubgroupSizeControlProperties);
1185 }
1186 case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: {
1187 return sizeof(VkPipelineShaderStageRequiredSubgroupSizeCreateInfo);
1188 }
1189 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: {
1190 return sizeof(VkPhysicalDeviceInlineUniformBlockFeatures);
1191 }
1192 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: {
1193 return sizeof(VkPhysicalDeviceInlineUniformBlockProperties);
1194 }
1195 case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: {
1196 return sizeof(VkWriteDescriptorSetInlineUniformBlock);
1197 }
1198 case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: {
1199 return sizeof(VkDescriptorPoolInlineUniformBlockCreateInfo);
1200 }
1201 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {
1202 return sizeof(VkPhysicalDeviceTextureCompressionASTCHDRFeatures);
1203 }
1204 case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: {
1205 return sizeof(VkPipelineRenderingCreateInfo);
1206 }
1207 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: {
1208 return sizeof(VkPhysicalDeviceDynamicRenderingFeatures);
1209 }
1210 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: {
1211 return sizeof(VkCommandBufferInheritanceRenderingInfo);
1212 }
1213 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: {
1214 return sizeof(VkPhysicalDeviceShaderIntegerDotProductFeatures);
1215 }
1216 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: {
1217 return sizeof(VkPhysicalDeviceShaderIntegerDotProductProperties);
1218 }
1219 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: {
1220 return sizeof(VkPhysicalDeviceTexelBufferAlignmentProperties);
1221 }
1222 case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: {
1223 return sizeof(VkFormatProperties3);
1224 }
1225 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: {
1226 return sizeof(VkPhysicalDeviceMaintenance4Features);
1227 }
1228 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: {
1229 return sizeof(VkPhysicalDeviceMaintenance4Properties);
1230 }
1231 #endif
1232 #ifdef VK_KHR_swapchain
1233 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: {
1234 return sizeof(VkImageSwapchainCreateInfoKHR);
1235 }
1236 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: {
1237 return sizeof(VkBindImageMemorySwapchainInfoKHR);
1238 }
1239 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: {
1240 return sizeof(VkDeviceGroupPresentInfoKHR);
1241 }
1242 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: {
1243 return sizeof(VkDeviceGroupSwapchainCreateInfoKHR);
1244 }
1245 #endif
1246 #ifdef VK_KHR_dynamic_rendering
1247 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: {
1248 return sizeof(VkRenderingFragmentShadingRateAttachmentInfoKHR);
1249 }
1250 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: {
1251 return sizeof(VkRenderingFragmentDensityMapAttachmentInfoEXT);
1252 }
1253 case VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD: {
1254 return sizeof(VkAttachmentSampleCountInfoAMD);
1255 }
1256 case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX: {
1257 return sizeof(VkMultiviewPerViewAttributesInfoNVX);
1258 }
1259 #endif
1260 #ifdef VK_KHR_incremental_present
1261 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: {
1262 return sizeof(VkPresentRegionsKHR);
1263 }
1264 #endif
1265 #ifdef VK_KHR_pipeline_executable_properties
1266 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: {
1267 return sizeof(VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR);
1268 }
1269 #endif
1270 #ifdef VK_KHR_synchronization2
1271 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV: {
1272 return sizeof(VkQueueFamilyCheckpointProperties2NV);
1273 }
1274 #endif
1275 #ifdef VK_KHR_maintenance5
1276 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: {
1277 return sizeof(VkPhysicalDeviceMaintenance5FeaturesKHR);
1278 }
1279 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR: {
1280 return sizeof(VkPhysicalDeviceMaintenance5PropertiesKHR);
1281 }
1282 case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR: {
1283 return sizeof(VkPipelineCreateFlags2CreateInfoKHR);
1284 }
1285 case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR: {
1286 return sizeof(VkBufferUsageFlags2CreateInfoKHR);
1287 }
1288 #endif
1289 #ifdef VK_ANDROID_native_buffer
1290 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: {
1291 return sizeof(VkNativeBufferANDROID);
1292 }
1293 #endif
1294 #ifdef VK_EXT_transform_feedback
1295 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: {
1296 return sizeof(VkPhysicalDeviceTransformFeedbackFeaturesEXT);
1297 }
1298 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: {
1299 return sizeof(VkPhysicalDeviceTransformFeedbackPropertiesEXT);
1300 }
1301 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: {
1302 return sizeof(VkPipelineRasterizationStateStreamCreateInfoEXT);
1303 }
1304 #endif
1305 #ifdef VK_EXT_depth_clip_enable
1306 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: {
1307 return sizeof(VkPhysicalDeviceDepthClipEnableFeaturesEXT);
1308 }
1309 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: {
1310 return sizeof(VkPipelineRasterizationDepthClipStateCreateInfoEXT);
1311 }
1312 #endif
1313 #ifdef VK_EXT_debug_utils
1314 case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: {
1315 return sizeof(VkDebugUtilsObjectNameInfoEXT);
1316 }
1317 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: {
1318 return sizeof(VkDebugUtilsMessengerCreateInfoEXT);
1319 }
1320 #endif
1321 #ifdef VK_EXT_vertex_attribute_divisor
1322 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
1323 return sizeof(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT);
1324 }
1325 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: {
1326 return sizeof(VkPipelineVertexInputDivisorStateCreateInfoEXT);
1327 }
1328 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
1329 return sizeof(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT);
1330 }
1331 #endif
1332 #ifdef VK_EXT_fragment_density_map
1333 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: {
1334 switch (rootType) {
1335 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
1336 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
1337 break;
1338 }
1339 case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: {
1340 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
1341 break;
1342 }
1343 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
1344 return sizeof(VkImportColorBufferGOOGLE);
1345 break;
1346 }
1347 default: {
1348 return sizeof(VkPhysicalDeviceFragmentDensityMapFeaturesEXT);
1349 break;
1350 }
1351 }
1352 }
1353 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT: {
1354 switch (rootType) {
1355 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2: {
1356 return sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT);
1357 break;
1358 }
1359 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
1360 return sizeof(VkCreateBlobGOOGLE);
1361 break;
1362 }
1363 default: {
1364 return sizeof(VkPhysicalDeviceFragmentDensityMapPropertiesEXT);
1365 break;
1366 }
1367 }
1368 }
1369 case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: {
1370 switch (rootType) {
1371 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: {
1372 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
1373 break;
1374 }
1375 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2: {
1376 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
1377 break;
1378 }
1379 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
1380 return sizeof(VkImportBufferGOOGLE);
1381 break;
1382 }
1383 default: {
1384 return sizeof(VkRenderPassFragmentDensityMapCreateInfoEXT);
1385 break;
1386 }
1387 }
1388 }
1389 #endif
1390 #ifdef VK_EXT_validation_features
1391 case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: {
1392 return sizeof(VkValidationFeaturesEXT);
1393 }
1394 #endif
1395 #ifdef VK_EXT_provoking_vertex
1396 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: {
1397 return sizeof(VkPhysicalDeviceProvokingVertexFeaturesEXT);
1398 }
1399 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: {
1400 return sizeof(VkPhysicalDeviceProvokingVertexPropertiesEXT);
1401 }
1402 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: {
1403 return sizeof(VkPipelineRasterizationProvokingVertexStateCreateInfoEXT);
1404 }
1405 #endif
1406 #ifdef VK_EXT_line_rasterization
1407 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: {
1408 return sizeof(VkPhysicalDeviceLineRasterizationFeaturesEXT);
1409 }
1410 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT: {
1411 return sizeof(VkPhysicalDeviceLineRasterizationPropertiesEXT);
1412 }
1413 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT: {
1414 return sizeof(VkPipelineRasterizationLineStateCreateInfoEXT);
1415 }
1416 #endif
1417 #ifdef VK_EXT_index_type_uint8
1418 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
1419 return sizeof(VkPhysicalDeviceIndexTypeUint8FeaturesEXT);
1420 }
1421 #endif
1422 #ifdef VK_EXT_extended_dynamic_state
1423 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: {
1424 return sizeof(VkPhysicalDeviceExtendedDynamicStateFeaturesEXT);
1425 }
1426 #endif
1427 #ifdef VK_EXT_host_image_copy
1428 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT: {
1429 return sizeof(VkPhysicalDeviceHostImageCopyFeaturesEXT);
1430 }
1431 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT: {
1432 return sizeof(VkPhysicalDeviceHostImageCopyPropertiesEXT);
1433 }
1434 case VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT: {
1435 return sizeof(VkSubresourceHostMemcpySizeEXT);
1436 }
1437 case VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT: {
1438 return sizeof(VkHostImageCopyDevicePerformanceQueryEXT);
1439 }
1440 #endif
1441 #ifdef VK_EXT_swapchain_maintenance1
1442 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: {
1443 return sizeof(VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT);
1444 }
1445 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: {
1446 return sizeof(VkSwapchainPresentFenceInfoEXT);
1447 }
1448 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: {
1449 return sizeof(VkSwapchainPresentModesCreateInfoEXT);
1450 }
1451 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT: {
1452 return sizeof(VkSwapchainPresentModeInfoEXT);
1453 }
1454 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: {
1455 return sizeof(VkSwapchainPresentScalingCreateInfoEXT);
1456 }
1457 #endif
1458 #ifdef VK_EXT_texel_buffer_alignment
1459 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: {
1460 return sizeof(VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT);
1461 }
1462 #endif
1463 #ifdef VK_EXT_device_memory_report
1464 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: {
1465 return sizeof(VkPhysicalDeviceDeviceMemoryReportFeaturesEXT);
1466 }
1467 case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: {
1468 return sizeof(VkDeviceDeviceMemoryReportCreateInfoEXT);
1469 }
1470 #endif
1471 #ifdef VK_EXT_robustness2
1472 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
1473 return sizeof(VkPhysicalDeviceRobustness2FeaturesEXT);
1474 }
1475 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: {
1476 return sizeof(VkPhysicalDeviceRobustness2PropertiesEXT);
1477 }
1478 #endif
1479 #ifdef VK_EXT_custom_border_color
1480 case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: {
1481 return sizeof(VkSamplerCustomBorderColorCreateInfoEXT);
1482 }
1483 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: {
1484 return sizeof(VkPhysicalDeviceCustomBorderColorPropertiesEXT);
1485 }
1486 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: {
1487 return sizeof(VkPhysicalDeviceCustomBorderColorFeaturesEXT);
1488 }
1489 #endif
1490 #ifdef VK_EXT_graphics_pipeline_library
1491 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: {
1492 return sizeof(VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT);
1493 }
1494 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: {
1495 return sizeof(VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT);
1496 }
1497 case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: {
1498 return sizeof(VkGraphicsPipelineLibraryCreateInfoEXT);
1499 }
1500 #endif
1501 #ifdef VK_EXT_ycbcr_2plane_444_formats
1502 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: {
1503 return sizeof(VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT);
1504 }
1505 #endif
1506 #ifdef VK_EXT_image_compression_control
1507 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: {
1508 return sizeof(VkPhysicalDeviceImageCompressionControlFeaturesEXT);
1509 }
1510 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT: {
1511 return sizeof(VkImageCompressionControlEXT);
1512 }
1513 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT: {
1514 return sizeof(VkImageCompressionPropertiesEXT);
1515 }
1516 #endif
1517 #ifdef VK_EXT_4444_formats
1518 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
1519 return sizeof(VkPhysicalDevice4444FormatsFeaturesEXT);
1520 }
1521 #endif
1522 #ifdef VK_EXT_primitive_topology_list_restart
1523 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: {
1524 return sizeof(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT);
1525 }
1526 #endif
1527 #ifdef VK_EXT_extended_dynamic_state2
1528 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: {
1529 return sizeof(VkPhysicalDeviceExtendedDynamicState2FeaturesEXT);
1530 }
1531 #endif
1532 #ifdef VK_GOOGLE_gfxstream
1533 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: {
1534 return sizeof(VkImportColorBufferGOOGLE);
1535 }
1536 case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE: {
1537 return sizeof(VkImportBufferGOOGLE);
1538 }
1539 case VK_STRUCTURE_TYPE_CREATE_BLOB_GOOGLE: {
1540 return sizeof(VkCreateBlobGOOGLE);
1541 }
1542 #endif
1543 #ifdef VK_EXT_image_compression_control_swapchain
1544 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: {
1545 return sizeof(VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT);
1546 }
1547 #endif
1548 default: {
1549 fprintf(stderr, "Unhandled Vulkan structure type %d, aborting.\n", structType);
1550 GFXSTREAM_ABORT(::emugl::FatalError(::emugl::ABORT_REASON_OTHER));
1551 return (size_t)0;
1552 }
1553 }
1554 }
1555
1556 } // namespace vk
1557 } // namespace gfxstream
1558