| // Copyright (C) 2018 The Android Open Source Project |
| // Copyright (C) 2018 Google Inc. |
| // |
| // 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. |
| |
| // Autogenerated module goldfish_vk_counting_guest |
| // |
| // (impl) generated by registry/vulkan/scripts/genvk.py -registry registry/vulkan/xml/vk.xml cereal |
| // -o ../../device/generic/vulkan-cereal/stream-servers/vulkan/cereal |
| // |
| // Please do not modify directly; |
| // re-run gfxstream-protocols/scripts/generate-vulkan-sources.sh, |
| // or directly from Python by defining: |
| // VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml |
| // VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py |
| // CEREAL_OUTPUT_DIR: Where to put the generated sources. |
| // |
| // python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o |
| // $CEREAL_OUTPUT_DIR |
| // |
| |
| #include "goldfish_vk_counting_guest.h" |
| |
| #include <cstring> |
| |
| #include "goldfish_vk_extension_structs_guest.h" |
| #include "goldfish_vk_private_defs.h" |
| |
| namespace goldfish_vk { |
| |
| void count_extension_struct(uint32_t featureBits, VkStructureType rootType, |
| const void* structExtension, size_t* count); |
| |
| #ifdef VK_VERSION_1_0 |
| void count_VkExtent2D(uint32_t featureBits, VkStructureType rootType, const VkExtent2D* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkExtent3D(uint32_t featureBits, VkStructureType rootType, const VkExtent3D* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkOffset2D(uint32_t featureBits, VkStructureType rootType, const VkOffset2D* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(int32_t); |
| *count += sizeof(int32_t); |
| } |
| |
| void count_VkOffset3D(uint32_t featureBits, VkStructureType rootType, const VkOffset3D* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(int32_t); |
| *count += sizeof(int32_t); |
| *count += sizeof(int32_t); |
| } |
| |
| void count_VkRect2D(uint32_t featureBits, VkStructureType rootType, const VkRect2D* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkOffset2D(featureBits, rootType, (VkOffset2D*)(&toCount->offset), count); |
| count_VkExtent2D(featureBits, rootType, (VkExtent2D*)(&toCount->extent), count); |
| } |
| |
| void count_VkBaseInStructure(uint32_t featureBits, VkStructureType rootType, |
| const VkBaseInStructure* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| } |
| |
| void count_VkBaseOutStructure(uint32_t featureBits, VkStructureType rootType, |
| const VkBaseOutStructure* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| } |
| |
| void count_VkBufferMemoryBarrier(uint32_t featureBits, VkStructureType rootType, |
| const VkBufferMemoryBarrier* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkDispatchIndirectCommand(uint32_t featureBits, VkStructureType rootType, |
| const VkDispatchIndirectCommand* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDrawIndexedIndirectCommand(uint32_t featureBits, VkStructureType rootType, |
| const VkDrawIndexedIndirectCommand* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(int32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDrawIndirectCommand(uint32_t featureBits, VkStructureType rootType, |
| const VkDrawIndirectCommand* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkImageSubresourceRange(uint32_t featureBits, VkStructureType rootType, |
| const VkImageSubresourceRange* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkImageAspectFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkImageMemoryBarrier(uint32_t featureBits, VkStructureType rootType, |
| const VkImageMemoryBarrier* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkImageLayout); |
| *count += sizeof(VkImageLayout); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| count_VkImageSubresourceRange(featureBits, rootType, |
| (VkImageSubresourceRange*)(&toCount->subresourceRange), count); |
| } |
| |
| void count_VkMemoryBarrier(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryBarrier* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkAccessFlags); |
| } |
| |
| void count_VkPipelineCacheHeaderVersionOne(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineCacheHeaderVersionOne* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkPipelineCacheHeaderVersion); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += VK_UUID_SIZE * sizeof(uint8_t); |
| } |
| |
| void count_VkAllocationCallbacks(uint32_t featureBits, VkStructureType rootType, |
| const VkAllocationCallbacks* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pUserData) { |
| *count += sizeof(uint8_t); |
| } |
| *count += 8; |
| *count += 8; |
| *count += 8; |
| *count += 8; |
| *count += 8; |
| } |
| |
| void count_VkApplicationInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkApplicationInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| if (featureBits & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT) { |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pApplicationName) { |
| *count += sizeof(uint32_t) + |
| (toCount->pApplicationName ? strlen(toCount->pApplicationName) : 0); |
| } |
| } else { |
| *count += |
| sizeof(uint32_t) + (toCount->pApplicationName ? strlen(toCount->pApplicationName) : 0); |
| } |
| *count += sizeof(uint32_t); |
| if (featureBits & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT) { |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pEngineName) { |
| *count += sizeof(uint32_t) + (toCount->pEngineName ? strlen(toCount->pEngineName) : 0); |
| } |
| } else { |
| *count += sizeof(uint32_t) + (toCount->pEngineName ? strlen(toCount->pEngineName) : 0); |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkFormatProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkFormatProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkFormatFeatureFlags); |
| *count += sizeof(VkFormatFeatureFlags); |
| *count += sizeof(VkFormatFeatureFlags); |
| } |
| |
| void count_VkImageFormatProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkImageFormatProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->maxExtent), count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkInstanceCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkInstanceCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkInstanceCreateFlags); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pApplicationInfo) { |
| count_VkApplicationInfo(featureBits, rootType, |
| (const VkApplicationInfo*)(toCount->pApplicationInfo), count); |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < toCount->enabledLayerCount; ++i) { |
| size_t l = |
| toCount->ppEnabledLayerNames[i] ? strlen(toCount->ppEnabledLayerNames[i]) : 0; |
| *count += |
| sizeof(uint32_t) + |
| (toCount->ppEnabledLayerNames[i] ? strlen(toCount->ppEnabledLayerNames[i]) : 0); |
| } |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < toCount->enabledExtensionCount; ++i) { |
| size_t l = toCount->ppEnabledExtensionNames[i] |
| ? strlen(toCount->ppEnabledExtensionNames[i]) |
| : 0; |
| *count += sizeof(uint32_t) + (toCount->ppEnabledExtensionNames[i] |
| ? strlen(toCount->ppEnabledExtensionNames[i]) |
| : 0); |
| } |
| } |
| } |
| |
| void count_VkMemoryHeap(uint32_t featureBits, VkStructureType rootType, const VkMemoryHeap* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkMemoryHeapFlags); |
| } |
| |
| void count_VkMemoryType(uint32_t featureBits, VkStructureType rootType, const VkMemoryType* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkMemoryPropertyFlags); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkPhysicalDeviceFeatures(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceFeatures* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkPhysicalDeviceLimits(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceLimits* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += 3 * sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += 3 * sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(uint32_t); |
| *count += 2 * sizeof(uint32_t); |
| *count += 2 * sizeof(float); |
| *count += sizeof(uint32_t); |
| *count += 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(int32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(int32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(VkSampleCountFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkBool32); |
| *count += sizeof(float); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += 2 * sizeof(float); |
| *count += 2 * sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkPhysicalDeviceMemoryProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceMemoryProperties* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i) { |
| count_VkMemoryType(featureBits, rootType, (VkMemoryType*)(toCount->memoryTypes + i), count); |
| } |
| *count += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i) { |
| count_VkMemoryHeap(featureBits, rootType, (VkMemoryHeap*)(toCount->memoryHeaps + i), count); |
| } |
| } |
| |
| void count_VkPhysicalDeviceSparseProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceSparseProperties* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkPhysicalDeviceProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkPhysicalDeviceType); |
| *count += VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char); |
| *count += VK_UUID_SIZE * sizeof(uint8_t); |
| count_VkPhysicalDeviceLimits(featureBits, rootType, (VkPhysicalDeviceLimits*)(&toCount->limits), |
| count); |
| count_VkPhysicalDeviceSparseProperties( |
| featureBits, rootType, (VkPhysicalDeviceSparseProperties*)(&toCount->sparseProperties), |
| count); |
| } |
| |
| void count_VkQueueFamilyProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkQueueFamilyProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkQueueFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->minImageTransferGranularity), |
| count); |
| } |
| |
| void count_VkDeviceQueueCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceQueueCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkDeviceQueueCreateFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->queueCount * sizeof(const float); |
| } |
| } |
| |
| void count_VkDeviceCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkDeviceCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->queueCreateInfoCount; ++i) { |
| count_VkDeviceQueueCreateInfo( |
| featureBits, rootType, |
| (const VkDeviceQueueCreateInfo*)(toCount->pQueueCreateInfos + i), count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < toCount->enabledLayerCount; ++i) { |
| size_t l = |
| toCount->ppEnabledLayerNames[i] ? strlen(toCount->ppEnabledLayerNames[i]) : 0; |
| *count += |
| sizeof(uint32_t) + |
| (toCount->ppEnabledLayerNames[i] ? strlen(toCount->ppEnabledLayerNames[i]) : 0); |
| } |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < toCount->enabledExtensionCount; ++i) { |
| size_t l = toCount->ppEnabledExtensionNames[i] |
| ? strlen(toCount->ppEnabledExtensionNames[i]) |
| : 0; |
| *count += sizeof(uint32_t) + (toCount->ppEnabledExtensionNames[i] |
| ? strlen(toCount->ppEnabledExtensionNames[i]) |
| : 0); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pEnabledFeatures) { |
| count_VkPhysicalDeviceFeatures(featureBits, rootType, |
| (const VkPhysicalDeviceFeatures*)(toCount->pEnabledFeatures), |
| count); |
| } |
| } |
| |
| void count_VkExtensionProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkExtensionProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += VK_MAX_EXTENSION_NAME_SIZE * sizeof(char); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkLayerProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkLayerProperties* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += VK_MAX_EXTENSION_NAME_SIZE * sizeof(char); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += VK_MAX_DESCRIPTION_SIZE * sizeof(char); |
| } |
| |
| void count_VkSubmitInfo(uint32_t featureBits, VkStructureType rootType, const VkSubmitInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| if (toCount->waitSemaphoreCount) { |
| *count += toCount->waitSemaphoreCount * 8; |
| } |
| if (toCount) { |
| *count += toCount->waitSemaphoreCount * sizeof(const VkPipelineStageFlags); |
| } |
| *count += sizeof(uint32_t); |
| if (toCount->commandBufferCount) { |
| *count += toCount->commandBufferCount * 8; |
| } |
| *count += sizeof(uint32_t); |
| if (toCount->signalSemaphoreCount) { |
| *count += toCount->signalSemaphoreCount * 8; |
| } |
| } |
| |
| void count_VkMappedMemoryRange(uint32_t featureBits, VkStructureType rootType, |
| const VkMappedMemoryRange* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkMemoryAllocateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryAllocateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkMemoryRequirements(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryRequirements* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkSparseMemoryBind(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseMemoryBind* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkSparseMemoryBindFlags); |
| } |
| |
| void count_VkSparseBufferMemoryBindInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseBufferMemoryBindInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->bindCount; ++i) { |
| count_VkSparseMemoryBind(featureBits, rootType, |
| (const VkSparseMemoryBind*)(toCount->pBinds + i), count); |
| } |
| } |
| } |
| |
| void count_VkSparseImageOpaqueMemoryBindInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseImageOpaqueMemoryBindInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->bindCount; ++i) { |
| count_VkSparseMemoryBind(featureBits, rootType, |
| (const VkSparseMemoryBind*)(toCount->pBinds + i), count); |
| } |
| } |
| } |
| |
| void count_VkImageSubresource(uint32_t featureBits, VkStructureType rootType, |
| const VkImageSubresource* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkImageAspectFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkSparseImageMemoryBind(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseImageMemoryBind* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkImageSubresource(featureBits, rootType, (VkImageSubresource*)(&toCount->subresource), |
| count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->offset), count); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->extent), count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkSparseMemoryBindFlags); |
| } |
| |
| void count_VkSparseImageMemoryBindInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseImageMemoryBindInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->bindCount; ++i) { |
| count_VkSparseImageMemoryBind(featureBits, rootType, |
| (const VkSparseImageMemoryBind*)(toCount->pBinds + i), |
| count); |
| } |
| } |
| } |
| |
| void count_VkBindSparseInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBindSparseInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| if (toCount->waitSemaphoreCount) { |
| *count += toCount->waitSemaphoreCount * 8; |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->bufferBindCount; ++i) { |
| count_VkSparseBufferMemoryBindInfo( |
| featureBits, rootType, |
| (const VkSparseBufferMemoryBindInfo*)(toCount->pBufferBinds + i), count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->imageOpaqueBindCount; ++i) { |
| count_VkSparseImageOpaqueMemoryBindInfo( |
| featureBits, rootType, |
| (const VkSparseImageOpaqueMemoryBindInfo*)(toCount->pImageOpaqueBinds + i), count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->imageBindCount; ++i) { |
| count_VkSparseImageMemoryBindInfo( |
| featureBits, rootType, |
| (const VkSparseImageMemoryBindInfo*)(toCount->pImageBinds + i), count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount->signalSemaphoreCount) { |
| *count += toCount->signalSemaphoreCount * 8; |
| } |
| } |
| |
| void count_VkSparseImageFormatProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseImageFormatProperties* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkImageAspectFlags); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->imageGranularity), count); |
| *count += sizeof(VkSparseImageFormatFlags); |
| } |
| |
| void count_VkSparseImageMemoryRequirements(uint32_t featureBits, VkStructureType rootType, |
| const VkSparseImageMemoryRequirements* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkSparseImageFormatProperties( |
| featureBits, rootType, (VkSparseImageFormatProperties*)(&toCount->formatProperties), count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkFenceCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkFenceCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkFenceCreateFlags); |
| } |
| |
| void count_VkSemaphoreCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSemaphoreCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkSemaphoreCreateFlags); |
| } |
| |
| void count_VkEventCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkEventCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkEventCreateFlags); |
| } |
| |
| void count_VkQueryPoolCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkQueryPoolCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkQueryPoolCreateFlags); |
| *count += sizeof(VkQueryType); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkQueryPipelineStatisticFlags); |
| } |
| |
| void count_VkBufferCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBufferCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkBufferCreateFlags); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkBufferUsageFlags); |
| *count += sizeof(VkSharingMode); |
| *count += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pQueueFamilyIndices) { |
| if (toCount) { |
| *count += toCount->queueFamilyIndexCount * sizeof(const uint32_t); |
| } |
| } |
| } |
| |
| void count_VkBufferViewCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBufferViewCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkBufferViewCreateFlags); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkFormat); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkImageCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkImageCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkImageCreateFlags); |
| *count += sizeof(VkImageType); |
| *count += sizeof(VkFormat); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->extent), count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkSampleCountFlagBits); |
| *count += sizeof(VkImageTiling); |
| *count += sizeof(VkImageUsageFlags); |
| *count += sizeof(VkSharingMode); |
| *count += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pQueueFamilyIndices) { |
| if (toCount) { |
| *count += toCount->queueFamilyIndexCount * sizeof(const uint32_t); |
| } |
| } |
| *count += sizeof(VkImageLayout); |
| } |
| |
| void count_VkSubresourceLayout(uint32_t featureBits, VkStructureType rootType, |
| const VkSubresourceLayout* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkComponentMapping(uint32_t featureBits, VkStructureType rootType, |
| const VkComponentMapping* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkComponentSwizzle); |
| *count += sizeof(VkComponentSwizzle); |
| *count += sizeof(VkComponentSwizzle); |
| *count += sizeof(VkComponentSwizzle); |
| } |
| |
| void count_VkImageViewCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkImageViewCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkImageViewCreateFlags); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkImageViewType); |
| *count += sizeof(VkFormat); |
| count_VkComponentMapping(featureBits, rootType, (VkComponentMapping*)(&toCount->components), |
| count); |
| count_VkImageSubresourceRange(featureBits, rootType, |
| (VkImageSubresourceRange*)(&toCount->subresourceRange), count); |
| } |
| |
| void count_VkShaderModuleCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkShaderModuleCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkShaderModuleCreateFlags); |
| *count += 8; |
| if (toCount) { |
| *count += (toCount->codeSize / 4) * sizeof(const uint32_t); |
| } |
| } |
| |
| void count_VkPipelineCacheCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineCacheCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineCacheCreateFlags); |
| *count += 8; |
| if (toCount) { |
| *count += toCount->initialDataSize * sizeof(const uint8_t); |
| } |
| } |
| |
| void count_VkSpecializationMapEntry(uint32_t featureBits, VkStructureType rootType, |
| const VkSpecializationMapEntry* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += 8; |
| } |
| |
| void count_VkSpecializationInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSpecializationInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->mapEntryCount; ++i) { |
| count_VkSpecializationMapEntry( |
| featureBits, rootType, (const VkSpecializationMapEntry*)(toCount->pMapEntries + i), |
| count); |
| } |
| } |
| *count += 8; |
| if (toCount) { |
| *count += toCount->dataSize * sizeof(const uint8_t); |
| } |
| } |
| |
| void count_VkPipelineShaderStageCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineShaderStageCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineShaderStageCreateFlags); |
| *count += sizeof(VkShaderStageFlagBits); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t) + (toCount->pName ? strlen(toCount->pName) : 0); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pSpecializationInfo) { |
| count_VkSpecializationInfo(featureBits, rootType, |
| (const VkSpecializationInfo*)(toCount->pSpecializationInfo), |
| count); |
| } |
| } |
| |
| void count_VkComputePipelineCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkComputePipelineCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineCreateFlags); |
| count_VkPipelineShaderStageCreateInfo( |
| featureBits, rootType, (VkPipelineShaderStageCreateInfo*)(&toCount->stage), count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(int32_t); |
| } |
| |
| void count_VkVertexInputBindingDescription(uint32_t featureBits, VkStructureType rootType, |
| const VkVertexInputBindingDescription* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkVertexInputRate); |
| } |
| |
| void count_VkVertexInputAttributeDescription(uint32_t featureBits, VkStructureType rootType, |
| const VkVertexInputAttributeDescription* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkFormat); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkPipelineVertexInputStateCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineVertexInputStateCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineVertexInputStateCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->vertexBindingDescriptionCount; ++i) { |
| count_VkVertexInputBindingDescription( |
| featureBits, rootType, |
| (const VkVertexInputBindingDescription*)(toCount->pVertexBindingDescriptions + i), |
| count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->vertexAttributeDescriptionCount; ++i) { |
| count_VkVertexInputAttributeDescription( |
| featureBits, rootType, |
| (const VkVertexInputAttributeDescription*)(toCount->pVertexAttributeDescriptions + |
| i), |
| count); |
| } |
| } |
| } |
| |
| void count_VkPipelineInputAssemblyStateCreateInfo( |
| uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineInputAssemblyStateCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineInputAssemblyStateCreateFlags); |
| *count += sizeof(VkPrimitiveTopology); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkPipelineTessellationStateCreateInfo( |
| uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineTessellationStateCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineTessellationStateCreateFlags); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkViewport(uint32_t featureBits, VkStructureType rootType, const VkViewport* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| } |
| |
| void count_VkPipelineViewportStateCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineViewportStateCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineViewportStateCreateFlags); |
| *count += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pViewports) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->viewportCount; ++i) { |
| count_VkViewport(featureBits, rootType, |
| (const VkViewport*)(toCount->pViewports + i), count); |
| } |
| } |
| } |
| *count += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pScissors) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->scissorCount; ++i) { |
| count_VkRect2D(featureBits, rootType, (const VkRect2D*)(toCount->pScissors + i), |
| count); |
| } |
| } |
| } |
| } |
| |
| void count_VkPipelineRasterizationStateCreateInfo( |
| uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineRasterizationStateCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineRasterizationStateCreateFlags); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkPolygonMode); |
| *count += sizeof(VkCullModeFlags); |
| *count += sizeof(VkFrontFace); |
| *count += sizeof(VkBool32); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| } |
| |
| void count_VkPipelineMultisampleStateCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineMultisampleStateCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineMultisampleStateCreateFlags); |
| *count += sizeof(VkSampleCountFlagBits); |
| *count += sizeof(VkBool32); |
| *count += sizeof(float); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pSampleMask) { |
| if (toCount) { |
| *count += (((toCount->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask); |
| } |
| } |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkStencilOpState(uint32_t featureBits, VkStructureType rootType, |
| const VkStencilOpState* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStencilOp); |
| *count += sizeof(VkStencilOp); |
| *count += sizeof(VkStencilOp); |
| *count += sizeof(VkCompareOp); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkPipelineDepthStencilStateCreateInfo( |
| uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineDepthStencilStateCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineDepthStencilStateCreateFlags); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkCompareOp); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| count_VkStencilOpState(featureBits, rootType, (VkStencilOpState*)(&toCount->front), count); |
| count_VkStencilOpState(featureBits, rootType, (VkStencilOpState*)(&toCount->back), count); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| } |
| |
| void count_VkPipelineColorBlendAttachmentState(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineColorBlendAttachmentState* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBlendFactor); |
| *count += sizeof(VkBlendFactor); |
| *count += sizeof(VkBlendOp); |
| *count += sizeof(VkBlendFactor); |
| *count += sizeof(VkBlendFactor); |
| *count += sizeof(VkBlendOp); |
| *count += sizeof(VkColorComponentFlags); |
| } |
| |
| void count_VkPipelineColorBlendStateCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineColorBlendStateCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineColorBlendStateCreateFlags); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkLogicOp); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->attachmentCount; ++i) { |
| count_VkPipelineColorBlendAttachmentState( |
| featureBits, rootType, |
| (const VkPipelineColorBlendAttachmentState*)(toCount->pAttachments + i), count); |
| } |
| } |
| *count += 4 * sizeof(float); |
| } |
| |
| void count_VkPipelineDynamicStateCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineDynamicStateCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineDynamicStateCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->dynamicStateCount * sizeof(const VkDynamicState); |
| } |
| } |
| |
| void count_VkGraphicsPipelineCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkGraphicsPipelineCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint32_t hasRasterization = 1; |
| if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| hasRasterization = (((0 == toCount->pRasterizationState)) |
| ? (0) |
| : (!((*(toCount->pRasterizationState)).rasterizerDiscardEnable))); |
| *count += 4; |
| } |
| uint32_t hasTessellation = 1; |
| if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| hasTessellation = arrayany( |
| toCount->pStages, 0, toCount->stageCount, [](VkPipelineShaderStageCreateInfo s) { |
| return ((s.stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) || |
| (s.stage == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)); |
| }); |
| *count += 4; |
| } |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->stageCount; ++i) { |
| count_VkPipelineShaderStageCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineShaderStageCreateInfo*)(toCount->pStages + i), count); |
| } |
| } |
| // WARNING PTR CHECK |
| if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| *count += 8; |
| } |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| toCount->pVertexInputState)) { |
| count_VkPipelineVertexInputStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineVertexInputStateCreateInfo*)(toCount->pVertexInputState), count); |
| } |
| // WARNING PTR CHECK |
| if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| *count += 8; |
| } |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| toCount->pInputAssemblyState)) { |
| count_VkPipelineInputAssemblyStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineInputAssemblyStateCreateInfo*)(toCount->pInputAssemblyState), count); |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pTessellationState) { |
| if (hasTessellation) { |
| count_VkPipelineTessellationStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineTessellationStateCreateInfo*)(toCount->pTessellationState), count); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pViewportState) { |
| if (hasRasterization) { |
| count_VkPipelineViewportStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineViewportStateCreateInfo*)(toCount->pViewportState), count); |
| } |
| } |
| // WARNING PTR CHECK |
| if (featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| *count += 8; |
| } |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| toCount->pRasterizationState)) { |
| count_VkPipelineRasterizationStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineRasterizationStateCreateInfo*)(toCount->pRasterizationState), count); |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pMultisampleState) { |
| if (hasRasterization) { |
| count_VkPipelineMultisampleStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineMultisampleStateCreateInfo*)(toCount->pMultisampleState), count); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pDepthStencilState) { |
| if (hasRasterization) { |
| count_VkPipelineDepthStencilStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineDepthStencilStateCreateInfo*)(toCount->pDepthStencilState), count); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pColorBlendState) { |
| if (hasRasterization) { |
| count_VkPipelineColorBlendStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineColorBlendStateCreateInfo*)(toCount->pColorBlendState), count); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pDynamicState) { |
| count_VkPipelineDynamicStateCreateInfo( |
| featureBits, rootType, |
| (const VkPipelineDynamicStateCreateInfo*)(toCount->pDynamicState), count); |
| } |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| uint64_t cgen_var_2; |
| *count += 1 * 8; |
| *count += sizeof(int32_t); |
| } |
| |
| void count_VkPushConstantRange(uint32_t featureBits, VkStructureType rootType, |
| const VkPushConstantRange* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkShaderStageFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkPipelineLayoutCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkPipelineLayoutCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkPipelineLayoutCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount->setLayoutCount) { |
| *count += toCount->setLayoutCount * 8; |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->pushConstantRangeCount; ++i) { |
| count_VkPushConstantRange( |
| featureBits, rootType, |
| (const VkPushConstantRange*)(toCount->pPushConstantRanges + i), count); |
| } |
| } |
| } |
| |
| void count_VkSamplerCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkSamplerCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkSamplerCreateFlags); |
| *count += sizeof(VkFilter); |
| *count += sizeof(VkFilter); |
| *count += sizeof(VkSamplerMipmapMode); |
| *count += sizeof(VkSamplerAddressMode); |
| *count += sizeof(VkSamplerAddressMode); |
| *count += sizeof(VkSamplerAddressMode); |
| *count += sizeof(float); |
| *count += sizeof(VkBool32); |
| *count += sizeof(float); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkCompareOp); |
| *count += sizeof(float); |
| *count += sizeof(float); |
| *count += sizeof(VkBorderColor); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkCopyDescriptorSet(uint32_t featureBits, VkStructureType rootType, |
| const VkCopyDescriptorSet* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDescriptorBufferInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorBufferInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkDescriptorImageInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorImageInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(VkImageLayout); |
| } |
| |
| void count_VkDescriptorPoolSize(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorPoolSize* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDescriptorType); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDescriptorPoolCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorPoolCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkDescriptorPoolCreateFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->poolSizeCount; ++i) { |
| count_VkDescriptorPoolSize(featureBits, rootType, |
| (const VkDescriptorPoolSize*)(toCount->pPoolSizes + i), |
| count); |
| } |
| } |
| } |
| |
| void count_VkDescriptorSetAllocateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorSetAllocateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| if (toCount->descriptorSetCount) { |
| *count += toCount->descriptorSetCount * 8; |
| } |
| } |
| |
| void count_VkDescriptorSetLayoutBinding(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorSetLayoutBinding* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkDescriptorType); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkShaderStageFlags); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pImmutableSamplers) { |
| if (toCount->descriptorCount) { |
| *count += toCount->descriptorCount * 8; |
| } |
| } |
| } |
| |
| void count_VkDescriptorSetLayoutCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDescriptorSetLayoutCreateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkDescriptorSetLayoutCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->bindingCount; ++i) { |
| count_VkDescriptorSetLayoutBinding( |
| featureBits, rootType, |
| (const VkDescriptorSetLayoutBinding*)(toCount->pBindings + i), count); |
| } |
| } |
| } |
| |
| void count_VkWriteDescriptorSet(uint32_t featureBits, VkStructureType rootType, |
| const VkWriteDescriptorSet* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkDescriptorType); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pImageInfo) { |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| ((VK_DESCRIPTOR_TYPE_SAMPLER == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT == toCount->descriptorType)))) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->descriptorCount; ++i) { |
| count_VkDescriptorImageInfo( |
| featureBits, rootType, |
| (const VkDescriptorImageInfo*)(toCount->pImageInfo + i), count); |
| } |
| } |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pBufferInfo) { |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| ((VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC == toCount->descriptorType)))) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->descriptorCount; ++i) { |
| count_VkDescriptorBufferInfo( |
| featureBits, rootType, |
| (const VkDescriptorBufferInfo*)(toCount->pBufferInfo + i), count); |
| } |
| } |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pTexelBufferView) { |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| ((VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == toCount->descriptorType) || |
| (VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == toCount->descriptorType)))) { |
| if (toCount->descriptorCount) { |
| *count += toCount->descriptorCount * 8; |
| } |
| } |
| } |
| } |
| |
| void count_VkAttachmentDescription(uint32_t featureBits, VkStructureType rootType, |
| const VkAttachmentDescription* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkAttachmentDescriptionFlags); |
| *count += sizeof(VkFormat); |
| *count += sizeof(VkSampleCountFlagBits); |
| *count += sizeof(VkAttachmentLoadOp); |
| *count += sizeof(VkAttachmentStoreOp); |
| *count += sizeof(VkAttachmentLoadOp); |
| *count += sizeof(VkAttachmentStoreOp); |
| *count += sizeof(VkImageLayout); |
| *count += sizeof(VkImageLayout); |
| } |
| |
| void count_VkAttachmentReference(uint32_t featureBits, VkStructureType rootType, |
| const VkAttachmentReference* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkImageLayout); |
| } |
| |
| void count_VkFramebufferCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkFramebufferCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkFramebufferCreateFlags); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| if ((!(featureBits & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| (((toCount->flags & VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT) == 0)))) { |
| if (toCount->attachmentCount) { |
| *count += toCount->attachmentCount * 8; |
| } |
| } |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkSubpassDescription(uint32_t featureBits, VkStructureType rootType, |
| const VkSubpassDescription* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkSubpassDescriptionFlags); |
| *count += sizeof(VkPipelineBindPoint); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->inputAttachmentCount; ++i) { |
| count_VkAttachmentReference( |
| featureBits, rootType, |
| (const VkAttachmentReference*)(toCount->pInputAttachments + i), count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->colorAttachmentCount; ++i) { |
| count_VkAttachmentReference( |
| featureBits, rootType, |
| (const VkAttachmentReference*)(toCount->pColorAttachments + i), count); |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pResolveAttachments) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->colorAttachmentCount; ++i) { |
| count_VkAttachmentReference( |
| featureBits, rootType, |
| (const VkAttachmentReference*)(toCount->pResolveAttachments + i), count); |
| } |
| } |
| } |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pDepthStencilAttachment) { |
| count_VkAttachmentReference( |
| featureBits, rootType, (const VkAttachmentReference*)(toCount->pDepthStencilAttachment), |
| count); |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->preserveAttachmentCount * sizeof(const uint32_t); |
| } |
| } |
| |
| void count_VkSubpassDependency(uint32_t featureBits, VkStructureType rootType, |
| const VkSubpassDependency* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkPipelineStageFlags); |
| *count += sizeof(VkPipelineStageFlags); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkAccessFlags); |
| *count += sizeof(VkDependencyFlags); |
| } |
| |
| void count_VkRenderPassCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkRenderPassCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkRenderPassCreateFlags); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->attachmentCount; ++i) { |
| count_VkAttachmentDescription( |
| featureBits, rootType, (const VkAttachmentDescription*)(toCount->pAttachments + i), |
| count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->subpassCount; ++i) { |
| count_VkSubpassDescription(featureBits, rootType, |
| (const VkSubpassDescription*)(toCount->pSubpasses + i), |
| count); |
| } |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->dependencyCount; ++i) { |
| count_VkSubpassDependency(featureBits, rootType, |
| (const VkSubpassDependency*)(toCount->pDependencies + i), |
| count); |
| } |
| } |
| } |
| |
| void count_VkCommandPoolCreateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkCommandPoolCreateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkCommandPoolCreateFlags); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkCommandBufferAllocateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkCommandBufferAllocateInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(VkCommandBufferLevel); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkCommandBufferInheritanceInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkCommandBufferInheritanceInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| *count += sizeof(uint32_t); |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkQueryControlFlags); |
| *count += sizeof(VkQueryPipelineStatisticFlags); |
| } |
| |
| void count_VkCommandBufferBeginInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkCommandBufferBeginInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkCommandBufferUsageFlags); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pInheritanceInfo) { |
| count_VkCommandBufferInheritanceInfo( |
| featureBits, rootType, |
| (const VkCommandBufferInheritanceInfo*)(toCount->pInheritanceInfo), count); |
| } |
| } |
| |
| void count_VkBufferCopy(uint32_t featureBits, VkStructureType rootType, const VkBufferCopy* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkImageSubresourceLayers(uint32_t featureBits, VkStructureType rootType, |
| const VkImageSubresourceLayers* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkImageAspectFlags); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkBufferImageCopy(uint32_t featureBits, VkStructureType rootType, |
| const VkBufferImageCopy* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkDeviceSize); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->imageSubresource), count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->imageOffset), count); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->imageExtent), count); |
| } |
| |
| void count_VkClearColorValue(uint32_t featureBits, VkStructureType rootType, |
| const VkClearColorValue* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += 4 * sizeof(float); |
| } |
| |
| void count_VkClearDepthStencilValue(uint32_t featureBits, VkStructureType rootType, |
| const VkClearDepthStencilValue* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(float); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkClearValue(uint32_t featureBits, VkStructureType rootType, const VkClearValue* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkClearColorValue(featureBits, rootType, (VkClearColorValue*)(&toCount->color), count); |
| } |
| |
| void count_VkClearAttachment(uint32_t featureBits, VkStructureType rootType, |
| const VkClearAttachment* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkImageAspectFlags); |
| *count += sizeof(uint32_t); |
| count_VkClearValue(featureBits, rootType, (VkClearValue*)(&toCount->clearValue), count); |
| } |
| |
| void count_VkClearRect(uint32_t featureBits, VkStructureType rootType, const VkClearRect* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkRect2D(featureBits, rootType, (VkRect2D*)(&toCount->rect), count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkImageBlit(uint32_t featureBits, VkStructureType rootType, const VkImageBlit* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->srcSubresource), count); |
| for (uint32_t i = 0; i < (uint32_t)2; ++i) { |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(toCount->srcOffsets + i), count); |
| } |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->dstSubresource), count); |
| for (uint32_t i = 0; i < (uint32_t)2; ++i) { |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(toCount->dstOffsets + i), count); |
| } |
| } |
| |
| void count_VkImageCopy(uint32_t featureBits, VkStructureType rootType, const VkImageCopy* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->srcSubresource), count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->srcOffset), count); |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->dstSubresource), count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->dstOffset), count); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->extent), count); |
| } |
| |
| void count_VkImageResolve(uint32_t featureBits, VkStructureType rootType, |
| const VkImageResolve* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->srcSubresource), count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->srcOffset), count); |
| count_VkImageSubresourceLayers(featureBits, rootType, |
| (VkImageSubresourceLayers*)(&toCount->dstSubresource), count); |
| count_VkOffset3D(featureBits, rootType, (VkOffset3D*)(&toCount->dstOffset), count); |
| count_VkExtent3D(featureBits, rootType, (VkExtent3D*)(&toCount->extent), count); |
| } |
| |
| void count_VkRenderPassBeginInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkRenderPassBeginInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| count_VkRect2D(featureBits, rootType, (VkRect2D*)(&toCount->renderArea), count); |
| *count += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| *count += 8; |
| if (toCount->pClearValues) { |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->clearValueCount; ++i) { |
| count_VkClearValue(featureBits, rootType, |
| (const VkClearValue*)(toCount->pClearValues + i), count); |
| } |
| } |
| } |
| } |
| |
| #endif |
| #ifdef VK_VERSION_1_1 |
| void count_VkPhysicalDeviceSubgroupProperties(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDeviceSubgroupProperties* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(VkShaderStageFlags); |
| *count += sizeof(VkSubgroupFeatureFlags); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkBindBufferMemoryInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBindBufferMemoryInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkBindImageMemoryInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBindImageMemoryInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| *count += sizeof(VkDeviceSize); |
| } |
| |
| void count_VkPhysicalDevice16BitStorageFeatures(uint32_t featureBits, VkStructureType rootType, |
| const VkPhysicalDevice16BitStorageFeatures* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkMemoryDedicatedRequirements(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryDedicatedRequirements* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkBool32); |
| *count += sizeof(VkBool32); |
| } |
| |
| void count_VkMemoryDedicatedAllocateInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryDedicatedAllocateInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| uint64_t cgen_var_0; |
| *count += 1 * 8; |
| uint64_t cgen_var_1; |
| *count += 1 * 8; |
| } |
| |
| void count_VkMemoryAllocateFlagsInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkMemoryAllocateFlagsInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(VkMemoryAllocateFlags); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDeviceGroupRenderPassBeginInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceGroupRenderPassBeginInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| for (uint32_t i = 0; i < (uint32_t)toCount->deviceRenderAreaCount; ++i) { |
| count_VkRect2D(featureBits, rootType, |
| (const VkRect2D*)(toCount->pDeviceRenderAreas + i), count); |
| } |
| } |
| } |
| |
| void count_VkDeviceGroupCommandBufferBeginInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceGroupCommandBufferBeginInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkDeviceGroupSubmitInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceGroupSubmitInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->waitSemaphoreCount * sizeof(const uint32_t); |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->commandBufferCount * sizeof(const uint32_t); |
| } |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->signalSemaphoreCount * sizeof(const uint32_t); |
| } |
| } |
| |
| void count_VkDeviceGroupBindSparseInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkDeviceGroupBindSparseInfo* toCount, size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| *count += sizeof(uint32_t); |
| } |
| |
| void count_VkBindBufferMemoryDeviceGroupInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBindBufferMemoryDeviceGroupInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount->pNext, count); |
| *count += sizeof(uint32_t); |
| if (toCount) { |
| *count += toCount->deviceIndexCount * sizeof(const uint32_t); |
| } |
| } |
| |
| void count_VkBindImageMemoryDeviceGroupInfo(uint32_t featureBits, VkStructureType rootType, |
| const VkBindImageMemoryDeviceGroupInfo* toCount, |
| size_t* count) { |
| (void)featureBits; |
| (void)rootType; |
| (void)toCount; |
| (void)count; |
| *count += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = toCount->sType; |
| } |
| count_extension_struct(featureBits, rootType, toCount<
|