blob: 4a2beb3e5d51d54f2caaea844192a07fb75eeced [file] [log] [blame]
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001// Copyright (C) 2018 The Android Open Source Project
2// Copyright (C) 2018 Google Inc.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16// Autogenerated module goldfish_vk_deepcopy_guest
17// (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
18// Please do not modify directly;
19// re-run android/scripts/generate-vulkan-sources.sh,
20// or directly from Python by defining:
21// VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml
22// CEREAL_OUTPUT_DIR: Where to put the generated sources.
23// python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR
24
25#include "goldfish_vk_deepcopy_guest.h"
26
27
28
29namespace goldfish_vk {
30
31#ifdef VK_VERSION_1_0
32void deepcopy_VkApplicationInfo(
33 Pool* pool,
34 const VkApplicationInfo* from,
35 VkApplicationInfo* to)
36{
Lingfeng Yang36891c52018-11-09 14:18:35 -080037 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -080038 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -080039 to->pNext = from->pNext;
40 to->pApplicationName = nullptr;
41 if (from->pApplicationName)
42 {
43 to->pApplicationName = pool->strDup(from->pApplicationName);
44 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -080045 to->pEngineName = nullptr;
46 if (from->pEngineName)
47 {
48 to->pEngineName = pool->strDup(from->pEngineName);
49 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -080050}
51
52void deepcopy_VkInstanceCreateInfo(
53 Pool* pool,
54 const VkInstanceCreateInfo* from,
55 VkInstanceCreateInfo* to)
56{
Lingfeng Yang36891c52018-11-09 14:18:35 -080057 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -080058 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -080059 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -080060 to->pApplicationInfo = nullptr;
61 if (from->pApplicationInfo)
62 {
63 to->pApplicationInfo = (VkApplicationInfo*)pool->alloc(sizeof(const VkApplicationInfo));
64 deepcopy_VkApplicationInfo(pool, from->pApplicationInfo, (VkApplicationInfo*)(to->pApplicationInfo));
65 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -080066 to->ppEnabledLayerNames = nullptr;
67 if (from->ppEnabledLayerNames && from->enabledLayerCount)
68 {
69 to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
70 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -080071 to->ppEnabledExtensionNames = nullptr;
72 if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
73 {
74 to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
75 }
76}
77
78void deepcopy_VkAllocationCallbacks(
79 Pool* pool,
80 const VkAllocationCallbacks* from,
81 VkAllocationCallbacks* to)
82{
Lingfeng Yang36891c52018-11-09 14:18:35 -080083 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -080084 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -080085 to->pUserData = nullptr;
86 if (from->pUserData)
87 {
88 to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
89 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -080090}
91
92void deepcopy_VkPhysicalDeviceFeatures(
93 Pool* pool,
94 const VkPhysicalDeviceFeatures* from,
95 VkPhysicalDeviceFeatures* to)
96{
Lingfeng Yang36891c52018-11-09 14:18:35 -080097 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -080098 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -080099}
100
101void deepcopy_VkFormatProperties(
102 Pool* pool,
103 const VkFormatProperties* from,
104 VkFormatProperties* to)
105{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800106 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800107 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800108}
109
110void deepcopy_VkExtent3D(
111 Pool* pool,
112 const VkExtent3D* from,
113 VkExtent3D* to)
114{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800115 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800116 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800117}
118
119void deepcopy_VkImageFormatProperties(
120 Pool* pool,
121 const VkImageFormatProperties* from,
122 VkImageFormatProperties* to)
123{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800124 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800125 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800126 deepcopy_VkExtent3D(pool, &from->maxExtent, (VkExtent3D*)(&to->maxExtent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800127}
128
129void deepcopy_VkPhysicalDeviceLimits(
130 Pool* pool,
131 const VkPhysicalDeviceLimits* from,
132 VkPhysicalDeviceLimits* to)
133{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800134 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800135 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800136 memcpy(to->maxComputeWorkGroupCount, from->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800137 memcpy(to->maxComputeWorkGroupSize, from->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800138 memcpy(to->maxViewportDimensions, from->maxViewportDimensions, 2 * sizeof(uint32_t));
139 memcpy(to->viewportBoundsRange, from->viewportBoundsRange, 2 * sizeof(float));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800140 memcpy(to->pointSizeRange, from->pointSizeRange, 2 * sizeof(float));
141 memcpy(to->lineWidthRange, from->lineWidthRange, 2 * sizeof(float));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800142}
143
144void deepcopy_VkPhysicalDeviceSparseProperties(
145 Pool* pool,
146 const VkPhysicalDeviceSparseProperties* from,
147 VkPhysicalDeviceSparseProperties* to)
148{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800149 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800150 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800151}
152
153void deepcopy_VkPhysicalDeviceProperties(
154 Pool* pool,
155 const VkPhysicalDeviceProperties* from,
156 VkPhysicalDeviceProperties* to)
157{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800158 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800159 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800160 memcpy(to->deviceName, from->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
161 memcpy(to->pipelineCacheUUID, from->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
162 deepcopy_VkPhysicalDeviceLimits(pool, &from->limits, (VkPhysicalDeviceLimits*)(&to->limits));
163 deepcopy_VkPhysicalDeviceSparseProperties(pool, &from->sparseProperties, (VkPhysicalDeviceSparseProperties*)(&to->sparseProperties));
164}
165
166void deepcopy_VkQueueFamilyProperties(
167 Pool* pool,
168 const VkQueueFamilyProperties* from,
169 VkQueueFamilyProperties* to)
170{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800171 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800172 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800173 deepcopy_VkExtent3D(pool, &from->minImageTransferGranularity, (VkExtent3D*)(&to->minImageTransferGranularity));
174}
175
176void deepcopy_VkMemoryType(
177 Pool* pool,
178 const VkMemoryType* from,
179 VkMemoryType* to)
180{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800181 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800182 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800183}
184
185void deepcopy_VkMemoryHeap(
186 Pool* pool,
187 const VkMemoryHeap* from,
188 VkMemoryHeap* to)
189{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800190 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800191 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800192}
193
194void deepcopy_VkPhysicalDeviceMemoryProperties(
195 Pool* pool,
196 const VkPhysicalDeviceMemoryProperties* from,
197 VkPhysicalDeviceMemoryProperties* to)
198{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800199 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800200 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800201 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
202 {
203 deepcopy_VkMemoryType(pool, from->memoryTypes + i, (VkMemoryType*)(to->memoryTypes + i));
204 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800205 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
206 {
207 deepcopy_VkMemoryHeap(pool, from->memoryHeaps + i, (VkMemoryHeap*)(to->memoryHeaps + i));
208 }
209}
210
211void deepcopy_VkDeviceQueueCreateInfo(
212 Pool* pool,
213 const VkDeviceQueueCreateInfo* from,
214 VkDeviceQueueCreateInfo* to)
215{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800216 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800217 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800218 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800219 to->pQueuePriorities = nullptr;
220 if (from->pQueuePriorities)
221 {
222 to->pQueuePriorities = (float*)pool->dupArray(from->pQueuePriorities, from->queueCount * sizeof(const float));
223 }
224}
225
226void deepcopy_VkDeviceCreateInfo(
227 Pool* pool,
228 const VkDeviceCreateInfo* from,
229 VkDeviceCreateInfo* to)
230{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800231 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800232 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800233 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800234 to->pQueueCreateInfos = nullptr;
235 if (from->pQueueCreateInfos)
236 {
237 to->pQueueCreateInfos = (VkDeviceQueueCreateInfo*)pool->alloc(from->queueCreateInfoCount * sizeof(const VkDeviceQueueCreateInfo));
238 to->queueCreateInfoCount = from->queueCreateInfoCount;
239 for (uint32_t i = 0; i < (uint32_t)from->queueCreateInfoCount; ++i)
240 {
241 deepcopy_VkDeviceQueueCreateInfo(pool, from->pQueueCreateInfos + i, (VkDeviceQueueCreateInfo*)(to->pQueueCreateInfos + i));
242 }
243 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800244 to->ppEnabledLayerNames = nullptr;
245 if (from->ppEnabledLayerNames && from->enabledLayerCount)
246 {
247 to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
248 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800249 to->ppEnabledExtensionNames = nullptr;
250 if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
251 {
252 to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
253 }
254 to->pEnabledFeatures = nullptr;
255 if (from->pEnabledFeatures)
256 {
257 to->pEnabledFeatures = (VkPhysicalDeviceFeatures*)pool->alloc(sizeof(const VkPhysicalDeviceFeatures));
258 deepcopy_VkPhysicalDeviceFeatures(pool, from->pEnabledFeatures, (VkPhysicalDeviceFeatures*)(to->pEnabledFeatures));
259 }
260}
261
262void deepcopy_VkExtensionProperties(
263 Pool* pool,
264 const VkExtensionProperties* from,
265 VkExtensionProperties* to)
266{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800267 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800268 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800269 memcpy(to->extensionName, from->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800270}
271
272void deepcopy_VkLayerProperties(
273 Pool* pool,
274 const VkLayerProperties* from,
275 VkLayerProperties* to)
276{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800277 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800278 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800279 memcpy(to->layerName, from->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800280 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
281}
282
283void deepcopy_VkSubmitInfo(
284 Pool* pool,
285 const VkSubmitInfo* from,
286 VkSubmitInfo* to)
287{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800288 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800289 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800290 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800291 to->pWaitSemaphores = nullptr;
292 if (from->pWaitSemaphores)
293 {
294 to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
295 }
296 to->pWaitDstStageMask = nullptr;
297 if (from->pWaitDstStageMask)
298 {
299 to->pWaitDstStageMask = (VkPipelineStageFlags*)pool->dupArray(from->pWaitDstStageMask, from->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
300 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800301 to->pCommandBuffers = nullptr;
302 if (from->pCommandBuffers)
303 {
304 to->pCommandBuffers = (VkCommandBuffer*)pool->dupArray(from->pCommandBuffers, from->commandBufferCount * sizeof(const VkCommandBuffer));
305 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800306 to->pSignalSemaphores = nullptr;
307 if (from->pSignalSemaphores)
308 {
309 to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
310 }
311}
312
313void deepcopy_VkMemoryAllocateInfo(
314 Pool* pool,
315 const VkMemoryAllocateInfo* from,
316 VkMemoryAllocateInfo* to)
317{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800318 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800319 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800320 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800321}
322
323void deepcopy_VkMappedMemoryRange(
324 Pool* pool,
325 const VkMappedMemoryRange* from,
326 VkMappedMemoryRange* to)
327{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800328 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800329 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800330 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800331}
332
333void deepcopy_VkMemoryRequirements(
334 Pool* pool,
335 const VkMemoryRequirements* from,
336 VkMemoryRequirements* to)
337{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800338 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800339 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800340}
341
342void deepcopy_VkSparseImageFormatProperties(
343 Pool* pool,
344 const VkSparseImageFormatProperties* from,
345 VkSparseImageFormatProperties* to)
346{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800347 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800348 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800349 deepcopy_VkExtent3D(pool, &from->imageGranularity, (VkExtent3D*)(&to->imageGranularity));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800350}
351
352void deepcopy_VkSparseImageMemoryRequirements(
353 Pool* pool,
354 const VkSparseImageMemoryRequirements* from,
355 VkSparseImageMemoryRequirements* to)
356{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800357 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800358 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800359 deepcopy_VkSparseImageFormatProperties(pool, &from->formatProperties, (VkSparseImageFormatProperties*)(&to->formatProperties));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800360}
361
362void deepcopy_VkSparseMemoryBind(
363 Pool* pool,
364 const VkSparseMemoryBind* from,
365 VkSparseMemoryBind* to)
366{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800367 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800368 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800369}
370
371void deepcopy_VkSparseBufferMemoryBindInfo(
372 Pool* pool,
373 const VkSparseBufferMemoryBindInfo* from,
374 VkSparseBufferMemoryBindInfo* to)
375{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800376 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800377 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800378 to->pBinds = nullptr;
379 if (from->pBinds)
380 {
381 to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
382 to->bindCount = from->bindCount;
383 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
384 {
385 deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
386 }
387 }
388}
389
390void deepcopy_VkSparseImageOpaqueMemoryBindInfo(
391 Pool* pool,
392 const VkSparseImageOpaqueMemoryBindInfo* from,
393 VkSparseImageOpaqueMemoryBindInfo* to)
394{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800395 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800396 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800397 to->pBinds = nullptr;
398 if (from->pBinds)
399 {
400 to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
401 to->bindCount = from->bindCount;
402 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
403 {
404 deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
405 }
406 }
407}
408
409void deepcopy_VkImageSubresource(
410 Pool* pool,
411 const VkImageSubresource* from,
412 VkImageSubresource* to)
413{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800414 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800415 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800416}
417
418void deepcopy_VkOffset3D(
419 Pool* pool,
420 const VkOffset3D* from,
421 VkOffset3D* to)
422{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800423 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800424 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800425}
426
427void deepcopy_VkSparseImageMemoryBind(
428 Pool* pool,
429 const VkSparseImageMemoryBind* from,
430 VkSparseImageMemoryBind* to)
431{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800432 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800433 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800434 deepcopy_VkImageSubresource(pool, &from->subresource, (VkImageSubresource*)(&to->subresource));
435 deepcopy_VkOffset3D(pool, &from->offset, (VkOffset3D*)(&to->offset));
436 deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800437}
438
439void deepcopy_VkSparseImageMemoryBindInfo(
440 Pool* pool,
441 const VkSparseImageMemoryBindInfo* from,
442 VkSparseImageMemoryBindInfo* to)
443{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800444 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800445 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800446 to->pBinds = nullptr;
447 if (from->pBinds)
448 {
449 to->pBinds = (VkSparseImageMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseImageMemoryBind));
450 to->bindCount = from->bindCount;
451 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
452 {
453 deepcopy_VkSparseImageMemoryBind(pool, from->pBinds + i, (VkSparseImageMemoryBind*)(to->pBinds + i));
454 }
455 }
456}
457
458void deepcopy_VkBindSparseInfo(
459 Pool* pool,
460 const VkBindSparseInfo* from,
461 VkBindSparseInfo* to)
462{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800463 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800464 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800465 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800466 to->pWaitSemaphores = nullptr;
467 if (from->pWaitSemaphores)
468 {
469 to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
470 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800471 to->pBufferBinds = nullptr;
472 if (from->pBufferBinds)
473 {
474 to->pBufferBinds = (VkSparseBufferMemoryBindInfo*)pool->alloc(from->bufferBindCount * sizeof(const VkSparseBufferMemoryBindInfo));
475 to->bufferBindCount = from->bufferBindCount;
476 for (uint32_t i = 0; i < (uint32_t)from->bufferBindCount; ++i)
477 {
478 deepcopy_VkSparseBufferMemoryBindInfo(pool, from->pBufferBinds + i, (VkSparseBufferMemoryBindInfo*)(to->pBufferBinds + i));
479 }
480 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800481 to->pImageOpaqueBinds = nullptr;
482 if (from->pImageOpaqueBinds)
483 {
484 to->pImageOpaqueBinds = (VkSparseImageOpaqueMemoryBindInfo*)pool->alloc(from->imageOpaqueBindCount * sizeof(const VkSparseImageOpaqueMemoryBindInfo));
485 to->imageOpaqueBindCount = from->imageOpaqueBindCount;
486 for (uint32_t i = 0; i < (uint32_t)from->imageOpaqueBindCount; ++i)
487 {
488 deepcopy_VkSparseImageOpaqueMemoryBindInfo(pool, from->pImageOpaqueBinds + i, (VkSparseImageOpaqueMemoryBindInfo*)(to->pImageOpaqueBinds + i));
489 }
490 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800491 to->pImageBinds = nullptr;
492 if (from->pImageBinds)
493 {
494 to->pImageBinds = (VkSparseImageMemoryBindInfo*)pool->alloc(from->imageBindCount * sizeof(const VkSparseImageMemoryBindInfo));
495 to->imageBindCount = from->imageBindCount;
496 for (uint32_t i = 0; i < (uint32_t)from->imageBindCount; ++i)
497 {
498 deepcopy_VkSparseImageMemoryBindInfo(pool, from->pImageBinds + i, (VkSparseImageMemoryBindInfo*)(to->pImageBinds + i));
499 }
500 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800501 to->pSignalSemaphores = nullptr;
502 if (from->pSignalSemaphores)
503 {
504 to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
505 }
506}
507
508void deepcopy_VkFenceCreateInfo(
509 Pool* pool,
510 const VkFenceCreateInfo* from,
511 VkFenceCreateInfo* to)
512{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800513 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800514 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800515 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800516}
517
518void deepcopy_VkSemaphoreCreateInfo(
519 Pool* pool,
520 const VkSemaphoreCreateInfo* from,
521 VkSemaphoreCreateInfo* to)
522{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800523 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800524 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800525 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800526}
527
528void deepcopy_VkEventCreateInfo(
529 Pool* pool,
530 const VkEventCreateInfo* from,
531 VkEventCreateInfo* to)
532{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800533 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800534 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800535 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800536}
537
538void deepcopy_VkQueryPoolCreateInfo(
539 Pool* pool,
540 const VkQueryPoolCreateInfo* from,
541 VkQueryPoolCreateInfo* to)
542{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800543 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800544 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800545 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800546}
547
548void deepcopy_VkBufferCreateInfo(
549 Pool* pool,
550 const VkBufferCreateInfo* from,
551 VkBufferCreateInfo* to)
552{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800553 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800554 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800555 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800556 to->pQueueFamilyIndices = nullptr;
557 if (from->pQueueFamilyIndices)
558 {
559 to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
560 }
561}
562
563void deepcopy_VkBufferViewCreateInfo(
564 Pool* pool,
565 const VkBufferViewCreateInfo* from,
566 VkBufferViewCreateInfo* to)
567{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800568 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800569 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800570 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800571}
572
573void deepcopy_VkImageCreateInfo(
574 Pool* pool,
575 const VkImageCreateInfo* from,
576 VkImageCreateInfo* to)
577{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800578 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800579 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800580 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800581 deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800582 to->pQueueFamilyIndices = nullptr;
583 if (from->pQueueFamilyIndices)
584 {
585 to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
586 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800587}
588
589void deepcopy_VkSubresourceLayout(
590 Pool* pool,
591 const VkSubresourceLayout* from,
592 VkSubresourceLayout* to)
593{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800594 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800595 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800596}
597
598void deepcopy_VkComponentMapping(
599 Pool* pool,
600 const VkComponentMapping* from,
601 VkComponentMapping* to)
602{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800603 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800604 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800605}
606
607void deepcopy_VkImageSubresourceRange(
608 Pool* pool,
609 const VkImageSubresourceRange* from,
610 VkImageSubresourceRange* to)
611{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800612 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800613 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800614}
615
616void deepcopy_VkImageViewCreateInfo(
617 Pool* pool,
618 const VkImageViewCreateInfo* from,
619 VkImageViewCreateInfo* to)
620{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800621 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800622 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800623 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800624 deepcopy_VkComponentMapping(pool, &from->components, (VkComponentMapping*)(&to->components));
625 deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
626}
627
628void deepcopy_VkShaderModuleCreateInfo(
629 Pool* pool,
630 const VkShaderModuleCreateInfo* from,
631 VkShaderModuleCreateInfo* to)
632{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800633 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800634 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800635 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800636 to->pCode = nullptr;
637 if (from->pCode)
638 {
639 to->pCode = (uint32_t*)pool->dupArray(from->pCode, (from->codeSize / 4) * sizeof(const uint32_t));
640 }
641}
642
643void deepcopy_VkPipelineCacheCreateInfo(
644 Pool* pool,
645 const VkPipelineCacheCreateInfo* from,
646 VkPipelineCacheCreateInfo* to)
647{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800648 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800649 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800650 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800651 to->pInitialData = nullptr;
652 if (from->pInitialData)
653 {
654 to->pInitialData = (void*)pool->dupArray(from->pInitialData, from->initialDataSize * sizeof(const uint8_t));
655 }
656}
657
658void deepcopy_VkSpecializationMapEntry(
659 Pool* pool,
660 const VkSpecializationMapEntry* from,
661 VkSpecializationMapEntry* to)
662{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800663 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800664 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800665}
666
667void deepcopy_VkSpecializationInfo(
668 Pool* pool,
669 const VkSpecializationInfo* from,
670 VkSpecializationInfo* to)
671{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800672 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800673 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800674 to->pMapEntries = nullptr;
675 if (from->pMapEntries)
676 {
677 to->pMapEntries = (VkSpecializationMapEntry*)pool->alloc(from->mapEntryCount * sizeof(const VkSpecializationMapEntry));
678 to->mapEntryCount = from->mapEntryCount;
679 for (uint32_t i = 0; i < (uint32_t)from->mapEntryCount; ++i)
680 {
681 deepcopy_VkSpecializationMapEntry(pool, from->pMapEntries + i, (VkSpecializationMapEntry*)(to->pMapEntries + i));
682 }
683 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800684 to->pData = nullptr;
685 if (from->pData)
686 {
687 to->pData = (void*)pool->dupArray(from->pData, from->dataSize * sizeof(const uint8_t));
688 }
689}
690
691void deepcopy_VkPipelineShaderStageCreateInfo(
692 Pool* pool,
693 const VkPipelineShaderStageCreateInfo* from,
694 VkPipelineShaderStageCreateInfo* to)
695{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800696 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800697 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800698 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800699 to->pName = nullptr;
700 if (from->pName)
701 {
702 to->pName = pool->strDup(from->pName);
703 }
704 to->pSpecializationInfo = nullptr;
705 if (from->pSpecializationInfo)
706 {
707 to->pSpecializationInfo = (VkSpecializationInfo*)pool->alloc(sizeof(const VkSpecializationInfo));
708 deepcopy_VkSpecializationInfo(pool, from->pSpecializationInfo, (VkSpecializationInfo*)(to->pSpecializationInfo));
709 }
710}
711
712void deepcopy_VkVertexInputBindingDescription(
713 Pool* pool,
714 const VkVertexInputBindingDescription* from,
715 VkVertexInputBindingDescription* to)
716{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800717 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800718 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800719}
720
721void deepcopy_VkVertexInputAttributeDescription(
722 Pool* pool,
723 const VkVertexInputAttributeDescription* from,
724 VkVertexInputAttributeDescription* to)
725{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800726 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800727 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800728}
729
730void deepcopy_VkPipelineVertexInputStateCreateInfo(
731 Pool* pool,
732 const VkPipelineVertexInputStateCreateInfo* from,
733 VkPipelineVertexInputStateCreateInfo* to)
734{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800735 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800736 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800737 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800738 to->pVertexBindingDescriptions = nullptr;
739 if (from->pVertexBindingDescriptions)
740 {
741 to->pVertexBindingDescriptions = (VkVertexInputBindingDescription*)pool->alloc(from->vertexBindingDescriptionCount * sizeof(const VkVertexInputBindingDescription));
742 to->vertexBindingDescriptionCount = from->vertexBindingDescriptionCount;
743 for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDescriptionCount; ++i)
744 {
745 deepcopy_VkVertexInputBindingDescription(pool, from->pVertexBindingDescriptions + i, (VkVertexInputBindingDescription*)(to->pVertexBindingDescriptions + i));
746 }
747 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800748 to->pVertexAttributeDescriptions = nullptr;
749 if (from->pVertexAttributeDescriptions)
750 {
751 to->pVertexAttributeDescriptions = (VkVertexInputAttributeDescription*)pool->alloc(from->vertexAttributeDescriptionCount * sizeof(const VkVertexInputAttributeDescription));
752 to->vertexAttributeDescriptionCount = from->vertexAttributeDescriptionCount;
753 for (uint32_t i = 0; i < (uint32_t)from->vertexAttributeDescriptionCount; ++i)
754 {
755 deepcopy_VkVertexInputAttributeDescription(pool, from->pVertexAttributeDescriptions + i, (VkVertexInputAttributeDescription*)(to->pVertexAttributeDescriptions + i));
756 }
757 }
758}
759
760void deepcopy_VkPipelineInputAssemblyStateCreateInfo(
761 Pool* pool,
762 const VkPipelineInputAssemblyStateCreateInfo* from,
763 VkPipelineInputAssemblyStateCreateInfo* to)
764{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800765 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800766 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800767 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800768}
769
770void deepcopy_VkPipelineTessellationStateCreateInfo(
771 Pool* pool,
772 const VkPipelineTessellationStateCreateInfo* from,
773 VkPipelineTessellationStateCreateInfo* to)
774{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800775 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800776 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800777 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800778}
779
780void deepcopy_VkViewport(
781 Pool* pool,
782 const VkViewport* from,
783 VkViewport* to)
784{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800785 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800786 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800787}
788
789void deepcopy_VkOffset2D(
790 Pool* pool,
791 const VkOffset2D* from,
792 VkOffset2D* to)
793{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800794 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800795 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800796}
797
798void deepcopy_VkExtent2D(
799 Pool* pool,
800 const VkExtent2D* from,
801 VkExtent2D* to)
802{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800803 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800804 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800805}
806
807void deepcopy_VkRect2D(
808 Pool* pool,
809 const VkRect2D* from,
810 VkRect2D* to)
811{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800812 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800813 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800814 deepcopy_VkOffset2D(pool, &from->offset, (VkOffset2D*)(&to->offset));
815 deepcopy_VkExtent2D(pool, &from->extent, (VkExtent2D*)(&to->extent));
816}
817
818void deepcopy_VkPipelineViewportStateCreateInfo(
819 Pool* pool,
820 const VkPipelineViewportStateCreateInfo* from,
821 VkPipelineViewportStateCreateInfo* to)
822{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800823 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800824 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800825 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800826 to->pViewports = nullptr;
827 if (from->pViewports)
828 {
829 to->pViewports = (VkViewport*)pool->alloc(from->viewportCount * sizeof(const VkViewport));
830 to->viewportCount = from->viewportCount;
831 for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
832 {
833 deepcopy_VkViewport(pool, from->pViewports + i, (VkViewport*)(to->pViewports + i));
834 }
835 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800836 to->pScissors = nullptr;
837 if (from->pScissors)
838 {
839 to->pScissors = (VkRect2D*)pool->alloc(from->scissorCount * sizeof(const VkRect2D));
840 to->scissorCount = from->scissorCount;
841 for (uint32_t i = 0; i < (uint32_t)from->scissorCount; ++i)
842 {
843 deepcopy_VkRect2D(pool, from->pScissors + i, (VkRect2D*)(to->pScissors + i));
844 }
845 }
846}
847
848void deepcopy_VkPipelineRasterizationStateCreateInfo(
849 Pool* pool,
850 const VkPipelineRasterizationStateCreateInfo* from,
851 VkPipelineRasterizationStateCreateInfo* to)
852{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800853 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800854 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800855 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800856}
857
858void deepcopy_VkPipelineMultisampleStateCreateInfo(
859 Pool* pool,
860 const VkPipelineMultisampleStateCreateInfo* from,
861 VkPipelineMultisampleStateCreateInfo* to)
862{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800863 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800864 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800865 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800866 to->pSampleMask = nullptr;
867 if (from->pSampleMask)
868 {
869 to->pSampleMask = (VkSampleMask*)pool->dupArray(from->pSampleMask, (((from->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
870 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800871}
872
873void deepcopy_VkStencilOpState(
874 Pool* pool,
875 const VkStencilOpState* from,
876 VkStencilOpState* to)
877{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800878 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800879 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800880}
881
882void deepcopy_VkPipelineDepthStencilStateCreateInfo(
883 Pool* pool,
884 const VkPipelineDepthStencilStateCreateInfo* from,
885 VkPipelineDepthStencilStateCreateInfo* to)
886{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800887 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800888 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800889 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800890 deepcopy_VkStencilOpState(pool, &from->front, (VkStencilOpState*)(&to->front));
891 deepcopy_VkStencilOpState(pool, &from->back, (VkStencilOpState*)(&to->back));
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800892}
893
894void deepcopy_VkPipelineColorBlendAttachmentState(
895 Pool* pool,
896 const VkPipelineColorBlendAttachmentState* from,
897 VkPipelineColorBlendAttachmentState* to)
898{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800899 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800900 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800901}
902
903void deepcopy_VkPipelineColorBlendStateCreateInfo(
904 Pool* pool,
905 const VkPipelineColorBlendStateCreateInfo* from,
906 VkPipelineColorBlendStateCreateInfo* to)
907{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800908 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800909 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800910 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800911 to->pAttachments = nullptr;
912 if (from->pAttachments)
913 {
914 to->pAttachments = (VkPipelineColorBlendAttachmentState*)pool->alloc(from->attachmentCount * sizeof(const VkPipelineColorBlendAttachmentState));
915 to->attachmentCount = from->attachmentCount;
916 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
917 {
918 deepcopy_VkPipelineColorBlendAttachmentState(pool, from->pAttachments + i, (VkPipelineColorBlendAttachmentState*)(to->pAttachments + i));
919 }
920 }
921 memcpy(to->blendConstants, from->blendConstants, 4 * sizeof(float));
922}
923
924void deepcopy_VkPipelineDynamicStateCreateInfo(
925 Pool* pool,
926 const VkPipelineDynamicStateCreateInfo* from,
927 VkPipelineDynamicStateCreateInfo* to)
928{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800929 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800930 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800931 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800932 to->pDynamicStates = nullptr;
933 if (from->pDynamicStates)
934 {
935 to->pDynamicStates = (VkDynamicState*)pool->dupArray(from->pDynamicStates, from->dynamicStateCount * sizeof(const VkDynamicState));
936 }
937}
938
939void deepcopy_VkGraphicsPipelineCreateInfo(
940 Pool* pool,
941 const VkGraphicsPipelineCreateInfo* from,
942 VkGraphicsPipelineCreateInfo* to)
943{
Lingfeng Yang36891c52018-11-09 14:18:35 -0800944 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -0800945 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800946 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -0800947 to->pStages = nullptr;
948 if (from->pStages)
949 {
950 to->pStages = (VkPipelineShaderStageCreateInfo*)pool->alloc(from->stageCount * sizeof(const VkPipelineShaderStageCreateInfo));
951 to->stageCount = from->stageCount;
952 for (uint32_t i = 0; i < (uint32_t)from->stageCount; ++i)
953 {
954 deepcopy_VkPipelineShaderStageCreateInfo(pool, from->pStages + i, (VkPipelineShaderStageCreateInfo*)(to->pStages + i));
955 }
956 }
957 to->pVertexInputState = nullptr;
958 if (from->pVertexInputState)
959 {
960 to->pVertexInputState = (VkPipelineVertexInputStateCreateInfo*)pool->alloc(sizeof(const VkPipelineVertexInputStateCreateInfo));
961 deepcopy_VkPipelineVertexInputStateCreateInfo(pool, from->pVertexInputState, (VkPipelineVertexInputStateCreateInfo*)(to->pVertexInputState));
962 }
963 to->pInputAssemblyState = nullptr;
964 if (from->pInputAssemblyState)
965 {
966 to->pInputAssemblyState = (VkPipelineInputAssemblyStateCreateInfo*)pool->alloc(sizeof(const VkPipelineInputAssemblyStateCreateInfo));
967 deepcopy_VkPipelineInputAssemblyStateCreateInfo(pool, from->pInputAssemblyState, (VkPipelineInputAssemblyStateCreateInfo*)(to->pInputAssemblyState));
968 }
969 to->pTessellationState = nullptr;
970 if (from->pTessellationState)
971 {
972 to->pTessellationState = (VkPipelineTessellationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineTessellationStateCreateInfo));
973 deepcopy_VkPipelineTessellationStateCreateInfo(pool, from->pTessellationState, (VkPipelineTessellationStateCreateInfo*)(to->pTessellationState));
974 }
975 to->pViewportState = nullptr;
976 if (from->pViewportState)
977 {
978 to->pViewportState = (VkPipelineViewportStateCreateInfo*)pool->alloc(sizeof(const VkPipelineViewportStateCreateInfo));
979 deepcopy_VkPipelineViewportStateCreateInfo(pool, from->pViewportState, (VkPipelineViewportStateCreateInfo*)(to->pViewportState));
980 }
981 to->pRasterizationState = nullptr;
982 if (from->pRasterizationState)
983 {
984 to->pRasterizationState = (VkPipelineRasterizationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineRasterizationStateCreateInfo));
985 deepcopy_VkPipelineRasterizationStateCreateInfo(pool, from->pRasterizationState, (VkPipelineRasterizationStateCreateInfo*)(to->pRasterizationState));
986 }
987 to->pMultisampleState = nullptr;
988 if (from->pMultisampleState)
989 {
990 to->pMultisampleState = (VkPipelineMultisampleStateCreateInfo*)pool->alloc(sizeof(const VkPipelineMultisampleStateCreateInfo));
991 deepcopy_VkPipelineMultisampleStateCreateInfo(pool, from->pMultisampleState, (VkPipelineMultisampleStateCreateInfo*)(to->pMultisampleState));
992 }
993 to->pDepthStencilState = nullptr;
994 if (from->pDepthStencilState)
995 {
996 to->pDepthStencilState = (VkPipelineDepthStencilStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDepthStencilStateCreateInfo));
997 deepcopy_VkPipelineDepthStencilStateCreateInfo(pool, from->pDepthStencilState, (VkPipelineDepthStencilStateCreateInfo*)(to->pDepthStencilState));
998 }
999 to->pColorBlendState = nullptr;
1000 if (from->pColorBlendState)
1001 {
1002 to->pColorBlendState = (VkPipelineColorBlendStateCreateInfo*)pool->alloc(sizeof(const VkPipelineColorBlendStateCreateInfo));
1003 deepcopy_VkPipelineColorBlendStateCreateInfo(pool, from->pColorBlendState, (VkPipelineColorBlendStateCreateInfo*)(to->pColorBlendState));
1004 }
1005 to->pDynamicState = nullptr;
1006 if (from->pDynamicState)
1007 {
1008 to->pDynamicState = (VkPipelineDynamicStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDynamicStateCreateInfo));
1009 deepcopy_VkPipelineDynamicStateCreateInfo(pool, from->pDynamicState, (VkPipelineDynamicStateCreateInfo*)(to->pDynamicState));
1010 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001011}
1012
1013void deepcopy_VkComputePipelineCreateInfo(
1014 Pool* pool,
1015 const VkComputePipelineCreateInfo* from,
1016 VkComputePipelineCreateInfo* to)
1017{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001018 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001019 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001020 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001021 deepcopy_VkPipelineShaderStageCreateInfo(pool, &from->stage, (VkPipelineShaderStageCreateInfo*)(&to->stage));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001022}
1023
1024void deepcopy_VkPushConstantRange(
1025 Pool* pool,
1026 const VkPushConstantRange* from,
1027 VkPushConstantRange* to)
1028{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001029 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001030 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001031}
1032
1033void deepcopy_VkPipelineLayoutCreateInfo(
1034 Pool* pool,
1035 const VkPipelineLayoutCreateInfo* from,
1036 VkPipelineLayoutCreateInfo* to)
1037{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001038 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001039 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001040 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001041 to->pSetLayouts = nullptr;
1042 if (from->pSetLayouts)
1043 {
1044 to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->setLayoutCount * sizeof(const VkDescriptorSetLayout));
1045 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001046 to->pPushConstantRanges = nullptr;
1047 if (from->pPushConstantRanges)
1048 {
1049 to->pPushConstantRanges = (VkPushConstantRange*)pool->alloc(from->pushConstantRangeCount * sizeof(const VkPushConstantRange));
1050 to->pushConstantRangeCount = from->pushConstantRangeCount;
1051 for (uint32_t i = 0; i < (uint32_t)from->pushConstantRangeCount; ++i)
1052 {
1053 deepcopy_VkPushConstantRange(pool, from->pPushConstantRanges + i, (VkPushConstantRange*)(to->pPushConstantRanges + i));
1054 }
1055 }
1056}
1057
1058void deepcopy_VkSamplerCreateInfo(
1059 Pool* pool,
1060 const VkSamplerCreateInfo* from,
1061 VkSamplerCreateInfo* to)
1062{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001063 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001064 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001065 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001066}
1067
1068void deepcopy_VkDescriptorSetLayoutBinding(
1069 Pool* pool,
1070 const VkDescriptorSetLayoutBinding* from,
1071 VkDescriptorSetLayoutBinding* to)
1072{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001073 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001074 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001075 to->pImmutableSamplers = nullptr;
1076 if (from->pImmutableSamplers)
1077 {
1078 to->pImmutableSamplers = (VkSampler*)pool->dupArray(from->pImmutableSamplers, from->descriptorCount * sizeof(const VkSampler));
1079 }
1080}
1081
1082void deepcopy_VkDescriptorSetLayoutCreateInfo(
1083 Pool* pool,
1084 const VkDescriptorSetLayoutCreateInfo* from,
1085 VkDescriptorSetLayoutCreateInfo* to)
1086{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001087 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001088 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001089 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001090 to->pBindings = nullptr;
1091 if (from->pBindings)
1092 {
1093 to->pBindings = (VkDescriptorSetLayoutBinding*)pool->alloc(from->bindingCount * sizeof(const VkDescriptorSetLayoutBinding));
1094 to->bindingCount = from->bindingCount;
1095 for (uint32_t i = 0; i < (uint32_t)from->bindingCount; ++i)
1096 {
1097 deepcopy_VkDescriptorSetLayoutBinding(pool, from->pBindings + i, (VkDescriptorSetLayoutBinding*)(to->pBindings + i));
1098 }
1099 }
1100}
1101
1102void deepcopy_VkDescriptorPoolSize(
1103 Pool* pool,
1104 const VkDescriptorPoolSize* from,
1105 VkDescriptorPoolSize* to)
1106{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001107 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001108 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001109}
1110
1111void deepcopy_VkDescriptorPoolCreateInfo(
1112 Pool* pool,
1113 const VkDescriptorPoolCreateInfo* from,
1114 VkDescriptorPoolCreateInfo* to)
1115{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001116 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001117 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001118 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001119 to->pPoolSizes = nullptr;
1120 if (from->pPoolSizes)
1121 {
1122 to->pPoolSizes = (VkDescriptorPoolSize*)pool->alloc(from->poolSizeCount * sizeof(const VkDescriptorPoolSize));
1123 to->poolSizeCount = from->poolSizeCount;
1124 for (uint32_t i = 0; i < (uint32_t)from->poolSizeCount; ++i)
1125 {
1126 deepcopy_VkDescriptorPoolSize(pool, from->pPoolSizes + i, (VkDescriptorPoolSize*)(to->pPoolSizes + i));
1127 }
1128 }
1129}
1130
1131void deepcopy_VkDescriptorSetAllocateInfo(
1132 Pool* pool,
1133 const VkDescriptorSetAllocateInfo* from,
1134 VkDescriptorSetAllocateInfo* to)
1135{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001136 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001137 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001138 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001139 to->pSetLayouts = nullptr;
1140 if (from->pSetLayouts)
1141 {
1142 to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->descriptorSetCount * sizeof(const VkDescriptorSetLayout));
1143 }
1144}
1145
1146void deepcopy_VkDescriptorImageInfo(
1147 Pool* pool,
1148 const VkDescriptorImageInfo* from,
1149 VkDescriptorImageInfo* to)
1150{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001151 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001152 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001153}
1154
1155void deepcopy_VkDescriptorBufferInfo(
1156 Pool* pool,
1157 const VkDescriptorBufferInfo* from,
1158 VkDescriptorBufferInfo* to)
1159{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001160 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001161 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001162}
1163
1164void deepcopy_VkWriteDescriptorSet(
1165 Pool* pool,
1166 const VkWriteDescriptorSet* from,
1167 VkWriteDescriptorSet* to)
1168{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001169 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001170 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001171 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001172 to->pImageInfo = nullptr;
1173 if (from->pImageInfo)
1174 {
1175 to->pImageInfo = (VkDescriptorImageInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorImageInfo));
1176 to->descriptorCount = from->descriptorCount;
1177 for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
1178 {
1179 deepcopy_VkDescriptorImageInfo(pool, from->pImageInfo + i, (VkDescriptorImageInfo*)(to->pImageInfo + i));
1180 }
1181 }
1182 to->pBufferInfo = nullptr;
1183 if (from->pBufferInfo)
1184 {
1185 to->pBufferInfo = (VkDescriptorBufferInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorBufferInfo));
1186 to->descriptorCount = from->descriptorCount;
1187 for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
1188 {
1189 deepcopy_VkDescriptorBufferInfo(pool, from->pBufferInfo + i, (VkDescriptorBufferInfo*)(to->pBufferInfo + i));
1190 }
1191 }
1192 to->pTexelBufferView = nullptr;
1193 if (from->pTexelBufferView)
1194 {
1195 to->pTexelBufferView = (VkBufferView*)pool->dupArray(from->pTexelBufferView, from->descriptorCount * sizeof(const VkBufferView));
1196 }
1197}
1198
1199void deepcopy_VkCopyDescriptorSet(
1200 Pool* pool,
1201 const VkCopyDescriptorSet* from,
1202 VkCopyDescriptorSet* to)
1203{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001204 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001205 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001206 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001207}
1208
1209void deepcopy_VkFramebufferCreateInfo(
1210 Pool* pool,
1211 const VkFramebufferCreateInfo* from,
1212 VkFramebufferCreateInfo* to)
1213{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001214 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001215 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001216 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001217 to->pAttachments = nullptr;
1218 if (from->pAttachments)
1219 {
1220 to->pAttachments = (VkImageView*)pool->dupArray(from->pAttachments, from->attachmentCount * sizeof(const VkImageView));
1221 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001222}
1223
1224void deepcopy_VkAttachmentDescription(
1225 Pool* pool,
1226 const VkAttachmentDescription* from,
1227 VkAttachmentDescription* to)
1228{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001229 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001230 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001231}
1232
1233void deepcopy_VkAttachmentReference(
1234 Pool* pool,
1235 const VkAttachmentReference* from,
1236 VkAttachmentReference* to)
1237{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001238 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001239 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001240}
1241
1242void deepcopy_VkSubpassDescription(
1243 Pool* pool,
1244 const VkSubpassDescription* from,
1245 VkSubpassDescription* to)
1246{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001247 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001248 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001249 to->pInputAttachments = nullptr;
1250 if (from->pInputAttachments)
1251 {
1252 to->pInputAttachments = (VkAttachmentReference*)pool->alloc(from->inputAttachmentCount * sizeof(const VkAttachmentReference));
1253 to->inputAttachmentCount = from->inputAttachmentCount;
1254 for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i)
1255 {
1256 deepcopy_VkAttachmentReference(pool, from->pInputAttachments + i, (VkAttachmentReference*)(to->pInputAttachments + i));
1257 }
1258 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001259 to->pColorAttachments = nullptr;
1260 if (from->pColorAttachments)
1261 {
1262 to->pColorAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1263 to->colorAttachmentCount = from->colorAttachmentCount;
1264 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
1265 {
1266 deepcopy_VkAttachmentReference(pool, from->pColorAttachments + i, (VkAttachmentReference*)(to->pColorAttachments + i));
1267 }
1268 }
1269 to->pResolveAttachments = nullptr;
1270 if (from->pResolveAttachments)
1271 {
1272 to->pResolveAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1273 to->colorAttachmentCount = from->colorAttachmentCount;
1274 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
1275 {
1276 deepcopy_VkAttachmentReference(pool, from->pResolveAttachments + i, (VkAttachmentReference*)(to->pResolveAttachments + i));
1277 }
1278 }
1279 to->pDepthStencilAttachment = nullptr;
1280 if (from->pDepthStencilAttachment)
1281 {
1282 to->pDepthStencilAttachment = (VkAttachmentReference*)pool->alloc(sizeof(const VkAttachmentReference));
1283 deepcopy_VkAttachmentReference(pool, from->pDepthStencilAttachment, (VkAttachmentReference*)(to->pDepthStencilAttachment));
1284 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001285 to->pPreserveAttachments = nullptr;
1286 if (from->pPreserveAttachments)
1287 {
1288 to->pPreserveAttachments = (uint32_t*)pool->dupArray(from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
1289 }
1290}
1291
1292void deepcopy_VkSubpassDependency(
1293 Pool* pool,
1294 const VkSubpassDependency* from,
1295 VkSubpassDependency* to)
1296{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001297 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001298 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001299}
1300
1301void deepcopy_VkRenderPassCreateInfo(
1302 Pool* pool,
1303 const VkRenderPassCreateInfo* from,
1304 VkRenderPassCreateInfo* to)
1305{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001306 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001307 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001308 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001309 to->pAttachments = nullptr;
1310 if (from->pAttachments)
1311 {
1312 to->pAttachments = (VkAttachmentDescription*)pool->alloc(from->attachmentCount * sizeof(const VkAttachmentDescription));
1313 to->attachmentCount = from->attachmentCount;
1314 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
1315 {
1316 deepcopy_VkAttachmentDescription(pool, from->pAttachments + i, (VkAttachmentDescription*)(to->pAttachments + i));
1317 }
1318 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001319 to->pSubpasses = nullptr;
1320 if (from->pSubpasses)
1321 {
1322 to->pSubpasses = (VkSubpassDescription*)pool->alloc(from->subpassCount * sizeof(const VkSubpassDescription));
1323 to->subpassCount = from->subpassCount;
1324 for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i)
1325 {
1326 deepcopy_VkSubpassDescription(pool, from->pSubpasses + i, (VkSubpassDescription*)(to->pSubpasses + i));
1327 }
1328 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001329 to->pDependencies = nullptr;
1330 if (from->pDependencies)
1331 {
1332 to->pDependencies = (VkSubpassDependency*)pool->alloc(from->dependencyCount * sizeof(const VkSubpassDependency));
1333 to->dependencyCount = from->dependencyCount;
1334 for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i)
1335 {
1336 deepcopy_VkSubpassDependency(pool, from->pDependencies + i, (VkSubpassDependency*)(to->pDependencies + i));
1337 }
1338 }
1339}
1340
1341void deepcopy_VkCommandPoolCreateInfo(
1342 Pool* pool,
1343 const VkCommandPoolCreateInfo* from,
1344 VkCommandPoolCreateInfo* to)
1345{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001346 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001347 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001348 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001349}
1350
1351void deepcopy_VkCommandBufferAllocateInfo(
1352 Pool* pool,
1353 const VkCommandBufferAllocateInfo* from,
1354 VkCommandBufferAllocateInfo* to)
1355{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001356 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001357 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001358 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001359}
1360
1361void deepcopy_VkCommandBufferInheritanceInfo(
1362 Pool* pool,
1363 const VkCommandBufferInheritanceInfo* from,
1364 VkCommandBufferInheritanceInfo* to)
1365{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001366 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001367 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001368 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001369}
1370
1371void deepcopy_VkCommandBufferBeginInfo(
1372 Pool* pool,
1373 const VkCommandBufferBeginInfo* from,
1374 VkCommandBufferBeginInfo* to)
1375{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001376 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001377 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001378 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001379 to->pInheritanceInfo = nullptr;
1380 if (from->pInheritanceInfo)
1381 {
1382 to->pInheritanceInfo = (VkCommandBufferInheritanceInfo*)pool->alloc(sizeof(const VkCommandBufferInheritanceInfo));
1383 deepcopy_VkCommandBufferInheritanceInfo(pool, from->pInheritanceInfo, (VkCommandBufferInheritanceInfo*)(to->pInheritanceInfo));
1384 }
1385}
1386
1387void deepcopy_VkBufferCopy(
1388 Pool* pool,
1389 const VkBufferCopy* from,
1390 VkBufferCopy* to)
1391{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001392 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001393 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001394}
1395
1396void deepcopy_VkImageSubresourceLayers(
1397 Pool* pool,
1398 const VkImageSubresourceLayers* from,
1399 VkImageSubresourceLayers* to)
1400{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001401 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001402 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001403}
1404
1405void deepcopy_VkImageCopy(
1406 Pool* pool,
1407 const VkImageCopy* from,
1408 VkImageCopy* to)
1409{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001410 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001411 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001412 deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1413 deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
1414 deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1415 deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
1416 deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
1417}
1418
1419void deepcopy_VkImageBlit(
1420 Pool* pool,
1421 const VkImageBlit* from,
1422 VkImageBlit* to)
1423{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001424 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001425 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001426 deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1427 for (uint32_t i = 0; i < (uint32_t)2; ++i)
1428 {
1429 deepcopy_VkOffset3D(pool, from->srcOffsets + i, (VkOffset3D*)(to->srcOffsets + i));
1430 }
1431 deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1432 for (uint32_t i = 0; i < (uint32_t)2; ++i)
1433 {
1434 deepcopy_VkOffset3D(pool, from->dstOffsets + i, (VkOffset3D*)(to->dstOffsets + i));
1435 }
1436}
1437
1438void deepcopy_VkBufferImageCopy(
1439 Pool* pool,
1440 const VkBufferImageCopy* from,
1441 VkBufferImageCopy* to)
1442{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001443 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001444 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001445 deepcopy_VkImageSubresourceLayers(pool, &from->imageSubresource, (VkImageSubresourceLayers*)(&to->imageSubresource));
1446 deepcopy_VkOffset3D(pool, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
1447 deepcopy_VkExtent3D(pool, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
1448}
1449
1450void deepcopy_VkClearColorValue(
1451 Pool* pool,
1452 const VkClearColorValue* from,
1453 VkClearColorValue* to)
1454{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001455 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001456 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001457 memcpy(to->float32, from->float32, 4 * sizeof(float));
1458 memcpy(to->int32, from->int32, 4 * sizeof(int32_t));
1459 memcpy(to->uint32, from->uint32, 4 * sizeof(uint32_t));
1460}
1461
1462void deepcopy_VkClearDepthStencilValue(
1463 Pool* pool,
1464 const VkClearDepthStencilValue* from,
1465 VkClearDepthStencilValue* to)
1466{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001467 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001468 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001469}
1470
1471void deepcopy_VkClearValue(
1472 Pool* pool,
1473 const VkClearValue* from,
1474 VkClearValue* to)
1475{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001476 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001477 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001478 deepcopy_VkClearColorValue(pool, &from->color, (VkClearColorValue*)(&to->color));
1479 deepcopy_VkClearDepthStencilValue(pool, &from->depthStencil, (VkClearDepthStencilValue*)(&to->depthStencil));
1480}
1481
1482void deepcopy_VkClearAttachment(
1483 Pool* pool,
1484 const VkClearAttachment* from,
1485 VkClearAttachment* to)
1486{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001487 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001488 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001489 deepcopy_VkClearValue(pool, &from->clearValue, (VkClearValue*)(&to->clearValue));
1490}
1491
1492void deepcopy_VkClearRect(
1493 Pool* pool,
1494 const VkClearRect* from,
1495 VkClearRect* to)
1496{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001497 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001498 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001499 deepcopy_VkRect2D(pool, &from->rect, (VkRect2D*)(&to->rect));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001500}
1501
1502void deepcopy_VkImageResolve(
1503 Pool* pool,
1504 const VkImageResolve* from,
1505 VkImageResolve* to)
1506{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001507 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001508 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001509 deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1510 deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
1511 deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1512 deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
1513 deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
1514}
1515
1516void deepcopy_VkMemoryBarrier(
1517 Pool* pool,
1518 const VkMemoryBarrier* from,
1519 VkMemoryBarrier* to)
1520{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001521 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001522 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001523 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001524}
1525
1526void deepcopy_VkBufferMemoryBarrier(
1527 Pool* pool,
1528 const VkBufferMemoryBarrier* from,
1529 VkBufferMemoryBarrier* to)
1530{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001531 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001532 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001533 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001534}
1535
1536void deepcopy_VkImageMemoryBarrier(
1537 Pool* pool,
1538 const VkImageMemoryBarrier* from,
1539 VkImageMemoryBarrier* to)
1540{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001541 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001542 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001543 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001544 deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
1545}
1546
1547void deepcopy_VkRenderPassBeginInfo(
1548 Pool* pool,
1549 const VkRenderPassBeginInfo* from,
1550 VkRenderPassBeginInfo* to)
1551{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001552 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001553 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001554 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001555 deepcopy_VkRect2D(pool, &from->renderArea, (VkRect2D*)(&to->renderArea));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001556 to->pClearValues = nullptr;
1557 if (from->pClearValues)
1558 {
1559 to->pClearValues = (VkClearValue*)pool->alloc(from->clearValueCount * sizeof(const VkClearValue));
1560 to->clearValueCount = from->clearValueCount;
1561 for (uint32_t i = 0; i < (uint32_t)from->clearValueCount; ++i)
1562 {
1563 deepcopy_VkClearValue(pool, from->pClearValues + i, (VkClearValue*)(to->pClearValues + i));
1564 }
1565 }
1566}
1567
1568void deepcopy_VkDispatchIndirectCommand(
1569 Pool* pool,
1570 const VkDispatchIndirectCommand* from,
1571 VkDispatchIndirectCommand* to)
1572{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001573 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001574 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001575}
1576
1577void deepcopy_VkDrawIndexedIndirectCommand(
1578 Pool* pool,
1579 const VkDrawIndexedIndirectCommand* from,
1580 VkDrawIndexedIndirectCommand* to)
1581{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001582 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001583 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001584}
1585
1586void deepcopy_VkDrawIndirectCommand(
1587 Pool* pool,
1588 const VkDrawIndirectCommand* from,
1589 VkDrawIndirectCommand* to)
1590{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001591 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001592 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001593}
1594
1595void deepcopy_VkBaseOutStructure(
1596 Pool* pool,
1597 const VkBaseOutStructure* from,
1598 VkBaseOutStructure* to)
1599{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001600 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001601 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001602 // TODO: Unsupported : VkBaseOutStructure* pNext
1603}
1604
1605void deepcopy_VkBaseInStructure(
1606 Pool* pool,
1607 const VkBaseInStructure* from,
1608 VkBaseInStructure* to)
1609{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001610 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001611 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001612 // TODO: Unsupported : const VkBaseInStructure* pNext
1613}
1614
1615#endif
1616#ifdef VK_VERSION_1_1
1617void deepcopy_VkPhysicalDeviceSubgroupProperties(
1618 Pool* pool,
1619 const VkPhysicalDeviceSubgroupProperties* from,
1620 VkPhysicalDeviceSubgroupProperties* to)
1621{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001622 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001623 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001624 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001625}
1626
1627void deepcopy_VkBindBufferMemoryInfo(
1628 Pool* pool,
1629 const VkBindBufferMemoryInfo* from,
1630 VkBindBufferMemoryInfo* to)
1631{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001632 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001633 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001634 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001635}
1636
1637void deepcopy_VkBindImageMemoryInfo(
1638 Pool* pool,
1639 const VkBindImageMemoryInfo* from,
1640 VkBindImageMemoryInfo* to)
1641{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001642 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001643 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001644 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001645}
1646
1647void deepcopy_VkPhysicalDevice16BitStorageFeatures(
1648 Pool* pool,
1649 const VkPhysicalDevice16BitStorageFeatures* from,
1650 VkPhysicalDevice16BitStorageFeatures* to)
1651{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001652 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001653 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001654 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001655}
1656
1657void deepcopy_VkMemoryDedicatedRequirements(
1658 Pool* pool,
1659 const VkMemoryDedicatedRequirements* from,
1660 VkMemoryDedicatedRequirements* to)
1661{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001662 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001663 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001664 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001665}
1666
1667void deepcopy_VkMemoryDedicatedAllocateInfo(
1668 Pool* pool,
1669 const VkMemoryDedicatedAllocateInfo* from,
1670 VkMemoryDedicatedAllocateInfo* to)
1671{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001672 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001673 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001674 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001675}
1676
1677void deepcopy_VkMemoryAllocateFlagsInfo(
1678 Pool* pool,
1679 const VkMemoryAllocateFlagsInfo* from,
1680 VkMemoryAllocateFlagsInfo* to)
1681{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001682 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001683 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001684 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001685}
1686
1687void deepcopy_VkDeviceGroupRenderPassBeginInfo(
1688 Pool* pool,
1689 const VkDeviceGroupRenderPassBeginInfo* from,
1690 VkDeviceGroupRenderPassBeginInfo* to)
1691{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001692 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001693 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001694 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001695 to->pDeviceRenderAreas = nullptr;
1696 if (from->pDeviceRenderAreas)
1697 {
1698 to->pDeviceRenderAreas = (VkRect2D*)pool->alloc(from->deviceRenderAreaCount * sizeof(const VkRect2D));
1699 to->deviceRenderAreaCount = from->deviceRenderAreaCount;
1700 for (uint32_t i = 0; i < (uint32_t)from->deviceRenderAreaCount; ++i)
1701 {
1702 deepcopy_VkRect2D(pool, from->pDeviceRenderAreas + i, (VkRect2D*)(to->pDeviceRenderAreas + i));
1703 }
1704 }
1705}
1706
1707void deepcopy_VkDeviceGroupCommandBufferBeginInfo(
1708 Pool* pool,
1709 const VkDeviceGroupCommandBufferBeginInfo* from,
1710 VkDeviceGroupCommandBufferBeginInfo* to)
1711{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001712 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001713 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001714 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001715}
1716
1717void deepcopy_VkDeviceGroupSubmitInfo(
1718 Pool* pool,
1719 const VkDeviceGroupSubmitInfo* from,
1720 VkDeviceGroupSubmitInfo* to)
1721{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001722 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001723 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001724 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001725 to->pWaitSemaphoreDeviceIndices = nullptr;
1726 if (from->pWaitSemaphoreDeviceIndices)
1727 {
1728 to->pWaitSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pWaitSemaphoreDeviceIndices, from->waitSemaphoreCount * sizeof(const uint32_t));
1729 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001730 to->pCommandBufferDeviceMasks = nullptr;
1731 if (from->pCommandBufferDeviceMasks)
1732 {
1733 to->pCommandBufferDeviceMasks = (uint32_t*)pool->dupArray(from->pCommandBufferDeviceMasks, from->commandBufferCount * sizeof(const uint32_t));
1734 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001735 to->pSignalSemaphoreDeviceIndices = nullptr;
1736 if (from->pSignalSemaphoreDeviceIndices)
1737 {
1738 to->pSignalSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pSignalSemaphoreDeviceIndices, from->signalSemaphoreCount * sizeof(const uint32_t));
1739 }
1740}
1741
1742void deepcopy_VkDeviceGroupBindSparseInfo(
1743 Pool* pool,
1744 const VkDeviceGroupBindSparseInfo* from,
1745 VkDeviceGroupBindSparseInfo* to)
1746{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001747 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001748 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001749 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001750}
1751
1752void deepcopy_VkBindBufferMemoryDeviceGroupInfo(
1753 Pool* pool,
1754 const VkBindBufferMemoryDeviceGroupInfo* from,
1755 VkBindBufferMemoryDeviceGroupInfo* to)
1756{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001757 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001758 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001759 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001760 to->pDeviceIndices = nullptr;
1761 if (from->pDeviceIndices)
1762 {
1763 to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
1764 }
1765}
1766
1767void deepcopy_VkBindImageMemoryDeviceGroupInfo(
1768 Pool* pool,
1769 const VkBindImageMemoryDeviceGroupInfo* from,
1770 VkBindImageMemoryDeviceGroupInfo* to)
1771{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001772 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001773 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001774 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001775 to->pDeviceIndices = nullptr;
1776 if (from->pDeviceIndices)
1777 {
1778 to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
1779 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001780 to->pSplitInstanceBindRegions = nullptr;
1781 if (from->pSplitInstanceBindRegions)
1782 {
1783 to->pSplitInstanceBindRegions = (VkRect2D*)pool->alloc(from->splitInstanceBindRegionCount * sizeof(const VkRect2D));
1784 to->splitInstanceBindRegionCount = from->splitInstanceBindRegionCount;
1785 for (uint32_t i = 0; i < (uint32_t)from->splitInstanceBindRegionCount; ++i)
1786 {
1787 deepcopy_VkRect2D(pool, from->pSplitInstanceBindRegions + i, (VkRect2D*)(to->pSplitInstanceBindRegions + i));
1788 }
1789 }
1790}
1791
1792void deepcopy_VkPhysicalDeviceGroupProperties(
1793 Pool* pool,
1794 const VkPhysicalDeviceGroupProperties* from,
1795 VkPhysicalDeviceGroupProperties* to)
1796{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001797 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001798 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001799 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001800 memcpy(to->physicalDevices, from->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001801}
1802
1803void deepcopy_VkDeviceGroupDeviceCreateInfo(
1804 Pool* pool,
1805 const VkDeviceGroupDeviceCreateInfo* from,
1806 VkDeviceGroupDeviceCreateInfo* to)
1807{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001808 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001809 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001810 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001811 to->pPhysicalDevices = nullptr;
1812 if (from->pPhysicalDevices)
1813 {
1814 to->pPhysicalDevices = (VkPhysicalDevice*)pool->dupArray(from->pPhysicalDevices, from->physicalDeviceCount * sizeof(const VkPhysicalDevice));
1815 }
1816}
1817
1818void deepcopy_VkBufferMemoryRequirementsInfo2(
1819 Pool* pool,
1820 const VkBufferMemoryRequirementsInfo2* from,
1821 VkBufferMemoryRequirementsInfo2* to)
1822{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001823 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001824 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001825 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001826}
1827
1828void deepcopy_VkImageMemoryRequirementsInfo2(
1829 Pool* pool,
1830 const VkImageMemoryRequirementsInfo2* from,
1831 VkImageMemoryRequirementsInfo2* to)
1832{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001833 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001834 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001835 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001836}
1837
1838void deepcopy_VkImageSparseMemoryRequirementsInfo2(
1839 Pool* pool,
1840 const VkImageSparseMemoryRequirementsInfo2* from,
1841 VkImageSparseMemoryRequirementsInfo2* to)
1842{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001843 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001844 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001845 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001846}
1847
1848void deepcopy_VkMemoryRequirements2(
1849 Pool* pool,
1850 const VkMemoryRequirements2* from,
1851 VkMemoryRequirements2* to)
1852{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001853 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001854 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001855 to->pNext = from->pNext;
1856 deepcopy_VkMemoryRequirements(pool, &from->memoryRequirements, (VkMemoryRequirements*)(&to->memoryRequirements));
1857}
1858
1859void deepcopy_VkSparseImageMemoryRequirements2(
1860 Pool* pool,
1861 const VkSparseImageMemoryRequirements2* from,
1862 VkSparseImageMemoryRequirements2* to)
1863{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001864 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001865 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001866 to->pNext = from->pNext;
1867 deepcopy_VkSparseImageMemoryRequirements(pool, &from->memoryRequirements, (VkSparseImageMemoryRequirements*)(&to->memoryRequirements));
1868}
1869
1870void deepcopy_VkPhysicalDeviceFeatures2(
1871 Pool* pool,
1872 const VkPhysicalDeviceFeatures2* from,
1873 VkPhysicalDeviceFeatures2* to)
1874{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001875 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001876 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001877 to->pNext = from->pNext;
1878 deepcopy_VkPhysicalDeviceFeatures(pool, &from->features, (VkPhysicalDeviceFeatures*)(&to->features));
1879}
1880
1881void deepcopy_VkPhysicalDeviceProperties2(
1882 Pool* pool,
1883 const VkPhysicalDeviceProperties2* from,
1884 VkPhysicalDeviceProperties2* to)
1885{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001886 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001887 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001888 to->pNext = from->pNext;
1889 deepcopy_VkPhysicalDeviceProperties(pool, &from->properties, (VkPhysicalDeviceProperties*)(&to->properties));
1890}
1891
1892void deepcopy_VkFormatProperties2(
1893 Pool* pool,
1894 const VkFormatProperties2* from,
1895 VkFormatProperties2* to)
1896{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001897 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001898 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001899 to->pNext = from->pNext;
1900 deepcopy_VkFormatProperties(pool, &from->formatProperties, (VkFormatProperties*)(&to->formatProperties));
1901}
1902
1903void deepcopy_VkImageFormatProperties2(
1904 Pool* pool,
1905 const VkImageFormatProperties2* from,
1906 VkImageFormatProperties2* to)
1907{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001908 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001909 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001910 to->pNext = from->pNext;
1911 deepcopy_VkImageFormatProperties(pool, &from->imageFormatProperties, (VkImageFormatProperties*)(&to->imageFormatProperties));
1912}
1913
1914void deepcopy_VkPhysicalDeviceImageFormatInfo2(
1915 Pool* pool,
1916 const VkPhysicalDeviceImageFormatInfo2* from,
1917 VkPhysicalDeviceImageFormatInfo2* to)
1918{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001919 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001920 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001921 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001922}
1923
1924void deepcopy_VkQueueFamilyProperties2(
1925 Pool* pool,
1926 const VkQueueFamilyProperties2* from,
1927 VkQueueFamilyProperties2* to)
1928{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001929 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001930 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001931 to->pNext = from->pNext;
1932 deepcopy_VkQueueFamilyProperties(pool, &from->queueFamilyProperties, (VkQueueFamilyProperties*)(&to->queueFamilyProperties));
1933}
1934
1935void deepcopy_VkPhysicalDeviceMemoryProperties2(
1936 Pool* pool,
1937 const VkPhysicalDeviceMemoryProperties2* from,
1938 VkPhysicalDeviceMemoryProperties2* to)
1939{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001940 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001941 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001942 to->pNext = from->pNext;
1943 deepcopy_VkPhysicalDeviceMemoryProperties(pool, &from->memoryProperties, (VkPhysicalDeviceMemoryProperties*)(&to->memoryProperties));
1944}
1945
1946void deepcopy_VkSparseImageFormatProperties2(
1947 Pool* pool,
1948 const VkSparseImageFormatProperties2* from,
1949 VkSparseImageFormatProperties2* to)
1950{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001951 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001952 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001953 to->pNext = from->pNext;
1954 deepcopy_VkSparseImageFormatProperties(pool, &from->properties, (VkSparseImageFormatProperties*)(&to->properties));
1955}
1956
1957void deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(
1958 Pool* pool,
1959 const VkPhysicalDeviceSparseImageFormatInfo2* from,
1960 VkPhysicalDeviceSparseImageFormatInfo2* to)
1961{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001962 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001963 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001964 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001965}
1966
1967void deepcopy_VkPhysicalDevicePointClippingProperties(
1968 Pool* pool,
1969 const VkPhysicalDevicePointClippingProperties* from,
1970 VkPhysicalDevicePointClippingProperties* to)
1971{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001972 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001973 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001974 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001975}
1976
1977void deepcopy_VkInputAttachmentAspectReference(
1978 Pool* pool,
1979 const VkInputAttachmentAspectReference* from,
1980 VkInputAttachmentAspectReference* to)
1981{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001982 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001983 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001984}
1985
1986void deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(
1987 Pool* pool,
1988 const VkRenderPassInputAttachmentAspectCreateInfo* from,
1989 VkRenderPassInputAttachmentAspectCreateInfo* to)
1990{
Lingfeng Yang36891c52018-11-09 14:18:35 -08001991 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08001992 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001993 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08001994 to->pAspectReferences = nullptr;
1995 if (from->pAspectReferences)
1996 {
1997 to->pAspectReferences = (VkInputAttachmentAspectReference*)pool->alloc(from->aspectReferenceCount * sizeof(const VkInputAttachmentAspectReference));
1998 to->aspectReferenceCount = from->aspectReferenceCount;
1999 for (uint32_t i = 0; i < (uint32_t)from->aspectReferenceCount; ++i)
2000 {
2001 deepcopy_VkInputAttachmentAspectReference(pool, from->pAspectReferences + i, (VkInputAttachmentAspectReference*)(to->pAspectReferences + i));
2002 }
2003 }
2004}
2005
2006void deepcopy_VkImageViewUsageCreateInfo(
2007 Pool* pool,
2008 const VkImageViewUsageCreateInfo* from,
2009 VkImageViewUsageCreateInfo* to)
2010{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002011 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002012 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002013 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002014}
2015
2016void deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(
2017 Pool* pool,
2018 const VkPipelineTessellationDomainOriginStateCreateInfo* from,
2019 VkPipelineTessellationDomainOriginStateCreateInfo* to)
2020{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002021 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002022 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002023 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002024}
2025
2026void deepcopy_VkRenderPassMultiviewCreateInfo(
2027 Pool* pool,
2028 const VkRenderPassMultiviewCreateInfo* from,
2029 VkRenderPassMultiviewCreateInfo* to)
2030{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002031 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002032 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002033 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002034 to->pViewMasks = nullptr;
2035 if (from->pViewMasks)
2036 {
2037 to->pViewMasks = (uint32_t*)pool->dupArray(from->pViewMasks, from->subpassCount * sizeof(const uint32_t));
2038 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002039 to->pViewOffsets = nullptr;
2040 if (from->pViewOffsets)
2041 {
2042 to->pViewOffsets = (int32_t*)pool->dupArray(from->pViewOffsets, from->dependencyCount * sizeof(const int32_t));
2043 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002044 to->pCorrelationMasks = nullptr;
2045 if (from->pCorrelationMasks)
2046 {
2047 to->pCorrelationMasks = (uint32_t*)pool->dupArray(from->pCorrelationMasks, from->correlationMaskCount * sizeof(const uint32_t));
2048 }
2049}
2050
2051void deepcopy_VkPhysicalDeviceMultiviewFeatures(
2052 Pool* pool,
2053 const VkPhysicalDeviceMultiviewFeatures* from,
2054 VkPhysicalDeviceMultiviewFeatures* to)
2055{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002056 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002057 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002058 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002059}
2060
2061void deepcopy_VkPhysicalDeviceMultiviewProperties(
2062 Pool* pool,
2063 const VkPhysicalDeviceMultiviewProperties* from,
2064 VkPhysicalDeviceMultiviewProperties* to)
2065{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002066 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002067 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002068 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002069}
2070
2071void deepcopy_VkPhysicalDeviceVariablePointerFeatures(
2072 Pool* pool,
2073 const VkPhysicalDeviceVariablePointerFeatures* from,
2074 VkPhysicalDeviceVariablePointerFeatures* to)
2075{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002076 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002077 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002078 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002079}
2080
2081void deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(
2082 Pool* pool,
2083 const VkPhysicalDeviceProtectedMemoryFeatures* from,
2084 VkPhysicalDeviceProtectedMemoryFeatures* to)
2085{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002086 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002087 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002088 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002089}
2090
2091void deepcopy_VkPhysicalDeviceProtectedMemoryProperties(
2092 Pool* pool,
2093 const VkPhysicalDeviceProtectedMemoryProperties* from,
2094 VkPhysicalDeviceProtectedMemoryProperties* to)
2095{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002096 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002097 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002098 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002099}
2100
2101void deepcopy_VkDeviceQueueInfo2(
2102 Pool* pool,
2103 const VkDeviceQueueInfo2* from,
2104 VkDeviceQueueInfo2* to)
2105{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002106 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002107 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002108 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002109}
2110
2111void deepcopy_VkProtectedSubmitInfo(
2112 Pool* pool,
2113 const VkProtectedSubmitInfo* from,
2114 VkProtectedSubmitInfo* to)
2115{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002116 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002117 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002118 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002119}
2120
2121void deepcopy_VkSamplerYcbcrConversionCreateInfo(
2122 Pool* pool,
2123 const VkSamplerYcbcrConversionCreateInfo* from,
2124 VkSamplerYcbcrConversionCreateInfo* to)
2125{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002126 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002127 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002128 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002129 deepcopy_VkComponentMapping(pool, &from->components, (VkComponentMapping*)(&to->components));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002130}
2131
2132void deepcopy_VkSamplerYcbcrConversionInfo(
2133 Pool* pool,
2134 const VkSamplerYcbcrConversionInfo* from,
2135 VkSamplerYcbcrConversionInfo* to)
2136{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002137 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002138 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002139 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002140}
2141
2142void deepcopy_VkBindImagePlaneMemoryInfo(
2143 Pool* pool,
2144 const VkBindImagePlaneMemoryInfo* from,
2145 VkBindImagePlaneMemoryInfo* to)
2146{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002147 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002148 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002149 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002150}
2151
2152void deepcopy_VkImagePlaneMemoryRequirementsInfo(
2153 Pool* pool,
2154 const VkImagePlaneMemoryRequirementsInfo* from,
2155 VkImagePlaneMemoryRequirementsInfo* to)
2156{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002157 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002158 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002159 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002160}
2161
2162void deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
2163 Pool* pool,
2164 const VkPhysicalDeviceSamplerYcbcrConversionFeatures* from,
2165 VkPhysicalDeviceSamplerYcbcrConversionFeatures* to)
2166{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002167 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002168 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002169 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002170}
2171
2172void deepcopy_VkSamplerYcbcrConversionImageFormatProperties(
2173 Pool* pool,
2174 const VkSamplerYcbcrConversionImageFormatProperties* from,
2175 VkSamplerYcbcrConversionImageFormatProperties* to)
2176{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002177 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002178 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002179 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002180}
2181
2182void deepcopy_VkDescriptorUpdateTemplateEntry(
2183 Pool* pool,
2184 const VkDescriptorUpdateTemplateEntry* from,
2185 VkDescriptorUpdateTemplateEntry* to)
2186{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002187 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002188 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002189}
2190
2191void deepcopy_VkDescriptorUpdateTemplateCreateInfo(
2192 Pool* pool,
2193 const VkDescriptorUpdateTemplateCreateInfo* from,
2194 VkDescriptorUpdateTemplateCreateInfo* to)
2195{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002196 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002197 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002198 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002199 to->pDescriptorUpdateEntries = nullptr;
2200 if (from->pDescriptorUpdateEntries)
2201 {
2202 to->pDescriptorUpdateEntries = (VkDescriptorUpdateTemplateEntry*)pool->alloc(from->descriptorUpdateEntryCount * sizeof(const VkDescriptorUpdateTemplateEntry));
2203 to->descriptorUpdateEntryCount = from->descriptorUpdateEntryCount;
2204 for (uint32_t i = 0; i < (uint32_t)from->descriptorUpdateEntryCount; ++i)
2205 {
2206 deepcopy_VkDescriptorUpdateTemplateEntry(pool, from->pDescriptorUpdateEntries + i, (VkDescriptorUpdateTemplateEntry*)(to->pDescriptorUpdateEntries + i));
2207 }
2208 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002209}
2210
2211void deepcopy_VkExternalMemoryProperties(
2212 Pool* pool,
2213 const VkExternalMemoryProperties* from,
2214 VkExternalMemoryProperties* to)
2215{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002216 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002217 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002218}
2219
2220void deepcopy_VkPhysicalDeviceExternalImageFormatInfo(
2221 Pool* pool,
2222 const VkPhysicalDeviceExternalImageFormatInfo* from,
2223 VkPhysicalDeviceExternalImageFormatInfo* to)
2224{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002225 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002226 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002227 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002228}
2229
2230void deepcopy_VkExternalImageFormatProperties(
2231 Pool* pool,
2232 const VkExternalImageFormatProperties* from,
2233 VkExternalImageFormatProperties* to)
2234{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002235 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002236 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002237 to->pNext = from->pNext;
2238 deepcopy_VkExternalMemoryProperties(pool, &from->externalMemoryProperties, (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
2239}
2240
2241void deepcopy_VkPhysicalDeviceExternalBufferInfo(
2242 Pool* pool,
2243 const VkPhysicalDeviceExternalBufferInfo* from,
2244 VkPhysicalDeviceExternalBufferInfo* to)
2245{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002246 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002247 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002248 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002249}
2250
2251void deepcopy_VkExternalBufferProperties(
2252 Pool* pool,
2253 const VkExternalBufferProperties* from,
2254 VkExternalBufferProperties* to)
2255{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002256 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002257 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002258 to->pNext = from->pNext;
2259 deepcopy_VkExternalMemoryProperties(pool, &from->externalMemoryProperties, (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
2260}
2261
2262void deepcopy_VkPhysicalDeviceIDProperties(
2263 Pool* pool,
2264 const VkPhysicalDeviceIDProperties* from,
2265 VkPhysicalDeviceIDProperties* to)
2266{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002267 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002268 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002269 to->pNext = from->pNext;
2270 memcpy(to->deviceUUID, from->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
2271 memcpy(to->driverUUID, from->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
2272 memcpy(to->deviceLUID, from->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002273}
2274
2275void deepcopy_VkExternalMemoryImageCreateInfo(
2276 Pool* pool,
2277 const VkExternalMemoryImageCreateInfo* from,
2278 VkExternalMemoryImageCreateInfo* to)
2279{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002280 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002281 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002282 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002283}
2284
2285void deepcopy_VkExternalMemoryBufferCreateInfo(
2286 Pool* pool,
2287 const VkExternalMemoryBufferCreateInfo* from,
2288 VkExternalMemoryBufferCreateInfo* to)
2289{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002290 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002291 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002292 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002293}
2294
2295void deepcopy_VkExportMemoryAllocateInfo(
2296 Pool* pool,
2297 const VkExportMemoryAllocateInfo* from,
2298 VkExportMemoryAllocateInfo* to)
2299{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002300 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002301 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002302 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002303}
2304
2305void deepcopy_VkPhysicalDeviceExternalFenceInfo(
2306 Pool* pool,
2307 const VkPhysicalDeviceExternalFenceInfo* from,
2308 VkPhysicalDeviceExternalFenceInfo* to)
2309{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002310 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002311 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002312 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002313}
2314
2315void deepcopy_VkExternalFenceProperties(
2316 Pool* pool,
2317 const VkExternalFenceProperties* from,
2318 VkExternalFenceProperties* to)
2319{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002320 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002321 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002322 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002323}
2324
2325void deepcopy_VkExportFenceCreateInfo(
2326 Pool* pool,
2327 const VkExportFenceCreateInfo* from,
2328 VkExportFenceCreateInfo* to)
2329{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002330 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002331 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002332 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002333}
2334
2335void deepcopy_VkExportSemaphoreCreateInfo(
2336 Pool* pool,
2337 const VkExportSemaphoreCreateInfo* from,
2338 VkExportSemaphoreCreateInfo* to)
2339{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002340 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002341 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002342 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002343}
2344
2345void deepcopy_VkPhysicalDeviceExternalSemaphoreInfo(
2346 Pool* pool,
2347 const VkPhysicalDeviceExternalSemaphoreInfo* from,
2348 VkPhysicalDeviceExternalSemaphoreInfo* to)
2349{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002350 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002351 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002352 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002353}
2354
2355void deepcopy_VkExternalSemaphoreProperties(
2356 Pool* pool,
2357 const VkExternalSemaphoreProperties* from,
2358 VkExternalSemaphoreProperties* to)
2359{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002360 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002361 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002362 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002363}
2364
2365void deepcopy_VkPhysicalDeviceMaintenance3Properties(
2366 Pool* pool,
2367 const VkPhysicalDeviceMaintenance3Properties* from,
2368 VkPhysicalDeviceMaintenance3Properties* to)
2369{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002370 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002371 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002372 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002373}
2374
2375void deepcopy_VkDescriptorSetLayoutSupport(
2376 Pool* pool,
2377 const VkDescriptorSetLayoutSupport* from,
2378 VkDescriptorSetLayoutSupport* to)
2379{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002380 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002381 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002382 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002383}
2384
2385void deepcopy_VkPhysicalDeviceShaderDrawParameterFeatures(
2386 Pool* pool,
2387 const VkPhysicalDeviceShaderDrawParameterFeatures* from,
2388 VkPhysicalDeviceShaderDrawParameterFeatures* to)
2389{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002390 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002391 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002392 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002393}
2394
2395#endif
2396#ifdef VK_KHR_surface
2397void deepcopy_VkSurfaceCapabilitiesKHR(
2398 Pool* pool,
2399 const VkSurfaceCapabilitiesKHR* from,
2400 VkSurfaceCapabilitiesKHR* to)
2401{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002402 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002403 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002404 deepcopy_VkExtent2D(pool, &from->currentExtent, (VkExtent2D*)(&to->currentExtent));
2405 deepcopy_VkExtent2D(pool, &from->minImageExtent, (VkExtent2D*)(&to->minImageExtent));
2406 deepcopy_VkExtent2D(pool, &from->maxImageExtent, (VkExtent2D*)(&to->maxImageExtent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002407}
2408
2409void deepcopy_VkSurfaceFormatKHR(
2410 Pool* pool,
2411 const VkSurfaceFormatKHR* from,
2412 VkSurfaceFormatKHR* to)
2413{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002414 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002415 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002416}
2417
2418#endif
2419#ifdef VK_KHR_swapchain
2420void deepcopy_VkSwapchainCreateInfoKHR(
2421 Pool* pool,
2422 const VkSwapchainCreateInfoKHR* from,
2423 VkSwapchainCreateInfoKHR* to)
2424{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002425 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002426 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002427 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002428 deepcopy_VkExtent2D(pool, &from->imageExtent, (VkExtent2D*)(&to->imageExtent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002429 to->pQueueFamilyIndices = nullptr;
2430 if (from->pQueueFamilyIndices)
2431 {
2432 to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
2433 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002434}
2435
2436void deepcopy_VkPresentInfoKHR(
2437 Pool* pool,
2438 const VkPresentInfoKHR* from,
2439 VkPresentInfoKHR* to)
2440{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002441 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002442 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002443 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002444 to->pWaitSemaphores = nullptr;
2445 if (from->pWaitSemaphores)
2446 {
2447 to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
2448 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002449 to->pSwapchains = nullptr;
2450 if (from->pSwapchains)
2451 {
2452 to->pSwapchains = (VkSwapchainKHR*)pool->dupArray(from->pSwapchains, from->swapchainCount * sizeof(const VkSwapchainKHR));
2453 }
2454 to->pImageIndices = nullptr;
2455 if (from->pImageIndices)
2456 {
2457 to->pImageIndices = (uint32_t*)pool->dupArray(from->pImageIndices, from->swapchainCount * sizeof(const uint32_t));
2458 }
2459 to->pResults = nullptr;
2460 if (from->pResults)
2461 {
2462 to->pResults = (VkResult*)pool->dupArray(from->pResults, from->swapchainCount * sizeof(VkResult));
2463 }
2464}
2465
2466void deepcopy_VkImageSwapchainCreateInfoKHR(
2467 Pool* pool,
2468 const VkImageSwapchainCreateInfoKHR* from,
2469 VkImageSwapchainCreateInfoKHR* to)
2470{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002471 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002472 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002473 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002474}
2475
2476void deepcopy_VkBindImageMemorySwapchainInfoKHR(
2477 Pool* pool,
2478 const VkBindImageMemorySwapchainInfoKHR* from,
2479 VkBindImageMemorySwapchainInfoKHR* to)
2480{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002481 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002482 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002483 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002484}
2485
2486void deepcopy_VkAcquireNextImageInfoKHR(
2487 Pool* pool,
2488 const VkAcquireNextImageInfoKHR* from,
2489 VkAcquireNextImageInfoKHR* to)
2490{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002491 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002492 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002493 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002494}
2495
2496void deepcopy_VkDeviceGroupPresentCapabilitiesKHR(
2497 Pool* pool,
2498 const VkDeviceGroupPresentCapabilitiesKHR* from,
2499 VkDeviceGroupPresentCapabilitiesKHR* to)
2500{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002501 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002502 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002503 to->pNext = from->pNext;
2504 memcpy(to->presentMask, from->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002505}
2506
2507void deepcopy_VkDeviceGroupPresentInfoKHR(
2508 Pool* pool,
2509 const VkDeviceGroupPresentInfoKHR* from,
2510 VkDeviceGroupPresentInfoKHR* to)
2511{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002512 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002513 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002514 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002515 to->pDeviceMasks = nullptr;
2516 if (from->pDeviceMasks)
2517 {
2518 to->pDeviceMasks = (uint32_t*)pool->dupArray(from->pDeviceMasks, from->swapchainCount * sizeof(const uint32_t));
2519 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002520}
2521
2522void deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(
2523 Pool* pool,
2524 const VkDeviceGroupSwapchainCreateInfoKHR* from,
2525 VkDeviceGroupSwapchainCreateInfoKHR* to)
2526{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002527 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002528 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002529 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002530}
2531
2532#endif
2533#ifdef VK_KHR_display
2534void deepcopy_VkDisplayPropertiesKHR(
2535 Pool* pool,
2536 const VkDisplayPropertiesKHR* from,
2537 VkDisplayPropertiesKHR* to)
2538{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002539 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002540 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002541 to->displayName = nullptr;
2542 if (from->displayName)
2543 {
2544 to->displayName = pool->strDup(from->displayName);
2545 }
2546 deepcopy_VkExtent2D(pool, &from->physicalDimensions, (VkExtent2D*)(&to->physicalDimensions));
2547 deepcopy_VkExtent2D(pool, &from->physicalResolution, (VkExtent2D*)(&to->physicalResolution));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002548}
2549
2550void deepcopy_VkDisplayModeParametersKHR(
2551 Pool* pool,
2552 const VkDisplayModeParametersKHR* from,
2553 VkDisplayModeParametersKHR* to)
2554{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002555 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002556 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002557 deepcopy_VkExtent2D(pool, &from->visibleRegion, (VkExtent2D*)(&to->visibleRegion));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002558}
2559
2560void deepcopy_VkDisplayModePropertiesKHR(
2561 Pool* pool,
2562 const VkDisplayModePropertiesKHR* from,
2563 VkDisplayModePropertiesKHR* to)
2564{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002565 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002566 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002567 deepcopy_VkDisplayModeParametersKHR(pool, &from->parameters, (VkDisplayModeParametersKHR*)(&to->parameters));
2568}
2569
2570void deepcopy_VkDisplayModeCreateInfoKHR(
2571 Pool* pool,
2572 const VkDisplayModeCreateInfoKHR* from,
2573 VkDisplayModeCreateInfoKHR* to)
2574{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002575 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002576 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002577 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002578 deepcopy_VkDisplayModeParametersKHR(pool, &from->parameters, (VkDisplayModeParametersKHR*)(&to->parameters));
2579}
2580
2581void deepcopy_VkDisplayPlaneCapabilitiesKHR(
2582 Pool* pool,
2583 const VkDisplayPlaneCapabilitiesKHR* from,
2584 VkDisplayPlaneCapabilitiesKHR* to)
2585{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002586 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002587 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002588 deepcopy_VkOffset2D(pool, &from->minSrcPosition, (VkOffset2D*)(&to->minSrcPosition));
2589 deepcopy_VkOffset2D(pool, &from->maxSrcPosition, (VkOffset2D*)(&to->maxSrcPosition));
2590 deepcopy_VkExtent2D(pool, &from->minSrcExtent, (VkExtent2D*)(&to->minSrcExtent));
2591 deepcopy_VkExtent2D(pool, &from->maxSrcExtent, (VkExtent2D*)(&to->maxSrcExtent));
2592 deepcopy_VkOffset2D(pool, &from->minDstPosition, (VkOffset2D*)(&to->minDstPosition));
2593 deepcopy_VkOffset2D(pool, &from->maxDstPosition, (VkOffset2D*)(&to->maxDstPosition));
2594 deepcopy_VkExtent2D(pool, &from->minDstExtent, (VkExtent2D*)(&to->minDstExtent));
2595 deepcopy_VkExtent2D(pool, &from->maxDstExtent, (VkExtent2D*)(&to->maxDstExtent));
2596}
2597
2598void deepcopy_VkDisplayPlanePropertiesKHR(
2599 Pool* pool,
2600 const VkDisplayPlanePropertiesKHR* from,
2601 VkDisplayPlanePropertiesKHR* to)
2602{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002603 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002604 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002605}
2606
2607void deepcopy_VkDisplaySurfaceCreateInfoKHR(
2608 Pool* pool,
2609 const VkDisplaySurfaceCreateInfoKHR* from,
2610 VkDisplaySurfaceCreateInfoKHR* to)
2611{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002612 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002613 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002614 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002615 deepcopy_VkExtent2D(pool, &from->imageExtent, (VkExtent2D*)(&to->imageExtent));
2616}
2617
2618#endif
2619#ifdef VK_KHR_display_swapchain
2620void deepcopy_VkDisplayPresentInfoKHR(
2621 Pool* pool,
2622 const VkDisplayPresentInfoKHR* from,
2623 VkDisplayPresentInfoKHR* to)
2624{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002625 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002626 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002627 to->pNext = from->pNext;
2628 deepcopy_VkRect2D(pool, &from->srcRect, (VkRect2D*)(&to->srcRect));
2629 deepcopy_VkRect2D(pool, &from->dstRect, (VkRect2D*)(&to->dstRect));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002630}
2631
2632#endif
2633#ifdef VK_KHR_xlib_surface
2634void deepcopy_VkXlibSurfaceCreateInfoKHR(
2635 Pool* pool,
2636 const VkXlibSurfaceCreateInfoKHR* from,
2637 VkXlibSurfaceCreateInfoKHR* to)
2638{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002639 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002640 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002641 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002642 to->dpy = nullptr;
2643 if (from->dpy)
2644 {
2645 to->dpy = (Display*)pool->dupArray(from->dpy, sizeof(Display));
2646 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002647}
2648
2649#endif
2650#ifdef VK_KHR_xcb_surface
2651void deepcopy_VkXcbSurfaceCreateInfoKHR(
2652 Pool* pool,
2653 const VkXcbSurfaceCreateInfoKHR* from,
2654 VkXcbSurfaceCreateInfoKHR* to)
2655{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002656 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002657 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002658 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002659 to->connection = nullptr;
2660 if (from->connection)
2661 {
2662 to->connection = (xcb_connection_t*)pool->dupArray(from->connection, sizeof(xcb_connection_t));
2663 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002664}
2665
2666#endif
2667#ifdef VK_KHR_wayland_surface
2668void deepcopy_VkWaylandSurfaceCreateInfoKHR(
2669 Pool* pool,
2670 const VkWaylandSurfaceCreateInfoKHR* from,
2671 VkWaylandSurfaceCreateInfoKHR* to)
2672{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002673 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002674 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002675 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002676 to->display = nullptr;
2677 if (from->display)
2678 {
2679 to->display = (wl_display*)pool->dupArray(from->display, sizeof(wl_display));
2680 }
2681 to->surface = nullptr;
2682 if (from->surface)
2683 {
2684 to->surface = (wl_surface*)pool->dupArray(from->surface, sizeof(wl_surface));
2685 }
2686}
2687
2688#endif
2689#ifdef VK_KHR_mir_surface
2690void deepcopy_VkMirSurfaceCreateInfoKHR(
2691 Pool* pool,
2692 const VkMirSurfaceCreateInfoKHR* from,
2693 VkMirSurfaceCreateInfoKHR* to)
2694{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002695 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002696 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002697 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002698 to->connection = nullptr;
2699 if (from->connection)
2700 {
2701 to->connection = (MirConnection*)pool->dupArray(from->connection, sizeof(MirConnection));
2702 }
2703 to->mirSurface = nullptr;
2704 if (from->mirSurface)
2705 {
2706 to->mirSurface = (MirSurface*)pool->dupArray(from->mirSurface, sizeof(MirSurface));
2707 }
2708}
2709
2710#endif
2711#ifdef VK_KHR_android_surface
2712void deepcopy_VkAndroidSurfaceCreateInfoKHR(
2713 Pool* pool,
2714 const VkAndroidSurfaceCreateInfoKHR* from,
2715 VkAndroidSurfaceCreateInfoKHR* to)
2716{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002717 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002718 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002719 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002720 to->window = nullptr;
2721 if (from->window)
2722 {
2723 to->window = (ANativeWindow*)pool->dupArray(from->window, sizeof(ANativeWindow));
2724 }
2725}
2726
2727#endif
2728#ifdef VK_KHR_win32_surface
2729void deepcopy_VkWin32SurfaceCreateInfoKHR(
2730 Pool* pool,
2731 const VkWin32SurfaceCreateInfoKHR* from,
2732 VkWin32SurfaceCreateInfoKHR* to)
2733{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002734 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002735 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002736 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002737}
2738
2739#endif
2740#ifdef VK_KHR_sampler_mirror_clamp_to_edge
2741#endif
2742#ifdef VK_KHR_multiview
2743#endif
2744#ifdef VK_KHR_get_physical_device_properties2
2745#endif
2746#ifdef VK_KHR_device_group
2747#endif
2748#ifdef VK_KHR_shader_draw_parameters
2749#endif
2750#ifdef VK_KHR_maintenance1
2751#endif
2752#ifdef VK_KHR_device_group_creation
2753#endif
2754#ifdef VK_KHR_external_memory_capabilities
2755#endif
2756#ifdef VK_KHR_external_memory
2757#endif
2758#ifdef VK_KHR_external_memory_win32
2759void deepcopy_VkImportMemoryWin32HandleInfoKHR(
2760 Pool* pool,
2761 const VkImportMemoryWin32HandleInfoKHR* from,
2762 VkImportMemoryWin32HandleInfoKHR* to)
2763{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002764 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002765 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002766 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002767}
2768
2769void deepcopy_VkExportMemoryWin32HandleInfoKHR(
2770 Pool* pool,
2771 const VkExportMemoryWin32HandleInfoKHR* from,
2772 VkExportMemoryWin32HandleInfoKHR* to)
2773{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002774 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002775 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002776 to->pNext = from->pNext;
2777 to->pAttributes = nullptr;
2778 if (from->pAttributes)
2779 {
2780 to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
2781 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002782}
2783
2784void deepcopy_VkMemoryWin32HandlePropertiesKHR(
2785 Pool* pool,
2786 const VkMemoryWin32HandlePropertiesKHR* from,
2787 VkMemoryWin32HandlePropertiesKHR* to)
2788{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002789 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002790 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002791 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002792}
2793
2794void deepcopy_VkMemoryGetWin32HandleInfoKHR(
2795 Pool* pool,
2796 const VkMemoryGetWin32HandleInfoKHR* from,
2797 VkMemoryGetWin32HandleInfoKHR* to)
2798{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002799 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002800 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002801 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002802}
2803
2804#endif
2805#ifdef VK_KHR_external_memory_fd
2806void deepcopy_VkImportMemoryFdInfoKHR(
2807 Pool* pool,
2808 const VkImportMemoryFdInfoKHR* from,
2809 VkImportMemoryFdInfoKHR* to)
2810{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002811 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002812 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002813 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002814}
2815
2816void deepcopy_VkMemoryFdPropertiesKHR(
2817 Pool* pool,
2818 const VkMemoryFdPropertiesKHR* from,
2819 VkMemoryFdPropertiesKHR* to)
2820{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002821 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002822 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002823 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002824}
2825
2826void deepcopy_VkMemoryGetFdInfoKHR(
2827 Pool* pool,
2828 const VkMemoryGetFdInfoKHR* from,
2829 VkMemoryGetFdInfoKHR* to)
2830{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002831 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002832 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002833 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002834}
2835
2836#endif
2837#ifdef VK_KHR_win32_keyed_mutex
2838void deepcopy_VkWin32KeyedMutexAcquireReleaseInfoKHR(
2839 Pool* pool,
2840 const VkWin32KeyedMutexAcquireReleaseInfoKHR* from,
2841 VkWin32KeyedMutexAcquireReleaseInfoKHR* to)
2842{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002843 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002844 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002845 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002846 to->pAcquireSyncs = nullptr;
2847 if (from->pAcquireSyncs)
2848 {
2849 to->pAcquireSyncs = (VkDeviceMemory*)pool->dupArray(from->pAcquireSyncs, from->acquireCount * sizeof(const VkDeviceMemory));
2850 }
2851 to->pAcquireKeys = nullptr;
2852 if (from->pAcquireKeys)
2853 {
2854 to->pAcquireKeys = (uint64_t*)pool->dupArray(from->pAcquireKeys, from->acquireCount * sizeof(const uint64_t));
2855 }
2856 to->pAcquireTimeouts = nullptr;
2857 if (from->pAcquireTimeouts)
2858 {
2859 to->pAcquireTimeouts = (uint32_t*)pool->dupArray(from->pAcquireTimeouts, from->acquireCount * sizeof(const uint32_t));
2860 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002861 to->pReleaseSyncs = nullptr;
2862 if (from->pReleaseSyncs)
2863 {
2864 to->pReleaseSyncs = (VkDeviceMemory*)pool->dupArray(from->pReleaseSyncs, from->releaseCount * sizeof(const VkDeviceMemory));
2865 }
2866 to->pReleaseKeys = nullptr;
2867 if (from->pReleaseKeys)
2868 {
2869 to->pReleaseKeys = (uint64_t*)pool->dupArray(from->pReleaseKeys, from->releaseCount * sizeof(const uint64_t));
2870 }
2871}
2872
2873#endif
2874#ifdef VK_KHR_external_semaphore_capabilities
2875#endif
2876#ifdef VK_KHR_external_semaphore
2877#endif
2878#ifdef VK_KHR_external_semaphore_win32
2879void deepcopy_VkImportSemaphoreWin32HandleInfoKHR(
2880 Pool* pool,
2881 const VkImportSemaphoreWin32HandleInfoKHR* from,
2882 VkImportSemaphoreWin32HandleInfoKHR* to)
2883{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002884 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002885 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002886 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002887}
2888
2889void deepcopy_VkExportSemaphoreWin32HandleInfoKHR(
2890 Pool* pool,
2891 const VkExportSemaphoreWin32HandleInfoKHR* from,
2892 VkExportSemaphoreWin32HandleInfoKHR* to)
2893{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002894 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002895 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002896 to->pNext = from->pNext;
2897 to->pAttributes = nullptr;
2898 if (from->pAttributes)
2899 {
2900 to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
2901 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002902}
2903
2904void deepcopy_VkD3D12FenceSubmitInfoKHR(
2905 Pool* pool,
2906 const VkD3D12FenceSubmitInfoKHR* from,
2907 VkD3D12FenceSubmitInfoKHR* to)
2908{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002909 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002910 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002911 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002912 to->pWaitSemaphoreValues = nullptr;
2913 if (from->pWaitSemaphoreValues)
2914 {
2915 to->pWaitSemaphoreValues = (uint64_t*)pool->dupArray(from->pWaitSemaphoreValues, from->waitSemaphoreValuesCount * sizeof(const uint64_t));
2916 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002917 to->pSignalSemaphoreValues = nullptr;
2918 if (from->pSignalSemaphoreValues)
2919 {
2920 to->pSignalSemaphoreValues = (uint64_t*)pool->dupArray(from->pSignalSemaphoreValues, from->signalSemaphoreValuesCount * sizeof(const uint64_t));
2921 }
2922}
2923
2924void deepcopy_VkSemaphoreGetWin32HandleInfoKHR(
2925 Pool* pool,
2926 const VkSemaphoreGetWin32HandleInfoKHR* from,
2927 VkSemaphoreGetWin32HandleInfoKHR* to)
2928{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002929 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002930 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002931 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002932}
2933
2934#endif
2935#ifdef VK_KHR_external_semaphore_fd
2936void deepcopy_VkImportSemaphoreFdInfoKHR(
2937 Pool* pool,
2938 const VkImportSemaphoreFdInfoKHR* from,
2939 VkImportSemaphoreFdInfoKHR* to)
2940{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002941 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002942 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002943 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002944}
2945
2946void deepcopy_VkSemaphoreGetFdInfoKHR(
2947 Pool* pool,
2948 const VkSemaphoreGetFdInfoKHR* from,
2949 VkSemaphoreGetFdInfoKHR* to)
2950{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002951 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002952 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002953 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002954}
2955
2956#endif
2957#ifdef VK_KHR_push_descriptor
2958void deepcopy_VkPhysicalDevicePushDescriptorPropertiesKHR(
2959 Pool* pool,
2960 const VkPhysicalDevicePushDescriptorPropertiesKHR* from,
2961 VkPhysicalDevicePushDescriptorPropertiesKHR* to)
2962{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002963 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002964 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002965 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002966}
2967
2968#endif
2969#ifdef VK_KHR_16bit_storage
2970#endif
2971#ifdef VK_KHR_incremental_present
2972void deepcopy_VkRectLayerKHR(
2973 Pool* pool,
2974 const VkRectLayerKHR* from,
2975 VkRectLayerKHR* to)
2976{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002977 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002978 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002979 deepcopy_VkOffset2D(pool, &from->offset, (VkOffset2D*)(&to->offset));
2980 deepcopy_VkExtent2D(pool, &from->extent, (VkExtent2D*)(&to->extent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002981}
2982
2983void deepcopy_VkPresentRegionKHR(
2984 Pool* pool,
2985 const VkPresentRegionKHR* from,
2986 VkPresentRegionKHR* to)
2987{
Lingfeng Yang36891c52018-11-09 14:18:35 -08002988 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08002989 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08002990 to->pRectangles = nullptr;
2991 if (from->pRectangles)
2992 {
2993 to->pRectangles = (VkRectLayerKHR*)pool->alloc(from->rectangleCount * sizeof(const VkRectLayerKHR));
2994 to->rectangleCount = from->rectangleCount;
2995 for (uint32_t i = 0; i < (uint32_t)from->rectangleCount; ++i)
2996 {
2997 deepcopy_VkRectLayerKHR(pool, from->pRectangles + i, (VkRectLayerKHR*)(to->pRectangles + i));
2998 }
2999 }
3000}
3001
3002void deepcopy_VkPresentRegionsKHR(
3003 Pool* pool,
3004 const VkPresentRegionsKHR* from,
3005 VkPresentRegionsKHR* to)
3006{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003007 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003008 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003009 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003010 to->pRegions = nullptr;
3011 if (from->pRegions)
3012 {
3013 to->pRegions = (VkPresentRegionKHR*)pool->alloc(from->swapchainCount * sizeof(const VkPresentRegionKHR));
3014 to->swapchainCount = from->swapchainCount;
3015 for (uint32_t i = 0; i < (uint32_t)from->swapchainCount; ++i)
3016 {
3017 deepcopy_VkPresentRegionKHR(pool, from->pRegions + i, (VkPresentRegionKHR*)(to->pRegions + i));
3018 }
3019 }
3020}
3021
3022#endif
3023#ifdef VK_KHR_descriptor_update_template
3024#endif
3025#ifdef VK_KHR_create_renderpass2
3026void deepcopy_VkAttachmentDescription2KHR(
3027 Pool* pool,
3028 const VkAttachmentDescription2KHR* from,
3029 VkAttachmentDescription2KHR* to)
3030{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003031 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003032 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003033 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003034}
3035
3036void deepcopy_VkAttachmentReference2KHR(
3037 Pool* pool,
3038 const VkAttachmentReference2KHR* from,
3039 VkAttachmentReference2KHR* to)
3040{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003041 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003042 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003043 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003044}
3045
3046void deepcopy_VkSubpassDescription2KHR(
3047 Pool* pool,
3048 const VkSubpassDescription2KHR* from,
3049 VkSubpassDescription2KHR* to)
3050{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003051 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003052 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003053 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003054 to->pInputAttachments = nullptr;
3055 if (from->pInputAttachments)
3056 {
3057 to->pInputAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->inputAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3058 to->inputAttachmentCount = from->inputAttachmentCount;
3059 for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i)
3060 {
3061 deepcopy_VkAttachmentReference2KHR(pool, from->pInputAttachments + i, (VkAttachmentReference2KHR*)(to->pInputAttachments + i));
3062 }
3063 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003064 to->pColorAttachments = nullptr;
3065 if (from->pColorAttachments)
3066 {
3067 to->pColorAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3068 to->colorAttachmentCount = from->colorAttachmentCount;
3069 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
3070 {
3071 deepcopy_VkAttachmentReference2KHR(pool, from->pColorAttachments + i, (VkAttachmentReference2KHR*)(to->pColorAttachments + i));
3072 }
3073 }
3074 to->pResolveAttachments = nullptr;
3075 if (from->pResolveAttachments)
3076 {
3077 to->pResolveAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3078 to->colorAttachmentCount = from->colorAttachmentCount;
3079 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
3080 {
3081 deepcopy_VkAttachmentReference2KHR(pool, from->pResolveAttachments + i, (VkAttachmentReference2KHR*)(to->pResolveAttachments + i));
3082 }
3083 }
3084 to->pDepthStencilAttachment = nullptr;
3085 if (from->pDepthStencilAttachment)
3086 {
3087 to->pDepthStencilAttachment = (VkAttachmentReference2KHR*)pool->alloc(sizeof(const VkAttachmentReference2KHR));
3088 deepcopy_VkAttachmentReference2KHR(pool, from->pDepthStencilAttachment, (VkAttachmentReference2KHR*)(to->pDepthStencilAttachment));
3089 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003090 to->pPreserveAttachments = nullptr;
3091 if (from->pPreserveAttachments)
3092 {
3093 to->pPreserveAttachments = (uint32_t*)pool->dupArray(from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
3094 }
3095}
3096
3097void deepcopy_VkSubpassDependency2KHR(
3098 Pool* pool,
3099 const VkSubpassDependency2KHR* from,
3100 VkSubpassDependency2KHR* to)
3101{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003102 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003103 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003104 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003105}
3106
3107void deepcopy_VkRenderPassCreateInfo2KHR(
3108 Pool* pool,
3109 const VkRenderPassCreateInfo2KHR* from,
3110 VkRenderPassCreateInfo2KHR* to)
3111{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003112 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003113 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003114 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003115 to->pAttachments = nullptr;
3116 if (from->pAttachments)
3117 {
3118 to->pAttachments = (VkAttachmentDescription2KHR*)pool->alloc(from->attachmentCount * sizeof(const VkAttachmentDescription2KHR));
3119 to->attachmentCount = from->attachmentCount;
3120 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
3121 {
3122 deepcopy_VkAttachmentDescription2KHR(pool, from->pAttachments + i, (VkAttachmentDescription2KHR*)(to->pAttachments + i));
3123 }
3124 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003125 to->pSubpasses = nullptr;
3126 if (from->pSubpasses)
3127 {
3128 to->pSubpasses = (VkSubpassDescription2KHR*)pool->alloc(from->subpassCount * sizeof(const VkSubpassDescription2KHR));
3129 to->subpassCount = from->subpassCount;
3130 for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i)
3131 {
3132 deepcopy_VkSubpassDescription2KHR(pool, from->pSubpasses + i, (VkSubpassDescription2KHR*)(to->pSubpasses + i));
3133 }
3134 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003135 to->pDependencies = nullptr;
3136 if (from->pDependencies)
3137 {
3138 to->pDependencies = (VkSubpassDependency2KHR*)pool->alloc(from->dependencyCount * sizeof(const VkSubpassDependency2KHR));
3139 to->dependencyCount = from->dependencyCount;
3140 for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i)
3141 {
3142 deepcopy_VkSubpassDependency2KHR(pool, from->pDependencies + i, (VkSubpassDependency2KHR*)(to->pDependencies + i));
3143 }
3144 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003145 to->pCorrelatedViewMasks = nullptr;
3146 if (from->pCorrelatedViewMasks)
3147 {
3148 to->pCorrelatedViewMasks = (uint32_t*)pool->dupArray(from->pCorrelatedViewMasks, from->correlatedViewMaskCount * sizeof(const uint32_t));
3149 }
3150}
3151
3152void deepcopy_VkSubpassBeginInfoKHR(
3153 Pool* pool,
3154 const VkSubpassBeginInfoKHR* from,
3155 VkSubpassBeginInfoKHR* to)
3156{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003157 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003158 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003159 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003160}
3161
3162void deepcopy_VkSubpassEndInfoKHR(
3163 Pool* pool,
3164 const VkSubpassEndInfoKHR* from,
3165 VkSubpassEndInfoKHR* to)
3166{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003167 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003168 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003169 to->pNext = from->pNext;
3170}
3171
3172#endif
3173#ifdef VK_KHR_shared_presentable_image
3174void deepcopy_VkSharedPresentSurfaceCapabilitiesKHR(
3175 Pool* pool,
3176 const VkSharedPresentSurfaceCapabilitiesKHR* from,
3177 VkSharedPresentSurfaceCapabilitiesKHR* to)
3178{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003179 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003180 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003181 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003182}
3183
3184#endif
3185#ifdef VK_KHR_external_fence_capabilities
3186#endif
3187#ifdef VK_KHR_external_fence
3188#endif
3189#ifdef VK_KHR_external_fence_win32
3190void deepcopy_VkImportFenceWin32HandleInfoKHR(
3191 Pool* pool,
3192 const VkImportFenceWin32HandleInfoKHR* from,
3193 VkImportFenceWin32HandleInfoKHR* to)
3194{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003195 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003196 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003197 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003198}
3199
3200void deepcopy_VkExportFenceWin32HandleInfoKHR(
3201 Pool* pool,
3202 const VkExportFenceWin32HandleInfoKHR* from,
3203 VkExportFenceWin32HandleInfoKHR* to)
3204{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003205 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003206 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003207 to->pNext = from->pNext;
3208 to->pAttributes = nullptr;
3209 if (from->pAttributes)
3210 {
3211 to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
3212 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003213}
3214
3215void deepcopy_VkFenceGetWin32HandleInfoKHR(
3216 Pool* pool,
3217 const VkFenceGetWin32HandleInfoKHR* from,
3218 VkFenceGetWin32HandleInfoKHR* to)
3219{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003220 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003221 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003222 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003223}
3224
3225#endif
3226#ifdef VK_KHR_external_fence_fd
3227void deepcopy_VkImportFenceFdInfoKHR(
3228 Pool* pool,
3229 const VkImportFenceFdInfoKHR* from,
3230 VkImportFenceFdInfoKHR* to)
3231{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003232 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003233 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003234 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003235}
3236
3237void deepcopy_VkFenceGetFdInfoKHR(
3238 Pool* pool,
3239 const VkFenceGetFdInfoKHR* from,
3240 VkFenceGetFdInfoKHR* to)
3241{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003242 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003243 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003244 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003245}
3246
3247#endif
3248#ifdef VK_KHR_maintenance2
3249#endif
3250#ifdef VK_KHR_get_surface_capabilities2
3251void deepcopy_VkPhysicalDeviceSurfaceInfo2KHR(
3252 Pool* pool,
3253 const VkPhysicalDeviceSurfaceInfo2KHR* from,
3254 VkPhysicalDeviceSurfaceInfo2KHR* to)
3255{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003256 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003257 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003258 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003259}
3260
3261void deepcopy_VkSurfaceCapabilities2KHR(
3262 Pool* pool,
3263 const VkSurfaceCapabilities2KHR* from,
3264 VkSurfaceCapabilities2KHR* to)
3265{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003266 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003267 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003268 to->pNext = from->pNext;
3269 deepcopy_VkSurfaceCapabilitiesKHR(pool, &from->surfaceCapabilities, (VkSurfaceCapabilitiesKHR*)(&to->surfaceCapabilities));
3270}
3271
3272void deepcopy_VkSurfaceFormat2KHR(
3273 Pool* pool,
3274 const VkSurfaceFormat2KHR* from,
3275 VkSurfaceFormat2KHR* to)
3276{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003277 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003278 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003279 to->pNext = from->pNext;
3280 deepcopy_VkSurfaceFormatKHR(pool, &from->surfaceFormat, (VkSurfaceFormatKHR*)(&to->surfaceFormat));
3281}
3282
3283#endif
3284#ifdef VK_KHR_variable_pointers
3285#endif
3286#ifdef VK_KHR_get_display_properties2
3287void deepcopy_VkDisplayProperties2KHR(
3288 Pool* pool,
3289 const VkDisplayProperties2KHR* from,
3290 VkDisplayProperties2KHR* to)
3291{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003292 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003293 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003294 to->pNext = from->pNext;
3295 deepcopy_VkDisplayPropertiesKHR(pool, &from->displayProperties, (VkDisplayPropertiesKHR*)(&to->displayProperties));
3296}
3297
3298void deepcopy_VkDisplayPlaneProperties2KHR(
3299 Pool* pool,
3300 const VkDisplayPlaneProperties2KHR* from,
3301 VkDisplayPlaneProperties2KHR* to)
3302{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003303 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003304 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003305 to->pNext = from->pNext;
3306 deepcopy_VkDisplayPlanePropertiesKHR(pool, &from->displayPlaneProperties, (VkDisplayPlanePropertiesKHR*)(&to->displayPlaneProperties));
3307}
3308
3309void deepcopy_VkDisplayModeProperties2KHR(
3310 Pool* pool,
3311 const VkDisplayModeProperties2KHR* from,
3312 VkDisplayModeProperties2KHR* to)
3313{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003314 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003315 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003316 to->pNext = from->pNext;
3317 deepcopy_VkDisplayModePropertiesKHR(pool, &from->displayModeProperties, (VkDisplayModePropertiesKHR*)(&to->displayModeProperties));
3318}
3319
3320void deepcopy_VkDisplayPlaneInfo2KHR(
3321 Pool* pool,
3322 const VkDisplayPlaneInfo2KHR* from,
3323 VkDisplayPlaneInfo2KHR* to)
3324{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003325 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003326 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003327 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003328}
3329
3330void deepcopy_VkDisplayPlaneCapabilities2KHR(
3331 Pool* pool,
3332 const VkDisplayPlaneCapabilities2KHR* from,
3333 VkDisplayPlaneCapabilities2KHR* to)
3334{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003335 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003336 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003337 to->pNext = from->pNext;
3338 deepcopy_VkDisplayPlaneCapabilitiesKHR(pool, &from->capabilities, (VkDisplayPlaneCapabilitiesKHR*)(&to->capabilities));
3339}
3340
3341#endif
3342#ifdef VK_KHR_dedicated_allocation
3343#endif
3344#ifdef VK_KHR_storage_buffer_storage_class
3345#endif
3346#ifdef VK_KHR_relaxed_block_layout
3347#endif
3348#ifdef VK_KHR_get_memory_requirements2
3349#endif
3350#ifdef VK_KHR_image_format_list
3351void deepcopy_VkImageFormatListCreateInfoKHR(
3352 Pool* pool,
3353 const VkImageFormatListCreateInfoKHR* from,
3354 VkImageFormatListCreateInfoKHR* to)
3355{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003356 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003357 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003358 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003359 to->pViewFormats = nullptr;
3360 if (from->pViewFormats)
3361 {
3362 to->pViewFormats = (VkFormat*)pool->dupArray(from->pViewFormats, from->viewFormatCount * sizeof(const VkFormat));
3363 }
3364}
3365
3366#endif
3367#ifdef VK_KHR_sampler_ycbcr_conversion
3368#endif
3369#ifdef VK_KHR_bind_memory2
3370#endif
3371#ifdef VK_KHR_maintenance3
3372#endif
3373#ifdef VK_KHR_draw_indirect_count
3374#endif
3375#ifdef VK_KHR_8bit_storage
3376void deepcopy_VkPhysicalDevice8BitStorageFeaturesKHR(
3377 Pool* pool,
3378 const VkPhysicalDevice8BitStorageFeaturesKHR* from,
3379 VkPhysicalDevice8BitStorageFeaturesKHR* to)
3380{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003381 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003382 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003383 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003384}
3385
3386#endif
3387#ifdef VK_EXT_debug_report
3388void deepcopy_VkDebugReportCallbackCreateInfoEXT(
3389 Pool* pool,
3390 const VkDebugReportCallbackCreateInfoEXT* from,
3391 VkDebugReportCallbackCreateInfoEXT* to)
3392{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003393 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003394 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003395 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003396 to->pUserData = nullptr;
3397 if (from->pUserData)
3398 {
3399 to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
3400 }
3401}
3402
3403#endif
3404#ifdef VK_NV_glsl_shader
3405#endif
3406#ifdef VK_EXT_depth_range_unrestricted
3407#endif
3408#ifdef VK_IMG_filter_cubic
3409#endif
3410#ifdef VK_AMD_rasterization_order
3411void deepcopy_VkPipelineRasterizationStateRasterizationOrderAMD(
3412 Pool* pool,
3413 const VkPipelineRasterizationStateRasterizationOrderAMD* from,
3414 VkPipelineRasterizationStateRasterizationOrderAMD* to)
3415{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003416 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003417 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003418 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003419}
3420
3421#endif
3422#ifdef VK_AMD_shader_trinary_minmax
3423#endif
3424#ifdef VK_AMD_shader_explicit_vertex_parameter
3425#endif
3426#ifdef VK_EXT_debug_marker
3427void deepcopy_VkDebugMarkerObjectNameInfoEXT(
3428 Pool* pool,
3429 const VkDebugMarkerObjectNameInfoEXT* from,
3430 VkDebugMarkerObjectNameInfoEXT* to)
3431{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003432 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003433 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003434 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003435 to->pObjectName = nullptr;
3436 if (from->pObjectName)
3437 {
3438 to->pObjectName = pool->strDup(from->pObjectName);
3439 }
3440}
3441
3442void deepcopy_VkDebugMarkerObjectTagInfoEXT(
3443 Pool* pool,
3444 const VkDebugMarkerObjectTagInfoEXT* from,
3445 VkDebugMarkerObjectTagInfoEXT* to)
3446{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003447 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003448 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003449 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003450 to->pTag = nullptr;
3451 if (from->pTag)
3452 {
3453 to->pTag = (void*)pool->dupArray(from->pTag, from->tagSize * sizeof(const uint8_t));
3454 }
3455}
3456
3457void deepcopy_VkDebugMarkerMarkerInfoEXT(
3458 Pool* pool,
3459 const VkDebugMarkerMarkerInfoEXT* from,
3460 VkDebugMarkerMarkerInfoEXT* to)
3461{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003462 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003463 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003464 to->pNext = from->pNext;
3465 to->pMarkerName = nullptr;
3466 if (from->pMarkerName)
3467 {
3468 to->pMarkerName = pool->strDup(from->pMarkerName);
3469 }
3470 memcpy(to->color, from->color, 4 * sizeof(float));
3471}
3472
3473#endif
3474#ifdef VK_AMD_gcn_shader
3475#endif
3476#ifdef VK_NV_dedicated_allocation
3477void deepcopy_VkDedicatedAllocationImageCreateInfoNV(
3478 Pool* pool,
3479 const VkDedicatedAllocationImageCreateInfoNV* from,
3480 VkDedicatedAllocationImageCreateInfoNV* to)
3481{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003482 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003483 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003484 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003485}
3486
3487void deepcopy_VkDedicatedAllocationBufferCreateInfoNV(
3488 Pool* pool,
3489 const VkDedicatedAllocationBufferCreateInfoNV* from,
3490 VkDedicatedAllocationBufferCreateInfoNV* to)
3491{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003492 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003493 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003494 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003495}
3496
3497void deepcopy_VkDedicatedAllocationMemoryAllocateInfoNV(
3498 Pool* pool,
3499 const VkDedicatedAllocationMemoryAllocateInfoNV* from,
3500 VkDedicatedAllocationMemoryAllocateInfoNV* to)
3501{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003502 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003503 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003504 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003505}
3506
3507#endif
3508#ifdef VK_AMD_draw_indirect_count
3509#endif
3510#ifdef VK_AMD_negative_viewport_height
3511#endif
3512#ifdef VK_AMD_gpu_shader_half_float
3513#endif
3514#ifdef VK_AMD_shader_ballot
3515#endif
3516#ifdef VK_AMD_texture_gather_bias_lod
3517void deepcopy_VkTextureLODGatherFormatPropertiesAMD(
3518 Pool* pool,
3519 const VkTextureLODGatherFormatPropertiesAMD* from,
3520 VkTextureLODGatherFormatPropertiesAMD* to)
3521{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003522 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003523 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003524 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003525}
3526
3527#endif
3528#ifdef VK_AMD_shader_info
3529void deepcopy_VkShaderResourceUsageAMD(
3530 Pool* pool,
3531 const VkShaderResourceUsageAMD* from,
3532 VkShaderResourceUsageAMD* to)
3533{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003534 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003535 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003536}
3537
3538void deepcopy_VkShaderStatisticsInfoAMD(
3539 Pool* pool,
3540 const VkShaderStatisticsInfoAMD* from,
3541 VkShaderStatisticsInfoAMD* to)
3542{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003543 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003544 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003545 deepcopy_VkShaderResourceUsageAMD(pool, &from->resourceUsage, (VkShaderResourceUsageAMD*)(&to->resourceUsage));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003546 memcpy(to->computeWorkGroupSize, from->computeWorkGroupSize, 3 * sizeof(uint32_t));
3547}
3548
3549#endif
3550#ifdef VK_AMD_shader_image_load_store_lod
3551#endif
3552#ifdef VK_IMG_format_pvrtc
3553#endif
3554#ifdef VK_NV_external_memory_capabilities
3555void deepcopy_VkExternalImageFormatPropertiesNV(
3556 Pool* pool,
3557 const VkExternalImageFormatPropertiesNV* from,
3558 VkExternalImageFormatPropertiesNV* to)
3559{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003560 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003561 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003562 deepcopy_VkImageFormatProperties(pool, &from->imageFormatProperties, (VkImageFormatProperties*)(&to->imageFormatProperties));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003563}
3564
3565#endif
3566#ifdef VK_NV_external_memory
3567void deepcopy_VkExternalMemoryImageCreateInfoNV(
3568 Pool* pool,
3569 const VkExternalMemoryImageCreateInfoNV* from,
3570 VkExternalMemoryImageCreateInfoNV* to)
3571{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003572 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003573 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003574 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003575}
3576
3577void deepcopy_VkExportMemoryAllocateInfoNV(
3578 Pool* pool,
3579 const VkExportMemoryAllocateInfoNV* from,
3580 VkExportMemoryAllocateInfoNV* to)
3581{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003582 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003583 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003584 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003585}
3586
3587#endif
3588#ifdef VK_NV_external_memory_win32
3589void deepcopy_VkImportMemoryWin32HandleInfoNV(
3590 Pool* pool,
3591 const VkImportMemoryWin32HandleInfoNV* from,
3592 VkImportMemoryWin32HandleInfoNV* to)
3593{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003594 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003595 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003596 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003597}
3598
3599void deepcopy_VkExportMemoryWin32HandleInfoNV(
3600 Pool* pool,
3601 const VkExportMemoryWin32HandleInfoNV* from,
3602 VkExportMemoryWin32HandleInfoNV* to)
3603{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003604 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003605 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003606 to->pNext = from->pNext;
3607 to->pAttributes = nullptr;
3608 if (from->pAttributes)
3609 {
3610 to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
3611 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003612}
3613
3614#endif
3615#ifdef VK_NV_win32_keyed_mutex
3616void deepcopy_VkWin32KeyedMutexAcquireReleaseInfoNV(
3617 Pool* pool,
3618 const VkWin32KeyedMutexAcquireReleaseInfoNV* from,
3619 VkWin32KeyedMutexAcquireReleaseInfoNV* to)
3620{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003621 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003622 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003623 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003624 to->pAcquireSyncs = nullptr;
3625 if (from->pAcquireSyncs)
3626 {
3627 to->pAcquireSyncs = (VkDeviceMemory*)pool->dupArray(from->pAcquireSyncs, from->acquireCount * sizeof(const VkDeviceMemory));
3628 }
3629 to->pAcquireKeys = nullptr;
3630 if (from->pAcquireKeys)
3631 {
3632 to->pAcquireKeys = (uint64_t*)pool->dupArray(from->pAcquireKeys, from->acquireCount * sizeof(const uint64_t));
3633 }
3634 to->pAcquireTimeoutMilliseconds = nullptr;
3635 if (from->pAcquireTimeoutMilliseconds)
3636 {
3637 to->pAcquireTimeoutMilliseconds = (uint32_t*)pool->dupArray(from->pAcquireTimeoutMilliseconds, from->acquireCount * sizeof(const uint32_t));
3638 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003639 to->pReleaseSyncs = nullptr;
3640 if (from->pReleaseSyncs)
3641 {
3642 to->pReleaseSyncs = (VkDeviceMemory*)pool->dupArray(from->pReleaseSyncs, from->releaseCount * sizeof(const VkDeviceMemory));
3643 }
3644 to->pReleaseKeys = nullptr;
3645 if (from->pReleaseKeys)
3646 {
3647 to->pReleaseKeys = (uint64_t*)pool->dupArray(from->pReleaseKeys, from->releaseCount * sizeof(const uint64_t));
3648 }
3649}
3650
3651#endif
3652#ifdef VK_EXT_validation_flags
3653void deepcopy_VkValidationFlagsEXT(
3654 Pool* pool,
3655 const VkValidationFlagsEXT* from,
3656 VkValidationFlagsEXT* to)
3657{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003658 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003659 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003660 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003661 to->pDisabledValidationChecks = nullptr;
3662 if (from->pDisabledValidationChecks)
3663 {
3664 to->pDisabledValidationChecks = (VkValidationCheckEXT*)pool->dupArray(from->pDisabledValidationChecks, from->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT));
3665 }
3666}
3667
3668#endif
3669#ifdef VK_NN_vi_surface
3670void deepcopy_VkViSurfaceCreateInfoNN(
3671 Pool* pool,
3672 const VkViSurfaceCreateInfoNN* from,
3673 VkViSurfaceCreateInfoNN* to)
3674{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003675 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003676 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003677 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003678 to->window = nullptr;
3679 if (from->window)
3680 {
3681 to->window = (void*)pool->dupArray(from->window, sizeof(uint8_t));
3682 }
3683}
3684
3685#endif
3686#ifdef VK_EXT_shader_subgroup_ballot
3687#endif
3688#ifdef VK_EXT_shader_subgroup_vote
3689#endif
3690#ifdef VK_EXT_conditional_rendering
3691void deepcopy_VkConditionalRenderingBeginInfoEXT(
3692 Pool* pool,
3693 const VkConditionalRenderingBeginInfoEXT* from,
3694 VkConditionalRenderingBeginInfoEXT* to)
3695{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003696 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003697 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003698 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003699}
3700
3701void deepcopy_VkPhysicalDeviceConditionalRenderingFeaturesEXT(
3702 Pool* pool,
3703 const VkPhysicalDeviceConditionalRenderingFeaturesEXT* from,
3704 VkPhysicalDeviceConditionalRenderingFeaturesEXT* to)
3705{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003706 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003707 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003708 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003709}
3710
3711void deepcopy_VkCommandBufferInheritanceConditionalRenderingInfoEXT(
3712 Pool* pool,
3713 const VkCommandBufferInheritanceConditionalRenderingInfoEXT* from,
3714 VkCommandBufferInheritanceConditionalRenderingInfoEXT* to)
3715{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003716 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003717 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003718 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003719}
3720
3721#endif
3722#ifdef VK_NVX_device_generated_commands
3723void deepcopy_VkDeviceGeneratedCommandsFeaturesNVX(
3724 Pool* pool,
3725 const VkDeviceGeneratedCommandsFeaturesNVX* from,
3726 VkDeviceGeneratedCommandsFeaturesNVX* to)
3727{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003728 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003729 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003730 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003731}
3732
3733void deepcopy_VkDeviceGeneratedCommandsLimitsNVX(
3734 Pool* pool,
3735 const VkDeviceGeneratedCommandsLimitsNVX* from,
3736 VkDeviceGeneratedCommandsLimitsNVX* to)
3737{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003738 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003739 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003740 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003741}
3742
3743void deepcopy_VkIndirectCommandsTokenNVX(
3744 Pool* pool,
3745 const VkIndirectCommandsTokenNVX* from,
3746 VkIndirectCommandsTokenNVX* to)
3747{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003748 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003749 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003750}
3751
3752void deepcopy_VkIndirectCommandsLayoutTokenNVX(
3753 Pool* pool,
3754 const VkIndirectCommandsLayoutTokenNVX* from,
3755 VkIndirectCommandsLayoutTokenNVX* to)
3756{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003757 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003758 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003759}
3760
3761void deepcopy_VkIndirectCommandsLayoutCreateInfoNVX(
3762 Pool* pool,
3763 const VkIndirectCommandsLayoutCreateInfoNVX* from,
3764 VkIndirectCommandsLayoutCreateInfoNVX* to)
3765{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003766 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003767 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003768 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003769 to->pTokens = nullptr;
3770 if (from->pTokens)
3771 {
3772 to->pTokens = (VkIndirectCommandsLayoutTokenNVX*)pool->alloc(from->tokenCount * sizeof(const VkIndirectCommandsLayoutTokenNVX));
3773 to->tokenCount = from->tokenCount;
3774 for (uint32_t i = 0; i < (uint32_t)from->tokenCount; ++i)
3775 {
3776 deepcopy_VkIndirectCommandsLayoutTokenNVX(pool, from->pTokens + i, (VkIndirectCommandsLayoutTokenNVX*)(to->pTokens + i));
3777 }
3778 }
3779}
3780
3781void deepcopy_VkCmdProcessCommandsInfoNVX(
3782 Pool* pool,
3783 const VkCmdProcessCommandsInfoNVX* from,
3784 VkCmdProcessCommandsInfoNVX* to)
3785{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003786 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003787 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003788 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003789 to->pIndirectCommandsTokens = nullptr;
3790 if (from->pIndirectCommandsTokens)
3791 {
3792 to->pIndirectCommandsTokens = (VkIndirectCommandsTokenNVX*)pool->alloc(from->indirectCommandsTokenCount * sizeof(const VkIndirectCommandsTokenNVX));
3793 to->indirectCommandsTokenCount = from->indirectCommandsTokenCount;
3794 for (uint32_t i = 0; i < (uint32_t)from->indirectCommandsTokenCount; ++i)
3795 {
3796 deepcopy_VkIndirectCommandsTokenNVX(pool, from->pIndirectCommandsTokens + i, (VkIndirectCommandsTokenNVX*)(to->pIndirectCommandsTokens + i));
3797 }
3798 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003799}
3800
3801void deepcopy_VkCmdReserveSpaceForCommandsInfoNVX(
3802 Pool* pool,
3803 const VkCmdReserveSpaceForCommandsInfoNVX* from,
3804 VkCmdReserveSpaceForCommandsInfoNVX* to)
3805{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003806 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003807 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003808 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003809}
3810
3811void deepcopy_VkObjectTableCreateInfoNVX(
3812 Pool* pool,
3813 const VkObjectTableCreateInfoNVX* from,
3814 VkObjectTableCreateInfoNVX* to)
3815{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003816 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003817 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003818 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003819 to->pObjectEntryTypes = nullptr;
3820 if (from->pObjectEntryTypes)
3821 {
3822 to->pObjectEntryTypes = (VkObjectEntryTypeNVX*)pool->dupArray(from->pObjectEntryTypes, from->objectCount * sizeof(const VkObjectEntryTypeNVX));
3823 }
3824 to->pObjectEntryCounts = nullptr;
3825 if (from->pObjectEntryCounts)
3826 {
3827 to->pObjectEntryCounts = (uint32_t*)pool->dupArray(from->pObjectEntryCounts, from->objectCount * sizeof(const uint32_t));
3828 }
3829 to->pObjectEntryUsageFlags = nullptr;
3830 if (from->pObjectEntryUsageFlags)
3831 {
3832 to->pObjectEntryUsageFlags = (VkObjectEntryUsageFlagsNVX*)pool->dupArray(from->pObjectEntryUsageFlags, from->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX));
3833 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003834}
3835
3836void deepcopy_VkObjectTableEntryNVX(
3837 Pool* pool,
3838 const VkObjectTableEntryNVX* from,
3839 VkObjectTableEntryNVX* to)
3840{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003841 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003842 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003843}
3844
3845void deepcopy_VkObjectTablePipelineEntryNVX(
3846 Pool* pool,
3847 const VkObjectTablePipelineEntryNVX* from,
3848 VkObjectTablePipelineEntryNVX* to)
3849{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003850 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003851 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003852}
3853
3854void deepcopy_VkObjectTableDescriptorSetEntryNVX(
3855 Pool* pool,
3856 const VkObjectTableDescriptorSetEntryNVX* from,
3857 VkObjectTableDescriptorSetEntryNVX* to)
3858{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003859 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003860 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003861}
3862
3863void deepcopy_VkObjectTableVertexBufferEntryNVX(
3864 Pool* pool,
3865 const VkObjectTableVertexBufferEntryNVX* from,
3866 VkObjectTableVertexBufferEntryNVX* to)
3867{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003868 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003869 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003870}
3871
3872void deepcopy_VkObjectTableIndexBufferEntryNVX(
3873 Pool* pool,
3874 const VkObjectTableIndexBufferEntryNVX* from,
3875 VkObjectTableIndexBufferEntryNVX* to)
3876{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003877 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003878 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003879}
3880
3881void deepcopy_VkObjectTablePushConstantEntryNVX(
3882 Pool* pool,
3883 const VkObjectTablePushConstantEntryNVX* from,
3884 VkObjectTablePushConstantEntryNVX* to)
3885{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003886 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003887 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003888}
3889
3890#endif
3891#ifdef VK_NV_clip_space_w_scaling
3892void deepcopy_VkViewportWScalingNV(
3893 Pool* pool,
3894 const VkViewportWScalingNV* from,
3895 VkViewportWScalingNV* to)
3896{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003897 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003898 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003899}
3900
3901void deepcopy_VkPipelineViewportWScalingStateCreateInfoNV(
3902 Pool* pool,
3903 const VkPipelineViewportWScalingStateCreateInfoNV* from,
3904 VkPipelineViewportWScalingStateCreateInfoNV* to)
3905{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003906 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003907 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003908 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003909 to->pViewportWScalings = nullptr;
3910 if (from->pViewportWScalings)
3911 {
3912 to->pViewportWScalings = (VkViewportWScalingNV*)pool->alloc(from->viewportCount * sizeof(const VkViewportWScalingNV));
3913 to->viewportCount = from->viewportCount;
3914 for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
3915 {
3916 deepcopy_VkViewportWScalingNV(pool, from->pViewportWScalings + i, (VkViewportWScalingNV*)(to->pViewportWScalings + i));
3917 }
3918 }
3919}
3920
3921#endif
3922#ifdef VK_EXT_direct_mode_display
3923#endif
3924#ifdef VK_EXT_acquire_xlib_display
3925#endif
3926#ifdef VK_EXT_display_surface_counter
3927void deepcopy_VkSurfaceCapabilities2EXT(
3928 Pool* pool,
3929 const VkSurfaceCapabilities2EXT* from,
3930 VkSurfaceCapabilities2EXT* to)
3931{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003932 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003933 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003934 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003935 deepcopy_VkExtent2D(pool, &from->currentExtent, (VkExtent2D*)(&to->currentExtent));
3936 deepcopy_VkExtent2D(pool, &from->minImageExtent, (VkExtent2D*)(&to->minImageExtent));
3937 deepcopy_VkExtent2D(pool, &from->maxImageExtent, (VkExtent2D*)(&to->maxImageExtent));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003938}
3939
3940#endif
3941#ifdef VK_EXT_display_control
3942void deepcopy_VkDisplayPowerInfoEXT(
3943 Pool* pool,
3944 const VkDisplayPowerInfoEXT* from,
3945 VkDisplayPowerInfoEXT* to)
3946{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003947 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003948 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003949 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003950}
3951
3952void deepcopy_VkDeviceEventInfoEXT(
3953 Pool* pool,
3954 const VkDeviceEventInfoEXT* from,
3955 VkDeviceEventInfoEXT* to)
3956{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003957 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003958 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003959 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003960}
3961
3962void deepcopy_VkDisplayEventInfoEXT(
3963 Pool* pool,
3964 const VkDisplayEventInfoEXT* from,
3965 VkDisplayEventInfoEXT* to)
3966{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003967 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003968 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003969 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003970}
3971
3972void deepcopy_VkSwapchainCounterCreateInfoEXT(
3973 Pool* pool,
3974 const VkSwapchainCounterCreateInfoEXT* from,
3975 VkSwapchainCounterCreateInfoEXT* to)
3976{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003977 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003978 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003979 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003980}
3981
3982#endif
3983#ifdef VK_GOOGLE_display_timing
3984void deepcopy_VkRefreshCycleDurationGOOGLE(
3985 Pool* pool,
3986 const VkRefreshCycleDurationGOOGLE* from,
3987 VkRefreshCycleDurationGOOGLE* to)
3988{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003989 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003990 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08003991}
3992
3993void deepcopy_VkPastPresentationTimingGOOGLE(
3994 Pool* pool,
3995 const VkPastPresentationTimingGOOGLE* from,
3996 VkPastPresentationTimingGOOGLE* to)
3997{
Lingfeng Yang36891c52018-11-09 14:18:35 -08003998 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08003999 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004000}
4001
4002void deepcopy_VkPresentTimeGOOGLE(
4003 Pool* pool,
4004 const VkPresentTimeGOOGLE* from,
4005 VkPresentTimeGOOGLE* to)
4006{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004007 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004008 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004009}
4010
4011void deepcopy_VkPresentTimesInfoGOOGLE(
4012 Pool* pool,
4013 const VkPresentTimesInfoGOOGLE* from,
4014 VkPresentTimesInfoGOOGLE* to)
4015{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004016 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004017 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004018 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004019 to->pTimes = nullptr;
4020 if (from->pTimes)
4021 {
4022 to->pTimes = (VkPresentTimeGOOGLE*)pool->alloc(from->swapchainCount * sizeof(const VkPresentTimeGOOGLE));
4023 to->swapchainCount = from->swapchainCount;
4024 for (uint32_t i = 0; i < (uint32_t)from->swapchainCount; ++i)
4025 {
4026 deepcopy_VkPresentTimeGOOGLE(pool, from->pTimes + i, (VkPresentTimeGOOGLE*)(to->pTimes + i));
4027 }
4028 }
4029}
4030
4031#endif
4032#ifdef VK_NV_sample_mask_override_coverage
4033#endif
4034#ifdef VK_NV_geometry_shader_passthrough
4035#endif
4036#ifdef VK_NV_viewport_array2
4037#endif
4038#ifdef VK_NVX_multiview_per_view_attributes
4039void deepcopy_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(
4040 Pool* pool,
4041 const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* from,
4042 VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* to)
4043{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004044 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004045 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004046 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004047}
4048
4049#endif
4050#ifdef VK_NV_viewport_swizzle
4051void deepcopy_VkViewportSwizzleNV(
4052 Pool* pool,
4053 const VkViewportSwizzleNV* from,
4054 VkViewportSwizzleNV* to)
4055{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004056 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004057 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004058}
4059
4060void deepcopy_VkPipelineViewportSwizzleStateCreateInfoNV(
4061 Pool* pool,
4062 const VkPipelineViewportSwizzleStateCreateInfoNV* from,
4063 VkPipelineViewportSwizzleStateCreateInfoNV* to)
4064{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004065 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004066 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004067 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004068 to->pViewportSwizzles = nullptr;
4069 if (from->pViewportSwizzles)
4070 {
4071 to->pViewportSwizzles = (VkViewportSwizzleNV*)pool->alloc(from->viewportCount * sizeof(const VkViewportSwizzleNV));
4072 to->viewportCount = from->viewportCount;
4073 for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
4074 {
4075 deepcopy_VkViewportSwizzleNV(pool, from->pViewportSwizzles + i, (VkViewportSwizzleNV*)(to->pViewportSwizzles + i));
4076 }
4077 }
4078}
4079
4080#endif
4081#ifdef VK_EXT_discard_rectangles
4082void deepcopy_VkPhysicalDeviceDiscardRectanglePropertiesEXT(
4083 Pool* pool,
4084 const VkPhysicalDeviceDiscardRectanglePropertiesEXT* from,
4085 VkPhysicalDeviceDiscardRectanglePropertiesEXT* to)
4086{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004087 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004088 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004089 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004090}
4091
4092void deepcopy_VkPipelineDiscardRectangleStateCreateInfoEXT(
4093 Pool* pool,
4094 const VkPipelineDiscardRectangleStateCreateInfoEXT* from,
4095 VkPipelineDiscardRectangleStateCreateInfoEXT* to)
4096{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004097 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004098 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004099 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004100 to->pDiscardRectangles = nullptr;
4101 if (from->pDiscardRectangles)
4102 {
4103 to->pDiscardRectangles = (VkRect2D*)pool->alloc(from->discardRectangleCount * sizeof(const VkRect2D));
4104 to->discardRectangleCount = from->discardRectangleCount;
4105 for (uint32_t i = 0; i < (uint32_t)from->discardRectangleCount; ++i)
4106 {
4107 deepcopy_VkRect2D(pool, from->pDiscardRectangles + i, (VkRect2D*)(to->pDiscardRectangles + i));
4108 }
4109 }
4110}
4111
4112#endif
4113#ifdef VK_EXT_conservative_rasterization
4114void deepcopy_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(
4115 Pool* pool,
4116 const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* from,
4117 VkPhysicalDeviceConservativeRasterizationPropertiesEXT* to)
4118{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004119 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004120 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004121 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004122}
4123
4124void deepcopy_VkPipelineRasterizationConservativeStateCreateInfoEXT(
4125 Pool* pool,
4126 const VkPipelineRasterizationConservativeStateCreateInfoEXT* from,
4127 VkPipelineRasterizationConservativeStateCreateInfoEXT* to)
4128{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004129 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004130 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004131 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004132}
4133
4134#endif
4135#ifdef VK_EXT_swapchain_colorspace
4136#endif
4137#ifdef VK_EXT_hdr_metadata
4138void deepcopy_VkXYColorEXT(
4139 Pool* pool,
4140 const VkXYColorEXT* from,
4141 VkXYColorEXT* to)
4142{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004143 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004144 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004145}
4146
4147void deepcopy_VkHdrMetadataEXT(
4148 Pool* pool,
4149 const VkHdrMetadataEXT* from,
4150 VkHdrMetadataEXT* to)
4151{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004152 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004153 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004154 to->pNext = from->pNext;
4155 deepcopy_VkXYColorEXT(pool, &from->displayPrimaryRed, (VkXYColorEXT*)(&to->displayPrimaryRed));
4156 deepcopy_VkXYColorEXT(pool, &from->displayPrimaryGreen, (VkXYColorEXT*)(&to->displayPrimaryGreen));
4157 deepcopy_VkXYColorEXT(pool, &from->displayPrimaryBlue, (VkXYColorEXT*)(&to->displayPrimaryBlue));
4158 deepcopy_VkXYColorEXT(pool, &from->whitePoint, (VkXYColorEXT*)(&to->whitePoint));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004159}
4160
4161#endif
4162#ifdef VK_MVK_ios_surface
4163void deepcopy_VkIOSSurfaceCreateInfoMVK(
4164 Pool* pool,
4165 const VkIOSSurfaceCreateInfoMVK* from,
4166 VkIOSSurfaceCreateInfoMVK* to)
4167{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004168 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004169 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004170 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004171 to->pView = nullptr;
4172 if (from->pView)
4173 {
4174 to->pView = (void*)pool->dupArray(from->pView, sizeof(const uint8_t));
4175 }
4176}
4177
4178#endif
4179#ifdef VK_MVK_macos_surface
4180void deepcopy_VkMacOSSurfaceCreateInfoMVK(
4181 Pool* pool,
4182 const VkMacOSSurfaceCreateInfoMVK* from,
4183 VkMacOSSurfaceCreateInfoMVK* to)
4184{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004185 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004186 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004187 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004188 to->pView = nullptr;
4189 if (from->pView)
4190 {
4191 to->pView = (void*)pool->dupArray(from->pView, sizeof(const uint8_t));
4192 }
4193}
4194
4195#endif
4196#ifdef VK_EXT_external_memory_dma_buf
4197#endif
4198#ifdef VK_EXT_queue_family_foreign
4199#endif
4200#ifdef VK_EXT_debug_utils
4201void deepcopy_VkDebugUtilsObjectNameInfoEXT(
4202 Pool* pool,
4203 const VkDebugUtilsObjectNameInfoEXT* from,
4204 VkDebugUtilsObjectNameInfoEXT* to)
4205{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004206 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004207 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004208 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004209 to->pObjectName = nullptr;
4210 if (from->pObjectName)
4211 {
4212 to->pObjectName = pool->strDup(from->pObjectName);
4213 }
4214}
4215
4216void deepcopy_VkDebugUtilsObjectTagInfoEXT(
4217 Pool* pool,
4218 const VkDebugUtilsObjectTagInfoEXT* from,
4219 VkDebugUtilsObjectTagInfoEXT* to)
4220{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004221 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004222 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004223 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004224 to->pTag = nullptr;
4225 if (from->pTag)
4226 {
4227 to->pTag = (void*)pool->dupArray(from->pTag, from->tagSize * sizeof(const uint8_t));
4228 }
4229}
4230
4231void deepcopy_VkDebugUtilsLabelEXT(
4232 Pool* pool,
4233 const VkDebugUtilsLabelEXT* from,
4234 VkDebugUtilsLabelEXT* to)
4235{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004236 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004237 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004238 to->pNext = from->pNext;
4239 to->pLabelName = nullptr;
4240 if (from->pLabelName)
4241 {
4242 to->pLabelName = pool->strDup(from->pLabelName);
4243 }
4244 memcpy(to->color, from->color, 4 * sizeof(float));
4245}
4246
4247void deepcopy_VkDebugUtilsMessengerCallbackDataEXT(
4248 Pool* pool,
4249 const VkDebugUtilsMessengerCallbackDataEXT* from,
4250 VkDebugUtilsMessengerCallbackDataEXT* to)
4251{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004252 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004253 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004254 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004255 to->pMessageIdName = nullptr;
4256 if (from->pMessageIdName)
4257 {
4258 to->pMessageIdName = pool->strDup(from->pMessageIdName);
4259 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004260 to->pMessage = nullptr;
4261 if (from->pMessage)
4262 {
4263 to->pMessage = pool->strDup(from->pMessage);
4264 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004265 to->pQueueLabels = nullptr;
4266 if (from->pQueueLabels)
4267 {
4268 to->pQueueLabels = (VkDebugUtilsLabelEXT*)pool->alloc(from->queueLabelCount * sizeof(VkDebugUtilsLabelEXT));
4269 to->queueLabelCount = from->queueLabelCount;
4270 for (uint32_t i = 0; i < (uint32_t)from->queueLabelCount; ++i)
4271 {
4272 deepcopy_VkDebugUtilsLabelEXT(pool, from->pQueueLabels + i, (VkDebugUtilsLabelEXT*)(to->pQueueLabels + i));
4273 }
4274 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004275 to->pCmdBufLabels = nullptr;
4276 if (from->pCmdBufLabels)
4277 {
4278 to->pCmdBufLabels = (VkDebugUtilsLabelEXT*)pool->alloc(from->cmdBufLabelCount * sizeof(VkDebugUtilsLabelEXT));
4279 to->cmdBufLabelCount = from->cmdBufLabelCount;
4280 for (uint32_t i = 0; i < (uint32_t)from->cmdBufLabelCount; ++i)
4281 {
4282 deepcopy_VkDebugUtilsLabelEXT(pool, from->pCmdBufLabels + i, (VkDebugUtilsLabelEXT*)(to->pCmdBufLabels + i));
4283 }
4284 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004285 to->pObjects = nullptr;
4286 if (from->pObjects)
4287 {
4288 to->pObjects = (VkDebugUtilsObjectNameInfoEXT*)pool->alloc(from->objectCount * sizeof(VkDebugUtilsObjectNameInfoEXT));
4289 to->objectCount = from->objectCount;
4290 for (uint32_t i = 0; i < (uint32_t)from->objectCount; ++i)
4291 {
4292 deepcopy_VkDebugUtilsObjectNameInfoEXT(pool, from->pObjects + i, (VkDebugUtilsObjectNameInfoEXT*)(to->pObjects + i));
4293 }
4294 }
4295}
4296
4297void deepcopy_VkDebugUtilsMessengerCreateInfoEXT(
4298 Pool* pool,
4299 const VkDebugUtilsMessengerCreateInfoEXT* from,
4300 VkDebugUtilsMessengerCreateInfoEXT* to)
4301{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004302 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004303 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004304 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004305 to->pUserData = nullptr;
4306 if (from->pUserData)
4307 {
4308 to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
4309 }
4310}
4311
4312#endif
4313#ifdef VK_ANDROID_external_memory_android_hardware_buffer
4314void deepcopy_VkAndroidHardwareBufferUsageANDROID(
4315 Pool* pool,
4316 const VkAndroidHardwareBufferUsageANDROID* from,
4317 VkAndroidHardwareBufferUsageANDROID* to)
4318{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004319 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004320 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004321 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004322}
4323
4324void deepcopy_VkAndroidHardwareBufferPropertiesANDROID(
4325 Pool* pool,
4326 const VkAndroidHardwareBufferPropertiesANDROID* from,
4327 VkAndroidHardwareBufferPropertiesANDROID* to)
4328{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004329 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004330 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004331 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004332}
4333
4334void deepcopy_VkAndroidHardwareBufferFormatPropertiesANDROID(
4335 Pool* pool,
4336 const VkAndroidHardwareBufferFormatPropertiesANDROID* from,
4337 VkAndroidHardwareBufferFormatPropertiesANDROID* to)
4338{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004339 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004340 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004341 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004342 deepcopy_VkComponentMapping(pool, &from->samplerYcbcrConversionComponents, (VkComponentMapping*)(&to->samplerYcbcrConversionComponents));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004343}
4344
4345void deepcopy_VkImportAndroidHardwareBufferInfoANDROID(
4346 Pool* pool,
4347 const VkImportAndroidHardwareBufferInfoANDROID* from,
4348 VkImportAndroidHardwareBufferInfoANDROID* to)
4349{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004350 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004351 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004352 to->pNext = from->pNext;
4353 to->buffer = nullptr;
4354 if (from->buffer)
4355 {
4356 to->buffer = (AHardwareBuffer*)pool->dupArray(from->buffer, sizeof(AHardwareBuffer));
4357 }
4358}
4359
4360void deepcopy_VkMemoryGetAndroidHardwareBufferInfoANDROID(
4361 Pool* pool,
4362 const VkMemoryGetAndroidHardwareBufferInfoANDROID* from,
4363 VkMemoryGetAndroidHardwareBufferInfoANDROID* to)
4364{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004365 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004366 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004367 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004368}
4369
4370void deepcopy_VkExternalFormatANDROID(
4371 Pool* pool,
4372 const VkExternalFormatANDROID* from,
4373 VkExternalFormatANDROID* to)
4374{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004375 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004376 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004377 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004378}
4379
4380#endif
4381#ifdef VK_EXT_sampler_filter_minmax
4382void deepcopy_VkSamplerReductionModeCreateInfoEXT(
4383 Pool* pool,
4384 const VkSamplerReductionModeCreateInfoEXT* from,
4385 VkSamplerReductionModeCreateInfoEXT* to)
4386{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004387 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004388 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004389 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004390}
4391
4392void deepcopy_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(
4393 Pool* pool,
4394 const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* from,
4395 VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* to)
4396{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004397 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004398 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004399 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004400}
4401
4402#endif
4403#ifdef VK_AMD_gpu_shader_int16
4404#endif
4405#ifdef VK_AMD_mixed_attachment_samples
4406#endif
4407#ifdef VK_AMD_shader_fragment_mask
4408#endif
4409#ifdef VK_EXT_shader_stencil_export
4410#endif
4411#ifdef VK_EXT_sample_locations
4412void deepcopy_VkSampleLocationEXT(
4413 Pool* pool,
4414 const VkSampleLocationEXT* from,
4415 VkSampleLocationEXT* to)
4416{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004417 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004418 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004419}
4420
4421void deepcopy_VkSampleLocationsInfoEXT(
4422 Pool* pool,
4423 const VkSampleLocationsInfoEXT* from,
4424 VkSampleLocationsInfoEXT* to)
4425{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004426 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004427 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004428 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004429 deepcopy_VkExtent2D(pool, &from->sampleLocationGridSize, (VkExtent2D*)(&to->sampleLocationGridSize));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004430 to->pSampleLocations = nullptr;
4431 if (from->pSampleLocations)
4432 {
4433 to->pSampleLocations = (VkSampleLocationEXT*)pool->alloc(from->sampleLocationsCount * sizeof(const VkSampleLocationEXT));
4434 to->sampleLocationsCount = from->sampleLocationsCount;
4435 for (uint32_t i = 0; i < (uint32_t)from->sampleLocationsCount; ++i)
4436 {
4437 deepcopy_VkSampleLocationEXT(pool, from->pSampleLocations + i, (VkSampleLocationEXT*)(to->pSampleLocations + i));
4438 }
4439 }
4440}
4441
4442void deepcopy_VkAttachmentSampleLocationsEXT(
4443 Pool* pool,
4444 const VkAttachmentSampleLocationsEXT* from,
4445 VkAttachmentSampleLocationsEXT* to)
4446{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004447 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004448 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004449 deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
4450}
4451
4452void deepcopy_VkSubpassSampleLocationsEXT(
4453 Pool* pool,
4454 const VkSubpassSampleLocationsEXT* from,
4455 VkSubpassSampleLocationsEXT* to)
4456{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004457 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004458 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004459 deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
4460}
4461
4462void deepcopy_VkRenderPassSampleLocationsBeginInfoEXT(
4463 Pool* pool,
4464 const VkRenderPassSampleLocationsBeginInfoEXT* from,
4465 VkRenderPassSampleLocationsBeginInfoEXT* to)
4466{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004467 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004468 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004469 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004470 to->pAttachmentInitialSampleLocations = nullptr;
4471 if (from->pAttachmentInitialSampleLocations)
4472 {
4473 to->pAttachmentInitialSampleLocations = (VkAttachmentSampleLocationsEXT*)pool->alloc(from->attachmentInitialSampleLocationsCount * sizeof(const VkAttachmentSampleLocationsEXT));
4474 to->attachmentInitialSampleLocationsCount = from->attachmentInitialSampleLocationsCount;
4475 for (uint32_t i = 0; i < (uint32_t)from->attachmentInitialSampleLocationsCount; ++i)
4476 {
4477 deepcopy_VkAttachmentSampleLocationsEXT(pool, from->pAttachmentInitialSampleLocations + i, (VkAttachmentSampleLocationsEXT*)(to->pAttachmentInitialSampleLocations + i));
4478 }
4479 }
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004480 to->pPostSubpassSampleLocations = nullptr;
4481 if (from->pPostSubpassSampleLocations)
4482 {
4483 to->pPostSubpassSampleLocations = (VkSubpassSampleLocationsEXT*)pool->alloc(from->postSubpassSampleLocationsCount * sizeof(const VkSubpassSampleLocationsEXT));
4484 to->postSubpassSampleLocationsCount = from->postSubpassSampleLocationsCount;
4485 for (uint32_t i = 0; i < (uint32_t)from->postSubpassSampleLocationsCount; ++i)
4486 {
4487 deepcopy_VkSubpassSampleLocationsEXT(pool, from->pPostSubpassSampleLocations + i, (VkSubpassSampleLocationsEXT*)(to->pPostSubpassSampleLocations + i));
4488 }
4489 }
4490}
4491
4492void deepcopy_VkPipelineSampleLocationsStateCreateInfoEXT(
4493 Pool* pool,
4494 const VkPipelineSampleLocationsStateCreateInfoEXT* from,
4495 VkPipelineSampleLocationsStateCreateInfoEXT* to)
4496{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004497 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004498 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004499 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004500 deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
4501}
4502
4503void deepcopy_VkPhysicalDeviceSampleLocationsPropertiesEXT(
4504 Pool* pool,
4505 const VkPhysicalDeviceSampleLocationsPropertiesEXT* from,
4506 VkPhysicalDeviceSampleLocationsPropertiesEXT* to)
4507{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004508 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004509 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004510 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004511 deepcopy_VkExtent2D(pool, &from->maxSampleLocationGridSize, (VkExtent2D*)(&to->maxSampleLocationGridSize));
4512 memcpy(to->sampleLocationCoordinateRange, from->sampleLocationCoordinateRange, 2 * sizeof(float));
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004513}
4514
4515void deepcopy_VkMultisamplePropertiesEXT(
4516 Pool* pool,
4517 const VkMultisamplePropertiesEXT* from,
4518 VkMultisamplePropertiesEXT* to)
4519{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004520 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004521 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004522 to->pNext = from->pNext;
4523 deepcopy_VkExtent2D(pool, &from->maxSampleLocationGridSize, (VkExtent2D*)(&to->maxSampleLocationGridSize));
4524}
4525
4526#endif
4527#ifdef VK_EXT_blend_operation_advanced
4528void deepcopy_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(
4529 Pool* pool,
4530 const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* from,
4531 VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* to)
4532{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004533 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004534 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004535 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004536}
4537
4538void deepcopy_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(
4539 Pool* pool,
4540 const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* from,
4541 VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* to)
4542{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004543 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004544 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004545 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004546}
4547
4548void deepcopy_VkPipelineColorBlendAdvancedStateCreateInfoEXT(
4549 Pool* pool,
4550 const VkPipelineColorBlendAdvancedStateCreateInfoEXT* from,
4551 VkPipelineColorBlendAdvancedStateCreateInfoEXT* to)
4552{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004553 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004554 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004555 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004556}
4557
4558#endif
4559#ifdef VK_NV_fragment_coverage_to_color
4560void deepcopy_VkPipelineCoverageToColorStateCreateInfoNV(
4561 Pool* pool,
4562 const VkPipelineCoverageToColorStateCreateInfoNV* from,
4563 VkPipelineCoverageToColorStateCreateInfoNV* to)
4564{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004565 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004566 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004567 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004568}
4569
4570#endif
4571#ifdef VK_NV_framebuffer_mixed_samples
4572void deepcopy_VkPipelineCoverageModulationStateCreateInfoNV(
4573 Pool* pool,
4574 const VkPipelineCoverageModulationStateCreateInfoNV* from,
4575 VkPipelineCoverageModulationStateCreateInfoNV* to)
4576{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004577 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004578 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004579 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004580 to->pCoverageModulationTable = nullptr;
4581 if (from->pCoverageModulationTable)
4582 {
4583 to->pCoverageModulationTable = (float*)pool->dupArray(from->pCoverageModulationTable, from->coverageModulationTableCount * sizeof(const float));
4584 }
4585}
4586
4587#endif
4588#ifdef VK_NV_fill_rectangle
4589#endif
4590#ifdef VK_EXT_post_depth_coverage
4591#endif
4592#ifdef VK_EXT_validation_cache
4593void deepcopy_VkValidationCacheCreateInfoEXT(
4594 Pool* pool,
4595 const VkValidationCacheCreateInfoEXT* from,
4596 VkValidationCacheCreateInfoEXT* to)
4597{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004598 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004599 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004600 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004601 to->pInitialData = nullptr;
4602 if (from->pInitialData)
4603 {
4604 to->pInitialData = (void*)pool->dupArray(from->pInitialData, from->initialDataSize * sizeof(const uint8_t));
4605 }
4606}
4607
4608void deepcopy_VkShaderModuleValidationCacheCreateInfoEXT(
4609 Pool* pool,
4610 const VkShaderModuleValidationCacheCreateInfoEXT* from,
4611 VkShaderModuleValidationCacheCreateInfoEXT* to)
4612{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004613 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004614 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004615 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004616}
4617
4618#endif
4619#ifdef VK_EXT_descriptor_indexing
4620void deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(
4621 Pool* pool,
4622 const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* from,
4623 VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* to)
4624{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004625 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004626 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004627 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004628 to->pBindingFlags = nullptr;
4629 if (from->pBindingFlags)
4630 {
4631 to->pBindingFlags = (VkDescriptorBindingFlagsEXT*)pool->dupArray(from->pBindingFlags, from->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT));
4632 }
4633}
4634
4635void deepcopy_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(
4636 Pool* pool,
4637 const VkPhysicalDeviceDescriptorIndexingFeaturesEXT* from,
4638 VkPhysicalDeviceDescriptorIndexingFeaturesEXT* to)
4639{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004640 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004641 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004642 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004643}
4644
4645void deepcopy_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(
4646 Pool* pool,
4647 const VkPhysicalDeviceDescriptorIndexingPropertiesEXT* from,
4648 VkPhysicalDeviceDescriptorIndexingPropertiesEXT* to)
4649{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004650 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004651 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004652 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004653}
4654
4655void deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(
4656 Pool* pool,
4657 const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* from,
4658 VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* to)
4659{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004660 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004661 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004662 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004663 to->pDescriptorCounts = nullptr;
4664 if (from->pDescriptorCounts)
4665 {
4666 to->pDescriptorCounts = (uint32_t*)pool->dupArray(from->pDescriptorCounts, from->descriptorSetCount * sizeof(const uint32_t));
4667 }
4668}
4669
4670void deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(
4671 Pool* pool,
4672 const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* from,
4673 VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* to)
4674{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004675 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004676 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004677 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004678}
4679
4680#endif
4681#ifdef VK_EXT_shader_viewport_index_layer
4682#endif
4683#ifdef VK_EXT_global_priority
4684void deepcopy_VkDeviceQueueGlobalPriorityCreateInfoEXT(
4685 Pool* pool,
4686 const VkDeviceQueueGlobalPriorityCreateInfoEXT* from,
4687 VkDeviceQueueGlobalPriorityCreateInfoEXT* to)
4688{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004689 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004690 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004691 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004692}
4693
4694#endif
4695#ifdef VK_EXT_external_memory_host
4696void deepcopy_VkImportMemoryHostPointerInfoEXT(
4697 Pool* pool,
4698 const VkImportMemoryHostPointerInfoEXT* from,
4699 VkImportMemoryHostPointerInfoEXT* to)
4700{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004701 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004702 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004703 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004704 to->pHostPointer = nullptr;
4705 if (from->pHostPointer)
4706 {
4707 to->pHostPointer = (void*)pool->dupArray(from->pHostPointer, sizeof(uint8_t));
4708 }
4709}
4710
4711void deepcopy_VkMemoryHostPointerPropertiesEXT(
4712 Pool* pool,
4713 const VkMemoryHostPointerPropertiesEXT* from,
4714 VkMemoryHostPointerPropertiesEXT* to)
4715{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004716 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004717 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004718 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004719}
4720
4721void deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
4722 Pool* pool,
4723 const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* from,
4724 VkPhysicalDeviceExternalMemoryHostPropertiesEXT* to)
4725{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004726 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004727 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004728 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004729}
4730
4731#endif
4732#ifdef VK_AMD_buffer_marker
4733#endif
4734#ifdef VK_AMD_shader_core_properties
4735void deepcopy_VkPhysicalDeviceShaderCorePropertiesAMD(
4736 Pool* pool,
4737 const VkPhysicalDeviceShaderCorePropertiesAMD* from,
4738 VkPhysicalDeviceShaderCorePropertiesAMD* to)
4739{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004740 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004741 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004742 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004743}
4744
4745#endif
4746#ifdef VK_EXT_vertex_attribute_divisor
4747void deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
4748 Pool* pool,
4749 const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* from,
4750 VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* to)
4751{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004752 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004753 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004754 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004755}
4756
4757void deepcopy_VkVertexInputBindingDivisorDescriptionEXT(
4758 Pool* pool,
4759 const VkVertexInputBindingDivisorDescriptionEXT* from,
4760 VkVertexInputBindingDivisorDescriptionEXT* to)
4761{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004762 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004763 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004764}
4765
4766void deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(
4767 Pool* pool,
4768 const VkPipelineVertexInputDivisorStateCreateInfoEXT* from,
4769 VkPipelineVertexInputDivisorStateCreateInfoEXT* to)
4770{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004771 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004772 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004773 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004774 to->pVertexBindingDivisors = nullptr;
4775 if (from->pVertexBindingDivisors)
4776 {
4777 to->pVertexBindingDivisors = (VkVertexInputBindingDivisorDescriptionEXT*)pool->alloc(from->vertexBindingDivisorCount * sizeof(const VkVertexInputBindingDivisorDescriptionEXT));
4778 to->vertexBindingDivisorCount = from->vertexBindingDivisorCount;
4779 for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDivisorCount; ++i)
4780 {
4781 deepcopy_VkVertexInputBindingDivisorDescriptionEXT(pool, from->pVertexBindingDivisors + i, (VkVertexInputBindingDivisorDescriptionEXT*)(to->pVertexBindingDivisors + i));
4782 }
4783 }
4784}
4785
4786#endif
4787#ifdef VK_NV_shader_subgroup_partitioned
4788#endif
4789#ifdef VK_NV_device_diagnostic_checkpoints
4790void deepcopy_VkQueueFamilyCheckpointPropertiesNV(
4791 Pool* pool,
4792 const VkQueueFamilyCheckpointPropertiesNV* from,
4793 VkQueueFamilyCheckpointPropertiesNV* to)
4794{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004795 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004796 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004797 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004798}
4799
4800void deepcopy_VkCheckpointDataNV(
4801 Pool* pool,
4802 const VkCheckpointDataNV* from,
4803 VkCheckpointDataNV* to)
4804{
Lingfeng Yang36891c52018-11-09 14:18:35 -08004805 (void)pool;
Lingfeng Yang25baf112018-11-08 17:19:52 -08004806 *to = *from;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004807 to->pNext = from->pNext;
Lingfeng Yang71b596b2018-11-07 18:03:25 -08004808 to->pCheckpointMarker = nullptr;
4809 if (from->pCheckpointMarker)
4810 {
4811 to->pCheckpointMarker = (void*)pool->dupArray(from->pCheckpointMarker, sizeof(uint8_t));
4812 }
4813}
4814
4815#endif
4816
4817} // namespace goldfish_vk