blob: 62fc0f01d7f28c0fabc164451a8e59b46fb4ccfb [file] [log] [blame]
// 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_deepcopy_guest
// (impl) generated by android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/genvk.py -registry android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/vk.xml cereal -o android/android-emugl/host/libs/libOpenglRender/vulkan/cereal
// Please do not modify directly;
// re-run android/scripts/generate-vulkan-sources.sh,
// or directly from Python by defining:
// VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml
// CEREAL_OUTPUT_DIR: Where to put the generated sources.
// python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR
#include "goldfish_vk_deepcopy_guest.h"
#include "goldfish_vk_extension_structs_guest.h"
#include "goldfish_vk_private_defs.h"
namespace goldfish_vk {
void deepcopy_extension_struct(
Pool* pool,
const void* structExtension,
void* structExtension_out);
#ifdef VK_VERSION_1_0
void deepcopy_VkApplicationInfo(
Pool* pool,
const VkApplicationInfo* from,
VkApplicationInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pApplicationName = nullptr;
if (from->pApplicationName)
{
to->pApplicationName = pool->strDup(from->pApplicationName);
}
to->pEngineName = nullptr;
if (from->pEngineName)
{
to->pEngineName = pool->strDup(from->pEngineName);
}
}
void deepcopy_VkInstanceCreateInfo(
Pool* pool,
const VkInstanceCreateInfo* from,
VkInstanceCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pApplicationInfo = nullptr;
if (from->pApplicationInfo)
{
to->pApplicationInfo = (VkApplicationInfo*)pool->alloc(sizeof(const VkApplicationInfo));
deepcopy_VkApplicationInfo(pool, from->pApplicationInfo, (VkApplicationInfo*)(to->pApplicationInfo));
}
to->ppEnabledLayerNames = nullptr;
if (from->ppEnabledLayerNames && from->enabledLayerCount)
{
to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
}
to->ppEnabledExtensionNames = nullptr;
if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
{
to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
}
}
void deepcopy_VkAllocationCallbacks(
Pool* pool,
const VkAllocationCallbacks* from,
VkAllocationCallbacks* to)
{
(void)pool;
*to = *from;
to->pUserData = nullptr;
if (from->pUserData)
{
to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
}
}
void deepcopy_VkPhysicalDeviceFeatures(
Pool* pool,
const VkPhysicalDeviceFeatures* from,
VkPhysicalDeviceFeatures* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkFormatProperties(
Pool* pool,
const VkFormatProperties* from,
VkFormatProperties* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkExtent3D(
Pool* pool,
const VkExtent3D* from,
VkExtent3D* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkImageFormatProperties(
Pool* pool,
const VkImageFormatProperties* from,
VkImageFormatProperties* to)
{
(void)pool;
*to = *from;
deepcopy_VkExtent3D(pool, &from->maxExtent, (VkExtent3D*)(&to->maxExtent));
}
void deepcopy_VkPhysicalDeviceLimits(
Pool* pool,
const VkPhysicalDeviceLimits* from,
VkPhysicalDeviceLimits* to)
{
(void)pool;
*to = *from;
memcpy(to->maxComputeWorkGroupCount, from->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
memcpy(to->maxComputeWorkGroupSize, from->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
memcpy(to->maxViewportDimensions, from->maxViewportDimensions, 2 * sizeof(uint32_t));
memcpy(to->viewportBoundsRange, from->viewportBoundsRange, 2 * sizeof(float));
memcpy(to->pointSizeRange, from->pointSizeRange, 2 * sizeof(float));
memcpy(to->lineWidthRange, from->lineWidthRange, 2 * sizeof(float));
}
void deepcopy_VkPhysicalDeviceSparseProperties(
Pool* pool,
const VkPhysicalDeviceSparseProperties* from,
VkPhysicalDeviceSparseProperties* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPhysicalDeviceProperties(
Pool* pool,
const VkPhysicalDeviceProperties* from,
VkPhysicalDeviceProperties* to)
{
(void)pool;
*to = *from;
memcpy(to->deviceName, from->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
memcpy(to->pipelineCacheUUID, from->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
deepcopy_VkPhysicalDeviceLimits(pool, &from->limits, (VkPhysicalDeviceLimits*)(&to->limits));
deepcopy_VkPhysicalDeviceSparseProperties(pool, &from->sparseProperties, (VkPhysicalDeviceSparseProperties*)(&to->sparseProperties));
}
void deepcopy_VkQueueFamilyProperties(
Pool* pool,
const VkQueueFamilyProperties* from,
VkQueueFamilyProperties* to)
{
(void)pool;
*to = *from;
deepcopy_VkExtent3D(pool, &from->minImageTransferGranularity, (VkExtent3D*)(&to->minImageTransferGranularity));
}
void deepcopy_VkMemoryType(
Pool* pool,
const VkMemoryType* from,
VkMemoryType* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkMemoryHeap(
Pool* pool,
const VkMemoryHeap* from,
VkMemoryHeap* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPhysicalDeviceMemoryProperties(
Pool* pool,
const VkPhysicalDeviceMemoryProperties* from,
VkPhysicalDeviceMemoryProperties* to)
{
(void)pool;
*to = *from;
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
{
deepcopy_VkMemoryType(pool, from->memoryTypes + i, (VkMemoryType*)(to->memoryTypes + i));
}
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
{
deepcopy_VkMemoryHeap(pool, from->memoryHeaps + i, (VkMemoryHeap*)(to->memoryHeaps + i));
}
}
void deepcopy_VkDeviceQueueCreateInfo(
Pool* pool,
const VkDeviceQueueCreateInfo* from,
VkDeviceQueueCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pQueuePriorities = nullptr;
if (from->pQueuePriorities)
{
to->pQueuePriorities = (float*)pool->dupArray(from->pQueuePriorities, from->queueCount * sizeof(const float));
}
}
void deepcopy_VkDeviceCreateInfo(
Pool* pool,
const VkDeviceCreateInfo* from,
VkDeviceCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pQueueCreateInfos = nullptr;
if (from->pQueueCreateInfos)
{
to->pQueueCreateInfos = (VkDeviceQueueCreateInfo*)pool->alloc(from->queueCreateInfoCount * sizeof(const VkDeviceQueueCreateInfo));
to->queueCreateInfoCount = from->queueCreateInfoCount;
for (uint32_t i = 0; i < (uint32_t)from->queueCreateInfoCount; ++i)
{
deepcopy_VkDeviceQueueCreateInfo(pool, from->pQueueCreateInfos + i, (VkDeviceQueueCreateInfo*)(to->pQueueCreateInfos + i));
}
}
to->ppEnabledLayerNames = nullptr;
if (from->ppEnabledLayerNames && from->enabledLayerCount)
{
to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
}
to->ppEnabledExtensionNames = nullptr;
if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
{
to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
}
to->pEnabledFeatures = nullptr;
if (from->pEnabledFeatures)
{
to->pEnabledFeatures = (VkPhysicalDeviceFeatures*)pool->alloc(sizeof(const VkPhysicalDeviceFeatures));
deepcopy_VkPhysicalDeviceFeatures(pool, from->pEnabledFeatures, (VkPhysicalDeviceFeatures*)(to->pEnabledFeatures));
}
}
void deepcopy_VkExtensionProperties(
Pool* pool,
const VkExtensionProperties* from,
VkExtensionProperties* to)
{
(void)pool;
*to = *from;
memcpy(to->extensionName, from->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
}
void deepcopy_VkLayerProperties(
Pool* pool,
const VkLayerProperties* from,
VkLayerProperties* to)
{
(void)pool;
*to = *from;
memcpy(to->layerName, from->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
}
void deepcopy_VkSubmitInfo(
Pool* pool,
const VkSubmitInfo* from,
VkSubmitInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pWaitSemaphores = nullptr;
if (from->pWaitSemaphores)
{
to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
}
to->pWaitDstStageMask = nullptr;
if (from->pWaitDstStageMask)
{
to->pWaitDstStageMask = (VkPipelineStageFlags*)pool->dupArray(from->pWaitDstStageMask, from->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
}
to->pCommandBuffers = nullptr;
if (from->pCommandBuffers)
{
to->pCommandBuffers = (VkCommandBuffer*)pool->dupArray(from->pCommandBuffers, from->commandBufferCount * sizeof(const VkCommandBuffer));
}
to->pSignalSemaphores = nullptr;
if (from->pSignalSemaphores)
{
to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
}
}
void deepcopy_VkMemoryAllocateInfo(
Pool* pool,
const VkMemoryAllocateInfo* from,
VkMemoryAllocateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMappedMemoryRange(
Pool* pool,
const VkMappedMemoryRange* from,
VkMappedMemoryRange* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMemoryRequirements(
Pool* pool,
const VkMemoryRequirements* from,
VkMemoryRequirements* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkSparseImageFormatProperties(
Pool* pool,
const VkSparseImageFormatProperties* from,
VkSparseImageFormatProperties* to)
{
(void)pool;
*to = *from;
deepcopy_VkExtent3D(pool, &from->imageGranularity, (VkExtent3D*)(&to->imageGranularity));
}
void deepcopy_VkSparseImageMemoryRequirements(
Pool* pool,
const VkSparseImageMemoryRequirements* from,
VkSparseImageMemoryRequirements* to)
{
(void)pool;
*to = *from;
deepcopy_VkSparseImageFormatProperties(pool, &from->formatProperties, (VkSparseImageFormatProperties*)(&to->formatProperties));
}
void deepcopy_VkSparseMemoryBind(
Pool* pool,
const VkSparseMemoryBind* from,
VkSparseMemoryBind* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkSparseBufferMemoryBindInfo(
Pool* pool,
const VkSparseBufferMemoryBindInfo* from,
VkSparseBufferMemoryBindInfo* to)
{
(void)pool;
*to = *from;
to->pBinds = nullptr;
if (from->pBinds)
{
to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
to->bindCount = from->bindCount;
for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
{
deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
}
}
}
void deepcopy_VkSparseImageOpaqueMemoryBindInfo(
Pool* pool,
const VkSparseImageOpaqueMemoryBindInfo* from,
VkSparseImageOpaqueMemoryBindInfo* to)
{
(void)pool;
*to = *from;
to->pBinds = nullptr;
if (from->pBinds)
{
to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
to->bindCount = from->bindCount;
for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
{
deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
}
}
}
void deepcopy_VkImageSubresource(
Pool* pool,
const VkImageSubresource* from,
VkImageSubresource* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkOffset3D(
Pool* pool,
const VkOffset3D* from,
VkOffset3D* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkSparseImageMemoryBind(
Pool* pool,
const VkSparseImageMemoryBind* from,
VkSparseImageMemoryBind* to)
{
(void)pool;
*to = *from;
deepcopy_VkImageSubresource(pool, &from->subresource, (VkImageSubresource*)(&to->subresource));
deepcopy_VkOffset3D(pool, &from->offset, (VkOffset3D*)(&to->offset));
deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
}
void deepcopy_VkSparseImageMemoryBindInfo(
Pool* pool,
const VkSparseImageMemoryBindInfo* from,
VkSparseImageMemoryBindInfo* to)
{
(void)pool;
*to = *from;
to->pBinds = nullptr;
if (from->pBinds)
{
to->pBinds = (VkSparseImageMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseImageMemoryBind));
to->bindCount = from->bindCount;
for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
{
deepcopy_VkSparseImageMemoryBind(pool, from->pBinds + i, (VkSparseImageMemoryBind*)(to->pBinds + i));
}
}
}
void deepcopy_VkBindSparseInfo(
Pool* pool,
const VkBindSparseInfo* from,
VkBindSparseInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pWaitSemaphores = nullptr;
if (from->pWaitSemaphores)
{
to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
}
to->pBufferBinds = nullptr;
if (from->pBufferBinds)
{
to->pBufferBinds = (VkSparseBufferMemoryBindInfo*)pool->alloc(from->bufferBindCount * sizeof(const VkSparseBufferMemoryBindInfo));
to->bufferBindCount = from->bufferBindCount;
for (uint32_t i = 0; i < (uint32_t)from->bufferBindCount; ++i)
{
deepcopy_VkSparseBufferMemoryBindInfo(pool, from->pBufferBinds + i, (VkSparseBufferMemoryBindInfo*)(to->pBufferBinds + i));
}
}
to->pImageOpaqueBinds = nullptr;
if (from->pImageOpaqueBinds)
{
to->pImageOpaqueBinds = (VkSparseImageOpaqueMemoryBindInfo*)pool->alloc(from->imageOpaqueBindCount * sizeof(const VkSparseImageOpaqueMemoryBindInfo));
to->imageOpaqueBindCount = from->imageOpaqueBindCount;
for (uint32_t i = 0; i < (uint32_t)from->imageOpaqueBindCount; ++i)
{
deepcopy_VkSparseImageOpaqueMemoryBindInfo(pool, from->pImageOpaqueBinds + i, (VkSparseImageOpaqueMemoryBindInfo*)(to->pImageOpaqueBinds + i));
}
}
to->pImageBinds = nullptr;
if (from->pImageBinds)
{
to->pImageBinds = (VkSparseImageMemoryBindInfo*)pool->alloc(from->imageBindCount * sizeof(const VkSparseImageMemoryBindInfo));
to->imageBindCount = from->imageBindCount;
for (uint32_t i = 0; i < (uint32_t)from->imageBindCount; ++i)
{
deepcopy_VkSparseImageMemoryBindInfo(pool, from->pImageBinds + i, (VkSparseImageMemoryBindInfo*)(to->pImageBinds + i));
}
}
to->pSignalSemaphores = nullptr;
if (from->pSignalSemaphores)
{
to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
}
}
void deepcopy_VkFenceCreateInfo(
Pool* pool,
const VkFenceCreateInfo* from,
VkFenceCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkSemaphoreCreateInfo(
Pool* pool,
const VkSemaphoreCreateInfo* from,
VkSemaphoreCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkEventCreateInfo(
Pool* pool,
const VkEventCreateInfo* from,
VkEventCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkQueryPoolCreateInfo(
Pool* pool,
const VkQueryPoolCreateInfo* from,
VkQueryPoolCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBufferCreateInfo(
Pool* pool,
const VkBufferCreateInfo* from,
VkBufferCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pQueueFamilyIndices = nullptr;
if (from->pQueueFamilyIndices)
{
to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
}
}
void deepcopy_VkBufferViewCreateInfo(
Pool* pool,
const VkBufferViewCreateInfo* from,
VkBufferViewCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkImageCreateInfo(
Pool* pool,
const VkImageCreateInfo* from,
VkImageCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
to->pQueueFamilyIndices = nullptr;
if (from->pQueueFamilyIndices)
{
to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
}
}
void deepcopy_VkSubresourceLayout(
Pool* pool,
const VkSubresourceLayout* from,
VkSubresourceLayout* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkComponentMapping(
Pool* pool,
const VkComponentMapping* from,
VkComponentMapping* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkImageSubresourceRange(
Pool* pool,
const VkImageSubresourceRange* from,
VkImageSubresourceRange* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkImageViewCreateInfo(
Pool* pool,
const VkImageViewCreateInfo* from,
VkImageViewCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkComponentMapping(pool, &from->components, (VkComponentMapping*)(&to->components));
deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
}
void deepcopy_VkShaderModuleCreateInfo(
Pool* pool,
const VkShaderModuleCreateInfo* from,
VkShaderModuleCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pCode = nullptr;
if (from->pCode)
{
to->pCode = (uint32_t*)pool->dupArray(from->pCode, (from->codeSize / 4) * sizeof(const uint32_t));
}
}
void deepcopy_VkPipelineCacheCreateInfo(
Pool* pool,
const VkPipelineCacheCreateInfo* from,
VkPipelineCacheCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pInitialData = nullptr;
if (from->pInitialData)
{
to->pInitialData = (void*)pool->dupArray(from->pInitialData, from->initialDataSize * sizeof(const uint8_t));
}
}
void deepcopy_VkSpecializationMapEntry(
Pool* pool,
const VkSpecializationMapEntry* from,
VkSpecializationMapEntry* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkSpecializationInfo(
Pool* pool,
const VkSpecializationInfo* from,
VkSpecializationInfo* to)
{
(void)pool;
*to = *from;
to->pMapEntries = nullptr;
if (from->pMapEntries)
{
to->pMapEntries = (VkSpecializationMapEntry*)pool->alloc(from->mapEntryCount * sizeof(const VkSpecializationMapEntry));
to->mapEntryCount = from->mapEntryCount;
for (uint32_t i = 0; i < (uint32_t)from->mapEntryCount; ++i)
{
deepcopy_VkSpecializationMapEntry(pool, from->pMapEntries + i, (VkSpecializationMapEntry*)(to->pMapEntries + i));
}
}
to->pData = nullptr;
if (from->pData)
{
to->pData = (void*)pool->dupArray(from->pData, from->dataSize * sizeof(const uint8_t));
}
}
void deepcopy_VkPipelineShaderStageCreateInfo(
Pool* pool,
const VkPipelineShaderStageCreateInfo* from,
VkPipelineShaderStageCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pName = nullptr;
if (from->pName)
{
to->pName = pool->strDup(from->pName);
}
to->pSpecializationInfo = nullptr;
if (from->pSpecializationInfo)
{
to->pSpecializationInfo = (VkSpecializationInfo*)pool->alloc(sizeof(const VkSpecializationInfo));
deepcopy_VkSpecializationInfo(pool, from->pSpecializationInfo, (VkSpecializationInfo*)(to->pSpecializationInfo));
}
}
void deepcopy_VkVertexInputBindingDescription(
Pool* pool,
const VkVertexInputBindingDescription* from,
VkVertexInputBindingDescription* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkVertexInputAttributeDescription(
Pool* pool,
const VkVertexInputAttributeDescription* from,
VkVertexInputAttributeDescription* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPipelineVertexInputStateCreateInfo(
Pool* pool,
const VkPipelineVertexInputStateCreateInfo* from,
VkPipelineVertexInputStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pVertexBindingDescriptions = nullptr;
if (from->pVertexBindingDescriptions)
{
to->pVertexBindingDescriptions = (VkVertexInputBindingDescription*)pool->alloc(from->vertexBindingDescriptionCount * sizeof(const VkVertexInputBindingDescription));
to->vertexBindingDescriptionCount = from->vertexBindingDescriptionCount;
for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDescriptionCount; ++i)
{
deepcopy_VkVertexInputBindingDescription(pool, from->pVertexBindingDescriptions + i, (VkVertexInputBindingDescription*)(to->pVertexBindingDescriptions + i));
}
}
to->pVertexAttributeDescriptions = nullptr;
if (from->pVertexAttributeDescriptions)
{
to->pVertexAttributeDescriptions = (VkVertexInputAttributeDescription*)pool->alloc(from->vertexAttributeDescriptionCount * sizeof(const VkVertexInputAttributeDescription));
to->vertexAttributeDescriptionCount = from->vertexAttributeDescriptionCount;
for (uint32_t i = 0; i < (uint32_t)from->vertexAttributeDescriptionCount; ++i)
{
deepcopy_VkVertexInputAttributeDescription(pool, from->pVertexAttributeDescriptions + i, (VkVertexInputAttributeDescription*)(to->pVertexAttributeDescriptions + i));
}
}
}
void deepcopy_VkPipelineInputAssemblyStateCreateInfo(
Pool* pool,
const VkPipelineInputAssemblyStateCreateInfo* from,
VkPipelineInputAssemblyStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkPipelineTessellationStateCreateInfo(
Pool* pool,
const VkPipelineTessellationStateCreateInfo* from,
VkPipelineTessellationStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkViewport(
Pool* pool,
const VkViewport* from,
VkViewport* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkOffset2D(
Pool* pool,
const VkOffset2D* from,
VkOffset2D* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkExtent2D(
Pool* pool,
const VkExtent2D* from,
VkExtent2D* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkRect2D(
Pool* pool,
const VkRect2D* from,
VkRect2D* to)
{
(void)pool;
*to = *from;
deepcopy_VkOffset2D(pool, &from->offset, (VkOffset2D*)(&to->offset));
deepcopy_VkExtent2D(pool, &from->extent, (VkExtent2D*)(&to->extent));
}
void deepcopy_VkPipelineViewportStateCreateInfo(
Pool* pool,
const VkPipelineViewportStateCreateInfo* from,
VkPipelineViewportStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pViewports = nullptr;
if (from->pViewports)
{
to->pViewports = (VkViewport*)pool->alloc(from->viewportCount * sizeof(const VkViewport));
to->viewportCount = from->viewportCount;
for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
{
deepcopy_VkViewport(pool, from->pViewports + i, (VkViewport*)(to->pViewports + i));
}
}
to->pScissors = nullptr;
if (from->pScissors)
{
to->pScissors = (VkRect2D*)pool->alloc(from->scissorCount * sizeof(const VkRect2D));
to->scissorCount = from->scissorCount;
for (uint32_t i = 0; i < (uint32_t)from->scissorCount; ++i)
{
deepcopy_VkRect2D(pool, from->pScissors + i, (VkRect2D*)(to->pScissors + i));
}
}
}
void deepcopy_VkPipelineRasterizationStateCreateInfo(
Pool* pool,
const VkPipelineRasterizationStateCreateInfo* from,
VkPipelineRasterizationStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkPipelineMultisampleStateCreateInfo(
Pool* pool,
const VkPipelineMultisampleStateCreateInfo* from,
VkPipelineMultisampleStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pSampleMask = nullptr;
if (from->pSampleMask)
{
to->pSampleMask = (VkSampleMask*)pool->dupArray(from->pSampleMask, (((from->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
}
}
void deepcopy_VkStencilOpState(
Pool* pool,
const VkStencilOpState* from,
VkStencilOpState* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPipelineDepthStencilStateCreateInfo(
Pool* pool,
const VkPipelineDepthStencilStateCreateInfo* from,
VkPipelineDepthStencilStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkStencilOpState(pool, &from->front, (VkStencilOpState*)(&to->front));
deepcopy_VkStencilOpState(pool, &from->back, (VkStencilOpState*)(&to->back));
}
void deepcopy_VkPipelineColorBlendAttachmentState(
Pool* pool,
const VkPipelineColorBlendAttachmentState* from,
VkPipelineColorBlendAttachmentState* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPipelineColorBlendStateCreateInfo(
Pool* pool,
const VkPipelineColorBlendStateCreateInfo* from,
VkPipelineColorBlendStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pAttachments = nullptr;
if (from->pAttachments)
{
to->pAttachments = (VkPipelineColorBlendAttachmentState*)pool->alloc(from->attachmentCount * sizeof(const VkPipelineColorBlendAttachmentState));
to->attachmentCount = from->attachmentCount;
for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
{
deepcopy_VkPipelineColorBlendAttachmentState(pool, from->pAttachments + i, (VkPipelineColorBlendAttachmentState*)(to->pAttachments + i));
}
}
memcpy(to->blendConstants, from->blendConstants, 4 * sizeof(float));
}
void deepcopy_VkPipelineDynamicStateCreateInfo(
Pool* pool,
const VkPipelineDynamicStateCreateInfo* from,
VkPipelineDynamicStateCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pDynamicStates = nullptr;
if (from->pDynamicStates)
{
to->pDynamicStates = (VkDynamicState*)pool->dupArray(from->pDynamicStates, from->dynamicStateCount * sizeof(const VkDynamicState));
}
}
void deepcopy_VkGraphicsPipelineCreateInfo(
Pool* pool,
const VkGraphicsPipelineCreateInfo* from,
VkGraphicsPipelineCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pStages = nullptr;
if (from->pStages)
{
to->pStages = (VkPipelineShaderStageCreateInfo*)pool->alloc(from->stageCount * sizeof(const VkPipelineShaderStageCreateInfo));
to->stageCount = from->stageCount;
for (uint32_t i = 0; i < (uint32_t)from->stageCount; ++i)
{
deepcopy_VkPipelineShaderStageCreateInfo(pool, from->pStages + i, (VkPipelineShaderStageCreateInfo*)(to->pStages + i));
}
}
to->pVertexInputState = nullptr;
if (from->pVertexInputState)
{
to->pVertexInputState = (VkPipelineVertexInputStateCreateInfo*)pool->alloc(sizeof(const VkPipelineVertexInputStateCreateInfo));
deepcopy_VkPipelineVertexInputStateCreateInfo(pool, from->pVertexInputState, (VkPipelineVertexInputStateCreateInfo*)(to->pVertexInputState));
}
to->pInputAssemblyState = nullptr;
if (from->pInputAssemblyState)
{
to->pInputAssemblyState = (VkPipelineInputAssemblyStateCreateInfo*)pool->alloc(sizeof(const VkPipelineInputAssemblyStateCreateInfo));
deepcopy_VkPipelineInputAssemblyStateCreateInfo(pool, from->pInputAssemblyState, (VkPipelineInputAssemblyStateCreateInfo*)(to->pInputAssemblyState));
}
to->pTessellationState = nullptr;
if (from->pTessellationState)
{
to->pTessellationState = (VkPipelineTessellationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineTessellationStateCreateInfo));
deepcopy_VkPipelineTessellationStateCreateInfo(pool, from->pTessellationState, (VkPipelineTessellationStateCreateInfo*)(to->pTessellationState));
}
to->pViewportState = nullptr;
if (from->pViewportState)
{
to->pViewportState = (VkPipelineViewportStateCreateInfo*)pool->alloc(sizeof(const VkPipelineViewportStateCreateInfo));
deepcopy_VkPipelineViewportStateCreateInfo(pool, from->pViewportState, (VkPipelineViewportStateCreateInfo*)(to->pViewportState));
}
to->pRasterizationState = nullptr;
if (from->pRasterizationState)
{
to->pRasterizationState = (VkPipelineRasterizationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineRasterizationStateCreateInfo));
deepcopy_VkPipelineRasterizationStateCreateInfo(pool, from->pRasterizationState, (VkPipelineRasterizationStateCreateInfo*)(to->pRasterizationState));
}
to->pMultisampleState = nullptr;
if (from->pMultisampleState)
{
to->pMultisampleState = (VkPipelineMultisampleStateCreateInfo*)pool->alloc(sizeof(const VkPipelineMultisampleStateCreateInfo));
deepcopy_VkPipelineMultisampleStateCreateInfo(pool, from->pMultisampleState, (VkPipelineMultisampleStateCreateInfo*)(to->pMultisampleState));
}
to->pDepthStencilState = nullptr;
if (from->pDepthStencilState)
{
to->pDepthStencilState = (VkPipelineDepthStencilStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDepthStencilStateCreateInfo));
deepcopy_VkPipelineDepthStencilStateCreateInfo(pool, from->pDepthStencilState, (VkPipelineDepthStencilStateCreateInfo*)(to->pDepthStencilState));
}
to->pColorBlendState = nullptr;
if (from->pColorBlendState)
{
to->pColorBlendState = (VkPipelineColorBlendStateCreateInfo*)pool->alloc(sizeof(const VkPipelineColorBlendStateCreateInfo));
deepcopy_VkPipelineColorBlendStateCreateInfo(pool, from->pColorBlendState, (VkPipelineColorBlendStateCreateInfo*)(to->pColorBlendState));
}
to->pDynamicState = nullptr;
if (from->pDynamicState)
{
to->pDynamicState = (VkPipelineDynamicStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDynamicStateCreateInfo));
deepcopy_VkPipelineDynamicStateCreateInfo(pool, from->pDynamicState, (VkPipelineDynamicStateCreateInfo*)(to->pDynamicState));
}
}
void deepcopy_VkComputePipelineCreateInfo(
Pool* pool,
const VkComputePipelineCreateInfo* from,
VkComputePipelineCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkPipelineShaderStageCreateInfo(pool, &from->stage, (VkPipelineShaderStageCreateInfo*)(&to->stage));
}
void deepcopy_VkPushConstantRange(
Pool* pool,
const VkPushConstantRange* from,
VkPushConstantRange* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkPipelineLayoutCreateInfo(
Pool* pool,
const VkPipelineLayoutCreateInfo* from,
VkPipelineLayoutCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pSetLayouts = nullptr;
if (from->pSetLayouts)
{
to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->setLayoutCount * sizeof(const VkDescriptorSetLayout));
}
to->pPushConstantRanges = nullptr;
if (from->pPushConstantRanges)
{
to->pPushConstantRanges = (VkPushConstantRange*)pool->alloc(from->pushConstantRangeCount * sizeof(const VkPushConstantRange));
to->pushConstantRangeCount = from->pushConstantRangeCount;
for (uint32_t i = 0; i < (uint32_t)from->pushConstantRangeCount; ++i)
{
deepcopy_VkPushConstantRange(pool, from->pPushConstantRanges + i, (VkPushConstantRange*)(to->pPushConstantRanges + i));
}
}
}
void deepcopy_VkSamplerCreateInfo(
Pool* pool,
const VkSamplerCreateInfo* from,
VkSamplerCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkDescriptorSetLayoutBinding(
Pool* pool,
const VkDescriptorSetLayoutBinding* from,
VkDescriptorSetLayoutBinding* to)
{
(void)pool;
*to = *from;
to->pImmutableSamplers = nullptr;
if (from->pImmutableSamplers)
{
to->pImmutableSamplers = (VkSampler*)pool->dupArray(from->pImmutableSamplers, from->descriptorCount * sizeof(const VkSampler));
}
}
void deepcopy_VkDescriptorSetLayoutCreateInfo(
Pool* pool,
const VkDescriptorSetLayoutCreateInfo* from,
VkDescriptorSetLayoutCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pBindings = nullptr;
if (from->pBindings)
{
to->pBindings = (VkDescriptorSetLayoutBinding*)pool->alloc(from->bindingCount * sizeof(const VkDescriptorSetLayoutBinding));
to->bindingCount = from->bindingCount;
for (uint32_t i = 0; i < (uint32_t)from->bindingCount; ++i)
{
deepcopy_VkDescriptorSetLayoutBinding(pool, from->pBindings + i, (VkDescriptorSetLayoutBinding*)(to->pBindings + i));
}
}
}
void deepcopy_VkDescriptorPoolSize(
Pool* pool,
const VkDescriptorPoolSize* from,
VkDescriptorPoolSize* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkDescriptorPoolCreateInfo(
Pool* pool,
const VkDescriptorPoolCreateInfo* from,
VkDescriptorPoolCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pPoolSizes = nullptr;
if (from->pPoolSizes)
{
to->pPoolSizes = (VkDescriptorPoolSize*)pool->alloc(from->poolSizeCount * sizeof(const VkDescriptorPoolSize));
to->poolSizeCount = from->poolSizeCount;
for (uint32_t i = 0; i < (uint32_t)from->poolSizeCount; ++i)
{
deepcopy_VkDescriptorPoolSize(pool, from->pPoolSizes + i, (VkDescriptorPoolSize*)(to->pPoolSizes + i));
}
}
}
void deepcopy_VkDescriptorSetAllocateInfo(
Pool* pool,
const VkDescriptorSetAllocateInfo* from,
VkDescriptorSetAllocateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pSetLayouts = nullptr;
if (from->pSetLayouts)
{
to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->descriptorSetCount * sizeof(const VkDescriptorSetLayout));
}
}
void deepcopy_VkDescriptorImageInfo(
Pool* pool,
const VkDescriptorImageInfo* from,
VkDescriptorImageInfo* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkDescriptorBufferInfo(
Pool* pool,
const VkDescriptorBufferInfo* from,
VkDescriptorBufferInfo* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkWriteDescriptorSet(
Pool* pool,
const VkWriteDescriptorSet* from,
VkWriteDescriptorSet* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pImageInfo = nullptr;
if (from->pImageInfo)
{
to->pImageInfo = (VkDescriptorImageInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorImageInfo));
to->descriptorCount = from->descriptorCount;
for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
{
deepcopy_VkDescriptorImageInfo(pool, from->pImageInfo + i, (VkDescriptorImageInfo*)(to->pImageInfo + i));
}
}
to->pBufferInfo = nullptr;
if (from->pBufferInfo)
{
to->pBufferInfo = (VkDescriptorBufferInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorBufferInfo));
to->descriptorCount = from->descriptorCount;
for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
{
deepcopy_VkDescriptorBufferInfo(pool, from->pBufferInfo + i, (VkDescriptorBufferInfo*)(to->pBufferInfo + i));
}
}
to->pTexelBufferView = nullptr;
if (from->pTexelBufferView)
{
to->pTexelBufferView = (VkBufferView*)pool->dupArray(from->pTexelBufferView, from->descriptorCount * sizeof(const VkBufferView));
}
}
void deepcopy_VkCopyDescriptorSet(
Pool* pool,
const VkCopyDescriptorSet* from,
VkCopyDescriptorSet* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkFramebufferCreateInfo(
Pool* pool,
const VkFramebufferCreateInfo* from,
VkFramebufferCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pAttachments = nullptr;
if (from->pAttachments)
{
to->pAttachments = (VkImageView*)pool->dupArray(from->pAttachments, from->attachmentCount * sizeof(const VkImageView));
}
}
void deepcopy_VkAttachmentDescription(
Pool* pool,
const VkAttachmentDescription* from,
VkAttachmentDescription* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkAttachmentReference(
Pool* pool,
const VkAttachmentReference* from,
VkAttachmentReference* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkSubpassDescription(
Pool* pool,
const VkSubpassDescription* from,
VkSubpassDescription* to)
{
(void)pool;
*to = *from;
to->pInputAttachments = nullptr;
if (from->pInputAttachments)
{
to->pInputAttachments = (VkAttachmentReference*)pool->alloc(from->inputAttachmentCount * sizeof(const VkAttachmentReference));
to->inputAttachmentCount = from->inputAttachmentCount;
for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i)
{
deepcopy_VkAttachmentReference(pool, from->pInputAttachments + i, (VkAttachmentReference*)(to->pInputAttachments + i));
}
}
to->pColorAttachments = nullptr;
if (from->pColorAttachments)
{
to->pColorAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
to->colorAttachmentCount = from->colorAttachmentCount;
for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
{
deepcopy_VkAttachmentReference(pool, from->pColorAttachments + i, (VkAttachmentReference*)(to->pColorAttachments + i));
}
}
to->pResolveAttachments = nullptr;
if (from->pResolveAttachments)
{
to->pResolveAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
to->colorAttachmentCount = from->colorAttachmentCount;
for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
{
deepcopy_VkAttachmentReference(pool, from->pResolveAttachments + i, (VkAttachmentReference*)(to->pResolveAttachments + i));
}
}
to->pDepthStencilAttachment = nullptr;
if (from->pDepthStencilAttachment)
{
to->pDepthStencilAttachment = (VkAttachmentReference*)pool->alloc(sizeof(const VkAttachmentReference));
deepcopy_VkAttachmentReference(pool, from->pDepthStencilAttachment, (VkAttachmentReference*)(to->pDepthStencilAttachment));
}
to->pPreserveAttachments = nullptr;
if (from->pPreserveAttachments)
{
to->pPreserveAttachments = (uint32_t*)pool->dupArray(from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
}
}
void deepcopy_VkSubpassDependency(
Pool* pool,
const VkSubpassDependency* from,
VkSubpassDependency* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkRenderPassCreateInfo(
Pool* pool,
const VkRenderPassCreateInfo* from,
VkRenderPassCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pAttachments = nullptr;
if (from->pAttachments)
{
to->pAttachments = (VkAttachmentDescription*)pool->alloc(from->attachmentCount * sizeof(const VkAttachmentDescription));
to->attachmentCount = from->attachmentCount;
for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
{
deepcopy_VkAttachmentDescription(pool, from->pAttachments + i, (VkAttachmentDescription*)(to->pAttachments + i));
}
}
to->pSubpasses = nullptr;
if (from->pSubpasses)
{
to->pSubpasses = (VkSubpassDescription*)pool->alloc(from->subpassCount * sizeof(const VkSubpassDescription));
to->subpassCount = from->subpassCount;
for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i)
{
deepcopy_VkSubpassDescription(pool, from->pSubpasses + i, (VkSubpassDescription*)(to->pSubpasses + i));
}
}
to->pDependencies = nullptr;
if (from->pDependencies)
{
to->pDependencies = (VkSubpassDependency*)pool->alloc(from->dependencyCount * sizeof(const VkSubpassDependency));
to->dependencyCount = from->dependencyCount;
for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i)
{
deepcopy_VkSubpassDependency(pool, from->pDependencies + i, (VkSubpassDependency*)(to->pDependencies + i));
}
}
}
void deepcopy_VkCommandPoolCreateInfo(
Pool* pool,
const VkCommandPoolCreateInfo* from,
VkCommandPoolCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkCommandBufferAllocateInfo(
Pool* pool,
const VkCommandBufferAllocateInfo* from,
VkCommandBufferAllocateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkCommandBufferInheritanceInfo(
Pool* pool,
const VkCommandBufferInheritanceInfo* from,
VkCommandBufferInheritanceInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkCommandBufferBeginInfo(
Pool* pool,
const VkCommandBufferBeginInfo* from,
VkCommandBufferBeginInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pInheritanceInfo = nullptr;
if (from->pInheritanceInfo)
{
to->pInheritanceInfo = (VkCommandBufferInheritanceInfo*)pool->alloc(sizeof(const VkCommandBufferInheritanceInfo));
deepcopy_VkCommandBufferInheritanceInfo(pool, from->pInheritanceInfo, (VkCommandBufferInheritanceInfo*)(to->pInheritanceInfo));
}
}
void deepcopy_VkBufferCopy(
Pool* pool,
const VkBufferCopy* from,
VkBufferCopy* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkImageSubresourceLayers(
Pool* pool,
const VkImageSubresourceLayers* from,
VkImageSubresourceLayers* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkImageCopy(
Pool* pool,
const VkImageCopy* from,
VkImageCopy* to)
{
(void)pool;
*to = *from;
deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
}
void deepcopy_VkImageBlit(
Pool* pool,
const VkImageBlit* from,
VkImageBlit* to)
{
(void)pool;
*to = *from;
deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i)
{
deepcopy_VkOffset3D(pool, from->srcOffsets + i, (VkOffset3D*)(to->srcOffsets + i));
}
deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i)
{
deepcopy_VkOffset3D(pool, from->dstOffsets + i, (VkOffset3D*)(to->dstOffsets + i));
}
}
void deepcopy_VkBufferImageCopy(
Pool* pool,
const VkBufferImageCopy* from,
VkBufferImageCopy* to)
{
(void)pool;
*to = *from;
deepcopy_VkImageSubresourceLayers(pool, &from->imageSubresource, (VkImageSubresourceLayers*)(&to->imageSubresource));
deepcopy_VkOffset3D(pool, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
deepcopy_VkExtent3D(pool, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
}
void deepcopy_VkClearColorValue(
Pool* pool,
const VkClearColorValue* from,
VkClearColorValue* to)
{
(void)pool;
*to = *from;
memcpy(to->float32, from->float32, 4 * sizeof(float));
memcpy(to->int32, from->int32, 4 * sizeof(int32_t));
memcpy(to->uint32, from->uint32, 4 * sizeof(uint32_t));
}
void deepcopy_VkClearDepthStencilValue(
Pool* pool,
const VkClearDepthStencilValue* from,
VkClearDepthStencilValue* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkClearValue(
Pool* pool,
const VkClearValue* from,
VkClearValue* to)
{
(void)pool;
*to = *from;
deepcopy_VkClearColorValue(pool, &from->color, (VkClearColorValue*)(&to->color));
deepcopy_VkClearDepthStencilValue(pool, &from->depthStencil, (VkClearDepthStencilValue*)(&to->depthStencil));
}
void deepcopy_VkClearAttachment(
Pool* pool,
const VkClearAttachment* from,
VkClearAttachment* to)
{
(void)pool;
*to = *from;
deepcopy_VkClearValue(pool, &from->clearValue, (VkClearValue*)(&to->clearValue));
}
void deepcopy_VkClearRect(
Pool* pool,
const VkClearRect* from,
VkClearRect* to)
{
(void)pool;
*to = *from;
deepcopy_VkRect2D(pool, &from->rect, (VkRect2D*)(&to->rect));
}
void deepcopy_VkImageResolve(
Pool* pool,
const VkImageResolve* from,
VkImageResolve* to)
{
(void)pool;
*to = *from;
deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
}
void deepcopy_VkMemoryBarrier(
Pool* pool,
const VkMemoryBarrier* from,
VkMemoryBarrier* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBufferMemoryBarrier(
Pool* pool,
const VkBufferMemoryBarrier* from,
VkBufferMemoryBarrier* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkImageMemoryBarrier(
Pool* pool,
const VkImageMemoryBarrier* from,
VkImageMemoryBarrier* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
}
void deepcopy_VkRenderPassBeginInfo(
Pool* pool,
const VkRenderPassBeginInfo* from,
VkRenderPassBeginInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkRect2D(pool, &from->renderArea, (VkRect2D*)(&to->renderArea));
to->pClearValues = nullptr;
if (from->pClearValues)
{
to->pClearValues = (VkClearValue*)pool->alloc(from->clearValueCount * sizeof(const VkClearValue));
to->clearValueCount = from->clearValueCount;
for (uint32_t i = 0; i < (uint32_t)from->clearValueCount; ++i)
{
deepcopy_VkClearValue(pool, from->pClearValues + i, (VkClearValue*)(to->pClearValues + i));
}
}
}
void deepcopy_VkDispatchIndirectCommand(
Pool* pool,
const VkDispatchIndirectCommand* from,
VkDispatchIndirectCommand* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkDrawIndexedIndirectCommand(
Pool* pool,
const VkDrawIndexedIndirectCommand* from,
VkDrawIndexedIndirectCommand* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkDrawIndirectCommand(
Pool* pool,
const VkDrawIndirectCommand* from,
VkDrawIndirectCommand* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkBaseOutStructure(
Pool* pool,
const VkBaseOutStructure* from,
VkBaseOutStructure* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (VkBaseOutStructure*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBaseInStructure(
Pool* pool,
const VkBaseInStructure* from,
VkBaseInStructure* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const VkBaseInStructure*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
#endif
#ifdef VK_VERSION_1_1
void deepcopy_VkPhysicalDeviceSubgroupProperties(
Pool* pool,
const VkPhysicalDeviceSubgroupProperties* from,
VkPhysicalDeviceSubgroupProperties* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBindBufferMemoryInfo(
Pool* pool,
const VkBindBufferMemoryInfo* from,
VkBindBufferMemoryInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBindImageMemoryInfo(
Pool* pool,
const VkBindImageMemoryInfo* from,
VkBindImageMemoryInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkPhysicalDevice16BitStorageFeatures(
Pool* pool,
const VkPhysicalDevice16BitStorageFeatures* from,
VkPhysicalDevice16BitStorageFeatures* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMemoryDedicatedRequirements(
Pool* pool,
const VkMemoryDedicatedRequirements* from,
VkMemoryDedicatedRequirements* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMemoryDedicatedAllocateInfo(
Pool* pool,
const VkMemoryDedicatedAllocateInfo* from,
VkMemoryDedicatedAllocateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMemoryAllocateFlagsInfo(
Pool* pool,
const VkMemoryAllocateFlagsInfo* from,
VkMemoryAllocateFlagsInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkDeviceGroupRenderPassBeginInfo(
Pool* pool,
const VkDeviceGroupRenderPassBeginInfo* from,
VkDeviceGroupRenderPassBeginInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pDeviceRenderAreas = nullptr;
if (from->pDeviceRenderAreas)
{
to->pDeviceRenderAreas = (VkRect2D*)pool->alloc(from->deviceRenderAreaCount * sizeof(const VkRect2D));
to->deviceRenderAreaCount = from->deviceRenderAreaCount;
for (uint32_t i = 0; i < (uint32_t)from->deviceRenderAreaCount; ++i)
{
deepcopy_VkRect2D(pool, from->pDeviceRenderAreas + i, (VkRect2D*)(to->pDeviceRenderAreas + i));
}
}
}
void deepcopy_VkDeviceGroupCommandBufferBeginInfo(
Pool* pool,
const VkDeviceGroupCommandBufferBeginInfo* from,
VkDeviceGroupCommandBufferBeginInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkDeviceGroupSubmitInfo(
Pool* pool,
const VkDeviceGroupSubmitInfo* from,
VkDeviceGroupSubmitInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pWaitSemaphoreDeviceIndices = nullptr;
if (from->pWaitSemaphoreDeviceIndices)
{
to->pWaitSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pWaitSemaphoreDeviceIndices, from->waitSemaphoreCount * sizeof(const uint32_t));
}
to->pCommandBufferDeviceMasks = nullptr;
if (from->pCommandBufferDeviceMasks)
{
to->pCommandBufferDeviceMasks = (uint32_t*)pool->dupArray(from->pCommandBufferDeviceMasks, from->commandBufferCount * sizeof(const uint32_t));
}
to->pSignalSemaphoreDeviceIndices = nullptr;
if (from->pSignalSemaphoreDeviceIndices)
{
to->pSignalSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pSignalSemaphoreDeviceIndices, from->signalSemaphoreCount * sizeof(const uint32_t));
}
}
void deepcopy_VkDeviceGroupBindSparseInfo(
Pool* pool,
const VkDeviceGroupBindSparseInfo* from,
VkDeviceGroupBindSparseInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkBindBufferMemoryDeviceGroupInfo(
Pool* pool,
const VkBindBufferMemoryDeviceGroupInfo* from,
VkBindBufferMemoryDeviceGroupInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pDeviceIndices = nullptr;
if (from->pDeviceIndices)
{
to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
}
}
void deepcopy_VkBindImageMemoryDeviceGroupInfo(
Pool* pool,
const VkBindImageMemoryDeviceGroupInfo* from,
VkBindImageMemoryDeviceGroupInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pDeviceIndices = nullptr;
if (from->pDeviceIndices)
{
to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
}
to->pSplitInstanceBindRegions = nullptr;
if (from->pSplitInstanceBindRegions)
{
to->pSplitInstanceBindRegions = (VkRect2D*)pool->alloc(from->splitInstanceBindRegionCount * sizeof(const VkRect2D));
to->splitInstanceBindRegionCount = from->splitInstanceBindRegionCount;
for (uint32_t i = 0; i < (uint32_t)from->splitInstanceBindRegionCount; ++i)
{
deepcopy_VkRect2D(pool, from->pSplitInstanceBindRegions + i, (VkRect2D*)(to->pSplitInstanceBindRegions + i));
}
}
}
void deepcopy_VkPhysicalDeviceGroupProperties(
Pool* pool,
const VkPhysicalDeviceGroupProperties* from,
VkPhysicalDeviceGroupProperties* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
memcpy(to->physicalDevices, from->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
}
void deepcopy_VkDeviceGroupDeviceCreateInfo(
Pool* pool,
const VkDeviceGroupDeviceCreateInfo* from,
VkDeviceGroupDeviceCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
to->pPhysicalDevices = nullptr;
if (from->pPhysicalDevices)
{
to->pPhysicalDevices = (VkPhysicalDevice*)pool->dupArray(from->pPhysicalDevices, from->physicalDeviceCount * sizeof(const VkPhysicalDevice));
}
}
void deepcopy_VkBufferMemoryRequirementsInfo2(
Pool* pool,
const VkBufferMemoryRequirementsInfo2* from,
VkBufferMemoryRequirementsInfo2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkImageMemoryRequirementsInfo2(
Pool* pool,
const VkImageMemoryRequirementsInfo2* from,
VkImageMemoryRequirementsInfo2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkImageSparseMemoryRequirementsInfo2(
Pool* pool,
const VkImageSparseMemoryRequirementsInfo2* from,
VkImageSparseMemoryRequirementsInfo2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkMemoryRequirements2(
Pool* pool,
const VkMemoryRequirements2* from,
VkMemoryRequirements2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkMemoryRequirements(pool, &from->memoryRequirements, (VkMemoryRequirements*)(&to->memoryRequirements));
}
void deepcopy_VkSparseImageMemoryRequirements2(
Pool* pool,
const VkSparseImageMemoryRequirements2* from,
VkSparseImageMemoryRequirements2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkSparseImageMemoryRequirements(pool, &from->memoryRequirements, (VkSparseImageMemoryRequirements*)(&to->memoryRequirements));
}
void deepcopy_VkPhysicalDeviceFeatures2(
Pool* pool,
const VkPhysicalDeviceFeatures2* from,
VkPhysicalDeviceFeatures2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkPhysicalDeviceFeatures(pool, &from->features, (VkPhysicalDeviceFeatures*)(&to->features));
}
void deepcopy_VkPhysicalDeviceProperties2(
Pool* pool,
const VkPhysicalDeviceProperties2* from,
VkPhysicalDeviceProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkPhysicalDeviceProperties(pool, &from->properties, (VkPhysicalDeviceProperties*)(&to->properties));
}
void deepcopy_VkFormatProperties2(
Pool* pool,
const VkFormatProperties2* from,
VkFormatProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkFormatProperties(pool, &from->formatProperties, (VkFormatProperties*)(&to->formatProperties));
}
void deepcopy_VkImageFormatProperties2(
Pool* pool,
const VkImageFormatProperties2* from,
VkImageFormatProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkImageFormatProperties(pool, &from->imageFormatProperties, (VkImageFormatProperties*)(&to->imageFormatProperties));
}
void deepcopy_VkPhysicalDeviceImageFormatInfo2(
Pool* pool,
const VkPhysicalDeviceImageFormatInfo2* from,
VkPhysicalDeviceImageFormatInfo2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkQueueFamilyProperties2(
Pool* pool,
const VkQueueFamilyProperties2* from,
VkQueueFamilyProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkQueueFamilyProperties(pool, &from->queueFamilyProperties, (VkQueueFamilyProperties*)(&to->queueFamilyProperties));
}
void deepcopy_VkPhysicalDeviceMemoryProperties2(
Pool* pool,
const VkPhysicalDeviceMemoryProperties2* from,
VkPhysicalDeviceMemoryProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkPhysicalDeviceMemoryProperties(pool, &from->memoryProperties, (VkPhysicalDeviceMemoryProperties*)(&to->memoryProperties));
}
void deepcopy_VkSparseImageFormatProperties2(
Pool* pool,
const VkSparseImageFormatProperties2* from,
VkSparseImageFormatProperties2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
deepcopy_VkSparseImageFormatProperties(pool, &from->properties, (VkSparseImageFormatProperties*)(&to->properties));
}
void deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(
Pool* pool,
const VkPhysicalDeviceSparseImageFormatInfo2* from,
VkPhysicalDeviceSparseImageFormatInfo2* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkPhysicalDevicePointClippingProperties(
Pool* pool,
const VkPhysicalDevicePointClippingProperties* from,
VkPhysicalDevicePointClippingProperties* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
}
}
void deepcopy_VkInputAttachmentAspectReference(
Pool* pool,
const VkInputAttachmentAspectReference* from,
VkInputAttachmentAspectReference* to)
{
(void)pool;
*to = *from;
}
void deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(
Pool* pool,
const VkRenderPassInputAttachmentAspectCreateInfo* from,
VkRenderPassInputAttachmentAspectCreateInfo* to)
{
(void)pool;
*to = *from;
size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
to->pNext = nullptr;
if (pNext_size)
{
to->pNext = (const void*)pool->alloc(pNext_size);
deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));