| // 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_reserved_marshaling_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_reserved_marshaling_guest.h" |
| |
| #include <cstring> |
| |
| #include "Resources.h" |
| #include "goldfish_vk_extension_structs_guest.h" |
| #include "goldfish_vk_private_defs.h" |
| |
| namespace goldfish_vk { |
| |
| void reservedmarshal_extension_struct(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const void* structExtension, uint8_t** ptr); |
| |
| void reservedunmarshal_extension_struct(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| void* structExtension_out, uint8_t** ptr); |
| |
| #ifdef VK_VERSION_1_0 |
| void reservedmarshal_VkExtent2D(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkExtent2D* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->width, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->height, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkExtent3D(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkExtent3D* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->width, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->height, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->depth, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkOffset2D(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkOffset2D* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (int32_t*)&forMarshaling->x, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (int32_t*)&forMarshaling->y, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| } |
| |
| void reservedmarshal_VkOffset3D(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkOffset3D* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (int32_t*)&forMarshaling->x, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (int32_t*)&forMarshaling->y, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (int32_t*)&forMarshaling->z, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| } |
| |
| void reservedmarshal_VkRect2D(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkRect2D* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| reservedmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->offset), ptr); |
| reservedmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->extent), ptr); |
| } |
| |
| void reservedmarshal_VkBaseInStructure(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBaseInStructure* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| } |
| |
| void reservedmarshal_VkBaseOutStructure(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBaseOutStructure* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| } |
| |
| void reservedmarshal_VkBufferMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBufferMemoryBarrier* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkBuffer((*&forMarshaling->buffer)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkDispatchIndirectCommand(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkDispatchIndirectCommand* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->x, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->y, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->z, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkDrawIndexedIndirectCommand(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkDrawIndexedIndirectCommand* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->indexCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->firstIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (int32_t*)&forMarshaling->vertexOffset, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkDrawIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkDrawIndirectCommand* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->vertexCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->firstVertex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkImageSubresourceRange(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageSubresourceRange* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); |
| *ptr += sizeof(VkImageAspectFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->baseMipLevel, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->levelCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkImageMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageMemoryBarrier* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| memcpy(*ptr, (VkImageLayout*)&forMarshaling->oldLayout, sizeof(VkImageLayout)); |
| *ptr += sizeof(VkImageLayout); |
| memcpy(*ptr, (VkImageLayout*)&forMarshaling->newLayout, sizeof(VkImageLayout)); |
| *ptr += sizeof(VkImageLayout); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkImage((*&forMarshaling->image)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| reservedmarshal_VkImageSubresourceRange( |
| vkStream, rootType, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange), ptr); |
| } |
| |
| void reservedmarshal_VkMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMemoryBarrier* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| memcpy(*ptr, (VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); |
| *ptr += sizeof(VkAccessFlags); |
| } |
| |
| void reservedmarshal_VkPipelineCacheHeaderVersionOne( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineCacheHeaderVersionOne* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->headerSize, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkPipelineCacheHeaderVersion*)&forMarshaling->headerVersion, |
| sizeof(VkPipelineCacheHeaderVersion)); |
| *ptr += sizeof(VkPipelineCacheHeaderVersion); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t)); |
| *ptr += VK_UUID_SIZE * sizeof(uint8_t); |
| } |
| |
| void reservedmarshal_VkAllocationCallbacks(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkAllocationCallbacks* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pUserData; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pUserData) { |
| memcpy(*ptr, (void*)forMarshaling->pUserData, sizeof(uint8_t)); |
| *ptr += sizeof(uint8_t); |
| } |
| uint64_t cgen_var_1 = (uint64_t)forMarshaling->pfnAllocation; |
| memcpy((*ptr), &cgen_var_1, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| uint64_t cgen_var_2 = (uint64_t)forMarshaling->pfnReallocation; |
| memcpy((*ptr), &cgen_var_2, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| uint64_t cgen_var_3 = (uint64_t)forMarshaling->pfnFree; |
| memcpy((*ptr), &cgen_var_3, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| uint64_t cgen_var_4 = (uint64_t)forMarshaling->pfnInternalAllocation; |
| memcpy((*ptr), &cgen_var_4, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| uint64_t cgen_var_5 = (uint64_t)forMarshaling->pfnInternalFree; |
| memcpy((*ptr), &cgen_var_5, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| } |
| |
| void reservedmarshal_VkApplicationInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkApplicationInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT) { |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationName; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pApplicationName) { |
| { |
| uint32_t l = |
| forMarshaling->pApplicationName ? strlen(forMarshaling->pApplicationName) : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->pApplicationName, l); |
| *ptr += l; |
| } |
| } |
| } else { |
| { |
| uint32_t l = |
| forMarshaling->pApplicationName ? strlen(forMarshaling->pApplicationName) : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->pApplicationName, l); |
| *ptr += l; |
| } |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->applicationVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT) { |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pEngineName; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pEngineName) { |
| { |
| uint32_t l = forMarshaling->pEngineName ? strlen(forMarshaling->pEngineName) : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->pEngineName, l); |
| *ptr += l; |
| } |
| } |
| } else { |
| { |
| uint32_t l = forMarshaling->pEngineName ? strlen(forMarshaling->pEngineName) : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->pEngineName, l); |
| *ptr += l; |
| } |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->engineVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkFormatProperties* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkFormatFeatureFlags*)&forMarshaling->linearTilingFeatures, |
| sizeof(VkFormatFeatureFlags)); |
| *ptr += sizeof(VkFormatFeatureFlags); |
| memcpy(*ptr, (VkFormatFeatureFlags*)&forMarshaling->optimalTilingFeatures, |
| sizeof(VkFormatFeatureFlags)); |
| *ptr += sizeof(VkFormatFeatureFlags); |
| memcpy(*ptr, (VkFormatFeatureFlags*)&forMarshaling->bufferFeatures, |
| sizeof(VkFormatFeatureFlags)); |
| *ptr += sizeof(VkFormatFeatureFlags); |
| } |
| |
| void reservedmarshal_VkImageFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageFormatProperties* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| reservedmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->maxExtent), ptr); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxMipLevels, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxArrayLayers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->sampleCounts, sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->maxResourceSize, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkInstanceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkInstanceCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkInstanceCreateFlags*)&forMarshaling->flags, sizeof(VkInstanceCreateFlags)); |
| *ptr += sizeof(VkInstanceCreateFlags); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationInfo; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pApplicationInfo) { |
| reservedmarshal_VkApplicationInfo( |
| vkStream, rootType, (const VkApplicationInfo*)(forMarshaling->pApplicationInfo), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| { |
| uint32_t c = 0; |
| if (forMarshaling) { |
| c = forMarshaling->enabledLayerCount; |
| } |
| memcpy(*ptr, (uint32_t*)&c, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < c; ++i) { |
| uint32_t l = forMarshaling->ppEnabledLayerNames |
| ? strlen(forMarshaling->ppEnabledLayerNames[i]) |
| : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| if (l) { |
| memcpy(*ptr, (char*)(forMarshaling->ppEnabledLayerNames[i]), l); |
| *ptr += l; |
| } |
| } |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| { |
| uint32_t c = 0; |
| if (forMarshaling) { |
| c = forMarshaling->enabledExtensionCount; |
| } |
| memcpy(*ptr, (uint32_t*)&c, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < c; ++i) { |
| uint32_t l = forMarshaling->ppEnabledExtensionNames |
| ? strlen(forMarshaling->ppEnabledExtensionNames[i]) |
| : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| if (l) { |
| memcpy(*ptr, (char*)(forMarshaling->ppEnabledExtensionNames[i]), l); |
| *ptr += l; |
| } |
| } |
| } |
| } |
| |
| void reservedmarshal_VkMemoryHeap(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMemoryHeap* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkMemoryHeapFlags*)&forMarshaling->flags, sizeof(VkMemoryHeapFlags)); |
| *ptr += sizeof(VkMemoryHeapFlags); |
| } |
| |
| void reservedmarshal_VkMemoryType(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMemoryType* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkMemoryPropertyFlags*)&forMarshaling->propertyFlags, |
| sizeof(VkMemoryPropertyFlags)); |
| *ptr += sizeof(VkMemoryPropertyFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->heapIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkPhysicalDeviceFeatures(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPhysicalDeviceFeatures* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkBool32*)&forMarshaling->robustBufferAccess, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->fullDrawIndexUint32, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->imageCubeArray, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->independentBlend, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->geometryShader, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->tessellationShader, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sampleRateShading, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->dualSrcBlend, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->logicOp, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->multiDrawIndirect, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->drawIndirectFirstInstance, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthClamp, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthBiasClamp, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->fillModeNonSolid, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthBounds, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->wideLines, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->largePoints, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->alphaToOne, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->multiViewport, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->samplerAnisotropy, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->textureCompressionETC2, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->textureCompressionASTC_LDR, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->textureCompressionBC, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->occlusionQueryPrecise, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->pipelineStatisticsQuery, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->fragmentStoresAndAtomics, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderTessellationAndGeometryPointSize, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderImageGatherExtended, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageImageMultisample, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderUniformBufferArrayDynamicIndexing, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderSampledImageArrayDynamicIndexing, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageBufferArrayDynamicIndexing, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderStorageImageArrayDynamicIndexing, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderClipDistance, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderCullDistance, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderFloat64, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderInt64, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderInt16, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderResourceResidency, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->shaderResourceMinLod, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseBinding, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidencyBuffer, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidencyImage2D, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidencyImage3D, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidency2Samples, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidency4Samples, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidency8Samples, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidency16Samples, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sparseResidencyAliased, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->variableMultisampleRate, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->inheritedQueries, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| } |
| |
| void reservedmarshal_VkPhysicalDeviceLimits(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPhysicalDeviceLimits* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxImageDimension1D, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxImageDimension2D, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxImageDimension3D, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxImageDimensionCube, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTexelBufferElements, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxUniformBufferRange, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxStorageBufferRange, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPushConstantsSize, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxMemoryAllocationCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxSamplerAllocationCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->bufferImageGranularity, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxBoundDescriptorSets, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageDescriptorInputAttachments, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxPerStageResources, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetSamplers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffersDynamic, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffersDynamic, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxVertexInputAttributes, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxVertexInputBindings, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxVertexInputBindingStride, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxVertexOutputComponents, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationGenerationLevel, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationPatchSize, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationControlPerVertexInputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationControlPerVertexOutputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationControlPerPatchOutputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationControlTotalOutputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationEvaluationInputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTessellationEvaluationOutputComponents, |
| sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxGeometryShaderInvocations, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxGeometryInputComponents, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxGeometryOutputComponents, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxGeometryOutputVertices, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFragmentInputComponents, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFragmentOutputAttachments, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxComputeSharedMemorySize, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)forMarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t)); |
| *ptr += 3 * sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)forMarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t)); |
| *ptr += 3 * sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->subPixelPrecisionBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->subTexelPrecisionBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->mipmapPrecisionBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxDrawIndirectCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (float*)&forMarshaling->maxSamplerLodBias, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->maxSamplerAnisotropy, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxViewports, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)forMarshaling->maxViewportDimensions, 2 * sizeof(uint32_t)); |
| *ptr += 2 * sizeof(uint32_t); |
| memcpy(*ptr, (float*)forMarshaling->viewportBoundsRange, 2 * sizeof(float)); |
| *ptr += 2 * sizeof(float); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->viewportSubPixelBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| uint64_t cgen_var_0 = (uint64_t)forMarshaling->minMemoryMapAlignment; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->minTexelBufferOffsetAlignment, |
| sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->minUniformBufferOffsetAlignment, |
| sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->minStorageBufferOffsetAlignment, |
| sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (int32_t*)&forMarshaling->minTexelOffset, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTexelOffset, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (int32_t*)&forMarshaling->minTexelGatherOffset, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxTexelGatherOffset, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (float*)&forMarshaling->minInterpolationOffset, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->maxInterpolationOffset, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFramebufferWidth, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFramebufferHeight, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxFramebufferLayers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->framebufferColorSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->framebufferDepthSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->framebufferStencilSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->framebufferNoAttachmentsSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxColorAttachments, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->sampledImageColorSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->sampledImageIntegerSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->sampledImageDepthSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->sampledImageStencilSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (VkSampleCountFlags*)&forMarshaling->storageImageSampleCounts, |
| sizeof(VkSampleCountFlags)); |
| *ptr += sizeof(VkSampleCountFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxSampleMaskWords, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->timestampComputeAndGraphics, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (float*)&forMarshaling->timestampPeriod, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxClipDistances, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxCullDistances, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->discreteQueuePriorities, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (float*)forMarshaling->pointSizeRange, 2 * sizeof(float)); |
| *ptr += 2 * sizeof(float); |
| memcpy(*ptr, (float*)forMarshaling->lineWidthRange, 2 * sizeof(float)); |
| *ptr += 2 * sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->pointSizeGranularity, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->lineWidthGranularity, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->strictLines, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->standardSampleLocations, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->optimalBufferCopyOffsetAlignment, |
| sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->optimalBufferCopyRowPitchAlignment, |
| sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkPhysicalDeviceMemoryProperties( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPhysicalDeviceMemoryProperties* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->memoryTypeCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i) { |
| reservedmarshal_VkMemoryType(vkStream, rootType, |
| (VkMemoryType*)(forMarshaling->memoryTypes + i), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->memoryHeapCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i) { |
| reservedmarshal_VkMemoryHeap(vkStream, rootType, |
| (VkMemoryHeap*)(forMarshaling->memoryHeaps + i), ptr); |
| } |
| } |
| |
| void reservedmarshal_VkPhysicalDeviceSparseProperties( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPhysicalDeviceSparseProperties* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkBool32*)&forMarshaling->residencyStandard2DBlockShape, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->residencyStandard2DMultisampleBlockShape, |
| sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->residencyStandard3DBlockShape, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->residencyAlignedMipSize, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->residencyNonResidentStrict, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| } |
| |
| void reservedmarshal_VkPhysicalDeviceProperties(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkPhysicalDeviceProperties* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->driverVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkPhysicalDeviceType*)&forMarshaling->deviceType, sizeof(VkPhysicalDeviceType)); |
| *ptr += sizeof(VkPhysicalDeviceType); |
| memcpy(*ptr, (char*)forMarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char)); |
| *ptr += VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char); |
| memcpy(*ptr, (uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t)); |
| *ptr += VK_UUID_SIZE * sizeof(uint8_t); |
| reservedmarshal_VkPhysicalDeviceLimits(vkStream, rootType, |
| (VkPhysicalDeviceLimits*)(&forMarshaling->limits), ptr); |
| reservedmarshal_VkPhysicalDeviceSparseProperties( |
| vkStream, rootType, (VkPhysicalDeviceSparseProperties*)(&forMarshaling->sparseProperties), |
| ptr); |
| } |
| |
| void reservedmarshal_VkQueueFamilyProperties(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkQueueFamilyProperties* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkQueueFlags*)&forMarshaling->queueFlags, sizeof(VkQueueFlags)); |
| *ptr += sizeof(VkQueueFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->timestampValidBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| reservedmarshal_VkExtent3D(vkStream, rootType, |
| (VkExtent3D*)(&forMarshaling->minImageTransferGranularity), ptr); |
| } |
| |
| void reservedmarshal_VkDeviceQueueCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkDeviceQueueCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkDeviceQueueCreateFlags*)&forMarshaling->flags, |
| sizeof(VkDeviceQueueCreateFlags)); |
| *ptr += sizeof(VkDeviceQueueCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (const float*)forMarshaling->pQueuePriorities, |
| forMarshaling->queueCount * sizeof(const float)); |
| *ptr += forMarshaling->queueCount * sizeof(const float); |
| } |
| |
| void reservedmarshal_VkDeviceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkDeviceCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkDeviceCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceCreateFlags)); |
| *ptr += sizeof(VkDeviceCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueCreateInfoCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueCreateInfoCount; ++i) { |
| reservedmarshal_VkDeviceQueueCreateInfo( |
| vkStream, rootType, |
| (const VkDeviceQueueCreateInfo*)(forMarshaling->pQueueCreateInfos + i), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| { |
| uint32_t c = 0; |
| if (forMarshaling) { |
| c = forMarshaling->enabledLayerCount; |
| } |
| memcpy(*ptr, (uint32_t*)&c, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < c; ++i) { |
| uint32_t l = forMarshaling->ppEnabledLayerNames |
| ? strlen(forMarshaling->ppEnabledLayerNames[i]) |
| : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| if (l) { |
| memcpy(*ptr, (char*)(forMarshaling->ppEnabledLayerNames[i]), l); |
| *ptr += l; |
| } |
| } |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| { |
| uint32_t c = 0; |
| if (forMarshaling) { |
| c = forMarshaling->enabledExtensionCount; |
| } |
| memcpy(*ptr, (uint32_t*)&c, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < c; ++i) { |
| uint32_t l = forMarshaling->ppEnabledExtensionNames |
| ? strlen(forMarshaling->ppEnabledExtensionNames[i]) |
| : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| if (l) { |
| memcpy(*ptr, (char*)(forMarshaling->ppEnabledExtensionNames[i]), l); |
| *ptr += l; |
| } |
| } |
| } |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pEnabledFeatures; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pEnabledFeatures) { |
| reservedmarshal_VkPhysicalDeviceFeatures( |
| vkStream, rootType, (const VkPhysicalDeviceFeatures*)(forMarshaling->pEnabledFeatures), |
| ptr); |
| } |
| } |
| |
| void reservedmarshal_VkExtensionProperties(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkExtensionProperties* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (char*)forMarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); |
| *ptr += VK_MAX_EXTENSION_NAME_SIZE * sizeof(char); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkLayerProperties(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkLayerProperties* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (char*)forMarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); |
| *ptr += VK_MAX_EXTENSION_NAME_SIZE * sizeof(char); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->implementationVersion, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char)); |
| *ptr += VK_MAX_DESCRIPTION_SIZE * sizeof(char); |
| } |
| |
| void reservedmarshal_VkSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSubmitInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (forMarshaling->waitSemaphoreCount) { |
| uint8_t* cgen_var_0_ptr = (uint8_t*)(*ptr); |
| if (forMarshaling) { |
| for (uint32_t k = 0; k < forMarshaling->waitSemaphoreCount; ++k) { |
| uint64_t tmpval = get_host_u64_VkSemaphore(forMarshaling->pWaitSemaphores[k]); |
| memcpy(cgen_var_0_ptr + k * 8, &tmpval, sizeof(uint64_t)); |
| } |
| } |
| *ptr += 8 * forMarshaling->waitSemaphoreCount; |
| } |
| memcpy(*ptr, (const VkPipelineStageFlags*)forMarshaling->pWaitDstStageMask, |
| forMarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags)); |
| *ptr += forMarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (forMarshaling->commandBufferCount) { |
| uint8_t* cgen_var_1_ptr = (uint8_t*)(*ptr); |
| if (forMarshaling) { |
| for (uint32_t k = 0; k < forMarshaling->commandBufferCount; ++k) { |
| uint64_t tmpval = get_host_u64_VkCommandBuffer(forMarshaling->pCommandBuffers[k]); |
| memcpy(cgen_var_1_ptr + k * 8, &tmpval, sizeof(uint64_t)); |
| } |
| } |
| *ptr += 8 * forMarshaling->commandBufferCount; |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (forMarshaling->signalSemaphoreCount) { |
| uint8_t* cgen_var_2_ptr = (uint8_t*)(*ptr); |
| if (forMarshaling) { |
| for (uint32_t k = 0; k < forMarshaling->signalSemaphoreCount; ++k) { |
| uint64_t tmpval = get_host_u64_VkSemaphore(forMarshaling->pSignalSemaphores[k]); |
| memcpy(cgen_var_2_ptr + k * 8, &tmpval, sizeof(uint64_t)); |
| } |
| } |
| *ptr += 8 * forMarshaling->signalSemaphoreCount; |
| } |
| } |
| |
| void reservedmarshal_VkMappedMemoryRange(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMappedMemoryRange* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkDeviceMemory((*&forMarshaling->memory)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkMemoryAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMemoryAllocateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->memoryTypeIndex, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkMemoryRequirements(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkMemoryRequirements* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->alignment, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkSparseMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSparseMemoryBind* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->resourceOffset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkDeviceMemory((*&forMarshaling->memory)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags)); |
| *ptr += sizeof(VkSparseMemoryBindFlags); |
| } |
| |
| void reservedmarshal_VkSparseBufferMemoryBindInfo(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkSparseBufferMemoryBindInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkBuffer((*&forMarshaling->buffer)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) { |
| reservedmarshal_VkSparseMemoryBind( |
| vkStream, rootType, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i), ptr); |
| } |
| } |
| |
| void reservedmarshal_VkSparseImageOpaqueMemoryBindInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSparseImageOpaqueMemoryBindInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkImage((*&forMarshaling->image)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) { |
| reservedmarshal_VkSparseMemoryBind( |
| vkStream, rootType, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i), ptr); |
| } |
| } |
| |
| void reservedmarshal_VkImageSubresource(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageSubresource* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); |
| *ptr += sizeof(VkImageAspectFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->arrayLayer, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkSparseImageMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSparseImageMemoryBind* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| reservedmarshal_VkImageSubresource(vkStream, rootType, |
| (VkImageSubresource*)(&forMarshaling->subresource), ptr); |
| reservedmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->offset), ptr); |
| reservedmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->extent), ptr); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkDeviceMemory((*&forMarshaling->memory)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags)); |
| *ptr += sizeof(VkSparseMemoryBindFlags); |
| } |
| |
| void reservedmarshal_VkSparseImageMemoryBindInfo(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkSparseImageMemoryBindInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkImage((*&forMarshaling->image)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) { |
| reservedmarshal_VkSparseImageMemoryBind( |
| vkStream, rootType, (const VkSparseImageMemoryBind*)(forMarshaling->pBinds + i), ptr); |
| } |
| } |
| |
| void reservedmarshal_VkBindSparseInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBindSparseInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (forMarshaling->waitSemaphoreCount) { |
| uint8_t* cgen_var_0_ptr = (uint8_t*)(*ptr); |
| if (forMarshaling) { |
| for (uint32_t k = 0; k < forMarshaling->waitSemaphoreCount; ++k) { |
| uint64_t tmpval = get_host_u64_VkSemaphore(forMarshaling->pWaitSemaphores[k]); |
| memcpy(cgen_var_0_ptr + k * 8, &tmpval, sizeof(uint64_t)); |
| } |
| } |
| *ptr += 8 * forMarshaling->waitSemaphoreCount; |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->bufferBindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->bufferBindCount; ++i) { |
| reservedmarshal_VkSparseBufferMemoryBindInfo( |
| vkStream, rootType, |
| (const VkSparseBufferMemoryBindInfo*)(forMarshaling->pBufferBinds + i), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->imageOpaqueBindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageOpaqueBindCount; ++i) { |
| reservedmarshal_VkSparseImageOpaqueMemoryBindInfo( |
| vkStream, rootType, |
| (const VkSparseImageOpaqueMemoryBindInfo*)(forMarshaling->pImageOpaqueBinds + i), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->imageBindCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageBindCount; ++i) { |
| reservedmarshal_VkSparseImageMemoryBindInfo( |
| vkStream, rootType, |
| (const VkSparseImageMemoryBindInfo*)(forMarshaling->pImageBinds + i), ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| if (forMarshaling->signalSemaphoreCount) { |
| uint8_t* cgen_var_1_ptr = (uint8_t*)(*ptr); |
| if (forMarshaling) { |
| for (uint32_t k = 0; k < forMarshaling->signalSemaphoreCount; ++k) { |
| uint64_t tmpval = get_host_u64_VkSemaphore(forMarshaling->pSignalSemaphores[k]); |
| memcpy(cgen_var_1_ptr + k * 8, &tmpval, sizeof(uint64_t)); |
| } |
| } |
| *ptr += 8 * forMarshaling->signalSemaphoreCount; |
| } |
| } |
| |
| void reservedmarshal_VkSparseImageFormatProperties( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSparseImageFormatProperties* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); |
| *ptr += sizeof(VkImageAspectFlags); |
| reservedmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->imageGranularity), |
| ptr); |
| memcpy(*ptr, (VkSparseImageFormatFlags*)&forMarshaling->flags, |
| sizeof(VkSparseImageFormatFlags)); |
| *ptr += sizeof(VkSparseImageFormatFlags); |
| } |
| |
| void reservedmarshal_VkSparseImageMemoryRequirements( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSparseImageMemoryRequirements* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| reservedmarshal_VkSparseImageFormatProperties( |
| vkStream, rootType, (VkSparseImageFormatProperties*)(&forMarshaling->formatProperties), |
| ptr); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->imageMipTailFirstLod, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->imageMipTailSize, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->imageMipTailOffset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->imageMipTailStride, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkFenceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkFenceCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkFenceCreateFlags*)&forMarshaling->flags, sizeof(VkFenceCreateFlags)); |
| *ptr += sizeof(VkFenceCreateFlags); |
| } |
| |
| void reservedmarshal_VkSemaphoreCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSemaphoreCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkSemaphoreCreateFlags*)&forMarshaling->flags, sizeof(VkSemaphoreCreateFlags)); |
| *ptr += sizeof(VkSemaphoreCreateFlags); |
| } |
| |
| void reservedmarshal_VkEventCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkEventCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkEventCreateFlags*)&forMarshaling->flags, sizeof(VkEventCreateFlags)); |
| *ptr += sizeof(VkEventCreateFlags); |
| } |
| |
| void reservedmarshal_VkQueryPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkQueryPoolCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkQueryPoolCreateFlags*)&forMarshaling->flags, sizeof(VkQueryPoolCreateFlags)); |
| *ptr += sizeof(VkQueryPoolCreateFlags); |
| memcpy(*ptr, (VkQueryType*)&forMarshaling->queryType, sizeof(VkQueryType)); |
| *ptr += sizeof(VkQueryType); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queryCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, |
| sizeof(VkQueryPipelineStatisticFlags)); |
| *ptr += sizeof(VkQueryPipelineStatisticFlags); |
| } |
| |
| void reservedmarshal_VkBufferCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBufferCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags)); |
| *ptr += sizeof(VkBufferCreateFlags); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags)); |
| *ptr += sizeof(VkBufferUsageFlags); |
| memcpy(*ptr, (VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode)); |
| *ptr += sizeof(VkSharingMode); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pQueueFamilyIndices) { |
| memcpy(*ptr, (const uint32_t*)forMarshaling->pQueueFamilyIndices, |
| forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); |
| *ptr += forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t); |
| } |
| } |
| |
| void reservedmarshal_VkBufferViewCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkBufferViewCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkBufferViewCreateFlags*)&forMarshaling->flags, sizeof(VkBufferViewCreateFlags)); |
| *ptr += sizeof(VkBufferViewCreateFlags); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkBuffer((*&forMarshaling->buffer)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkFormat*)&forMarshaling->format, sizeof(VkFormat)); |
| *ptr += sizeof(VkFormat); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkImageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags)); |
| *ptr += sizeof(VkImageCreateFlags); |
| memcpy(*ptr, (VkImageType*)&forMarshaling->imageType, sizeof(VkImageType)); |
| *ptr += sizeof(VkImageType); |
| memcpy(*ptr, (VkFormat*)&forMarshaling->format, sizeof(VkFormat)); |
| *ptr += sizeof(VkFormat); |
| reservedmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->extent), ptr); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->mipLevels, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->arrayLayers, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits)); |
| *ptr += sizeof(VkSampleCountFlagBits); |
| memcpy(*ptr, (VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling)); |
| *ptr += sizeof(VkImageTiling); |
| memcpy(*ptr, (VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags)); |
| *ptr += sizeof(VkImageUsageFlags); |
| memcpy(*ptr, (VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode)); |
| *ptr += sizeof(VkSharingMode); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pQueueFamilyIndices) { |
| memcpy(*ptr, (const uint32_t*)forMarshaling->pQueueFamilyIndices, |
| forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); |
| *ptr += forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t); |
| } |
| memcpy(*ptr, (VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout)); |
| *ptr += sizeof(VkImageLayout); |
| } |
| |
| void reservedmarshal_VkSubresourceLayout(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSubresourceLayout* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->rowPitch, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->arrayPitch, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| memcpy(*ptr, (VkDeviceSize*)&forMarshaling->depthPitch, sizeof(VkDeviceSize)); |
| *ptr += sizeof(VkDeviceSize); |
| } |
| |
| void reservedmarshal_VkComponentMapping(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkComponentMapping* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkComponentSwizzle*)&forMarshaling->r, sizeof(VkComponentSwizzle)); |
| *ptr += sizeof(VkComponentSwizzle); |
| memcpy(*ptr, (VkComponentSwizzle*)&forMarshaling->g, sizeof(VkComponentSwizzle)); |
| *ptr += sizeof(VkComponentSwizzle); |
| memcpy(*ptr, (VkComponentSwizzle*)&forMarshaling->b, sizeof(VkComponentSwizzle)); |
| *ptr += sizeof(VkComponentSwizzle); |
| memcpy(*ptr, (VkComponentSwizzle*)&forMarshaling->a, sizeof(VkComponentSwizzle)); |
| *ptr += sizeof(VkComponentSwizzle); |
| } |
| |
| void reservedmarshal_VkImageViewCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkImageViewCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkImageViewCreateFlags*)&forMarshaling->flags, sizeof(VkImageViewCreateFlags)); |
| *ptr += sizeof(VkImageViewCreateFlags); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkImage((*&forMarshaling->image)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (VkImageViewType*)&forMarshaling->viewType, sizeof(VkImageViewType)); |
| *ptr += sizeof(VkImageViewType); |
| memcpy(*ptr, (VkFormat*)&forMarshaling->format, sizeof(VkFormat)); |
| *ptr += sizeof(VkFormat); |
| reservedmarshal_VkComponentMapping(vkStream, rootType, |
| (VkComponentMapping*)(&forMarshaling->components), ptr); |
| reservedmarshal_VkImageSubresourceRange( |
| vkStream, rootType, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange), ptr); |
| } |
| |
| void reservedmarshal_VkShaderModuleCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkShaderModuleCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkShaderModuleCreateFlags*)&forMarshaling->flags, |
| sizeof(VkShaderModuleCreateFlags)); |
| *ptr += sizeof(VkShaderModuleCreateFlags); |
| uint64_t cgen_var_0 = (uint64_t)forMarshaling->codeSize; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| memcpy(*ptr, (const uint32_t*)forMarshaling->pCode, |
| (forMarshaling->codeSize / 4) * sizeof(const uint32_t)); |
| *ptr += (forMarshaling->codeSize / 4) * sizeof(const uint32_t); |
| } |
| |
| void reservedmarshal_VkPipelineCacheCreateInfo(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkPipelineCacheCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineCacheCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineCacheCreateFlags)); |
| *ptr += sizeof(VkPipelineCacheCreateFlags); |
| uint64_t cgen_var_0 = (uint64_t)forMarshaling->initialDataSize; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| memcpy(*ptr, (const void*)forMarshaling->pInitialData, |
| forMarshaling->initialDataSize * sizeof(const uint8_t)); |
| *ptr += forMarshaling->initialDataSize * sizeof(const uint8_t); |
| } |
| |
| void reservedmarshal_VkSpecializationMapEntry(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSpecializationMapEntry* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->constantID, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->offset, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| uint64_t cgen_var_0 = (uint64_t)forMarshaling->size; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| } |
| |
| void reservedmarshal_VkSpecializationInfo(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkSpecializationInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->mapEntryCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->mapEntryCount; ++i) { |
| reservedmarshal_VkSpecializationMapEntry( |
| vkStream, rootType, (const VkSpecializationMapEntry*)(forMarshaling->pMapEntries + i), |
| ptr); |
| } |
| uint64_t cgen_var_0 = (uint64_t)forMarshaling->dataSize; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| memcpy(*ptr, (const void*)forMarshaling->pData, |
| forMarshaling->dataSize * sizeof(const uint8_t)); |
| *ptr += forMarshaling->dataSize * sizeof(const uint8_t); |
| } |
| |
| void reservedmarshal_VkPipelineShaderStageCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineShaderStageCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineShaderStageCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineShaderStageCreateFlags)); |
| *ptr += sizeof(VkPipelineShaderStageCreateFlags); |
| memcpy(*ptr, (VkShaderStageFlagBits*)&forMarshaling->stage, sizeof(VkShaderStageFlagBits)); |
| *ptr += sizeof(VkShaderStageFlagBits); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkShaderModule((*&forMarshaling->module)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| { |
| uint32_t l = forMarshaling->pName ? strlen(forMarshaling->pName) : 0; |
| memcpy(*ptr, (uint32_t*)&l, sizeof(uint32_t)); |
| android::base::Stream::toBe32((uint8_t*)*ptr); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (char*)forMarshaling->pName, l); |
| *ptr += l; |
| } |
| // WARNING PTR CHECK |
| uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pSpecializationInfo; |
| memcpy((*ptr), &cgen_var_1, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pSpecializationInfo) { |
| reservedmarshal_VkSpecializationInfo( |
| vkStream, rootType, (const VkSpecializationInfo*)(forMarshaling->pSpecializationInfo), |
| ptr); |
| } |
| } |
| |
| void reservedmarshal_VkComputePipelineCreateInfo(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkComputePipelineCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags)); |
| *ptr += sizeof(VkPipelineCreateFlags); |
| reservedmarshal_VkPipelineShaderStageCreateInfo( |
| vkStream, rootType, (VkPipelineShaderStageCreateInfo*)(&forMarshaling->stage), ptr); |
| uint64_t cgen_var_0; |
| *&cgen_var_0 = get_host_u64_VkPipelineLayout((*&forMarshaling->layout)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_0, 1 * 8); |
| *ptr += 1 * 8; |
| uint64_t cgen_var_1; |
| *&cgen_var_1 = get_host_u64_VkPipeline((*&forMarshaling->basePipelineHandle)); |
| memcpy(*ptr, (uint64_t*)&cgen_var_1, 1 * 8); |
| *ptr += 1 * 8; |
| memcpy(*ptr, (int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t)); |
| *ptr += sizeof(int32_t); |
| } |
| |
| void reservedmarshal_VkVertexInputBindingDescription( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkVertexInputBindingDescription* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->stride, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkVertexInputRate*)&forMarshaling->inputRate, sizeof(VkVertexInputRate)); |
| *ptr += sizeof(VkVertexInputRate); |
| } |
| |
| void reservedmarshal_VkVertexInputAttributeDescription( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkVertexInputAttributeDescription* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (uint32_t*)&forMarshaling->location, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (VkFormat*)&forMarshaling->format, sizeof(VkFormat)); |
| *ptr += sizeof(VkFormat); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->offset, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkPipelineVertexInputStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineVertexInputStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineVertexInputStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineVertexInputStateCreateFlags)); |
| *ptr += sizeof(VkPipelineVertexInputStateCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->vertexBindingDescriptionCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDescriptionCount; ++i) { |
| reservedmarshal_VkVertexInputBindingDescription( |
| vkStream, rootType, |
| (const VkVertexInputBindingDescription*)(forMarshaling->pVertexBindingDescriptions + i), |
| ptr); |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexAttributeDescriptionCount; ++i) { |
| reservedmarshal_VkVertexInputAttributeDescription( |
| vkStream, rootType, |
| (const VkVertexInputAttributeDescription*)(forMarshaling->pVertexAttributeDescriptions + |
| i), |
| ptr); |
| } |
| } |
| |
| void reservedmarshal_VkPipelineInputAssemblyStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineInputAssemblyStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineInputAssemblyStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineInputAssemblyStateCreateFlags)); |
| *ptr += sizeof(VkPipelineInputAssemblyStateCreateFlags); |
| memcpy(*ptr, (VkPrimitiveTopology*)&forMarshaling->topology, sizeof(VkPrimitiveTopology)); |
| *ptr += sizeof(VkPrimitiveTopology); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->primitiveRestartEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| } |
| |
| void reservedmarshal_VkPipelineTessellationStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineTessellationStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineTessellationStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineTessellationStateCreateFlags)); |
| *ptr += sizeof(VkPipelineTessellationStateCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->patchControlPoints, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkViewport(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkViewport* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (float*)&forMarshaling->x, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->y, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->width, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->height, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->minDepth, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->maxDepth, sizeof(float)); |
| *ptr += sizeof(float); |
| } |
| |
| void reservedmarshal_VkPipelineViewportStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineViewportStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineViewportStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineViewportStateCreateFlags)); |
| *ptr += sizeof(VkPipelineViewportStateCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pViewports; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pViewports) { |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i) { |
| reservedmarshal_VkViewport(vkStream, rootType, |
| (const VkViewport*)(forMarshaling->pViewports + i), ptr); |
| } |
| } |
| memcpy(*ptr, (uint32_t*)&forMarshaling->scissorCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pScissors; |
| memcpy((*ptr), &cgen_var_1, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pScissors) { |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->scissorCount; ++i) { |
| reservedmarshal_VkRect2D(vkStream, rootType, |
| (const VkRect2D*)(forMarshaling->pScissors + i), ptr); |
| } |
| } |
| } |
| |
| void reservedmarshal_VkPipelineRasterizationStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineRasterizationStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineRasterizationStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineRasterizationStateCreateFlags)); |
| *ptr += sizeof(VkPipelineRasterizationStateCreateFlags); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthClampEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->rasterizerDiscardEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkPolygonMode*)&forMarshaling->polygonMode, sizeof(VkPolygonMode)); |
| *ptr += sizeof(VkPolygonMode); |
| memcpy(*ptr, (VkCullModeFlags*)&forMarshaling->cullMode, sizeof(VkCullModeFlags)); |
| *ptr += sizeof(VkCullModeFlags); |
| memcpy(*ptr, (VkFrontFace*)&forMarshaling->frontFace, sizeof(VkFrontFace)); |
| *ptr += sizeof(VkFrontFace); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthBiasEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (float*)&forMarshaling->depthBiasConstantFactor, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->depthBiasClamp, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->depthBiasSlopeFactor, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->lineWidth, sizeof(float)); |
| *ptr += sizeof(float); |
| } |
| |
| void reservedmarshal_VkPipelineMultisampleStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineMultisampleStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineMultisampleStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineMultisampleStateCreateFlags)); |
| *ptr += sizeof(VkPipelineMultisampleStateCreateFlags); |
| memcpy(*ptr, (VkSampleCountFlagBits*)&forMarshaling->rasterizationSamples, |
| sizeof(VkSampleCountFlagBits)); |
| *ptr += sizeof(VkSampleCountFlagBits); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->sampleShadingEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (float*)&forMarshaling->minSampleShading, sizeof(float)); |
| *ptr += sizeof(float); |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pSampleMask; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pSampleMask) { |
| memcpy(*ptr, (const VkSampleMask*)forMarshaling->pSampleMask, |
| (((forMarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask)); |
| *ptr += (((forMarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask); |
| } |
| memcpy(*ptr, (VkBool32*)&forMarshaling->alphaToCoverageEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->alphaToOneEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| } |
| |
| void reservedmarshal_VkStencilOpState(VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkStencilOpState* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStencilOp*)&forMarshaling->failOp, sizeof(VkStencilOp)); |
| *ptr += sizeof(VkStencilOp); |
| memcpy(*ptr, (VkStencilOp*)&forMarshaling->passOp, sizeof(VkStencilOp)); |
| *ptr += sizeof(VkStencilOp); |
| memcpy(*ptr, (VkStencilOp*)&forMarshaling->depthFailOp, sizeof(VkStencilOp)); |
| *ptr += sizeof(VkStencilOp); |
| memcpy(*ptr, (VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp)); |
| *ptr += sizeof(VkCompareOp); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->compareMask, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->writeMask, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->reference, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| } |
| |
| void reservedmarshal_VkPipelineDepthStencilStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineDepthStencilStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineDepthStencilStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineDepthStencilStateCreateFlags)); |
| *ptr += sizeof(VkPipelineDepthStencilStateCreateFlags); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthTestEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthWriteEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkCompareOp*)&forMarshaling->depthCompareOp, sizeof(VkCompareOp)); |
| *ptr += sizeof(VkCompareOp); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->depthBoundsTestEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->stencilTestEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| reservedmarshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forMarshaling->front), |
| ptr); |
| reservedmarshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forMarshaling->back), |
| ptr); |
| memcpy(*ptr, (float*)&forMarshaling->minDepthBounds, sizeof(float)); |
| *ptr += sizeof(float); |
| memcpy(*ptr, (float*)&forMarshaling->maxDepthBounds, sizeof(float)); |
| *ptr += sizeof(float); |
| } |
| |
| void reservedmarshal_VkPipelineColorBlendAttachmentState( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineColorBlendAttachmentState* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkBool32*)&forMarshaling->blendEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkBlendFactor*)&forMarshaling->srcColorBlendFactor, sizeof(VkBlendFactor)); |
| *ptr += sizeof(VkBlendFactor); |
| memcpy(*ptr, (VkBlendFactor*)&forMarshaling->dstColorBlendFactor, sizeof(VkBlendFactor)); |
| *ptr += sizeof(VkBlendFactor); |
| memcpy(*ptr, (VkBlendOp*)&forMarshaling->colorBlendOp, sizeof(VkBlendOp)); |
| *ptr += sizeof(VkBlendOp); |
| memcpy(*ptr, (VkBlendFactor*)&forMarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor)); |
| *ptr += sizeof(VkBlendFactor); |
| memcpy(*ptr, (VkBlendFactor*)&forMarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor)); |
| *ptr += sizeof(VkBlendFactor); |
| memcpy(*ptr, (VkBlendOp*)&forMarshaling->alphaBlendOp, sizeof(VkBlendOp)); |
| *ptr += sizeof(VkBlendOp); |
| memcpy(*ptr, (VkColorComponentFlags*)&forMarshaling->colorWriteMask, |
| sizeof(VkColorComponentFlags)); |
| *ptr += sizeof(VkColorComponentFlags); |
| } |
| |
| void reservedmarshal_VkPipelineColorBlendStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineColorBlendStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineColorBlendStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineColorBlendStateCreateFlags)); |
| *ptr += sizeof(VkPipelineColorBlendStateCreateFlags); |
| memcpy(*ptr, (VkBool32*)&forMarshaling->logicOpEnable, sizeof(VkBool32)); |
| *ptr += sizeof(VkBool32); |
| memcpy(*ptr, (VkLogicOp*)&forMarshaling->logicOp, sizeof(VkLogicOp)); |
| *ptr += sizeof(VkLogicOp); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) { |
| reservedmarshal_VkPipelineColorBlendAttachmentState( |
| vkStream, rootType, |
| (const VkPipelineColorBlendAttachmentState*)(forMarshaling->pAttachments + i), ptr); |
| } |
| memcpy(*ptr, (float*)forMarshaling->blendConstants, 4 * sizeof(float)); |
| *ptr += 4 * sizeof(float); |
| } |
| |
| void reservedmarshal_VkPipelineDynamicStateCreateInfo( |
| VulkanStreamGuest* vkStream, VkStructureType rootType, |
| const VkPipelineDynamicStateCreateInfo* forMarshaling, uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineDynamicStateCreateFlags*)&forMarshaling->flags, |
| sizeof(VkPipelineDynamicStateCreateFlags)); |
| *ptr += sizeof(VkPipelineDynamicStateCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->dynamicStateCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| memcpy(*ptr, (const VkDynamicState*)forMarshaling->pDynamicStates, |
| forMarshaling->dynamicStateCount * sizeof(const VkDynamicState)); |
| *ptr += forMarshaling->dynamicStateCount * sizeof(const VkDynamicState); |
| } |
| |
| void reservedmarshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest* vkStream, |
| VkStructureType rootType, |
| const VkGraphicsPipelineCreateInfo* forMarshaling, |
| uint8_t** ptr) { |
| (void)vkStream; |
| (void)rootType; |
| uint32_t hasRasterization = 1; |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| hasRasterization = |
| (((0 == forMarshaling->pRasterizationState)) |
| ? (0) |
| : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable))); |
| uint32_t cgen_var_0 = (uint32_t)hasRasterization; |
| memcpy((*ptr), &cgen_var_0, 4); |
| android::base::Stream::toBe32((uint8_t*)(*ptr)); |
| *ptr += 4; |
| } |
| uint32_t hasTessellation = 1; |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| hasTessellation = |
| arrayany(forMarshaling->pStages, 0, forMarshaling->stageCount, |
| [](VkPipelineShaderStageCreateInfo s) { |
| return ((s.stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) || |
| (s.stage == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)); |
| }); |
| uint32_t cgen_var_0 = (uint32_t)hasTessellation; |
| memcpy((*ptr), &cgen_var_0, 4); |
| android::base::Stream::toBe32((uint8_t*)(*ptr)); |
| *ptr += 4; |
| } |
| memcpy(*ptr, (VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); |
| *ptr += sizeof(VkStructureType); |
| if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) { |
| rootType = forMarshaling->sType; |
| } |
| reservedmarshal_extension_struct(vkStream, rootType, forMarshaling->pNext, ptr); |
| memcpy(*ptr, (VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags)); |
| *ptr += sizeof(VkPipelineCreateFlags); |
| memcpy(*ptr, (uint32_t*)&forMarshaling->stageCount, sizeof(uint32_t)); |
| *ptr += sizeof(uint32_t); |
| for (uint32_t i = 0; i < (uint32_t)forMarshaling->stageCount; ++i) { |
| reservedmarshal_VkPipelineShaderStageCreateInfo( |
| vkStream, rootType, |
| (const VkPipelineShaderStageCreateInfo*)(forMarshaling->pStages + i), ptr); |
| } |
| // WARNING PTR CHECK |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pVertexInputState; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| } |
| if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| forMarshaling->pVertexInputState)) { |
| reservedmarshal_VkPipelineVertexInputStateCreateInfo( |
| vkStream, rootType, |
| (const VkPipelineVertexInputStateCreateInfo*)(forMarshaling->pVertexInputState), ptr); |
| } |
| // WARNING PTR CHECK |
| if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) { |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pInputAssemblyState; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| } |
| if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || |
| forMarshaling->pInputAssemblyState)) { |
| reservedmarshal_VkPipelineInputAssemblyStateCreateInfo( |
| vkStream, rootType, |
| (const VkPipelineInputAssemblyStateCreateInfo*)(forMarshaling->pInputAssemblyState), |
| ptr); |
| } |
| // WARNING PTR CHECK |
| uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pTessellationState; |
| memcpy((*ptr), &cgen_var_0, 8); |
| android::base::Stream::toBe64((uint8_t*)(*ptr)); |
| *ptr += 8; |
| if (forMarshaling->pTessellationState) { |
| if (hasTessellation) { |
| reservedmarshal_VkPipelineTessellationStateCreateInfo( |
| vkStream, rootType, |
| (const VkPipelineTessellationStateCreateInfo*)(forMarshaling->pTessellationState), |
| ptr); |
| } |
| } |
| // WARNING PTR CHECK |
| uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pViewportState; |
|