1 // Copyright (C) 2018 The Android Open Source Project
2 // Copyright (C) 2018 Google Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 // Autogenerated module goldfish_vk_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 #include "goldfish_vk_extension_structs_guest.h"
29 #include "goldfish_vk_private_defs.h"
30 
31 
32 namespace goldfish_vk {
33 
34 void deepcopy_extension_struct(
35     Pool* pool,
36     const void* structExtension,
37     void* structExtension_out);
38 
39 #ifdef VK_VERSION_1_0
deepcopy_VkApplicationInfo(Pool * pool,const VkApplicationInfo * from,VkApplicationInfo * to)40 void deepcopy_VkApplicationInfo(
41     Pool* pool,
42     const VkApplicationInfo* from,
43     VkApplicationInfo* to)
44 {
45     (void)pool;
46     *to = *from;
47     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
48     to->pNext = nullptr;
49     if (pNext_size)
50     {
51         to->pNext = (const void*)pool->alloc(pNext_size);
52         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
53     }
54     to->pApplicationName = nullptr;
55     if (from->pApplicationName)
56     {
57         to->pApplicationName = pool->strDup(from->pApplicationName);
58     }
59     to->pEngineName = nullptr;
60     if (from->pEngineName)
61     {
62         to->pEngineName = pool->strDup(from->pEngineName);
63     }
64 }
65 
deepcopy_VkInstanceCreateInfo(Pool * pool,const VkInstanceCreateInfo * from,VkInstanceCreateInfo * to)66 void deepcopy_VkInstanceCreateInfo(
67     Pool* pool,
68     const VkInstanceCreateInfo* from,
69     VkInstanceCreateInfo* to)
70 {
71     (void)pool;
72     *to = *from;
73     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
74     to->pNext = nullptr;
75     if (pNext_size)
76     {
77         to->pNext = (const void*)pool->alloc(pNext_size);
78         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
79     }
80     to->pApplicationInfo = nullptr;
81     if (from->pApplicationInfo)
82     {
83         to->pApplicationInfo = (VkApplicationInfo*)pool->alloc(sizeof(const VkApplicationInfo));
84         deepcopy_VkApplicationInfo(pool, from->pApplicationInfo, (VkApplicationInfo*)(to->pApplicationInfo));
85     }
86     to->ppEnabledLayerNames = nullptr;
87     if (from->ppEnabledLayerNames && from->enabledLayerCount)
88     {
89         to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
90     }
91     to->ppEnabledExtensionNames = nullptr;
92     if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
93     {
94         to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
95     }
96 }
97 
deepcopy_VkAllocationCallbacks(Pool * pool,const VkAllocationCallbacks * from,VkAllocationCallbacks * to)98 void deepcopy_VkAllocationCallbacks(
99     Pool* pool,
100     const VkAllocationCallbacks* from,
101     VkAllocationCallbacks* to)
102 {
103     (void)pool;
104     *to = *from;
105     to->pUserData = nullptr;
106     if (from->pUserData)
107     {
108         to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
109     }
110 }
111 
deepcopy_VkPhysicalDeviceFeatures(Pool * pool,const VkPhysicalDeviceFeatures * from,VkPhysicalDeviceFeatures * to)112 void deepcopy_VkPhysicalDeviceFeatures(
113     Pool* pool,
114     const VkPhysicalDeviceFeatures* from,
115     VkPhysicalDeviceFeatures* to)
116 {
117     (void)pool;
118     *to = *from;
119 }
120 
deepcopy_VkFormatProperties(Pool * pool,const VkFormatProperties * from,VkFormatProperties * to)121 void deepcopy_VkFormatProperties(
122     Pool* pool,
123     const VkFormatProperties* from,
124     VkFormatProperties* to)
125 {
126     (void)pool;
127     *to = *from;
128 }
129 
deepcopy_VkExtent3D(Pool * pool,const VkExtent3D * from,VkExtent3D * to)130 void deepcopy_VkExtent3D(
131     Pool* pool,
132     const VkExtent3D* from,
133     VkExtent3D* to)
134 {
135     (void)pool;
136     *to = *from;
137 }
138 
deepcopy_VkImageFormatProperties(Pool * pool,const VkImageFormatProperties * from,VkImageFormatProperties * to)139 void deepcopy_VkImageFormatProperties(
140     Pool* pool,
141     const VkImageFormatProperties* from,
142     VkImageFormatProperties* to)
143 {
144     (void)pool;
145     *to = *from;
146     deepcopy_VkExtent3D(pool, &from->maxExtent, (VkExtent3D*)(&to->maxExtent));
147 }
148 
deepcopy_VkPhysicalDeviceLimits(Pool * pool,const VkPhysicalDeviceLimits * from,VkPhysicalDeviceLimits * to)149 void deepcopy_VkPhysicalDeviceLimits(
150     Pool* pool,
151     const VkPhysicalDeviceLimits* from,
152     VkPhysicalDeviceLimits* to)
153 {
154     (void)pool;
155     *to = *from;
156     memcpy(to->maxComputeWorkGroupCount, from->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
157     memcpy(to->maxComputeWorkGroupSize, from->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
158     memcpy(to->maxViewportDimensions, from->maxViewportDimensions, 2 * sizeof(uint32_t));
159     memcpy(to->viewportBoundsRange, from->viewportBoundsRange, 2 * sizeof(float));
160     memcpy(to->pointSizeRange, from->pointSizeRange, 2 * sizeof(float));
161     memcpy(to->lineWidthRange, from->lineWidthRange, 2 * sizeof(float));
162 }
163 
deepcopy_VkPhysicalDeviceSparseProperties(Pool * pool,const VkPhysicalDeviceSparseProperties * from,VkPhysicalDeviceSparseProperties * to)164 void deepcopy_VkPhysicalDeviceSparseProperties(
165     Pool* pool,
166     const VkPhysicalDeviceSparseProperties* from,
167     VkPhysicalDeviceSparseProperties* to)
168 {
169     (void)pool;
170     *to = *from;
171 }
172 
deepcopy_VkPhysicalDeviceProperties(Pool * pool,const VkPhysicalDeviceProperties * from,VkPhysicalDeviceProperties * to)173 void deepcopy_VkPhysicalDeviceProperties(
174     Pool* pool,
175     const VkPhysicalDeviceProperties* from,
176     VkPhysicalDeviceProperties* to)
177 {
178     (void)pool;
179     *to = *from;
180     memcpy(to->deviceName, from->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
181     memcpy(to->pipelineCacheUUID, from->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
182     deepcopy_VkPhysicalDeviceLimits(pool, &from->limits, (VkPhysicalDeviceLimits*)(&to->limits));
183     deepcopy_VkPhysicalDeviceSparseProperties(pool, &from->sparseProperties, (VkPhysicalDeviceSparseProperties*)(&to->sparseProperties));
184 }
185 
deepcopy_VkQueueFamilyProperties(Pool * pool,const VkQueueFamilyProperties * from,VkQueueFamilyProperties * to)186 void deepcopy_VkQueueFamilyProperties(
187     Pool* pool,
188     const VkQueueFamilyProperties* from,
189     VkQueueFamilyProperties* to)
190 {
191     (void)pool;
192     *to = *from;
193     deepcopy_VkExtent3D(pool, &from->minImageTransferGranularity, (VkExtent3D*)(&to->minImageTransferGranularity));
194 }
195 
deepcopy_VkMemoryType(Pool * pool,const VkMemoryType * from,VkMemoryType * to)196 void deepcopy_VkMemoryType(
197     Pool* pool,
198     const VkMemoryType* from,
199     VkMemoryType* to)
200 {
201     (void)pool;
202     *to = *from;
203 }
204 
deepcopy_VkMemoryHeap(Pool * pool,const VkMemoryHeap * from,VkMemoryHeap * to)205 void deepcopy_VkMemoryHeap(
206     Pool* pool,
207     const VkMemoryHeap* from,
208     VkMemoryHeap* to)
209 {
210     (void)pool;
211     *to = *from;
212 }
213 
deepcopy_VkPhysicalDeviceMemoryProperties(Pool * pool,const VkPhysicalDeviceMemoryProperties * from,VkPhysicalDeviceMemoryProperties * to)214 void deepcopy_VkPhysicalDeviceMemoryProperties(
215     Pool* pool,
216     const VkPhysicalDeviceMemoryProperties* from,
217     VkPhysicalDeviceMemoryProperties* to)
218 {
219     (void)pool;
220     *to = *from;
221     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
222     {
223         deepcopy_VkMemoryType(pool, from->memoryTypes + i, (VkMemoryType*)(to->memoryTypes + i));
224     }
225     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
226     {
227         deepcopy_VkMemoryHeap(pool, from->memoryHeaps + i, (VkMemoryHeap*)(to->memoryHeaps + i));
228     }
229 }
230 
deepcopy_VkDeviceQueueCreateInfo(Pool * pool,const VkDeviceQueueCreateInfo * from,VkDeviceQueueCreateInfo * to)231 void deepcopy_VkDeviceQueueCreateInfo(
232     Pool* pool,
233     const VkDeviceQueueCreateInfo* from,
234     VkDeviceQueueCreateInfo* to)
235 {
236     (void)pool;
237     *to = *from;
238     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
239     to->pNext = nullptr;
240     if (pNext_size)
241     {
242         to->pNext = (const void*)pool->alloc(pNext_size);
243         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
244     }
245     to->pQueuePriorities = nullptr;
246     if (from->pQueuePriorities)
247     {
248         to->pQueuePriorities = (float*)pool->dupArray(from->pQueuePriorities, from->queueCount * sizeof(const float));
249     }
250 }
251 
deepcopy_VkDeviceCreateInfo(Pool * pool,const VkDeviceCreateInfo * from,VkDeviceCreateInfo * to)252 void deepcopy_VkDeviceCreateInfo(
253     Pool* pool,
254     const VkDeviceCreateInfo* from,
255     VkDeviceCreateInfo* to)
256 {
257     (void)pool;
258     *to = *from;
259     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
260     to->pNext = nullptr;
261     if (pNext_size)
262     {
263         to->pNext = (const void*)pool->alloc(pNext_size);
264         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
265     }
266     to->pQueueCreateInfos = nullptr;
267     if (from->pQueueCreateInfos)
268     {
269         to->pQueueCreateInfos = (VkDeviceQueueCreateInfo*)pool->alloc(from->queueCreateInfoCount * sizeof(const VkDeviceQueueCreateInfo));
270         to->queueCreateInfoCount = from->queueCreateInfoCount;
271         for (uint32_t i = 0; i < (uint32_t)from->queueCreateInfoCount; ++i)
272         {
273             deepcopy_VkDeviceQueueCreateInfo(pool, from->pQueueCreateInfos + i, (VkDeviceQueueCreateInfo*)(to->pQueueCreateInfos + i));
274         }
275     }
276     to->ppEnabledLayerNames = nullptr;
277     if (from->ppEnabledLayerNames && from->enabledLayerCount)
278     {
279         to->ppEnabledLayerNames = pool->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
280     }
281     to->ppEnabledExtensionNames = nullptr;
282     if (from->ppEnabledExtensionNames && from->enabledExtensionCount)
283     {
284         to->ppEnabledExtensionNames = pool->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
285     }
286     to->pEnabledFeatures = nullptr;
287     if (from->pEnabledFeatures)
288     {
289         to->pEnabledFeatures = (VkPhysicalDeviceFeatures*)pool->alloc(sizeof(const VkPhysicalDeviceFeatures));
290         deepcopy_VkPhysicalDeviceFeatures(pool, from->pEnabledFeatures, (VkPhysicalDeviceFeatures*)(to->pEnabledFeatures));
291     }
292 }
293 
deepcopy_VkExtensionProperties(Pool * pool,const VkExtensionProperties * from,VkExtensionProperties * to)294 void deepcopy_VkExtensionProperties(
295     Pool* pool,
296     const VkExtensionProperties* from,
297     VkExtensionProperties* to)
298 {
299     (void)pool;
300     *to = *from;
301     memcpy(to->extensionName, from->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
302 }
303 
deepcopy_VkLayerProperties(Pool * pool,const VkLayerProperties * from,VkLayerProperties * to)304 void deepcopy_VkLayerProperties(
305     Pool* pool,
306     const VkLayerProperties* from,
307     VkLayerProperties* to)
308 {
309     (void)pool;
310     *to = *from;
311     memcpy(to->layerName, from->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
312     memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
313 }
314 
deepcopy_VkSubmitInfo(Pool * pool,const VkSubmitInfo * from,VkSubmitInfo * to)315 void deepcopy_VkSubmitInfo(
316     Pool* pool,
317     const VkSubmitInfo* from,
318     VkSubmitInfo* to)
319 {
320     (void)pool;
321     *to = *from;
322     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
323     to->pNext = nullptr;
324     if (pNext_size)
325     {
326         to->pNext = (const void*)pool->alloc(pNext_size);
327         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
328     }
329     to->pWaitSemaphores = nullptr;
330     if (from->pWaitSemaphores)
331     {
332         to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
333     }
334     to->pWaitDstStageMask = nullptr;
335     if (from->pWaitDstStageMask)
336     {
337         to->pWaitDstStageMask = (VkPipelineStageFlags*)pool->dupArray(from->pWaitDstStageMask, from->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
338     }
339     to->pCommandBuffers = nullptr;
340     if (from->pCommandBuffers)
341     {
342         to->pCommandBuffers = (VkCommandBuffer*)pool->dupArray(from->pCommandBuffers, from->commandBufferCount * sizeof(const VkCommandBuffer));
343     }
344     to->pSignalSemaphores = nullptr;
345     if (from->pSignalSemaphores)
346     {
347         to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
348     }
349 }
350 
deepcopy_VkMemoryAllocateInfo(Pool * pool,const VkMemoryAllocateInfo * from,VkMemoryAllocateInfo * to)351 void deepcopy_VkMemoryAllocateInfo(
352     Pool* pool,
353     const VkMemoryAllocateInfo* from,
354     VkMemoryAllocateInfo* to)
355 {
356     (void)pool;
357     *to = *from;
358     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
359     to->pNext = nullptr;
360     if (pNext_size)
361     {
362         to->pNext = (const void*)pool->alloc(pNext_size);
363         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
364     }
365 }
366 
deepcopy_VkMappedMemoryRange(Pool * pool,const VkMappedMemoryRange * from,VkMappedMemoryRange * to)367 void deepcopy_VkMappedMemoryRange(
368     Pool* pool,
369     const VkMappedMemoryRange* from,
370     VkMappedMemoryRange* to)
371 {
372     (void)pool;
373     *to = *from;
374     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
375     to->pNext = nullptr;
376     if (pNext_size)
377     {
378         to->pNext = (const void*)pool->alloc(pNext_size);
379         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
380     }
381 }
382 
deepcopy_VkMemoryRequirements(Pool * pool,const VkMemoryRequirements * from,VkMemoryRequirements * to)383 void deepcopy_VkMemoryRequirements(
384     Pool* pool,
385     const VkMemoryRequirements* from,
386     VkMemoryRequirements* to)
387 {
388     (void)pool;
389     *to = *from;
390 }
391 
deepcopy_VkSparseImageFormatProperties(Pool * pool,const VkSparseImageFormatProperties * from,VkSparseImageFormatProperties * to)392 void deepcopy_VkSparseImageFormatProperties(
393     Pool* pool,
394     const VkSparseImageFormatProperties* from,
395     VkSparseImageFormatProperties* to)
396 {
397     (void)pool;
398     *to = *from;
399     deepcopy_VkExtent3D(pool, &from->imageGranularity, (VkExtent3D*)(&to->imageGranularity));
400 }
401 
deepcopy_VkSparseImageMemoryRequirements(Pool * pool,const VkSparseImageMemoryRequirements * from,VkSparseImageMemoryRequirements * to)402 void deepcopy_VkSparseImageMemoryRequirements(
403     Pool* pool,
404     const VkSparseImageMemoryRequirements* from,
405     VkSparseImageMemoryRequirements* to)
406 {
407     (void)pool;
408     *to = *from;
409     deepcopy_VkSparseImageFormatProperties(pool, &from->formatProperties, (VkSparseImageFormatProperties*)(&to->formatProperties));
410 }
411 
deepcopy_VkSparseMemoryBind(Pool * pool,const VkSparseMemoryBind * from,VkSparseMemoryBind * to)412 void deepcopy_VkSparseMemoryBind(
413     Pool* pool,
414     const VkSparseMemoryBind* from,
415     VkSparseMemoryBind* to)
416 {
417     (void)pool;
418     *to = *from;
419 }
420 
deepcopy_VkSparseBufferMemoryBindInfo(Pool * pool,const VkSparseBufferMemoryBindInfo * from,VkSparseBufferMemoryBindInfo * to)421 void deepcopy_VkSparseBufferMemoryBindInfo(
422     Pool* pool,
423     const VkSparseBufferMemoryBindInfo* from,
424     VkSparseBufferMemoryBindInfo* to)
425 {
426     (void)pool;
427     *to = *from;
428     to->pBinds = nullptr;
429     if (from->pBinds)
430     {
431         to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
432         to->bindCount = from->bindCount;
433         for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
434         {
435             deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
436         }
437     }
438 }
439 
deepcopy_VkSparseImageOpaqueMemoryBindInfo(Pool * pool,const VkSparseImageOpaqueMemoryBindInfo * from,VkSparseImageOpaqueMemoryBindInfo * to)440 void deepcopy_VkSparseImageOpaqueMemoryBindInfo(
441     Pool* pool,
442     const VkSparseImageOpaqueMemoryBindInfo* from,
443     VkSparseImageOpaqueMemoryBindInfo* to)
444 {
445     (void)pool;
446     *to = *from;
447     to->pBinds = nullptr;
448     if (from->pBinds)
449     {
450         to->pBinds = (VkSparseMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseMemoryBind));
451         to->bindCount = from->bindCount;
452         for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
453         {
454             deepcopy_VkSparseMemoryBind(pool, from->pBinds + i, (VkSparseMemoryBind*)(to->pBinds + i));
455         }
456     }
457 }
458 
deepcopy_VkImageSubresource(Pool * pool,const VkImageSubresource * from,VkImageSubresource * to)459 void deepcopy_VkImageSubresource(
460     Pool* pool,
461     const VkImageSubresource* from,
462     VkImageSubresource* to)
463 {
464     (void)pool;
465     *to = *from;
466 }
467 
deepcopy_VkOffset3D(Pool * pool,const VkOffset3D * from,VkOffset3D * to)468 void deepcopy_VkOffset3D(
469     Pool* pool,
470     const VkOffset3D* from,
471     VkOffset3D* to)
472 {
473     (void)pool;
474     *to = *from;
475 }
476 
deepcopy_VkSparseImageMemoryBind(Pool * pool,const VkSparseImageMemoryBind * from,VkSparseImageMemoryBind * to)477 void deepcopy_VkSparseImageMemoryBind(
478     Pool* pool,
479     const VkSparseImageMemoryBind* from,
480     VkSparseImageMemoryBind* to)
481 {
482     (void)pool;
483     *to = *from;
484     deepcopy_VkImageSubresource(pool, &from->subresource, (VkImageSubresource*)(&to->subresource));
485     deepcopy_VkOffset3D(pool, &from->offset, (VkOffset3D*)(&to->offset));
486     deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
487 }
488 
deepcopy_VkSparseImageMemoryBindInfo(Pool * pool,const VkSparseImageMemoryBindInfo * from,VkSparseImageMemoryBindInfo * to)489 void deepcopy_VkSparseImageMemoryBindInfo(
490     Pool* pool,
491     const VkSparseImageMemoryBindInfo* from,
492     VkSparseImageMemoryBindInfo* to)
493 {
494     (void)pool;
495     *to = *from;
496     to->pBinds = nullptr;
497     if (from->pBinds)
498     {
499         to->pBinds = (VkSparseImageMemoryBind*)pool->alloc(from->bindCount * sizeof(const VkSparseImageMemoryBind));
500         to->bindCount = from->bindCount;
501         for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i)
502         {
503             deepcopy_VkSparseImageMemoryBind(pool, from->pBinds + i, (VkSparseImageMemoryBind*)(to->pBinds + i));
504         }
505     }
506 }
507 
deepcopy_VkBindSparseInfo(Pool * pool,const VkBindSparseInfo * from,VkBindSparseInfo * to)508 void deepcopy_VkBindSparseInfo(
509     Pool* pool,
510     const VkBindSparseInfo* from,
511     VkBindSparseInfo* to)
512 {
513     (void)pool;
514     *to = *from;
515     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
516     to->pNext = nullptr;
517     if (pNext_size)
518     {
519         to->pNext = (const void*)pool->alloc(pNext_size);
520         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
521     }
522     to->pWaitSemaphores = nullptr;
523     if (from->pWaitSemaphores)
524     {
525         to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
526     }
527     to->pBufferBinds = nullptr;
528     if (from->pBufferBinds)
529     {
530         to->pBufferBinds = (VkSparseBufferMemoryBindInfo*)pool->alloc(from->bufferBindCount * sizeof(const VkSparseBufferMemoryBindInfo));
531         to->bufferBindCount = from->bufferBindCount;
532         for (uint32_t i = 0; i < (uint32_t)from->bufferBindCount; ++i)
533         {
534             deepcopy_VkSparseBufferMemoryBindInfo(pool, from->pBufferBinds + i, (VkSparseBufferMemoryBindInfo*)(to->pBufferBinds + i));
535         }
536     }
537     to->pImageOpaqueBinds = nullptr;
538     if (from->pImageOpaqueBinds)
539     {
540         to->pImageOpaqueBinds = (VkSparseImageOpaqueMemoryBindInfo*)pool->alloc(from->imageOpaqueBindCount * sizeof(const VkSparseImageOpaqueMemoryBindInfo));
541         to->imageOpaqueBindCount = from->imageOpaqueBindCount;
542         for (uint32_t i = 0; i < (uint32_t)from->imageOpaqueBindCount; ++i)
543         {
544             deepcopy_VkSparseImageOpaqueMemoryBindInfo(pool, from->pImageOpaqueBinds + i, (VkSparseImageOpaqueMemoryBindInfo*)(to->pImageOpaqueBinds + i));
545         }
546     }
547     to->pImageBinds = nullptr;
548     if (from->pImageBinds)
549     {
550         to->pImageBinds = (VkSparseImageMemoryBindInfo*)pool->alloc(from->imageBindCount * sizeof(const VkSparseImageMemoryBindInfo));
551         to->imageBindCount = from->imageBindCount;
552         for (uint32_t i = 0; i < (uint32_t)from->imageBindCount; ++i)
553         {
554             deepcopy_VkSparseImageMemoryBindInfo(pool, from->pImageBinds + i, (VkSparseImageMemoryBindInfo*)(to->pImageBinds + i));
555         }
556     }
557     to->pSignalSemaphores = nullptr;
558     if (from->pSignalSemaphores)
559     {
560         to->pSignalSemaphores = (VkSemaphore*)pool->dupArray(from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
561     }
562 }
563 
deepcopy_VkFenceCreateInfo(Pool * pool,const VkFenceCreateInfo * from,VkFenceCreateInfo * to)564 void deepcopy_VkFenceCreateInfo(
565     Pool* pool,
566     const VkFenceCreateInfo* from,
567     VkFenceCreateInfo* to)
568 {
569     (void)pool;
570     *to = *from;
571     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
572     to->pNext = nullptr;
573     if (pNext_size)
574     {
575         to->pNext = (const void*)pool->alloc(pNext_size);
576         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
577     }
578 }
579 
deepcopy_VkSemaphoreCreateInfo(Pool * pool,const VkSemaphoreCreateInfo * from,VkSemaphoreCreateInfo * to)580 void deepcopy_VkSemaphoreCreateInfo(
581     Pool* pool,
582     const VkSemaphoreCreateInfo* from,
583     VkSemaphoreCreateInfo* to)
584 {
585     (void)pool;
586     *to = *from;
587     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
588     to->pNext = nullptr;
589     if (pNext_size)
590     {
591         to->pNext = (const void*)pool->alloc(pNext_size);
592         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
593     }
594 }
595 
deepcopy_VkEventCreateInfo(Pool * pool,const VkEventCreateInfo * from,VkEventCreateInfo * to)596 void deepcopy_VkEventCreateInfo(
597     Pool* pool,
598     const VkEventCreateInfo* from,
599     VkEventCreateInfo* to)
600 {
601     (void)pool;
602     *to = *from;
603     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
604     to->pNext = nullptr;
605     if (pNext_size)
606     {
607         to->pNext = (const void*)pool->alloc(pNext_size);
608         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
609     }
610 }
611 
deepcopy_VkQueryPoolCreateInfo(Pool * pool,const VkQueryPoolCreateInfo * from,VkQueryPoolCreateInfo * to)612 void deepcopy_VkQueryPoolCreateInfo(
613     Pool* pool,
614     const VkQueryPoolCreateInfo* from,
615     VkQueryPoolCreateInfo* to)
616 {
617     (void)pool;
618     *to = *from;
619     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
620     to->pNext = nullptr;
621     if (pNext_size)
622     {
623         to->pNext = (const void*)pool->alloc(pNext_size);
624         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
625     }
626 }
627 
deepcopy_VkBufferCreateInfo(Pool * pool,const VkBufferCreateInfo * from,VkBufferCreateInfo * to)628 void deepcopy_VkBufferCreateInfo(
629     Pool* pool,
630     const VkBufferCreateInfo* from,
631     VkBufferCreateInfo* to)
632 {
633     (void)pool;
634     *to = *from;
635     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
636     to->pNext = nullptr;
637     if (pNext_size)
638     {
639         to->pNext = (const void*)pool->alloc(pNext_size);
640         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
641     }
642     to->pQueueFamilyIndices = nullptr;
643     if (from->pQueueFamilyIndices)
644     {
645         to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
646     }
647 }
648 
deepcopy_VkBufferViewCreateInfo(Pool * pool,const VkBufferViewCreateInfo * from,VkBufferViewCreateInfo * to)649 void deepcopy_VkBufferViewCreateInfo(
650     Pool* pool,
651     const VkBufferViewCreateInfo* from,
652     VkBufferViewCreateInfo* to)
653 {
654     (void)pool;
655     *to = *from;
656     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
657     to->pNext = nullptr;
658     if (pNext_size)
659     {
660         to->pNext = (const void*)pool->alloc(pNext_size);
661         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
662     }
663 }
664 
deepcopy_VkImageCreateInfo(Pool * pool,const VkImageCreateInfo * from,VkImageCreateInfo * to)665 void deepcopy_VkImageCreateInfo(
666     Pool* pool,
667     const VkImageCreateInfo* from,
668     VkImageCreateInfo* to)
669 {
670     (void)pool;
671     *to = *from;
672     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
673     to->pNext = nullptr;
674     if (pNext_size)
675     {
676         to->pNext = (const void*)pool->alloc(pNext_size);
677         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
678     }
679     deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
680     to->pQueueFamilyIndices = nullptr;
681     if (from->pQueueFamilyIndices)
682     {
683         to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
684     }
685 }
686 
deepcopy_VkSubresourceLayout(Pool * pool,const VkSubresourceLayout * from,VkSubresourceLayout * to)687 void deepcopy_VkSubresourceLayout(
688     Pool* pool,
689     const VkSubresourceLayout* from,
690     VkSubresourceLayout* to)
691 {
692     (void)pool;
693     *to = *from;
694 }
695 
deepcopy_VkComponentMapping(Pool * pool,const VkComponentMapping * from,VkComponentMapping * to)696 void deepcopy_VkComponentMapping(
697     Pool* pool,
698     const VkComponentMapping* from,
699     VkComponentMapping* to)
700 {
701     (void)pool;
702     *to = *from;
703 }
704 
deepcopy_VkImageSubresourceRange(Pool * pool,const VkImageSubresourceRange * from,VkImageSubresourceRange * to)705 void deepcopy_VkImageSubresourceRange(
706     Pool* pool,
707     const VkImageSubresourceRange* from,
708     VkImageSubresourceRange* to)
709 {
710     (void)pool;
711     *to = *from;
712 }
713 
deepcopy_VkImageViewCreateInfo(Pool * pool,const VkImageViewCreateInfo * from,VkImageViewCreateInfo * to)714 void deepcopy_VkImageViewCreateInfo(
715     Pool* pool,
716     const VkImageViewCreateInfo* from,
717     VkImageViewCreateInfo* to)
718 {
719     (void)pool;
720     *to = *from;
721     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
722     to->pNext = nullptr;
723     if (pNext_size)
724     {
725         to->pNext = (const void*)pool->alloc(pNext_size);
726         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
727     }
728     deepcopy_VkComponentMapping(pool, &from->components, (VkComponentMapping*)(&to->components));
729     deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
730 }
731 
deepcopy_VkShaderModuleCreateInfo(Pool * pool,const VkShaderModuleCreateInfo * from,VkShaderModuleCreateInfo * to)732 void deepcopy_VkShaderModuleCreateInfo(
733     Pool* pool,
734     const VkShaderModuleCreateInfo* from,
735     VkShaderModuleCreateInfo* to)
736 {
737     (void)pool;
738     *to = *from;
739     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
740     to->pNext = nullptr;
741     if (pNext_size)
742     {
743         to->pNext = (const void*)pool->alloc(pNext_size);
744         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
745     }
746     to->pCode = nullptr;
747     if (from->pCode)
748     {
749         to->pCode = (uint32_t*)pool->dupArray(from->pCode, (from->codeSize / 4) * sizeof(const uint32_t));
750     }
751 }
752 
deepcopy_VkPipelineCacheCreateInfo(Pool * pool,const VkPipelineCacheCreateInfo * from,VkPipelineCacheCreateInfo * to)753 void deepcopy_VkPipelineCacheCreateInfo(
754     Pool* pool,
755     const VkPipelineCacheCreateInfo* from,
756     VkPipelineCacheCreateInfo* to)
757 {
758     (void)pool;
759     *to = *from;
760     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
761     to->pNext = nullptr;
762     if (pNext_size)
763     {
764         to->pNext = (const void*)pool->alloc(pNext_size);
765         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
766     }
767     to->pInitialData = nullptr;
768     if (from->pInitialData)
769     {
770         to->pInitialData = (void*)pool->dupArray(from->pInitialData, from->initialDataSize * sizeof(const uint8_t));
771     }
772 }
773 
deepcopy_VkSpecializationMapEntry(Pool * pool,const VkSpecializationMapEntry * from,VkSpecializationMapEntry * to)774 void deepcopy_VkSpecializationMapEntry(
775     Pool* pool,
776     const VkSpecializationMapEntry* from,
777     VkSpecializationMapEntry* to)
778 {
779     (void)pool;
780     *to = *from;
781 }
782 
deepcopy_VkSpecializationInfo(Pool * pool,const VkSpecializationInfo * from,VkSpecializationInfo * to)783 void deepcopy_VkSpecializationInfo(
784     Pool* pool,
785     const VkSpecializationInfo* from,
786     VkSpecializationInfo* to)
787 {
788     (void)pool;
789     *to = *from;
790     to->pMapEntries = nullptr;
791     if (from->pMapEntries)
792     {
793         to->pMapEntries = (VkSpecializationMapEntry*)pool->alloc(from->mapEntryCount * sizeof(const VkSpecializationMapEntry));
794         to->mapEntryCount = from->mapEntryCount;
795         for (uint32_t i = 0; i < (uint32_t)from->mapEntryCount; ++i)
796         {
797             deepcopy_VkSpecializationMapEntry(pool, from->pMapEntries + i, (VkSpecializationMapEntry*)(to->pMapEntries + i));
798         }
799     }
800     to->pData = nullptr;
801     if (from->pData)
802     {
803         to->pData = (void*)pool->dupArray(from->pData, from->dataSize * sizeof(const uint8_t));
804     }
805 }
806 
deepcopy_VkPipelineShaderStageCreateInfo(Pool * pool,const VkPipelineShaderStageCreateInfo * from,VkPipelineShaderStageCreateInfo * to)807 void deepcopy_VkPipelineShaderStageCreateInfo(
808     Pool* pool,
809     const VkPipelineShaderStageCreateInfo* from,
810     VkPipelineShaderStageCreateInfo* to)
811 {
812     (void)pool;
813     *to = *from;
814     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
815     to->pNext = nullptr;
816     if (pNext_size)
817     {
818         to->pNext = (const void*)pool->alloc(pNext_size);
819         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
820     }
821     to->pName = nullptr;
822     if (from->pName)
823     {
824         to->pName = pool->strDup(from->pName);
825     }
826     to->pSpecializationInfo = nullptr;
827     if (from->pSpecializationInfo)
828     {
829         to->pSpecializationInfo = (VkSpecializationInfo*)pool->alloc(sizeof(const VkSpecializationInfo));
830         deepcopy_VkSpecializationInfo(pool, from->pSpecializationInfo, (VkSpecializationInfo*)(to->pSpecializationInfo));
831     }
832 }
833 
deepcopy_VkVertexInputBindingDescription(Pool * pool,const VkVertexInputBindingDescription * from,VkVertexInputBindingDescription * to)834 void deepcopy_VkVertexInputBindingDescription(
835     Pool* pool,
836     const VkVertexInputBindingDescription* from,
837     VkVertexInputBindingDescription* to)
838 {
839     (void)pool;
840     *to = *from;
841 }
842 
deepcopy_VkVertexInputAttributeDescription(Pool * pool,const VkVertexInputAttributeDescription * from,VkVertexInputAttributeDescription * to)843 void deepcopy_VkVertexInputAttributeDescription(
844     Pool* pool,
845     const VkVertexInputAttributeDescription* from,
846     VkVertexInputAttributeDescription* to)
847 {
848     (void)pool;
849     *to = *from;
850 }
851 
deepcopy_VkPipelineVertexInputStateCreateInfo(Pool * pool,const VkPipelineVertexInputStateCreateInfo * from,VkPipelineVertexInputStateCreateInfo * to)852 void deepcopy_VkPipelineVertexInputStateCreateInfo(
853     Pool* pool,
854     const VkPipelineVertexInputStateCreateInfo* from,
855     VkPipelineVertexInputStateCreateInfo* to)
856 {
857     (void)pool;
858     *to = *from;
859     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
860     to->pNext = nullptr;
861     if (pNext_size)
862     {
863         to->pNext = (const void*)pool->alloc(pNext_size);
864         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
865     }
866     to->pVertexBindingDescriptions = nullptr;
867     if (from->pVertexBindingDescriptions)
868     {
869         to->pVertexBindingDescriptions = (VkVertexInputBindingDescription*)pool->alloc(from->vertexBindingDescriptionCount * sizeof(const VkVertexInputBindingDescription));
870         to->vertexBindingDescriptionCount = from->vertexBindingDescriptionCount;
871         for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDescriptionCount; ++i)
872         {
873             deepcopy_VkVertexInputBindingDescription(pool, from->pVertexBindingDescriptions + i, (VkVertexInputBindingDescription*)(to->pVertexBindingDescriptions + i));
874         }
875     }
876     to->pVertexAttributeDescriptions = nullptr;
877     if (from->pVertexAttributeDescriptions)
878     {
879         to->pVertexAttributeDescriptions = (VkVertexInputAttributeDescription*)pool->alloc(from->vertexAttributeDescriptionCount * sizeof(const VkVertexInputAttributeDescription));
880         to->vertexAttributeDescriptionCount = from->vertexAttributeDescriptionCount;
881         for (uint32_t i = 0; i < (uint32_t)from->vertexAttributeDescriptionCount; ++i)
882         {
883             deepcopy_VkVertexInputAttributeDescription(pool, from->pVertexAttributeDescriptions + i, (VkVertexInputAttributeDescription*)(to->pVertexAttributeDescriptions + i));
884         }
885     }
886 }
887 
deepcopy_VkPipelineInputAssemblyStateCreateInfo(Pool * pool,const VkPipelineInputAssemblyStateCreateInfo * from,VkPipelineInputAssemblyStateCreateInfo * to)888 void deepcopy_VkPipelineInputAssemblyStateCreateInfo(
889     Pool* pool,
890     const VkPipelineInputAssemblyStateCreateInfo* from,
891     VkPipelineInputAssemblyStateCreateInfo* to)
892 {
893     (void)pool;
894     *to = *from;
895     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
896     to->pNext = nullptr;
897     if (pNext_size)
898     {
899         to->pNext = (const void*)pool->alloc(pNext_size);
900         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
901     }
902 }
903 
deepcopy_VkPipelineTessellationStateCreateInfo(Pool * pool,const VkPipelineTessellationStateCreateInfo * from,VkPipelineTessellationStateCreateInfo * to)904 void deepcopy_VkPipelineTessellationStateCreateInfo(
905     Pool* pool,
906     const VkPipelineTessellationStateCreateInfo* from,
907     VkPipelineTessellationStateCreateInfo* to)
908 {
909     (void)pool;
910     *to = *from;
911     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
912     to->pNext = nullptr;
913     if (pNext_size)
914     {
915         to->pNext = (const void*)pool->alloc(pNext_size);
916         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
917     }
918 }
919 
deepcopy_VkViewport(Pool * pool,const VkViewport * from,VkViewport * to)920 void deepcopy_VkViewport(
921     Pool* pool,
922     const VkViewport* from,
923     VkViewport* to)
924 {
925     (void)pool;
926     *to = *from;
927 }
928 
deepcopy_VkOffset2D(Pool * pool,const VkOffset2D * from,VkOffset2D * to)929 void deepcopy_VkOffset2D(
930     Pool* pool,
931     const VkOffset2D* from,
932     VkOffset2D* to)
933 {
934     (void)pool;
935     *to = *from;
936 }
937 
deepcopy_VkExtent2D(Pool * pool,const VkExtent2D * from,VkExtent2D * to)938 void deepcopy_VkExtent2D(
939     Pool* pool,
940     const VkExtent2D* from,
941     VkExtent2D* to)
942 {
943     (void)pool;
944     *to = *from;
945 }
946 
deepcopy_VkRect2D(Pool * pool,const VkRect2D * from,VkRect2D * to)947 void deepcopy_VkRect2D(
948     Pool* pool,
949     const VkRect2D* from,
950     VkRect2D* to)
951 {
952     (void)pool;
953     *to = *from;
954     deepcopy_VkOffset2D(pool, &from->offset, (VkOffset2D*)(&to->offset));
955     deepcopy_VkExtent2D(pool, &from->extent, (VkExtent2D*)(&to->extent));
956 }
957 
deepcopy_VkPipelineViewportStateCreateInfo(Pool * pool,const VkPipelineViewportStateCreateInfo * from,VkPipelineViewportStateCreateInfo * to)958 void deepcopy_VkPipelineViewportStateCreateInfo(
959     Pool* pool,
960     const VkPipelineViewportStateCreateInfo* from,
961     VkPipelineViewportStateCreateInfo* to)
962 {
963     (void)pool;
964     *to = *from;
965     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
966     to->pNext = nullptr;
967     if (pNext_size)
968     {
969         to->pNext = (const void*)pool->alloc(pNext_size);
970         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
971     }
972     to->pViewports = nullptr;
973     if (from->pViewports)
974     {
975         to->pViewports = (VkViewport*)pool->alloc(from->viewportCount * sizeof(const VkViewport));
976         to->viewportCount = from->viewportCount;
977         for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
978         {
979             deepcopy_VkViewport(pool, from->pViewports + i, (VkViewport*)(to->pViewports + i));
980         }
981     }
982     to->pScissors = nullptr;
983     if (from->pScissors)
984     {
985         to->pScissors = (VkRect2D*)pool->alloc(from->scissorCount * sizeof(const VkRect2D));
986         to->scissorCount = from->scissorCount;
987         for (uint32_t i = 0; i < (uint32_t)from->scissorCount; ++i)
988         {
989             deepcopy_VkRect2D(pool, from->pScissors + i, (VkRect2D*)(to->pScissors + i));
990         }
991     }
992 }
993 
deepcopy_VkPipelineRasterizationStateCreateInfo(Pool * pool,const VkPipelineRasterizationStateCreateInfo * from,VkPipelineRasterizationStateCreateInfo * to)994 void deepcopy_VkPipelineRasterizationStateCreateInfo(
995     Pool* pool,
996     const VkPipelineRasterizationStateCreateInfo* from,
997     VkPipelineRasterizationStateCreateInfo* to)
998 {
999     (void)pool;
1000     *to = *from;
1001     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1002     to->pNext = nullptr;
1003     if (pNext_size)
1004     {
1005         to->pNext = (const void*)pool->alloc(pNext_size);
1006         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1007     }
1008 }
1009 
deepcopy_VkPipelineMultisampleStateCreateInfo(Pool * pool,const VkPipelineMultisampleStateCreateInfo * from,VkPipelineMultisampleStateCreateInfo * to)1010 void deepcopy_VkPipelineMultisampleStateCreateInfo(
1011     Pool* pool,
1012     const VkPipelineMultisampleStateCreateInfo* from,
1013     VkPipelineMultisampleStateCreateInfo* to)
1014 {
1015     (void)pool;
1016     *to = *from;
1017     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1018     to->pNext = nullptr;
1019     if (pNext_size)
1020     {
1021         to->pNext = (const void*)pool->alloc(pNext_size);
1022         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1023     }
1024     to->pSampleMask = nullptr;
1025     if (from->pSampleMask)
1026     {
1027         to->pSampleMask = (VkSampleMask*)pool->dupArray(from->pSampleMask, (((from->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
1028     }
1029 }
1030 
deepcopy_VkStencilOpState(Pool * pool,const VkStencilOpState * from,VkStencilOpState * to)1031 void deepcopy_VkStencilOpState(
1032     Pool* pool,
1033     const VkStencilOpState* from,
1034     VkStencilOpState* to)
1035 {
1036     (void)pool;
1037     *to = *from;
1038 }
1039 
deepcopy_VkPipelineDepthStencilStateCreateInfo(Pool * pool,const VkPipelineDepthStencilStateCreateInfo * from,VkPipelineDepthStencilStateCreateInfo * to)1040 void deepcopy_VkPipelineDepthStencilStateCreateInfo(
1041     Pool* pool,
1042     const VkPipelineDepthStencilStateCreateInfo* from,
1043     VkPipelineDepthStencilStateCreateInfo* to)
1044 {
1045     (void)pool;
1046     *to = *from;
1047     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1048     to->pNext = nullptr;
1049     if (pNext_size)
1050     {
1051         to->pNext = (const void*)pool->alloc(pNext_size);
1052         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1053     }
1054     deepcopy_VkStencilOpState(pool, &from->front, (VkStencilOpState*)(&to->front));
1055     deepcopy_VkStencilOpState(pool, &from->back, (VkStencilOpState*)(&to->back));
1056 }
1057 
deepcopy_VkPipelineColorBlendAttachmentState(Pool * pool,const VkPipelineColorBlendAttachmentState * from,VkPipelineColorBlendAttachmentState * to)1058 void deepcopy_VkPipelineColorBlendAttachmentState(
1059     Pool* pool,
1060     const VkPipelineColorBlendAttachmentState* from,
1061     VkPipelineColorBlendAttachmentState* to)
1062 {
1063     (void)pool;
1064     *to = *from;
1065 }
1066 
deepcopy_VkPipelineColorBlendStateCreateInfo(Pool * pool,const VkPipelineColorBlendStateCreateInfo * from,VkPipelineColorBlendStateCreateInfo * to)1067 void deepcopy_VkPipelineColorBlendStateCreateInfo(
1068     Pool* pool,
1069     const VkPipelineColorBlendStateCreateInfo* from,
1070     VkPipelineColorBlendStateCreateInfo* to)
1071 {
1072     (void)pool;
1073     *to = *from;
1074     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1075     to->pNext = nullptr;
1076     if (pNext_size)
1077     {
1078         to->pNext = (const void*)pool->alloc(pNext_size);
1079         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1080     }
1081     to->pAttachments = nullptr;
1082     if (from->pAttachments)
1083     {
1084         to->pAttachments = (VkPipelineColorBlendAttachmentState*)pool->alloc(from->attachmentCount * sizeof(const VkPipelineColorBlendAttachmentState));
1085         to->attachmentCount = from->attachmentCount;
1086         for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
1087         {
1088             deepcopy_VkPipelineColorBlendAttachmentState(pool, from->pAttachments + i, (VkPipelineColorBlendAttachmentState*)(to->pAttachments + i));
1089         }
1090     }
1091     memcpy(to->blendConstants, from->blendConstants, 4 * sizeof(float));
1092 }
1093 
deepcopy_VkPipelineDynamicStateCreateInfo(Pool * pool,const VkPipelineDynamicStateCreateInfo * from,VkPipelineDynamicStateCreateInfo * to)1094 void deepcopy_VkPipelineDynamicStateCreateInfo(
1095     Pool* pool,
1096     const VkPipelineDynamicStateCreateInfo* from,
1097     VkPipelineDynamicStateCreateInfo* to)
1098 {
1099     (void)pool;
1100     *to = *from;
1101     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1102     to->pNext = nullptr;
1103     if (pNext_size)
1104     {
1105         to->pNext = (const void*)pool->alloc(pNext_size);
1106         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1107     }
1108     to->pDynamicStates = nullptr;
1109     if (from->pDynamicStates)
1110     {
1111         to->pDynamicStates = (VkDynamicState*)pool->dupArray(from->pDynamicStates, from->dynamicStateCount * sizeof(const VkDynamicState));
1112     }
1113 }
1114 
deepcopy_VkGraphicsPipelineCreateInfo(Pool * pool,const VkGraphicsPipelineCreateInfo * from,VkGraphicsPipelineCreateInfo * to)1115 void deepcopy_VkGraphicsPipelineCreateInfo(
1116     Pool* pool,
1117     const VkGraphicsPipelineCreateInfo* from,
1118     VkGraphicsPipelineCreateInfo* to)
1119 {
1120     (void)pool;
1121     *to = *from;
1122     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1123     to->pNext = nullptr;
1124     if (pNext_size)
1125     {
1126         to->pNext = (const void*)pool->alloc(pNext_size);
1127         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1128     }
1129     to->pStages = nullptr;
1130     if (from->pStages)
1131     {
1132         to->pStages = (VkPipelineShaderStageCreateInfo*)pool->alloc(from->stageCount * sizeof(const VkPipelineShaderStageCreateInfo));
1133         to->stageCount = from->stageCount;
1134         for (uint32_t i = 0; i < (uint32_t)from->stageCount; ++i)
1135         {
1136             deepcopy_VkPipelineShaderStageCreateInfo(pool, from->pStages + i, (VkPipelineShaderStageCreateInfo*)(to->pStages + i));
1137         }
1138     }
1139     to->pVertexInputState = nullptr;
1140     if (from->pVertexInputState)
1141     {
1142         to->pVertexInputState = (VkPipelineVertexInputStateCreateInfo*)pool->alloc(sizeof(const VkPipelineVertexInputStateCreateInfo));
1143         deepcopy_VkPipelineVertexInputStateCreateInfo(pool, from->pVertexInputState, (VkPipelineVertexInputStateCreateInfo*)(to->pVertexInputState));
1144     }
1145     to->pInputAssemblyState = nullptr;
1146     if (from->pInputAssemblyState)
1147     {
1148         to->pInputAssemblyState = (VkPipelineInputAssemblyStateCreateInfo*)pool->alloc(sizeof(const VkPipelineInputAssemblyStateCreateInfo));
1149         deepcopy_VkPipelineInputAssemblyStateCreateInfo(pool, from->pInputAssemblyState, (VkPipelineInputAssemblyStateCreateInfo*)(to->pInputAssemblyState));
1150     }
1151     to->pTessellationState = nullptr;
1152     if (from->pTessellationState)
1153     {
1154         to->pTessellationState = (VkPipelineTessellationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineTessellationStateCreateInfo));
1155         deepcopy_VkPipelineTessellationStateCreateInfo(pool, from->pTessellationState, (VkPipelineTessellationStateCreateInfo*)(to->pTessellationState));
1156     }
1157     to->pViewportState = nullptr;
1158     if (from->pViewportState)
1159     {
1160         to->pViewportState = (VkPipelineViewportStateCreateInfo*)pool->alloc(sizeof(const VkPipelineViewportStateCreateInfo));
1161         deepcopy_VkPipelineViewportStateCreateInfo(pool, from->pViewportState, (VkPipelineViewportStateCreateInfo*)(to->pViewportState));
1162     }
1163     to->pRasterizationState = nullptr;
1164     if (from->pRasterizationState)
1165     {
1166         to->pRasterizationState = (VkPipelineRasterizationStateCreateInfo*)pool->alloc(sizeof(const VkPipelineRasterizationStateCreateInfo));
1167         deepcopy_VkPipelineRasterizationStateCreateInfo(pool, from->pRasterizationState, (VkPipelineRasterizationStateCreateInfo*)(to->pRasterizationState));
1168     }
1169     to->pMultisampleState = nullptr;
1170     if (from->pMultisampleState)
1171     {
1172         to->pMultisampleState = (VkPipelineMultisampleStateCreateInfo*)pool->alloc(sizeof(const VkPipelineMultisampleStateCreateInfo));
1173         deepcopy_VkPipelineMultisampleStateCreateInfo(pool, from->pMultisampleState, (VkPipelineMultisampleStateCreateInfo*)(to->pMultisampleState));
1174     }
1175     to->pDepthStencilState = nullptr;
1176     if (from->pDepthStencilState)
1177     {
1178         to->pDepthStencilState = (VkPipelineDepthStencilStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDepthStencilStateCreateInfo));
1179         deepcopy_VkPipelineDepthStencilStateCreateInfo(pool, from->pDepthStencilState, (VkPipelineDepthStencilStateCreateInfo*)(to->pDepthStencilState));
1180     }
1181     to->pColorBlendState = nullptr;
1182     if (from->pColorBlendState)
1183     {
1184         to->pColorBlendState = (VkPipelineColorBlendStateCreateInfo*)pool->alloc(sizeof(const VkPipelineColorBlendStateCreateInfo));
1185         deepcopy_VkPipelineColorBlendStateCreateInfo(pool, from->pColorBlendState, (VkPipelineColorBlendStateCreateInfo*)(to->pColorBlendState));
1186     }
1187     to->pDynamicState = nullptr;
1188     if (from->pDynamicState)
1189     {
1190         to->pDynamicState = (VkPipelineDynamicStateCreateInfo*)pool->alloc(sizeof(const VkPipelineDynamicStateCreateInfo));
1191         deepcopy_VkPipelineDynamicStateCreateInfo(pool, from->pDynamicState, (VkPipelineDynamicStateCreateInfo*)(to->pDynamicState));
1192     }
1193 }
1194 
deepcopy_VkComputePipelineCreateInfo(Pool * pool,const VkComputePipelineCreateInfo * from,VkComputePipelineCreateInfo * to)1195 void deepcopy_VkComputePipelineCreateInfo(
1196     Pool* pool,
1197     const VkComputePipelineCreateInfo* from,
1198     VkComputePipelineCreateInfo* to)
1199 {
1200     (void)pool;
1201     *to = *from;
1202     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1203     to->pNext = nullptr;
1204     if (pNext_size)
1205     {
1206         to->pNext = (const void*)pool->alloc(pNext_size);
1207         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1208     }
1209     deepcopy_VkPipelineShaderStageCreateInfo(pool, &from->stage, (VkPipelineShaderStageCreateInfo*)(&to->stage));
1210 }
1211 
deepcopy_VkPushConstantRange(Pool * pool,const VkPushConstantRange * from,VkPushConstantRange * to)1212 void deepcopy_VkPushConstantRange(
1213     Pool* pool,
1214     const VkPushConstantRange* from,
1215     VkPushConstantRange* to)
1216 {
1217     (void)pool;
1218     *to = *from;
1219 }
1220 
deepcopy_VkPipelineLayoutCreateInfo(Pool * pool,const VkPipelineLayoutCreateInfo * from,VkPipelineLayoutCreateInfo * to)1221 void deepcopy_VkPipelineLayoutCreateInfo(
1222     Pool* pool,
1223     const VkPipelineLayoutCreateInfo* from,
1224     VkPipelineLayoutCreateInfo* to)
1225 {
1226     (void)pool;
1227     *to = *from;
1228     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1229     to->pNext = nullptr;
1230     if (pNext_size)
1231     {
1232         to->pNext = (const void*)pool->alloc(pNext_size);
1233         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1234     }
1235     to->pSetLayouts = nullptr;
1236     if (from->pSetLayouts)
1237     {
1238         to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->setLayoutCount * sizeof(const VkDescriptorSetLayout));
1239     }
1240     to->pPushConstantRanges = nullptr;
1241     if (from->pPushConstantRanges)
1242     {
1243         to->pPushConstantRanges = (VkPushConstantRange*)pool->alloc(from->pushConstantRangeCount * sizeof(const VkPushConstantRange));
1244         to->pushConstantRangeCount = from->pushConstantRangeCount;
1245         for (uint32_t i = 0; i < (uint32_t)from->pushConstantRangeCount; ++i)
1246         {
1247             deepcopy_VkPushConstantRange(pool, from->pPushConstantRanges + i, (VkPushConstantRange*)(to->pPushConstantRanges + i));
1248         }
1249     }
1250 }
1251 
deepcopy_VkSamplerCreateInfo(Pool * pool,const VkSamplerCreateInfo * from,VkSamplerCreateInfo * to)1252 void deepcopy_VkSamplerCreateInfo(
1253     Pool* pool,
1254     const VkSamplerCreateInfo* from,
1255     VkSamplerCreateInfo* to)
1256 {
1257     (void)pool;
1258     *to = *from;
1259     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1260     to->pNext = nullptr;
1261     if (pNext_size)
1262     {
1263         to->pNext = (const void*)pool->alloc(pNext_size);
1264         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1265     }
1266 }
1267 
deepcopy_VkDescriptorSetLayoutBinding(Pool * pool,const VkDescriptorSetLayoutBinding * from,VkDescriptorSetLayoutBinding * to)1268 void deepcopy_VkDescriptorSetLayoutBinding(
1269     Pool* pool,
1270     const VkDescriptorSetLayoutBinding* from,
1271     VkDescriptorSetLayoutBinding* to)
1272 {
1273     (void)pool;
1274     *to = *from;
1275     to->pImmutableSamplers = nullptr;
1276     if (from->pImmutableSamplers)
1277     {
1278         to->pImmutableSamplers = (VkSampler*)pool->dupArray(from->pImmutableSamplers, from->descriptorCount * sizeof(const VkSampler));
1279     }
1280 }
1281 
deepcopy_VkDescriptorSetLayoutCreateInfo(Pool * pool,const VkDescriptorSetLayoutCreateInfo * from,VkDescriptorSetLayoutCreateInfo * to)1282 void deepcopy_VkDescriptorSetLayoutCreateInfo(
1283     Pool* pool,
1284     const VkDescriptorSetLayoutCreateInfo* from,
1285     VkDescriptorSetLayoutCreateInfo* to)
1286 {
1287     (void)pool;
1288     *to = *from;
1289     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1290     to->pNext = nullptr;
1291     if (pNext_size)
1292     {
1293         to->pNext = (const void*)pool->alloc(pNext_size);
1294         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1295     }
1296     to->pBindings = nullptr;
1297     if (from->pBindings)
1298     {
1299         to->pBindings = (VkDescriptorSetLayoutBinding*)pool->alloc(from->bindingCount * sizeof(const VkDescriptorSetLayoutBinding));
1300         to->bindingCount = from->bindingCount;
1301         for (uint32_t i = 0; i < (uint32_t)from->bindingCount; ++i)
1302         {
1303             deepcopy_VkDescriptorSetLayoutBinding(pool, from->pBindings + i, (VkDescriptorSetLayoutBinding*)(to->pBindings + i));
1304         }
1305     }
1306 }
1307 
deepcopy_VkDescriptorPoolSize(Pool * pool,const VkDescriptorPoolSize * from,VkDescriptorPoolSize * to)1308 void deepcopy_VkDescriptorPoolSize(
1309     Pool* pool,
1310     const VkDescriptorPoolSize* from,
1311     VkDescriptorPoolSize* to)
1312 {
1313     (void)pool;
1314     *to = *from;
1315 }
1316 
deepcopy_VkDescriptorPoolCreateInfo(Pool * pool,const VkDescriptorPoolCreateInfo * from,VkDescriptorPoolCreateInfo * to)1317 void deepcopy_VkDescriptorPoolCreateInfo(
1318     Pool* pool,
1319     const VkDescriptorPoolCreateInfo* from,
1320     VkDescriptorPoolCreateInfo* to)
1321 {
1322     (void)pool;
1323     *to = *from;
1324     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1325     to->pNext = nullptr;
1326     if (pNext_size)
1327     {
1328         to->pNext = (const void*)pool->alloc(pNext_size);
1329         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1330     }
1331     to->pPoolSizes = nullptr;
1332     if (from->pPoolSizes)
1333     {
1334         to->pPoolSizes = (VkDescriptorPoolSize*)pool->alloc(from->poolSizeCount * sizeof(const VkDescriptorPoolSize));
1335         to->poolSizeCount = from->poolSizeCount;
1336         for (uint32_t i = 0; i < (uint32_t)from->poolSizeCount; ++i)
1337         {
1338             deepcopy_VkDescriptorPoolSize(pool, from->pPoolSizes + i, (VkDescriptorPoolSize*)(to->pPoolSizes + i));
1339         }
1340     }
1341 }
1342 
deepcopy_VkDescriptorSetAllocateInfo(Pool * pool,const VkDescriptorSetAllocateInfo * from,VkDescriptorSetAllocateInfo * to)1343 void deepcopy_VkDescriptorSetAllocateInfo(
1344     Pool* pool,
1345     const VkDescriptorSetAllocateInfo* from,
1346     VkDescriptorSetAllocateInfo* to)
1347 {
1348     (void)pool;
1349     *to = *from;
1350     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1351     to->pNext = nullptr;
1352     if (pNext_size)
1353     {
1354         to->pNext = (const void*)pool->alloc(pNext_size);
1355         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1356     }
1357     to->pSetLayouts = nullptr;
1358     if (from->pSetLayouts)
1359     {
1360         to->pSetLayouts = (VkDescriptorSetLayout*)pool->dupArray(from->pSetLayouts, from->descriptorSetCount * sizeof(const VkDescriptorSetLayout));
1361     }
1362 }
1363 
deepcopy_VkDescriptorImageInfo(Pool * pool,const VkDescriptorImageInfo * from,VkDescriptorImageInfo * to)1364 void deepcopy_VkDescriptorImageInfo(
1365     Pool* pool,
1366     const VkDescriptorImageInfo* from,
1367     VkDescriptorImageInfo* to)
1368 {
1369     (void)pool;
1370     *to = *from;
1371 }
1372 
deepcopy_VkDescriptorBufferInfo(Pool * pool,const VkDescriptorBufferInfo * from,VkDescriptorBufferInfo * to)1373 void deepcopy_VkDescriptorBufferInfo(
1374     Pool* pool,
1375     const VkDescriptorBufferInfo* from,
1376     VkDescriptorBufferInfo* to)
1377 {
1378     (void)pool;
1379     *to = *from;
1380 }
1381 
deepcopy_VkWriteDescriptorSet(Pool * pool,const VkWriteDescriptorSet * from,VkWriteDescriptorSet * to)1382 void deepcopy_VkWriteDescriptorSet(
1383     Pool* pool,
1384     const VkWriteDescriptorSet* from,
1385     VkWriteDescriptorSet* to)
1386 {
1387     (void)pool;
1388     *to = *from;
1389     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1390     to->pNext = nullptr;
1391     if (pNext_size)
1392     {
1393         to->pNext = (const void*)pool->alloc(pNext_size);
1394         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1395     }
1396     to->pImageInfo = nullptr;
1397     if (from->pImageInfo)
1398     {
1399         to->pImageInfo = (VkDescriptorImageInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorImageInfo));
1400         to->descriptorCount = from->descriptorCount;
1401         for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
1402         {
1403             deepcopy_VkDescriptorImageInfo(pool, from->pImageInfo + i, (VkDescriptorImageInfo*)(to->pImageInfo + i));
1404         }
1405     }
1406     to->pBufferInfo = nullptr;
1407     if (from->pBufferInfo)
1408     {
1409         to->pBufferInfo = (VkDescriptorBufferInfo*)pool->alloc(from->descriptorCount * sizeof(const VkDescriptorBufferInfo));
1410         to->descriptorCount = from->descriptorCount;
1411         for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i)
1412         {
1413             deepcopy_VkDescriptorBufferInfo(pool, from->pBufferInfo + i, (VkDescriptorBufferInfo*)(to->pBufferInfo + i));
1414         }
1415     }
1416     to->pTexelBufferView = nullptr;
1417     if (from->pTexelBufferView)
1418     {
1419         to->pTexelBufferView = (VkBufferView*)pool->dupArray(from->pTexelBufferView, from->descriptorCount * sizeof(const VkBufferView));
1420     }
1421 }
1422 
deepcopy_VkCopyDescriptorSet(Pool * pool,const VkCopyDescriptorSet * from,VkCopyDescriptorSet * to)1423 void deepcopy_VkCopyDescriptorSet(
1424     Pool* pool,
1425     const VkCopyDescriptorSet* from,
1426     VkCopyDescriptorSet* to)
1427 {
1428     (void)pool;
1429     *to = *from;
1430     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1431     to->pNext = nullptr;
1432     if (pNext_size)
1433     {
1434         to->pNext = (const void*)pool->alloc(pNext_size);
1435         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1436     }
1437 }
1438 
deepcopy_VkFramebufferCreateInfo(Pool * pool,const VkFramebufferCreateInfo * from,VkFramebufferCreateInfo * to)1439 void deepcopy_VkFramebufferCreateInfo(
1440     Pool* pool,
1441     const VkFramebufferCreateInfo* from,
1442     VkFramebufferCreateInfo* to)
1443 {
1444     (void)pool;
1445     *to = *from;
1446     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1447     to->pNext = nullptr;
1448     if (pNext_size)
1449     {
1450         to->pNext = (const void*)pool->alloc(pNext_size);
1451         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1452     }
1453     to->pAttachments = nullptr;
1454     if (from->pAttachments)
1455     {
1456         to->pAttachments = (VkImageView*)pool->dupArray(from->pAttachments, from->attachmentCount * sizeof(const VkImageView));
1457     }
1458 }
1459 
deepcopy_VkAttachmentDescription(Pool * pool,const VkAttachmentDescription * from,VkAttachmentDescription * to)1460 void deepcopy_VkAttachmentDescription(
1461     Pool* pool,
1462     const VkAttachmentDescription* from,
1463     VkAttachmentDescription* to)
1464 {
1465     (void)pool;
1466     *to = *from;
1467 }
1468 
deepcopy_VkAttachmentReference(Pool * pool,const VkAttachmentReference * from,VkAttachmentReference * to)1469 void deepcopy_VkAttachmentReference(
1470     Pool* pool,
1471     const VkAttachmentReference* from,
1472     VkAttachmentReference* to)
1473 {
1474     (void)pool;
1475     *to = *from;
1476 }
1477 
deepcopy_VkSubpassDescription(Pool * pool,const VkSubpassDescription * from,VkSubpassDescription * to)1478 void deepcopy_VkSubpassDescription(
1479     Pool* pool,
1480     const VkSubpassDescription* from,
1481     VkSubpassDescription* to)
1482 {
1483     (void)pool;
1484     *to = *from;
1485     to->pInputAttachments = nullptr;
1486     if (from->pInputAttachments)
1487     {
1488         to->pInputAttachments = (VkAttachmentReference*)pool->alloc(from->inputAttachmentCount * sizeof(const VkAttachmentReference));
1489         to->inputAttachmentCount = from->inputAttachmentCount;
1490         for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i)
1491         {
1492             deepcopy_VkAttachmentReference(pool, from->pInputAttachments + i, (VkAttachmentReference*)(to->pInputAttachments + i));
1493         }
1494     }
1495     to->pColorAttachments = nullptr;
1496     if (from->pColorAttachments)
1497     {
1498         to->pColorAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1499         to->colorAttachmentCount = from->colorAttachmentCount;
1500         for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
1501         {
1502             deepcopy_VkAttachmentReference(pool, from->pColorAttachments + i, (VkAttachmentReference*)(to->pColorAttachments + i));
1503         }
1504     }
1505     to->pResolveAttachments = nullptr;
1506     if (from->pResolveAttachments)
1507     {
1508         to->pResolveAttachments = (VkAttachmentReference*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1509         to->colorAttachmentCount = from->colorAttachmentCount;
1510         for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
1511         {
1512             deepcopy_VkAttachmentReference(pool, from->pResolveAttachments + i, (VkAttachmentReference*)(to->pResolveAttachments + i));
1513         }
1514     }
1515     to->pDepthStencilAttachment = nullptr;
1516     if (from->pDepthStencilAttachment)
1517     {
1518         to->pDepthStencilAttachment = (VkAttachmentReference*)pool->alloc(sizeof(const VkAttachmentReference));
1519         deepcopy_VkAttachmentReference(pool, from->pDepthStencilAttachment, (VkAttachmentReference*)(to->pDepthStencilAttachment));
1520     }
1521     to->pPreserveAttachments = nullptr;
1522     if (from->pPreserveAttachments)
1523     {
1524         to->pPreserveAttachments = (uint32_t*)pool->dupArray(from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
1525     }
1526 }
1527 
deepcopy_VkSubpassDependency(Pool * pool,const VkSubpassDependency * from,VkSubpassDependency * to)1528 void deepcopy_VkSubpassDependency(
1529     Pool* pool,
1530     const VkSubpassDependency* from,
1531     VkSubpassDependency* to)
1532 {
1533     (void)pool;
1534     *to = *from;
1535 }
1536 
deepcopy_VkRenderPassCreateInfo(Pool * pool,const VkRenderPassCreateInfo * from,VkRenderPassCreateInfo * to)1537 void deepcopy_VkRenderPassCreateInfo(
1538     Pool* pool,
1539     const VkRenderPassCreateInfo* from,
1540     VkRenderPassCreateInfo* to)
1541 {
1542     (void)pool;
1543     *to = *from;
1544     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1545     to->pNext = nullptr;
1546     if (pNext_size)
1547     {
1548         to->pNext = (const void*)pool->alloc(pNext_size);
1549         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1550     }
1551     to->pAttachments = nullptr;
1552     if (from->pAttachments)
1553     {
1554         to->pAttachments = (VkAttachmentDescription*)pool->alloc(from->attachmentCount * sizeof(const VkAttachmentDescription));
1555         to->attachmentCount = from->attachmentCount;
1556         for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
1557         {
1558             deepcopy_VkAttachmentDescription(pool, from->pAttachments + i, (VkAttachmentDescription*)(to->pAttachments + i));
1559         }
1560     }
1561     to->pSubpasses = nullptr;
1562     if (from->pSubpasses)
1563     {
1564         to->pSubpasses = (VkSubpassDescription*)pool->alloc(from->subpassCount * sizeof(const VkSubpassDescription));
1565         to->subpassCount = from->subpassCount;
1566         for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i)
1567         {
1568             deepcopy_VkSubpassDescription(pool, from->pSubpasses + i, (VkSubpassDescription*)(to->pSubpasses + i));
1569         }
1570     }
1571     to->pDependencies = nullptr;
1572     if (from->pDependencies)
1573     {
1574         to->pDependencies = (VkSubpassDependency*)pool->alloc(from->dependencyCount * sizeof(const VkSubpassDependency));
1575         to->dependencyCount = from->dependencyCount;
1576         for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i)
1577         {
1578             deepcopy_VkSubpassDependency(pool, from->pDependencies + i, (VkSubpassDependency*)(to->pDependencies + i));
1579         }
1580     }
1581 }
1582 
deepcopy_VkCommandPoolCreateInfo(Pool * pool,const VkCommandPoolCreateInfo * from,VkCommandPoolCreateInfo * to)1583 void deepcopy_VkCommandPoolCreateInfo(
1584     Pool* pool,
1585     const VkCommandPoolCreateInfo* from,
1586     VkCommandPoolCreateInfo* to)
1587 {
1588     (void)pool;
1589     *to = *from;
1590     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1591     to->pNext = nullptr;
1592     if (pNext_size)
1593     {
1594         to->pNext = (const void*)pool->alloc(pNext_size);
1595         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1596     }
1597 }
1598 
deepcopy_VkCommandBufferAllocateInfo(Pool * pool,const VkCommandBufferAllocateInfo * from,VkCommandBufferAllocateInfo * to)1599 void deepcopy_VkCommandBufferAllocateInfo(
1600     Pool* pool,
1601     const VkCommandBufferAllocateInfo* from,
1602     VkCommandBufferAllocateInfo* to)
1603 {
1604     (void)pool;
1605     *to = *from;
1606     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1607     to->pNext = nullptr;
1608     if (pNext_size)
1609     {
1610         to->pNext = (const void*)pool->alloc(pNext_size);
1611         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1612     }
1613 }
1614 
deepcopy_VkCommandBufferInheritanceInfo(Pool * pool,const VkCommandBufferInheritanceInfo * from,VkCommandBufferInheritanceInfo * to)1615 void deepcopy_VkCommandBufferInheritanceInfo(
1616     Pool* pool,
1617     const VkCommandBufferInheritanceInfo* from,
1618     VkCommandBufferInheritanceInfo* to)
1619 {
1620     (void)pool;
1621     *to = *from;
1622     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1623     to->pNext = nullptr;
1624     if (pNext_size)
1625     {
1626         to->pNext = (const void*)pool->alloc(pNext_size);
1627         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1628     }
1629 }
1630 
deepcopy_VkCommandBufferBeginInfo(Pool * pool,const VkCommandBufferBeginInfo * from,VkCommandBufferBeginInfo * to)1631 void deepcopy_VkCommandBufferBeginInfo(
1632     Pool* pool,
1633     const VkCommandBufferBeginInfo* from,
1634     VkCommandBufferBeginInfo* to)
1635 {
1636     (void)pool;
1637     *to = *from;
1638     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1639     to->pNext = nullptr;
1640     if (pNext_size)
1641     {
1642         to->pNext = (const void*)pool->alloc(pNext_size);
1643         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1644     }
1645     to->pInheritanceInfo = nullptr;
1646     if (from->pInheritanceInfo)
1647     {
1648         to->pInheritanceInfo = (VkCommandBufferInheritanceInfo*)pool->alloc(sizeof(const VkCommandBufferInheritanceInfo));
1649         deepcopy_VkCommandBufferInheritanceInfo(pool, from->pInheritanceInfo, (VkCommandBufferInheritanceInfo*)(to->pInheritanceInfo));
1650     }
1651 }
1652 
deepcopy_VkBufferCopy(Pool * pool,const VkBufferCopy * from,VkBufferCopy * to)1653 void deepcopy_VkBufferCopy(
1654     Pool* pool,
1655     const VkBufferCopy* from,
1656     VkBufferCopy* to)
1657 {
1658     (void)pool;
1659     *to = *from;
1660 }
1661 
deepcopy_VkImageSubresourceLayers(Pool * pool,const VkImageSubresourceLayers * from,VkImageSubresourceLayers * to)1662 void deepcopy_VkImageSubresourceLayers(
1663     Pool* pool,
1664     const VkImageSubresourceLayers* from,
1665     VkImageSubresourceLayers* to)
1666 {
1667     (void)pool;
1668     *to = *from;
1669 }
1670 
deepcopy_VkImageCopy(Pool * pool,const VkImageCopy * from,VkImageCopy * to)1671 void deepcopy_VkImageCopy(
1672     Pool* pool,
1673     const VkImageCopy* from,
1674     VkImageCopy* to)
1675 {
1676     (void)pool;
1677     *to = *from;
1678     deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1679     deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
1680     deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1681     deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
1682     deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
1683 }
1684 
deepcopy_VkImageBlit(Pool * pool,const VkImageBlit * from,VkImageBlit * to)1685 void deepcopy_VkImageBlit(
1686     Pool* pool,
1687     const VkImageBlit* from,
1688     VkImageBlit* to)
1689 {
1690     (void)pool;
1691     *to = *from;
1692     deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1693     for (uint32_t i = 0; i < (uint32_t)2; ++i)
1694     {
1695         deepcopy_VkOffset3D(pool, from->srcOffsets + i, (VkOffset3D*)(to->srcOffsets + i));
1696     }
1697     deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1698     for (uint32_t i = 0; i < (uint32_t)2; ++i)
1699     {
1700         deepcopy_VkOffset3D(pool, from->dstOffsets + i, (VkOffset3D*)(to->dstOffsets + i));
1701     }
1702 }
1703 
deepcopy_VkBufferImageCopy(Pool * pool,const VkBufferImageCopy * from,VkBufferImageCopy * to)1704 void deepcopy_VkBufferImageCopy(
1705     Pool* pool,
1706     const VkBufferImageCopy* from,
1707     VkBufferImageCopy* to)
1708 {
1709     (void)pool;
1710     *to = *from;
1711     deepcopy_VkImageSubresourceLayers(pool, &from->imageSubresource, (VkImageSubresourceLayers*)(&to->imageSubresource));
1712     deepcopy_VkOffset3D(pool, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
1713     deepcopy_VkExtent3D(pool, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
1714 }
1715 
deepcopy_VkClearColorValue(Pool * pool,const VkClearColorValue * from,VkClearColorValue * to)1716 void deepcopy_VkClearColorValue(
1717     Pool* pool,
1718     const VkClearColorValue* from,
1719     VkClearColorValue* to)
1720 {
1721     (void)pool;
1722     *to = *from;
1723     memcpy(to->float32, from->float32, 4 * sizeof(float));
1724     memcpy(to->int32, from->int32, 4 * sizeof(int32_t));
1725     memcpy(to->uint32, from->uint32, 4 * sizeof(uint32_t));
1726 }
1727 
deepcopy_VkClearDepthStencilValue(Pool * pool,const VkClearDepthStencilValue * from,VkClearDepthStencilValue * to)1728 void deepcopy_VkClearDepthStencilValue(
1729     Pool* pool,
1730     const VkClearDepthStencilValue* from,
1731     VkClearDepthStencilValue* to)
1732 {
1733     (void)pool;
1734     *to = *from;
1735 }
1736 
deepcopy_VkClearValue(Pool * pool,const VkClearValue * from,VkClearValue * to)1737 void deepcopy_VkClearValue(
1738     Pool* pool,
1739     const VkClearValue* from,
1740     VkClearValue* to)
1741 {
1742     (void)pool;
1743     *to = *from;
1744     deepcopy_VkClearColorValue(pool, &from->color, (VkClearColorValue*)(&to->color));
1745     deepcopy_VkClearDepthStencilValue(pool, &from->depthStencil, (VkClearDepthStencilValue*)(&to->depthStencil));
1746 }
1747 
deepcopy_VkClearAttachment(Pool * pool,const VkClearAttachment * from,VkClearAttachment * to)1748 void deepcopy_VkClearAttachment(
1749     Pool* pool,
1750     const VkClearAttachment* from,
1751     VkClearAttachment* to)
1752 {
1753     (void)pool;
1754     *to = *from;
1755     deepcopy_VkClearValue(pool, &from->clearValue, (VkClearValue*)(&to->clearValue));
1756 }
1757 
deepcopy_VkClearRect(Pool * pool,const VkClearRect * from,VkClearRect * to)1758 void deepcopy_VkClearRect(
1759     Pool* pool,
1760     const VkClearRect* from,
1761     VkClearRect* to)
1762 {
1763     (void)pool;
1764     *to = *from;
1765     deepcopy_VkRect2D(pool, &from->rect, (VkRect2D*)(&to->rect));
1766 }
1767 
deepcopy_VkImageResolve(Pool * pool,const VkImageResolve * from,VkImageResolve * to)1768 void deepcopy_VkImageResolve(
1769     Pool* pool,
1770     const VkImageResolve* from,
1771     VkImageResolve* to)
1772 {
1773     (void)pool;
1774     *to = *from;
1775     deepcopy_VkImageSubresourceLayers(pool, &from->srcSubresource, (VkImageSubresourceLayers*)(&to->srcSubresource));
1776     deepcopy_VkOffset3D(pool, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
1777     deepcopy_VkImageSubresourceLayers(pool, &from->dstSubresource, (VkImageSubresourceLayers*)(&to->dstSubresource));
1778     deepcopy_VkOffset3D(pool, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
1779     deepcopy_VkExtent3D(pool, &from->extent, (VkExtent3D*)(&to->extent));
1780 }
1781 
deepcopy_VkMemoryBarrier(Pool * pool,const VkMemoryBarrier * from,VkMemoryBarrier * to)1782 void deepcopy_VkMemoryBarrier(
1783     Pool* pool,
1784     const VkMemoryBarrier* from,
1785     VkMemoryBarrier* to)
1786 {
1787     (void)pool;
1788     *to = *from;
1789     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1790     to->pNext = nullptr;
1791     if (pNext_size)
1792     {
1793         to->pNext = (const void*)pool->alloc(pNext_size);
1794         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1795     }
1796 }
1797 
deepcopy_VkBufferMemoryBarrier(Pool * pool,const VkBufferMemoryBarrier * from,VkBufferMemoryBarrier * to)1798 void deepcopy_VkBufferMemoryBarrier(
1799     Pool* pool,
1800     const VkBufferMemoryBarrier* from,
1801     VkBufferMemoryBarrier* to)
1802 {
1803     (void)pool;
1804     *to = *from;
1805     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1806     to->pNext = nullptr;
1807     if (pNext_size)
1808     {
1809         to->pNext = (const void*)pool->alloc(pNext_size);
1810         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1811     }
1812 }
1813 
deepcopy_VkImageMemoryBarrier(Pool * pool,const VkImageMemoryBarrier * from,VkImageMemoryBarrier * to)1814 void deepcopy_VkImageMemoryBarrier(
1815     Pool* pool,
1816     const VkImageMemoryBarrier* from,
1817     VkImageMemoryBarrier* to)
1818 {
1819     (void)pool;
1820     *to = *from;
1821     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1822     to->pNext = nullptr;
1823     if (pNext_size)
1824     {
1825         to->pNext = (const void*)pool->alloc(pNext_size);
1826         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1827     }
1828     deepcopy_VkImageSubresourceRange(pool, &from->subresourceRange, (VkImageSubresourceRange*)(&to->subresourceRange));
1829 }
1830 
deepcopy_VkRenderPassBeginInfo(Pool * pool,const VkRenderPassBeginInfo * from,VkRenderPassBeginInfo * to)1831 void deepcopy_VkRenderPassBeginInfo(
1832     Pool* pool,
1833     const VkRenderPassBeginInfo* from,
1834     VkRenderPassBeginInfo* to)
1835 {
1836     (void)pool;
1837     *to = *from;
1838     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1839     to->pNext = nullptr;
1840     if (pNext_size)
1841     {
1842         to->pNext = (const void*)pool->alloc(pNext_size);
1843         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1844     }
1845     deepcopy_VkRect2D(pool, &from->renderArea, (VkRect2D*)(&to->renderArea));
1846     to->pClearValues = nullptr;
1847     if (from->pClearValues)
1848     {
1849         to->pClearValues = (VkClearValue*)pool->alloc(from->clearValueCount * sizeof(const VkClearValue));
1850         to->clearValueCount = from->clearValueCount;
1851         for (uint32_t i = 0; i < (uint32_t)from->clearValueCount; ++i)
1852         {
1853             deepcopy_VkClearValue(pool, from->pClearValues + i, (VkClearValue*)(to->pClearValues + i));
1854         }
1855     }
1856 }
1857 
deepcopy_VkDispatchIndirectCommand(Pool * pool,const VkDispatchIndirectCommand * from,VkDispatchIndirectCommand * to)1858 void deepcopy_VkDispatchIndirectCommand(
1859     Pool* pool,
1860     const VkDispatchIndirectCommand* from,
1861     VkDispatchIndirectCommand* to)
1862 {
1863     (void)pool;
1864     *to = *from;
1865 }
1866 
deepcopy_VkDrawIndexedIndirectCommand(Pool * pool,const VkDrawIndexedIndirectCommand * from,VkDrawIndexedIndirectCommand * to)1867 void deepcopy_VkDrawIndexedIndirectCommand(
1868     Pool* pool,
1869     const VkDrawIndexedIndirectCommand* from,
1870     VkDrawIndexedIndirectCommand* to)
1871 {
1872     (void)pool;
1873     *to = *from;
1874 }
1875 
deepcopy_VkDrawIndirectCommand(Pool * pool,const VkDrawIndirectCommand * from,VkDrawIndirectCommand * to)1876 void deepcopy_VkDrawIndirectCommand(
1877     Pool* pool,
1878     const VkDrawIndirectCommand* from,
1879     VkDrawIndirectCommand* to)
1880 {
1881     (void)pool;
1882     *to = *from;
1883 }
1884 
deepcopy_VkBaseOutStructure(Pool * pool,const VkBaseOutStructure * from,VkBaseOutStructure * to)1885 void deepcopy_VkBaseOutStructure(
1886     Pool* pool,
1887     const VkBaseOutStructure* from,
1888     VkBaseOutStructure* to)
1889 {
1890     (void)pool;
1891     *to = *from;
1892     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1893     to->pNext = nullptr;
1894     if (pNext_size)
1895     {
1896         to->pNext = (VkBaseOutStructure*)pool->alloc(pNext_size);
1897         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1898     }
1899 }
1900 
deepcopy_VkBaseInStructure(Pool * pool,const VkBaseInStructure * from,VkBaseInStructure * to)1901 void deepcopy_VkBaseInStructure(
1902     Pool* pool,
1903     const VkBaseInStructure* from,
1904     VkBaseInStructure* to)
1905 {
1906     (void)pool;
1907     *to = *from;
1908     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1909     to->pNext = nullptr;
1910     if (pNext_size)
1911     {
1912         to->pNext = (const VkBaseInStructure*)pool->alloc(pNext_size);
1913         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1914     }
1915 }
1916 
1917 #endif
1918 #ifdef VK_VERSION_1_1
deepcopy_VkPhysicalDeviceSubgroupProperties(Pool * pool,const VkPhysicalDeviceSubgroupProperties * from,VkPhysicalDeviceSubgroupProperties * to)1919 void deepcopy_VkPhysicalDeviceSubgroupProperties(
1920     Pool* pool,
1921     const VkPhysicalDeviceSubgroupProperties* from,
1922     VkPhysicalDeviceSubgroupProperties* to)
1923 {
1924     (void)pool;
1925     *to = *from;
1926     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1927     to->pNext = nullptr;
1928     if (pNext_size)
1929     {
1930         to->pNext = (void*)pool->alloc(pNext_size);
1931         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1932     }
1933 }
1934 
deepcopy_VkBindBufferMemoryInfo(Pool * pool,const VkBindBufferMemoryInfo * from,VkBindBufferMemoryInfo * to)1935 void deepcopy_VkBindBufferMemoryInfo(
1936     Pool* pool,
1937     const VkBindBufferMemoryInfo* from,
1938     VkBindBufferMemoryInfo* to)
1939 {
1940     (void)pool;
1941     *to = *from;
1942     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1943     to->pNext = nullptr;
1944     if (pNext_size)
1945     {
1946         to->pNext = (const void*)pool->alloc(pNext_size);
1947         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1948     }
1949 }
1950 
deepcopy_VkBindImageMemoryInfo(Pool * pool,const VkBindImageMemoryInfo * from,VkBindImageMemoryInfo * to)1951 void deepcopy_VkBindImageMemoryInfo(
1952     Pool* pool,
1953     const VkBindImageMemoryInfo* from,
1954     VkBindImageMemoryInfo* to)
1955 {
1956     (void)pool;
1957     *to = *from;
1958     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1959     to->pNext = nullptr;
1960     if (pNext_size)
1961     {
1962         to->pNext = (const void*)pool->alloc(pNext_size);
1963         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1964     }
1965 }
1966 
deepcopy_VkPhysicalDevice16BitStorageFeatures(Pool * pool,const VkPhysicalDevice16BitStorageFeatures * from,VkPhysicalDevice16BitStorageFeatures * to)1967 void deepcopy_VkPhysicalDevice16BitStorageFeatures(
1968     Pool* pool,
1969     const VkPhysicalDevice16BitStorageFeatures* from,
1970     VkPhysicalDevice16BitStorageFeatures* to)
1971 {
1972     (void)pool;
1973     *to = *from;
1974     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1975     to->pNext = nullptr;
1976     if (pNext_size)
1977     {
1978         to->pNext = (void*)pool->alloc(pNext_size);
1979         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1980     }
1981 }
1982 
deepcopy_VkMemoryDedicatedRequirements(Pool * pool,const VkMemoryDedicatedRequirements * from,VkMemoryDedicatedRequirements * to)1983 void deepcopy_VkMemoryDedicatedRequirements(
1984     Pool* pool,
1985     const VkMemoryDedicatedRequirements* from,
1986     VkMemoryDedicatedRequirements* to)
1987 {
1988     (void)pool;
1989     *to = *from;
1990     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
1991     to->pNext = nullptr;
1992     if (pNext_size)
1993     {
1994         to->pNext = (void*)pool->alloc(pNext_size);
1995         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
1996     }
1997 }
1998 
deepcopy_VkMemoryDedicatedAllocateInfo(Pool * pool,const VkMemoryDedicatedAllocateInfo * from,VkMemoryDedicatedAllocateInfo * to)1999 void deepcopy_VkMemoryDedicatedAllocateInfo(
2000     Pool* pool,
2001     const VkMemoryDedicatedAllocateInfo* from,
2002     VkMemoryDedicatedAllocateInfo* to)
2003 {
2004     (void)pool;
2005     *to = *from;
2006     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2007     to->pNext = nullptr;
2008     if (pNext_size)
2009     {
2010         to->pNext = (const void*)pool->alloc(pNext_size);
2011         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2012     }
2013 }
2014 
deepcopy_VkMemoryAllocateFlagsInfo(Pool * pool,const VkMemoryAllocateFlagsInfo * from,VkMemoryAllocateFlagsInfo * to)2015 void deepcopy_VkMemoryAllocateFlagsInfo(
2016     Pool* pool,
2017     const VkMemoryAllocateFlagsInfo* from,
2018     VkMemoryAllocateFlagsInfo* to)
2019 {
2020     (void)pool;
2021     *to = *from;
2022     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2023     to->pNext = nullptr;
2024     if (pNext_size)
2025     {
2026         to->pNext = (const void*)pool->alloc(pNext_size);
2027         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2028     }
2029 }
2030 
deepcopy_VkDeviceGroupRenderPassBeginInfo(Pool * pool,const VkDeviceGroupRenderPassBeginInfo * from,VkDeviceGroupRenderPassBeginInfo * to)2031 void deepcopy_VkDeviceGroupRenderPassBeginInfo(
2032     Pool* pool,
2033     const VkDeviceGroupRenderPassBeginInfo* from,
2034     VkDeviceGroupRenderPassBeginInfo* to)
2035 {
2036     (void)pool;
2037     *to = *from;
2038     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2039     to->pNext = nullptr;
2040     if (pNext_size)
2041     {
2042         to->pNext = (const void*)pool->alloc(pNext_size);
2043         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2044     }
2045     to->pDeviceRenderAreas = nullptr;
2046     if (from->pDeviceRenderAreas)
2047     {
2048         to->pDeviceRenderAreas = (VkRect2D*)pool->alloc(from->deviceRenderAreaCount * sizeof(const VkRect2D));
2049         to->deviceRenderAreaCount = from->deviceRenderAreaCount;
2050         for (uint32_t i = 0; i < (uint32_t)from->deviceRenderAreaCount; ++i)
2051         {
2052             deepcopy_VkRect2D(pool, from->pDeviceRenderAreas + i, (VkRect2D*)(to->pDeviceRenderAreas + i));
2053         }
2054     }
2055 }
2056 
deepcopy_VkDeviceGroupCommandBufferBeginInfo(Pool * pool,const VkDeviceGroupCommandBufferBeginInfo * from,VkDeviceGroupCommandBufferBeginInfo * to)2057 void deepcopy_VkDeviceGroupCommandBufferBeginInfo(
2058     Pool* pool,
2059     const VkDeviceGroupCommandBufferBeginInfo* from,
2060     VkDeviceGroupCommandBufferBeginInfo* to)
2061 {
2062     (void)pool;
2063     *to = *from;
2064     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2065     to->pNext = nullptr;
2066     if (pNext_size)
2067     {
2068         to->pNext = (const void*)pool->alloc(pNext_size);
2069         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2070     }
2071 }
2072 
deepcopy_VkDeviceGroupSubmitInfo(Pool * pool,const VkDeviceGroupSubmitInfo * from,VkDeviceGroupSubmitInfo * to)2073 void deepcopy_VkDeviceGroupSubmitInfo(
2074     Pool* pool,
2075     const VkDeviceGroupSubmitInfo* from,
2076     VkDeviceGroupSubmitInfo* to)
2077 {
2078     (void)pool;
2079     *to = *from;
2080     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2081     to->pNext = nullptr;
2082     if (pNext_size)
2083     {
2084         to->pNext = (const void*)pool->alloc(pNext_size);
2085         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2086     }
2087     to->pWaitSemaphoreDeviceIndices = nullptr;
2088     if (from->pWaitSemaphoreDeviceIndices)
2089     {
2090         to->pWaitSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pWaitSemaphoreDeviceIndices, from->waitSemaphoreCount * sizeof(const uint32_t));
2091     }
2092     to->pCommandBufferDeviceMasks = nullptr;
2093     if (from->pCommandBufferDeviceMasks)
2094     {
2095         to->pCommandBufferDeviceMasks = (uint32_t*)pool->dupArray(from->pCommandBufferDeviceMasks, from->commandBufferCount * sizeof(const uint32_t));
2096     }
2097     to->pSignalSemaphoreDeviceIndices = nullptr;
2098     if (from->pSignalSemaphoreDeviceIndices)
2099     {
2100         to->pSignalSemaphoreDeviceIndices = (uint32_t*)pool->dupArray(from->pSignalSemaphoreDeviceIndices, from->signalSemaphoreCount * sizeof(const uint32_t));
2101     }
2102 }
2103 
deepcopy_VkDeviceGroupBindSparseInfo(Pool * pool,const VkDeviceGroupBindSparseInfo * from,VkDeviceGroupBindSparseInfo * to)2104 void deepcopy_VkDeviceGroupBindSparseInfo(
2105     Pool* pool,
2106     const VkDeviceGroupBindSparseInfo* from,
2107     VkDeviceGroupBindSparseInfo* to)
2108 {
2109     (void)pool;
2110     *to = *from;
2111     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2112     to->pNext = nullptr;
2113     if (pNext_size)
2114     {
2115         to->pNext = (const void*)pool->alloc(pNext_size);
2116         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2117     }
2118 }
2119 
deepcopy_VkBindBufferMemoryDeviceGroupInfo(Pool * pool,const VkBindBufferMemoryDeviceGroupInfo * from,VkBindBufferMemoryDeviceGroupInfo * to)2120 void deepcopy_VkBindBufferMemoryDeviceGroupInfo(
2121     Pool* pool,
2122     const VkBindBufferMemoryDeviceGroupInfo* from,
2123     VkBindBufferMemoryDeviceGroupInfo* to)
2124 {
2125     (void)pool;
2126     *to = *from;
2127     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2128     to->pNext = nullptr;
2129     if (pNext_size)
2130     {
2131         to->pNext = (const void*)pool->alloc(pNext_size);
2132         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2133     }
2134     to->pDeviceIndices = nullptr;
2135     if (from->pDeviceIndices)
2136     {
2137         to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
2138     }
2139 }
2140 
deepcopy_VkBindImageMemoryDeviceGroupInfo(Pool * pool,const VkBindImageMemoryDeviceGroupInfo * from,VkBindImageMemoryDeviceGroupInfo * to)2141 void deepcopy_VkBindImageMemoryDeviceGroupInfo(
2142     Pool* pool,
2143     const VkBindImageMemoryDeviceGroupInfo* from,
2144     VkBindImageMemoryDeviceGroupInfo* to)
2145 {
2146     (void)pool;
2147     *to = *from;
2148     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2149     to->pNext = nullptr;
2150     if (pNext_size)
2151     {
2152         to->pNext = (const void*)pool->alloc(pNext_size);
2153         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2154     }
2155     to->pDeviceIndices = nullptr;
2156     if (from->pDeviceIndices)
2157     {
2158         to->pDeviceIndices = (uint32_t*)pool->dupArray(from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
2159     }
2160     to->pSplitInstanceBindRegions = nullptr;
2161     if (from->pSplitInstanceBindRegions)
2162     {
2163         to->pSplitInstanceBindRegions = (VkRect2D*)pool->alloc(from->splitInstanceBindRegionCount * sizeof(const VkRect2D));
2164         to->splitInstanceBindRegionCount = from->splitInstanceBindRegionCount;
2165         for (uint32_t i = 0; i < (uint32_t)from->splitInstanceBindRegionCount; ++i)
2166         {
2167             deepcopy_VkRect2D(pool, from->pSplitInstanceBindRegions + i, (VkRect2D*)(to->pSplitInstanceBindRegions + i));
2168         }
2169     }
2170 }
2171 
deepcopy_VkPhysicalDeviceGroupProperties(Pool * pool,const VkPhysicalDeviceGroupProperties * from,VkPhysicalDeviceGroupProperties * to)2172 void deepcopy_VkPhysicalDeviceGroupProperties(
2173     Pool* pool,
2174     const VkPhysicalDeviceGroupProperties* from,
2175     VkPhysicalDeviceGroupProperties* to)
2176 {
2177     (void)pool;
2178     *to = *from;
2179     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2180     to->pNext = nullptr;
2181     if (pNext_size)
2182     {
2183         to->pNext = (void*)pool->alloc(pNext_size);
2184         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2185     }
2186     memcpy(to->physicalDevices, from->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
2187 }
2188 
deepcopy_VkDeviceGroupDeviceCreateInfo(Pool * pool,const VkDeviceGroupDeviceCreateInfo * from,VkDeviceGroupDeviceCreateInfo * to)2189 void deepcopy_VkDeviceGroupDeviceCreateInfo(
2190     Pool* pool,
2191     const VkDeviceGroupDeviceCreateInfo* from,
2192     VkDeviceGroupDeviceCreateInfo* to)
2193 {
2194     (void)pool;
2195     *to = *from;
2196     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2197     to->pNext = nullptr;
2198     if (pNext_size)
2199     {
2200         to->pNext = (const void*)pool->alloc(pNext_size);
2201         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2202     }
2203     to->pPhysicalDevices = nullptr;
2204     if (from->pPhysicalDevices)
2205     {
2206         to->pPhysicalDevices = (VkPhysicalDevice*)pool->dupArray(from->pPhysicalDevices, from->physicalDeviceCount * sizeof(const VkPhysicalDevice));
2207     }
2208 }
2209 
deepcopy_VkBufferMemoryRequirementsInfo2(Pool * pool,const VkBufferMemoryRequirementsInfo2 * from,VkBufferMemoryRequirementsInfo2 * to)2210 void deepcopy_VkBufferMemoryRequirementsInfo2(
2211     Pool* pool,
2212     const VkBufferMemoryRequirementsInfo2* from,
2213     VkBufferMemoryRequirementsInfo2* to)
2214 {
2215     (void)pool;
2216     *to = *from;
2217     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2218     to->pNext = nullptr;
2219     if (pNext_size)
2220     {
2221         to->pNext = (const void*)pool->alloc(pNext_size);
2222         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2223     }
2224 }
2225 
deepcopy_VkImageMemoryRequirementsInfo2(Pool * pool,const VkImageMemoryRequirementsInfo2 * from,VkImageMemoryRequirementsInfo2 * to)2226 void deepcopy_VkImageMemoryRequirementsInfo2(
2227     Pool* pool,
2228     const VkImageMemoryRequirementsInfo2* from,
2229     VkImageMemoryRequirementsInfo2* to)
2230 {
2231     (void)pool;
2232     *to = *from;
2233     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2234     to->pNext = nullptr;
2235     if (pNext_size)
2236     {
2237         to->pNext = (const void*)pool->alloc(pNext_size);
2238         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2239     }
2240 }
2241 
deepcopy_VkImageSparseMemoryRequirementsInfo2(Pool * pool,const VkImageSparseMemoryRequirementsInfo2 * from,VkImageSparseMemoryRequirementsInfo2 * to)2242 void deepcopy_VkImageSparseMemoryRequirementsInfo2(
2243     Pool* pool,
2244     const VkImageSparseMemoryRequirementsInfo2* from,
2245     VkImageSparseMemoryRequirementsInfo2* to)
2246 {
2247     (void)pool;
2248     *to = *from;
2249     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2250     to->pNext = nullptr;
2251     if (pNext_size)
2252     {
2253         to->pNext = (const void*)pool->alloc(pNext_size);
2254         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2255     }
2256 }
2257 
deepcopy_VkMemoryRequirements2(Pool * pool,const VkMemoryRequirements2 * from,VkMemoryRequirements2 * to)2258 void deepcopy_VkMemoryRequirements2(
2259     Pool* pool,
2260     const VkMemoryRequirements2* from,
2261     VkMemoryRequirements2* to)
2262 {
2263     (void)pool;
2264     *to = *from;
2265     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2266     to->pNext = nullptr;
2267     if (pNext_size)
2268     {
2269         to->pNext = (void*)pool->alloc(pNext_size);
2270         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2271     }
2272     deepcopy_VkMemoryRequirements(pool, &from->memoryRequirements, (VkMemoryRequirements*)(&to->memoryRequirements));
2273 }
2274 
deepcopy_VkSparseImageMemoryRequirements2(Pool * pool,const VkSparseImageMemoryRequirements2 * from,VkSparseImageMemoryRequirements2 * to)2275 void deepcopy_VkSparseImageMemoryRequirements2(
2276     Pool* pool,
2277     const VkSparseImageMemoryRequirements2* from,
2278     VkSparseImageMemoryRequirements2* to)
2279 {
2280     (void)pool;
2281     *to = *from;
2282     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2283     to->pNext = nullptr;
2284     if (pNext_size)
2285     {
2286         to->pNext = (void*)pool->alloc(pNext_size);
2287         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2288     }
2289     deepcopy_VkSparseImageMemoryRequirements(pool, &from->memoryRequirements, (VkSparseImageMemoryRequirements*)(&to->memoryRequirements));
2290 }
2291 
deepcopy_VkPhysicalDeviceFeatures2(Pool * pool,const VkPhysicalDeviceFeatures2 * from,VkPhysicalDeviceFeatures2 * to)2292 void deepcopy_VkPhysicalDeviceFeatures2(
2293     Pool* pool,
2294     const VkPhysicalDeviceFeatures2* from,
2295     VkPhysicalDeviceFeatures2* to)
2296 {
2297     (void)pool;
2298     *to = *from;
2299     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2300     to->pNext = nullptr;
2301     if (pNext_size)
2302     {
2303         to->pNext = (void*)pool->alloc(pNext_size);
2304         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2305     }
2306     deepcopy_VkPhysicalDeviceFeatures(pool, &from->features, (VkPhysicalDeviceFeatures*)(&to->features));
2307 }
2308 
deepcopy_VkPhysicalDeviceProperties2(Pool * pool,const VkPhysicalDeviceProperties2 * from,VkPhysicalDeviceProperties2 * to)2309 void deepcopy_VkPhysicalDeviceProperties2(
2310     Pool* pool,
2311     const VkPhysicalDeviceProperties2* from,
2312     VkPhysicalDeviceProperties2* to)
2313 {
2314     (void)pool;
2315     *to = *from;
2316     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2317     to->pNext = nullptr;
2318     if (pNext_size)
2319     {
2320         to->pNext = (void*)pool->alloc(pNext_size);
2321         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2322     }
2323     deepcopy_VkPhysicalDeviceProperties(pool, &from->properties, (VkPhysicalDeviceProperties*)(&to->properties));
2324 }
2325 
deepcopy_VkFormatProperties2(Pool * pool,const VkFormatProperties2 * from,VkFormatProperties2 * to)2326 void deepcopy_VkFormatProperties2(
2327     Pool* pool,
2328     const VkFormatProperties2* from,
2329     VkFormatProperties2* to)
2330 {
2331     (void)pool;
2332     *to = *from;
2333     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2334     to->pNext = nullptr;
2335     if (pNext_size)
2336     {
2337         to->pNext = (void*)pool->alloc(pNext_size);
2338         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2339     }
2340     deepcopy_VkFormatProperties(pool, &from->formatProperties, (VkFormatProperties*)(&to->formatProperties));
2341 }
2342 
deepcopy_VkImageFormatProperties2(Pool * pool,const VkImageFormatProperties2 * from,VkImageFormatProperties2 * to)2343 void deepcopy_VkImageFormatProperties2(
2344     Pool* pool,
2345     const VkImageFormatProperties2* from,
2346     VkImageFormatProperties2* to)
2347 {
2348     (void)pool;
2349     *to = *from;
2350     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2351     to->pNext = nullptr;
2352     if (pNext_size)
2353     {
2354         to->pNext = (void*)pool->alloc(pNext_size);
2355         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2356     }
2357     deepcopy_VkImageFormatProperties(pool, &from->imageFormatProperties, (VkImageFormatProperties*)(&to->imageFormatProperties));
2358 }
2359 
deepcopy_VkPhysicalDeviceImageFormatInfo2(Pool * pool,const VkPhysicalDeviceImageFormatInfo2 * from,VkPhysicalDeviceImageFormatInfo2 * to)2360 void deepcopy_VkPhysicalDeviceImageFormatInfo2(
2361     Pool* pool,
2362     const VkPhysicalDeviceImageFormatInfo2* from,
2363     VkPhysicalDeviceImageFormatInfo2* to)
2364 {
2365     (void)pool;
2366     *to = *from;
2367     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2368     to->pNext = nullptr;
2369     if (pNext_size)
2370     {
2371         to->pNext = (const void*)pool->alloc(pNext_size);
2372         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2373     }
2374 }
2375 
deepcopy_VkQueueFamilyProperties2(Pool * pool,const VkQueueFamilyProperties2 * from,VkQueueFamilyProperties2 * to)2376 void deepcopy_VkQueueFamilyProperties2(
2377     Pool* pool,
2378     const VkQueueFamilyProperties2* from,
2379     VkQueueFamilyProperties2* to)
2380 {
2381     (void)pool;
2382     *to = *from;
2383     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2384     to->pNext = nullptr;
2385     if (pNext_size)
2386     {
2387         to->pNext = (void*)pool->alloc(pNext_size);
2388         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2389     }
2390     deepcopy_VkQueueFamilyProperties(pool, &from->queueFamilyProperties, (VkQueueFamilyProperties*)(&to->queueFamilyProperties));
2391 }
2392 
deepcopy_VkPhysicalDeviceMemoryProperties2(Pool * pool,const VkPhysicalDeviceMemoryProperties2 * from,VkPhysicalDeviceMemoryProperties2 * to)2393 void deepcopy_VkPhysicalDeviceMemoryProperties2(
2394     Pool* pool,
2395     const VkPhysicalDeviceMemoryProperties2* from,
2396     VkPhysicalDeviceMemoryProperties2* to)
2397 {
2398     (void)pool;
2399     *to = *from;
2400     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2401     to->pNext = nullptr;
2402     if (pNext_size)
2403     {
2404         to->pNext = (void*)pool->alloc(pNext_size);
2405         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2406     }
2407     deepcopy_VkPhysicalDeviceMemoryProperties(pool, &from->memoryProperties, (VkPhysicalDeviceMemoryProperties*)(&to->memoryProperties));
2408 }
2409 
deepcopy_VkSparseImageFormatProperties2(Pool * pool,const VkSparseImageFormatProperties2 * from,VkSparseImageFormatProperties2 * to)2410 void deepcopy_VkSparseImageFormatProperties2(
2411     Pool* pool,
2412     const VkSparseImageFormatProperties2* from,
2413     VkSparseImageFormatProperties2* to)
2414 {
2415     (void)pool;
2416     *to = *from;
2417     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2418     to->pNext = nullptr;
2419     if (pNext_size)
2420     {
2421         to->pNext = (void*)pool->alloc(pNext_size);
2422         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2423     }
2424     deepcopy_VkSparseImageFormatProperties(pool, &from->properties, (VkSparseImageFormatProperties*)(&to->properties));
2425 }
2426 
deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(Pool * pool,const VkPhysicalDeviceSparseImageFormatInfo2 * from,VkPhysicalDeviceSparseImageFormatInfo2 * to)2427 void deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(
2428     Pool* pool,
2429     const VkPhysicalDeviceSparseImageFormatInfo2* from,
2430     VkPhysicalDeviceSparseImageFormatInfo2* to)
2431 {
2432     (void)pool;
2433     *to = *from;
2434     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2435     to->pNext = nullptr;
2436     if (pNext_size)
2437     {
2438         to->pNext = (const void*)pool->alloc(pNext_size);
2439         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2440     }
2441 }
2442 
deepcopy_VkPhysicalDevicePointClippingProperties(Pool * pool,const VkPhysicalDevicePointClippingProperties * from,VkPhysicalDevicePointClippingProperties * to)2443 void deepcopy_VkPhysicalDevicePointClippingProperties(
2444     Pool* pool,
2445     const VkPhysicalDevicePointClippingProperties* from,
2446     VkPhysicalDevicePointClippingProperties* to)
2447 {
2448     (void)pool;
2449     *to = *from;
2450     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2451     to->pNext = nullptr;
2452     if (pNext_size)
2453     {
2454         to->pNext = (void*)pool->alloc(pNext_size);
2455         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2456     }
2457 }
2458 
deepcopy_VkInputAttachmentAspectReference(Pool * pool,const VkInputAttachmentAspectReference * from,VkInputAttachmentAspectReference * to)2459 void deepcopy_VkInputAttachmentAspectReference(
2460     Pool* pool,
2461     const VkInputAttachmentAspectReference* from,
2462     VkInputAttachmentAspectReference* to)
2463 {
2464     (void)pool;
2465     *to = *from;
2466 }
2467 
deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(Pool * pool,const VkRenderPassInputAttachmentAspectCreateInfo * from,VkRenderPassInputAttachmentAspectCreateInfo * to)2468 void deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(
2469     Pool* pool,
2470     const VkRenderPassInputAttachmentAspectCreateInfo* from,
2471     VkRenderPassInputAttachmentAspectCreateInfo* to)
2472 {
2473     (void)pool;
2474     *to = *from;
2475     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2476     to->pNext = nullptr;
2477     if (pNext_size)
2478     {
2479         to->pNext = (const void*)pool->alloc(pNext_size);
2480         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2481     }
2482     to->pAspectReferences = nullptr;
2483     if (from->pAspectReferences)
2484     {
2485         to->pAspectReferences = (VkInputAttachmentAspectReference*)pool->alloc(from->aspectReferenceCount * sizeof(const VkInputAttachmentAspectReference));
2486         to->aspectReferenceCount = from->aspectReferenceCount;
2487         for (uint32_t i = 0; i < (uint32_t)from->aspectReferenceCount; ++i)
2488         {
2489             deepcopy_VkInputAttachmentAspectReference(pool, from->pAspectReferences + i, (VkInputAttachmentAspectReference*)(to->pAspectReferences + i));
2490         }
2491     }
2492 }
2493 
deepcopy_VkImageViewUsageCreateInfo(Pool * pool,const VkImageViewUsageCreateInfo * from,VkImageViewUsageCreateInfo * to)2494 void deepcopy_VkImageViewUsageCreateInfo(
2495     Pool* pool,
2496     const VkImageViewUsageCreateInfo* from,
2497     VkImageViewUsageCreateInfo* to)
2498 {
2499     (void)pool;
2500     *to = *from;
2501     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2502     to->pNext = nullptr;
2503     if (pNext_size)
2504     {
2505         to->pNext = (const void*)pool->alloc(pNext_size);
2506         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2507     }
2508 }
2509 
deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(Pool * pool,const VkPipelineTessellationDomainOriginStateCreateInfo * from,VkPipelineTessellationDomainOriginStateCreateInfo * to)2510 void deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(
2511     Pool* pool,
2512     const VkPipelineTessellationDomainOriginStateCreateInfo* from,
2513     VkPipelineTessellationDomainOriginStateCreateInfo* to)
2514 {
2515     (void)pool;
2516     *to = *from;
2517     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2518     to->pNext = nullptr;
2519     if (pNext_size)
2520     {
2521         to->pNext = (const void*)pool->alloc(pNext_size);
2522         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2523     }
2524 }
2525 
deepcopy_VkRenderPassMultiviewCreateInfo(Pool * pool,const VkRenderPassMultiviewCreateInfo * from,VkRenderPassMultiviewCreateInfo * to)2526 void deepcopy_VkRenderPassMultiviewCreateInfo(
2527     Pool* pool,
2528     const VkRenderPassMultiviewCreateInfo* from,
2529     VkRenderPassMultiviewCreateInfo* to)
2530 {
2531     (void)pool;
2532     *to = *from;
2533     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2534     to->pNext = nullptr;
2535     if (pNext_size)
2536     {
2537         to->pNext = (const void*)pool->alloc(pNext_size);
2538         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2539     }
2540     to->pViewMasks = nullptr;
2541     if (from->pViewMasks)
2542     {
2543         to->pViewMasks = (uint32_t*)pool->dupArray(from->pViewMasks, from->subpassCount * sizeof(const uint32_t));
2544     }
2545     to->pViewOffsets = nullptr;
2546     if (from->pViewOffsets)
2547     {
2548         to->pViewOffsets = (int32_t*)pool->dupArray(from->pViewOffsets, from->dependencyCount * sizeof(const int32_t));
2549     }
2550     to->pCorrelationMasks = nullptr;
2551     if (from->pCorrelationMasks)
2552     {
2553         to->pCorrelationMasks = (uint32_t*)pool->dupArray(from->pCorrelationMasks, from->correlationMaskCount * sizeof(const uint32_t));
2554     }
2555 }
2556 
deepcopy_VkPhysicalDeviceMultiviewFeatures(Pool * pool,const VkPhysicalDeviceMultiviewFeatures * from,VkPhysicalDeviceMultiviewFeatures * to)2557 void deepcopy_VkPhysicalDeviceMultiviewFeatures(
2558     Pool* pool,
2559     const VkPhysicalDeviceMultiviewFeatures* from,
2560     VkPhysicalDeviceMultiviewFeatures* to)
2561 {
2562     (void)pool;
2563     *to = *from;
2564     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2565     to->pNext = nullptr;
2566     if (pNext_size)
2567     {
2568         to->pNext = (void*)pool->alloc(pNext_size);
2569         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2570     }
2571 }
2572 
deepcopy_VkPhysicalDeviceMultiviewProperties(Pool * pool,const VkPhysicalDeviceMultiviewProperties * from,VkPhysicalDeviceMultiviewProperties * to)2573 void deepcopy_VkPhysicalDeviceMultiviewProperties(
2574     Pool* pool,
2575     const VkPhysicalDeviceMultiviewProperties* from,
2576     VkPhysicalDeviceMultiviewProperties* to)
2577 {
2578     (void)pool;
2579     *to = *from;
2580     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2581     to->pNext = nullptr;
2582     if (pNext_size)
2583     {
2584         to->pNext = (void*)pool->alloc(pNext_size);
2585         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2586     }
2587 }
2588 
deepcopy_VkPhysicalDeviceVariablePointerFeatures(Pool * pool,const VkPhysicalDeviceVariablePointerFeatures * from,VkPhysicalDeviceVariablePointerFeatures * to)2589 void deepcopy_VkPhysicalDeviceVariablePointerFeatures(
2590     Pool* pool,
2591     const VkPhysicalDeviceVariablePointerFeatures* from,
2592     VkPhysicalDeviceVariablePointerFeatures* to)
2593 {
2594     (void)pool;
2595     *to = *from;
2596     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2597     to->pNext = nullptr;
2598     if (pNext_size)
2599     {
2600         to->pNext = (void*)pool->alloc(pNext_size);
2601         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2602     }
2603 }
2604 
deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(Pool * pool,const VkPhysicalDeviceProtectedMemoryFeatures * from,VkPhysicalDeviceProtectedMemoryFeatures * to)2605 void deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(
2606     Pool* pool,
2607     const VkPhysicalDeviceProtectedMemoryFeatures* from,
2608     VkPhysicalDeviceProtectedMemoryFeatures* to)
2609 {
2610     (void)pool;
2611     *to = *from;
2612     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2613     to->pNext = nullptr;
2614     if (pNext_size)
2615     {
2616         to->pNext = (void*)pool->alloc(pNext_size);
2617         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2618     }
2619 }
2620 
deepcopy_VkPhysicalDeviceProtectedMemoryProperties(Pool * pool,const VkPhysicalDeviceProtectedMemoryProperties * from,VkPhysicalDeviceProtectedMemoryProperties * to)2621 void deepcopy_VkPhysicalDeviceProtectedMemoryProperties(
2622     Pool* pool,
2623     const VkPhysicalDeviceProtectedMemoryProperties* from,
2624     VkPhysicalDeviceProtectedMemoryProperties* to)
2625 {
2626     (void)pool;
2627     *to = *from;
2628     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2629     to->pNext = nullptr;
2630     if (pNext_size)
2631     {
2632         to->pNext = (void*)pool->alloc(pNext_size);
2633         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2634     }
2635 }
2636 
deepcopy_VkDeviceQueueInfo2(Pool * pool,const VkDeviceQueueInfo2 * from,VkDeviceQueueInfo2 * to)2637 void deepcopy_VkDeviceQueueInfo2(
2638     Pool* pool,
2639     const VkDeviceQueueInfo2* from,
2640     VkDeviceQueueInfo2* to)
2641 {
2642     (void)pool;
2643     *to = *from;
2644     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2645     to->pNext = nullptr;
2646     if (pNext_size)
2647     {
2648         to->pNext = (const void*)pool->alloc(pNext_size);
2649         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2650     }
2651 }
2652 
deepcopy_VkProtectedSubmitInfo(Pool * pool,const VkProtectedSubmitInfo * from,VkProtectedSubmitInfo * to)2653 void deepcopy_VkProtectedSubmitInfo(
2654     Pool* pool,
2655     const VkProtectedSubmitInfo* from,
2656     VkProtectedSubmitInfo* to)
2657 {
2658     (void)pool;
2659     *to = *from;
2660     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2661     to->pNext = nullptr;
2662     if (pNext_size)
2663     {
2664         to->pNext = (const void*)pool->alloc(pNext_size);
2665         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2666     }
2667 }
2668 
deepcopy_VkSamplerYcbcrConversionCreateInfo(Pool * pool,const VkSamplerYcbcrConversionCreateInfo * from,VkSamplerYcbcrConversionCreateInfo * to)2669 void deepcopy_VkSamplerYcbcrConversionCreateInfo(
2670     Pool* pool,
2671     const VkSamplerYcbcrConversionCreateInfo* from,
2672     VkSamplerYcbcrConversionCreateInfo* to)
2673 {
2674     (void)pool;
2675     *to = *from;
2676     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2677     to->pNext = nullptr;
2678     if (pNext_size)
2679     {
2680         to->pNext = (const void*)pool->alloc(pNext_size);
2681         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2682     }
2683     deepcopy_VkComponentMapping(pool, &from->components, (VkComponentMapping*)(&to->components));
2684 }
2685 
deepcopy_VkSamplerYcbcrConversionInfo(Pool * pool,const VkSamplerYcbcrConversionInfo * from,VkSamplerYcbcrConversionInfo * to)2686 void deepcopy_VkSamplerYcbcrConversionInfo(
2687     Pool* pool,
2688     const VkSamplerYcbcrConversionInfo* from,
2689     VkSamplerYcbcrConversionInfo* to)
2690 {
2691     (void)pool;
2692     *to = *from;
2693     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2694     to->pNext = nullptr;
2695     if (pNext_size)
2696     {
2697         to->pNext = (const void*)pool->alloc(pNext_size);
2698         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2699     }
2700 }
2701 
deepcopy_VkBindImagePlaneMemoryInfo(Pool * pool,const VkBindImagePlaneMemoryInfo * from,VkBindImagePlaneMemoryInfo * to)2702 void deepcopy_VkBindImagePlaneMemoryInfo(
2703     Pool* pool,
2704     const VkBindImagePlaneMemoryInfo* from,
2705     VkBindImagePlaneMemoryInfo* to)
2706 {
2707     (void)pool;
2708     *to = *from;
2709     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2710     to->pNext = nullptr;
2711     if (pNext_size)
2712     {
2713         to->pNext = (const void*)pool->alloc(pNext_size);
2714         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2715     }
2716 }
2717 
deepcopy_VkImagePlaneMemoryRequirementsInfo(Pool * pool,const VkImagePlaneMemoryRequirementsInfo * from,VkImagePlaneMemoryRequirementsInfo * to)2718 void deepcopy_VkImagePlaneMemoryRequirementsInfo(
2719     Pool* pool,
2720     const VkImagePlaneMemoryRequirementsInfo* from,
2721     VkImagePlaneMemoryRequirementsInfo* to)
2722 {
2723     (void)pool;
2724     *to = *from;
2725     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2726     to->pNext = nullptr;
2727     if (pNext_size)
2728     {
2729         to->pNext = (const void*)pool->alloc(pNext_size);
2730         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2731     }
2732 }
2733 
deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(Pool * pool,const VkPhysicalDeviceSamplerYcbcrConversionFeatures * from,VkPhysicalDeviceSamplerYcbcrConversionFeatures * to)2734 void deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
2735     Pool* pool,
2736     const VkPhysicalDeviceSamplerYcbcrConversionFeatures* from,
2737     VkPhysicalDeviceSamplerYcbcrConversionFeatures* to)
2738 {
2739     (void)pool;
2740     *to = *from;
2741     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2742     to->pNext = nullptr;
2743     if (pNext_size)
2744     {
2745         to->pNext = (void*)pool->alloc(pNext_size);
2746         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2747     }
2748 }
2749 
deepcopy_VkSamplerYcbcrConversionImageFormatProperties(Pool * pool,const VkSamplerYcbcrConversionImageFormatProperties * from,VkSamplerYcbcrConversionImageFormatProperties * to)2750 void deepcopy_VkSamplerYcbcrConversionImageFormatProperties(
2751     Pool* pool,
2752     const VkSamplerYcbcrConversionImageFormatProperties* from,
2753     VkSamplerYcbcrConversionImageFormatProperties* to)
2754 {
2755     (void)pool;
2756     *to = *from;
2757     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2758     to->pNext = nullptr;
2759     if (pNext_size)
2760     {
2761         to->pNext = (void*)pool->alloc(pNext_size);
2762         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2763     }
2764 }
2765 
deepcopy_VkDescriptorUpdateTemplateEntry(Pool * pool,const VkDescriptorUpdateTemplateEntry * from,VkDescriptorUpdateTemplateEntry * to)2766 void deepcopy_VkDescriptorUpdateTemplateEntry(
2767     Pool* pool,
2768     const VkDescriptorUpdateTemplateEntry* from,
2769     VkDescriptorUpdateTemplateEntry* to)
2770 {
2771     (void)pool;
2772     *to = *from;
2773 }
2774 
deepcopy_VkDescriptorUpdateTemplateCreateInfo(Pool * pool,const VkDescriptorUpdateTemplateCreateInfo * from,VkDescriptorUpdateTemplateCreateInfo * to)2775 void deepcopy_VkDescriptorUpdateTemplateCreateInfo(
2776     Pool* pool,
2777     const VkDescriptorUpdateTemplateCreateInfo* from,
2778     VkDescriptorUpdateTemplateCreateInfo* to)
2779 {
2780     (void)pool;
2781     *to = *from;
2782     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2783     to->pNext = nullptr;
2784     if (pNext_size)
2785     {
2786         to->pNext = (void*)pool->alloc(pNext_size);
2787         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2788     }
2789     to->pDescriptorUpdateEntries = nullptr;
2790     if (from->pDescriptorUpdateEntries)
2791     {
2792         to->pDescriptorUpdateEntries = (VkDescriptorUpdateTemplateEntry*)pool->alloc(from->descriptorUpdateEntryCount * sizeof(const VkDescriptorUpdateTemplateEntry));
2793         to->descriptorUpdateEntryCount = from->descriptorUpdateEntryCount;
2794         for (uint32_t i = 0; i < (uint32_t)from->descriptorUpdateEntryCount; ++i)
2795         {
2796             deepcopy_VkDescriptorUpdateTemplateEntry(pool, from->pDescriptorUpdateEntries + i, (VkDescriptorUpdateTemplateEntry*)(to->pDescriptorUpdateEntries + i));
2797         }
2798     }
2799 }
2800 
deepcopy_VkExternalMemoryProperties(Pool * pool,const VkExternalMemoryProperties * from,VkExternalMemoryProperties * to)2801 void deepcopy_VkExternalMemoryProperties(
2802     Pool* pool,
2803     const VkExternalMemoryProperties* from,
2804     VkExternalMemoryProperties* to)
2805 {
2806     (void)pool;
2807     *to = *from;
2808 }
2809 
deepcopy_VkPhysicalDeviceExternalImageFormatInfo(Pool * pool,const VkPhysicalDeviceExternalImageFormatInfo * from,VkPhysicalDeviceExternalImageFormatInfo * to)2810 void deepcopy_VkPhysicalDeviceExternalImageFormatInfo(
2811     Pool* pool,
2812     const VkPhysicalDeviceExternalImageFormatInfo* from,
2813     VkPhysicalDeviceExternalImageFormatInfo* to)
2814 {
2815     (void)pool;
2816     *to = *from;
2817     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2818     to->pNext = nullptr;
2819     if (pNext_size)
2820     {
2821         to->pNext = (const void*)pool->alloc(pNext_size);
2822         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2823     }
2824 }
2825 
deepcopy_VkExternalImageFormatProperties(Pool * pool,const VkExternalImageFormatProperties * from,VkExternalImageFormatProperties * to)2826 void deepcopy_VkExternalImageFormatProperties(
2827     Pool* pool,
2828     const VkExternalImageFormatProperties* from,
2829     VkExternalImageFormatProperties* to)
2830 {
2831     (void)pool;
2832     *to = *from;
2833     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2834     to->pNext = nullptr;
2835     if (pNext_size)
2836     {
2837         to->pNext = (void*)pool->alloc(pNext_size);
2838         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2839     }
2840     deepcopy_VkExternalMemoryProperties(pool, &from->externalMemoryProperties, (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
2841 }
2842 
deepcopy_VkPhysicalDeviceExternalBufferInfo(Pool * pool,const VkPhysicalDeviceExternalBufferInfo * from,VkPhysicalDeviceExternalBufferInfo * to)2843 void deepcopy_VkPhysicalDeviceExternalBufferInfo(
2844     Pool* pool,
2845     const VkPhysicalDeviceExternalBufferInfo* from,
2846     VkPhysicalDeviceExternalBufferInfo* to)
2847 {
2848     (void)pool;
2849     *to = *from;
2850     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2851     to->pNext = nullptr;
2852     if (pNext_size)
2853     {
2854         to->pNext = (const void*)pool->alloc(pNext_size);
2855         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2856     }
2857 }
2858 
deepcopy_VkExternalBufferProperties(Pool * pool,const VkExternalBufferProperties * from,VkExternalBufferProperties * to)2859 void deepcopy_VkExternalBufferProperties(
2860     Pool* pool,
2861     const VkExternalBufferProperties* from,
2862     VkExternalBufferProperties* to)
2863 {
2864     (void)pool;
2865     *to = *from;
2866     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2867     to->pNext = nullptr;
2868     if (pNext_size)
2869     {
2870         to->pNext = (void*)pool->alloc(pNext_size);
2871         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2872     }
2873     deepcopy_VkExternalMemoryProperties(pool, &from->externalMemoryProperties, (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
2874 }
2875 
deepcopy_VkPhysicalDeviceIDProperties(Pool * pool,const VkPhysicalDeviceIDProperties * from,VkPhysicalDeviceIDProperties * to)2876 void deepcopy_VkPhysicalDeviceIDProperties(
2877     Pool* pool,
2878     const VkPhysicalDeviceIDProperties* from,
2879     VkPhysicalDeviceIDProperties* to)
2880 {
2881     (void)pool;
2882     *to = *from;
2883     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2884     to->pNext = nullptr;
2885     if (pNext_size)
2886     {
2887         to->pNext = (void*)pool->alloc(pNext_size);
2888         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2889     }
2890     memcpy(to->deviceUUID, from->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
2891     memcpy(to->driverUUID, from->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
2892     memcpy(to->deviceLUID, from->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
2893 }
2894 
deepcopy_VkExternalMemoryImageCreateInfo(Pool * pool,const VkExternalMemoryImageCreateInfo * from,VkExternalMemoryImageCreateInfo * to)2895 void deepcopy_VkExternalMemoryImageCreateInfo(
2896     Pool* pool,
2897     const VkExternalMemoryImageCreateInfo* from,
2898     VkExternalMemoryImageCreateInfo* to)
2899 {
2900     (void)pool;
2901     *to = *from;
2902     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2903     to->pNext = nullptr;
2904     if (pNext_size)
2905     {
2906         to->pNext = (const void*)pool->alloc(pNext_size);
2907         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2908     }
2909 }
2910 
deepcopy_VkExternalMemoryBufferCreateInfo(Pool * pool,const VkExternalMemoryBufferCreateInfo * from,VkExternalMemoryBufferCreateInfo * to)2911 void deepcopy_VkExternalMemoryBufferCreateInfo(
2912     Pool* pool,
2913     const VkExternalMemoryBufferCreateInfo* from,
2914     VkExternalMemoryBufferCreateInfo* to)
2915 {
2916     (void)pool;
2917     *to = *from;
2918     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2919     to->pNext = nullptr;
2920     if (pNext_size)
2921     {
2922         to->pNext = (const void*)pool->alloc(pNext_size);
2923         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2924     }
2925 }
2926 
deepcopy_VkExportMemoryAllocateInfo(Pool * pool,const VkExportMemoryAllocateInfo * from,VkExportMemoryAllocateInfo * to)2927 void deepcopy_VkExportMemoryAllocateInfo(
2928     Pool* pool,
2929     const VkExportMemoryAllocateInfo* from,
2930     VkExportMemoryAllocateInfo* to)
2931 {
2932     (void)pool;
2933     *to = *from;
2934     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2935     to->pNext = nullptr;
2936     if (pNext_size)
2937     {
2938         to->pNext = (const void*)pool->alloc(pNext_size);
2939         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2940     }
2941 }
2942 
deepcopy_VkPhysicalDeviceExternalFenceInfo(Pool * pool,const VkPhysicalDeviceExternalFenceInfo * from,VkPhysicalDeviceExternalFenceInfo * to)2943 void deepcopy_VkPhysicalDeviceExternalFenceInfo(
2944     Pool* pool,
2945     const VkPhysicalDeviceExternalFenceInfo* from,
2946     VkPhysicalDeviceExternalFenceInfo* to)
2947 {
2948     (void)pool;
2949     *to = *from;
2950     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2951     to->pNext = nullptr;
2952     if (pNext_size)
2953     {
2954         to->pNext = (const void*)pool->alloc(pNext_size);
2955         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2956     }
2957 }
2958 
deepcopy_VkExternalFenceProperties(Pool * pool,const VkExternalFenceProperties * from,VkExternalFenceProperties * to)2959 void deepcopy_VkExternalFenceProperties(
2960     Pool* pool,
2961     const VkExternalFenceProperties* from,
2962     VkExternalFenceProperties* to)
2963 {
2964     (void)pool;
2965     *to = *from;
2966     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2967     to->pNext = nullptr;
2968     if (pNext_size)
2969     {
2970         to->pNext = (void*)pool->alloc(pNext_size);
2971         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2972     }
2973 }
2974 
deepcopy_VkExportFenceCreateInfo(Pool * pool,const VkExportFenceCreateInfo * from,VkExportFenceCreateInfo * to)2975 void deepcopy_VkExportFenceCreateInfo(
2976     Pool* pool,
2977     const VkExportFenceCreateInfo* from,
2978     VkExportFenceCreateInfo* to)
2979 {
2980     (void)pool;
2981     *to = *from;
2982     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2983     to->pNext = nullptr;
2984     if (pNext_size)
2985     {
2986         to->pNext = (const void*)pool->alloc(pNext_size);
2987         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
2988     }
2989 }
2990 
deepcopy_VkExportSemaphoreCreateInfo(Pool * pool,const VkExportSemaphoreCreateInfo * from,VkExportSemaphoreCreateInfo * to)2991 void deepcopy_VkExportSemaphoreCreateInfo(
2992     Pool* pool,
2993     const VkExportSemaphoreCreateInfo* from,
2994     VkExportSemaphoreCreateInfo* to)
2995 {
2996     (void)pool;
2997     *to = *from;
2998     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
2999     to->pNext = nullptr;
3000     if (pNext_size)
3001     {
3002         to->pNext = (const void*)pool->alloc(pNext_size);
3003         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3004     }
3005 }
3006 
deepcopy_VkPhysicalDeviceExternalSemaphoreInfo(Pool * pool,const VkPhysicalDeviceExternalSemaphoreInfo * from,VkPhysicalDeviceExternalSemaphoreInfo * to)3007 void deepcopy_VkPhysicalDeviceExternalSemaphoreInfo(
3008     Pool* pool,
3009     const VkPhysicalDeviceExternalSemaphoreInfo* from,
3010     VkPhysicalDeviceExternalSemaphoreInfo* to)
3011 {
3012     (void)pool;
3013     *to = *from;
3014     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3015     to->pNext = nullptr;
3016     if (pNext_size)
3017     {
3018         to->pNext = (const void*)pool->alloc(pNext_size);
3019         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3020     }
3021 }
3022 
deepcopy_VkExternalSemaphoreProperties(Pool * pool,const VkExternalSemaphoreProperties * from,VkExternalSemaphoreProperties * to)3023 void deepcopy_VkExternalSemaphoreProperties(
3024     Pool* pool,
3025     const VkExternalSemaphoreProperties* from,
3026     VkExternalSemaphoreProperties* to)
3027 {
3028     (void)pool;
3029     *to = *from;
3030     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3031     to->pNext = nullptr;
3032     if (pNext_size)
3033     {
3034         to->pNext = (void*)pool->alloc(pNext_size);
3035         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3036     }
3037 }
3038 
deepcopy_VkPhysicalDeviceMaintenance3Properties(Pool * pool,const VkPhysicalDeviceMaintenance3Properties * from,VkPhysicalDeviceMaintenance3Properties * to)3039 void deepcopy_VkPhysicalDeviceMaintenance3Properties(
3040     Pool* pool,
3041     const VkPhysicalDeviceMaintenance3Properties* from,
3042     VkPhysicalDeviceMaintenance3Properties* to)
3043 {
3044     (void)pool;
3045     *to = *from;
3046     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3047     to->pNext = nullptr;
3048     if (pNext_size)
3049     {
3050         to->pNext = (void*)pool->alloc(pNext_size);
3051         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3052     }
3053 }
3054 
deepcopy_VkDescriptorSetLayoutSupport(Pool * pool,const VkDescriptorSetLayoutSupport * from,VkDescriptorSetLayoutSupport * to)3055 void deepcopy_VkDescriptorSetLayoutSupport(
3056     Pool* pool,
3057     const VkDescriptorSetLayoutSupport* from,
3058     VkDescriptorSetLayoutSupport* to)
3059 {
3060     (void)pool;
3061     *to = *from;
3062     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3063     to->pNext = nullptr;
3064     if (pNext_size)
3065     {
3066         to->pNext = (void*)pool->alloc(pNext_size);
3067         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3068     }
3069 }
3070 
deepcopy_VkPhysicalDeviceShaderDrawParameterFeatures(Pool * pool,const VkPhysicalDeviceShaderDrawParameterFeatures * from,VkPhysicalDeviceShaderDrawParameterFeatures * to)3071 void deepcopy_VkPhysicalDeviceShaderDrawParameterFeatures(
3072     Pool* pool,
3073     const VkPhysicalDeviceShaderDrawParameterFeatures* from,
3074     VkPhysicalDeviceShaderDrawParameterFeatures* to)
3075 {
3076     (void)pool;
3077     *to = *from;
3078     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3079     to->pNext = nullptr;
3080     if (pNext_size)
3081     {
3082         to->pNext = (void*)pool->alloc(pNext_size);
3083         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3084     }
3085 }
3086 
3087 #endif
3088 #ifdef VK_KHR_surface
deepcopy_VkSurfaceCapabilitiesKHR(Pool * pool,const VkSurfaceCapabilitiesKHR * from,VkSurfaceCapabilitiesKHR * to)3089 void deepcopy_VkSurfaceCapabilitiesKHR(
3090     Pool* pool,
3091     const VkSurfaceCapabilitiesKHR* from,
3092     VkSurfaceCapabilitiesKHR* to)
3093 {
3094     (void)pool;
3095     *to = *from;
3096     deepcopy_VkExtent2D(pool, &from->currentExtent, (VkExtent2D*)(&to->currentExtent));
3097     deepcopy_VkExtent2D(pool, &from->minImageExtent, (VkExtent2D*)(&to->minImageExtent));
3098     deepcopy_VkExtent2D(pool, &from->maxImageExtent, (VkExtent2D*)(&to->maxImageExtent));
3099 }
3100 
deepcopy_VkSurfaceFormatKHR(Pool * pool,const VkSurfaceFormatKHR * from,VkSurfaceFormatKHR * to)3101 void deepcopy_VkSurfaceFormatKHR(
3102     Pool* pool,
3103     const VkSurfaceFormatKHR* from,
3104     VkSurfaceFormatKHR* to)
3105 {
3106     (void)pool;
3107     *to = *from;
3108 }
3109 
3110 #endif
3111 #ifdef VK_KHR_swapchain
deepcopy_VkSwapchainCreateInfoKHR(Pool * pool,const VkSwapchainCreateInfoKHR * from,VkSwapchainCreateInfoKHR * to)3112 void deepcopy_VkSwapchainCreateInfoKHR(
3113     Pool* pool,
3114     const VkSwapchainCreateInfoKHR* from,
3115     VkSwapchainCreateInfoKHR* to)
3116 {
3117     (void)pool;
3118     *to = *from;
3119     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3120     to->pNext = nullptr;
3121     if (pNext_size)
3122     {
3123         to->pNext = (const void*)pool->alloc(pNext_size);
3124         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3125     }
3126     deepcopy_VkExtent2D(pool, &from->imageExtent, (VkExtent2D*)(&to->imageExtent));
3127     to->pQueueFamilyIndices = nullptr;
3128     if (from->pQueueFamilyIndices)
3129     {
3130         to->pQueueFamilyIndices = (uint32_t*)pool->dupArray(from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
3131     }
3132 }
3133 
deepcopy_VkPresentInfoKHR(Pool * pool,const VkPresentInfoKHR * from,VkPresentInfoKHR * to)3134 void deepcopy_VkPresentInfoKHR(
3135     Pool* pool,
3136     const VkPresentInfoKHR* from,
3137     VkPresentInfoKHR* to)
3138 {
3139     (void)pool;
3140     *to = *from;
3141     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3142     to->pNext = nullptr;
3143     if (pNext_size)
3144     {
3145         to->pNext = (const void*)pool->alloc(pNext_size);
3146         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3147     }
3148     to->pWaitSemaphores = nullptr;
3149     if (from->pWaitSemaphores)
3150     {
3151         to->pWaitSemaphores = (VkSemaphore*)pool->dupArray(from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
3152     }
3153     to->pSwapchains = nullptr;
3154     if (from->pSwapchains)
3155     {
3156         to->pSwapchains = (VkSwapchainKHR*)pool->dupArray(from->pSwapchains, from->swapchainCount * sizeof(const VkSwapchainKHR));
3157     }
3158     to->pImageIndices = nullptr;
3159     if (from->pImageIndices)
3160     {
3161         to->pImageIndices = (uint32_t*)pool->dupArray(from->pImageIndices, from->swapchainCount * sizeof(const uint32_t));
3162     }
3163     to->pResults = nullptr;
3164     if (from->pResults)
3165     {
3166         to->pResults = (VkResult*)pool->dupArray(from->pResults, from->swapchainCount * sizeof(VkResult));
3167     }
3168 }
3169 
deepcopy_VkImageSwapchainCreateInfoKHR(Pool * pool,const VkImageSwapchainCreateInfoKHR * from,VkImageSwapchainCreateInfoKHR * to)3170 void deepcopy_VkImageSwapchainCreateInfoKHR(
3171     Pool* pool,
3172     const VkImageSwapchainCreateInfoKHR* from,
3173     VkImageSwapchainCreateInfoKHR* to)
3174 {
3175     (void)pool;
3176     *to = *from;
3177     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3178     to->pNext = nullptr;
3179     if (pNext_size)
3180     {
3181         to->pNext = (const void*)pool->alloc(pNext_size);
3182         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3183     }
3184 }
3185 
deepcopy_VkBindImageMemorySwapchainInfoKHR(Pool * pool,const VkBindImageMemorySwapchainInfoKHR * from,VkBindImageMemorySwapchainInfoKHR * to)3186 void deepcopy_VkBindImageMemorySwapchainInfoKHR(
3187     Pool* pool,
3188     const VkBindImageMemorySwapchainInfoKHR* from,
3189     VkBindImageMemorySwapchainInfoKHR* to)
3190 {
3191     (void)pool;
3192     *to = *from;
3193     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3194     to->pNext = nullptr;
3195     if (pNext_size)
3196     {
3197         to->pNext = (const void*)pool->alloc(pNext_size);
3198         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3199     }
3200 }
3201 
deepcopy_VkAcquireNextImageInfoKHR(Pool * pool,const VkAcquireNextImageInfoKHR * from,VkAcquireNextImageInfoKHR * to)3202 void deepcopy_VkAcquireNextImageInfoKHR(
3203     Pool* pool,
3204     const VkAcquireNextImageInfoKHR* from,
3205     VkAcquireNextImageInfoKHR* to)
3206 {
3207     (void)pool;
3208     *to = *from;
3209     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3210     to->pNext = nullptr;
3211     if (pNext_size)
3212     {
3213         to->pNext = (const void*)pool->alloc(pNext_size);
3214         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3215     }
3216 }
3217 
deepcopy_VkDeviceGroupPresentCapabilitiesKHR(Pool * pool,const VkDeviceGroupPresentCapabilitiesKHR * from,VkDeviceGroupPresentCapabilitiesKHR * to)3218 void deepcopy_VkDeviceGroupPresentCapabilitiesKHR(
3219     Pool* pool,
3220     const VkDeviceGroupPresentCapabilitiesKHR* from,
3221     VkDeviceGroupPresentCapabilitiesKHR* to)
3222 {
3223     (void)pool;
3224     *to = *from;
3225     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3226     to->pNext = nullptr;
3227     if (pNext_size)
3228     {
3229         to->pNext = (const void*)pool->alloc(pNext_size);
3230         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3231     }
3232     memcpy(to->presentMask, from->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
3233 }
3234 
deepcopy_VkDeviceGroupPresentInfoKHR(Pool * pool,const VkDeviceGroupPresentInfoKHR * from,VkDeviceGroupPresentInfoKHR * to)3235 void deepcopy_VkDeviceGroupPresentInfoKHR(
3236     Pool* pool,
3237     const VkDeviceGroupPresentInfoKHR* from,
3238     VkDeviceGroupPresentInfoKHR* to)
3239 {
3240     (void)pool;
3241     *to = *from;
3242     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3243     to->pNext = nullptr;
3244     if (pNext_size)
3245     {
3246         to->pNext = (const void*)pool->alloc(pNext_size);
3247         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3248     }
3249     to->pDeviceMasks = nullptr;
3250     if (from->pDeviceMasks)
3251     {
3252         to->pDeviceMasks = (uint32_t*)pool->dupArray(from->pDeviceMasks, from->swapchainCount * sizeof(const uint32_t));
3253     }
3254 }
3255 
deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(Pool * pool,const VkDeviceGroupSwapchainCreateInfoKHR * from,VkDeviceGroupSwapchainCreateInfoKHR * to)3256 void deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(
3257     Pool* pool,
3258     const VkDeviceGroupSwapchainCreateInfoKHR* from,
3259     VkDeviceGroupSwapchainCreateInfoKHR* to)
3260 {
3261     (void)pool;
3262     *to = *from;
3263     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3264     to->pNext = nullptr;
3265     if (pNext_size)
3266     {
3267         to->pNext = (const void*)pool->alloc(pNext_size);
3268         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3269     }
3270 }
3271 
3272 #endif
3273 #ifdef VK_KHR_display
deepcopy_VkDisplayPropertiesKHR(Pool * pool,const VkDisplayPropertiesKHR * from,VkDisplayPropertiesKHR * to)3274 void deepcopy_VkDisplayPropertiesKHR(
3275     Pool* pool,
3276     const VkDisplayPropertiesKHR* from,
3277     VkDisplayPropertiesKHR* to)
3278 {
3279     (void)pool;
3280     *to = *from;
3281     to->displayName = nullptr;
3282     if (from->displayName)
3283     {
3284         to->displayName = pool->strDup(from->displayName);
3285     }
3286     deepcopy_VkExtent2D(pool, &from->physicalDimensions, (VkExtent2D*)(&to->physicalDimensions));
3287     deepcopy_VkExtent2D(pool, &from->physicalResolution, (VkExtent2D*)(&to->physicalResolution));
3288 }
3289 
deepcopy_VkDisplayModeParametersKHR(Pool * pool,const VkDisplayModeParametersKHR * from,VkDisplayModeParametersKHR * to)3290 void deepcopy_VkDisplayModeParametersKHR(
3291     Pool* pool,
3292     const VkDisplayModeParametersKHR* from,
3293     VkDisplayModeParametersKHR* to)
3294 {
3295     (void)pool;
3296     *to = *from;
3297     deepcopy_VkExtent2D(pool, &from->visibleRegion, (VkExtent2D*)(&to->visibleRegion));
3298 }
3299 
deepcopy_VkDisplayModePropertiesKHR(Pool * pool,const VkDisplayModePropertiesKHR * from,VkDisplayModePropertiesKHR * to)3300 void deepcopy_VkDisplayModePropertiesKHR(
3301     Pool* pool,
3302     const VkDisplayModePropertiesKHR* from,
3303     VkDisplayModePropertiesKHR* to)
3304 {
3305     (void)pool;
3306     *to = *from;
3307     deepcopy_VkDisplayModeParametersKHR(pool, &from->parameters, (VkDisplayModeParametersKHR*)(&to->parameters));
3308 }
3309 
deepcopy_VkDisplayModeCreateInfoKHR(Pool * pool,const VkDisplayModeCreateInfoKHR * from,VkDisplayModeCreateInfoKHR * to)3310 void deepcopy_VkDisplayModeCreateInfoKHR(
3311     Pool* pool,
3312     const VkDisplayModeCreateInfoKHR* from,
3313     VkDisplayModeCreateInfoKHR* to)
3314 {
3315     (void)pool;
3316     *to = *from;
3317     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3318     to->pNext = nullptr;
3319     if (pNext_size)
3320     {
3321         to->pNext = (const void*)pool->alloc(pNext_size);
3322         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3323     }
3324     deepcopy_VkDisplayModeParametersKHR(pool, &from->parameters, (VkDisplayModeParametersKHR*)(&to->parameters));
3325 }
3326 
deepcopy_VkDisplayPlaneCapabilitiesKHR(Pool * pool,const VkDisplayPlaneCapabilitiesKHR * from,VkDisplayPlaneCapabilitiesKHR * to)3327 void deepcopy_VkDisplayPlaneCapabilitiesKHR(
3328     Pool* pool,
3329     const VkDisplayPlaneCapabilitiesKHR* from,
3330     VkDisplayPlaneCapabilitiesKHR* to)
3331 {
3332     (void)pool;
3333     *to = *from;
3334     deepcopy_VkOffset2D(pool, &from->minSrcPosition, (VkOffset2D*)(&to->minSrcPosition));
3335     deepcopy_VkOffset2D(pool, &from->maxSrcPosition, (VkOffset2D*)(&to->maxSrcPosition));
3336     deepcopy_VkExtent2D(pool, &from->minSrcExtent, (VkExtent2D*)(&to->minSrcExtent));
3337     deepcopy_VkExtent2D(pool, &from->maxSrcExtent, (VkExtent2D*)(&to->maxSrcExtent));
3338     deepcopy_VkOffset2D(pool, &from->minDstPosition, (VkOffset2D*)(&to->minDstPosition));
3339     deepcopy_VkOffset2D(pool, &from->maxDstPosition, (VkOffset2D*)(&to->maxDstPosition));
3340     deepcopy_VkExtent2D(pool, &from->minDstExtent, (VkExtent2D*)(&to->minDstExtent));
3341     deepcopy_VkExtent2D(pool, &from->maxDstExtent, (VkExtent2D*)(&to->maxDstExtent));
3342 }
3343 
deepcopy_VkDisplayPlanePropertiesKHR(Pool * pool,const VkDisplayPlanePropertiesKHR * from,VkDisplayPlanePropertiesKHR * to)3344 void deepcopy_VkDisplayPlanePropertiesKHR(
3345     Pool* pool,
3346     const VkDisplayPlanePropertiesKHR* from,
3347     VkDisplayPlanePropertiesKHR* to)
3348 {
3349     (void)pool;
3350     *to = *from;
3351 }
3352 
deepcopy_VkDisplaySurfaceCreateInfoKHR(Pool * pool,const VkDisplaySurfaceCreateInfoKHR * from,VkDisplaySurfaceCreateInfoKHR * to)3353 void deepcopy_VkDisplaySurfaceCreateInfoKHR(
3354     Pool* pool,
3355     const VkDisplaySurfaceCreateInfoKHR* from,
3356     VkDisplaySurfaceCreateInfoKHR* to)
3357 {
3358     (void)pool;
3359     *to = *from;
3360     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3361     to->pNext = nullptr;
3362     if (pNext_size)
3363     {
3364         to->pNext = (const void*)pool->alloc(pNext_size);
3365         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3366     }
3367     deepcopy_VkExtent2D(pool, &from->imageExtent, (VkExtent2D*)(&to->imageExtent));
3368 }
3369 
3370 #endif
3371 #ifdef VK_KHR_display_swapchain
deepcopy_VkDisplayPresentInfoKHR(Pool * pool,const VkDisplayPresentInfoKHR * from,VkDisplayPresentInfoKHR * to)3372 void deepcopy_VkDisplayPresentInfoKHR(
3373     Pool* pool,
3374     const VkDisplayPresentInfoKHR* from,
3375     VkDisplayPresentInfoKHR* to)
3376 {
3377     (void)pool;
3378     *to = *from;
3379     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3380     to->pNext = nullptr;
3381     if (pNext_size)
3382     {
3383         to->pNext = (const void*)pool->alloc(pNext_size);
3384         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3385     }
3386     deepcopy_VkRect2D(pool, &from->srcRect, (VkRect2D*)(&to->srcRect));
3387     deepcopy_VkRect2D(pool, &from->dstRect, (VkRect2D*)(&to->dstRect));
3388 }
3389 
3390 #endif
3391 #ifdef VK_KHR_xlib_surface
deepcopy_VkXlibSurfaceCreateInfoKHR(Pool * pool,const VkXlibSurfaceCreateInfoKHR * from,VkXlibSurfaceCreateInfoKHR * to)3392 void deepcopy_VkXlibSurfaceCreateInfoKHR(
3393     Pool* pool,
3394     const VkXlibSurfaceCreateInfoKHR* from,
3395     VkXlibSurfaceCreateInfoKHR* to)
3396 {
3397     (void)pool;
3398     *to = *from;
3399     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3400     to->pNext = nullptr;
3401     if (pNext_size)
3402     {
3403         to->pNext = (const void*)pool->alloc(pNext_size);
3404         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3405     }
3406     to->dpy = nullptr;
3407     if (from->dpy)
3408     {
3409         to->dpy = (Display*)pool->dupArray(from->dpy, sizeof(Display));
3410     }
3411 }
3412 
3413 #endif
3414 #ifdef VK_KHR_xcb_surface
deepcopy_VkXcbSurfaceCreateInfoKHR(Pool * pool,const VkXcbSurfaceCreateInfoKHR * from,VkXcbSurfaceCreateInfoKHR * to)3415 void deepcopy_VkXcbSurfaceCreateInfoKHR(
3416     Pool* pool,
3417     const VkXcbSurfaceCreateInfoKHR* from,
3418     VkXcbSurfaceCreateInfoKHR* to)
3419 {
3420     (void)pool;
3421     *to = *from;
3422     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3423     to->pNext = nullptr;
3424     if (pNext_size)
3425     {
3426         to->pNext = (const void*)pool->alloc(pNext_size);
3427         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3428     }
3429     to->connection = nullptr;
3430     if (from->connection)
3431     {
3432         to->connection = (xcb_connection_t*)pool->dupArray(from->connection, sizeof(xcb_connection_t));
3433     }
3434 }
3435 
3436 #endif
3437 #ifdef VK_KHR_wayland_surface
deepcopy_VkWaylandSurfaceCreateInfoKHR(Pool * pool,const VkWaylandSurfaceCreateInfoKHR * from,VkWaylandSurfaceCreateInfoKHR * to)3438 void deepcopy_VkWaylandSurfaceCreateInfoKHR(
3439     Pool* pool,
3440     const VkWaylandSurfaceCreateInfoKHR* from,
3441     VkWaylandSurfaceCreateInfoKHR* to)
3442 {
3443     (void)pool;
3444     *to = *from;
3445     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3446     to->pNext = nullptr;
3447     if (pNext_size)
3448     {
3449         to->pNext = (const void*)pool->alloc(pNext_size);
3450         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3451     }
3452     to->display = nullptr;
3453     if (from->display)
3454     {
3455         to->display = (wl_display*)pool->dupArray(from->display, sizeof(wl_display));
3456     }
3457     to->surface = nullptr;
3458     if (from->surface)
3459     {
3460         to->surface = (wl_surface*)pool->dupArray(from->surface, sizeof(wl_surface));
3461     }
3462 }
3463 
3464 #endif
3465 #ifdef VK_KHR_mir_surface
deepcopy_VkMirSurfaceCreateInfoKHR(Pool * pool,const VkMirSurfaceCreateInfoKHR * from,VkMirSurfaceCreateInfoKHR * to)3466 void deepcopy_VkMirSurfaceCreateInfoKHR(
3467     Pool* pool,
3468     const VkMirSurfaceCreateInfoKHR* from,
3469     VkMirSurfaceCreateInfoKHR* to)
3470 {
3471     (void)pool;
3472     *to = *from;
3473     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3474     to->pNext = nullptr;
3475     if (pNext_size)
3476     {
3477         to->pNext = (const void*)pool->alloc(pNext_size);
3478         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3479     }
3480     to->connection = nullptr;
3481     if (from->connection)
3482     {
3483         to->connection = (MirConnection*)pool->dupArray(from->connection, sizeof(MirConnection));
3484     }
3485     to->mirSurface = nullptr;
3486     if (from->mirSurface)
3487     {
3488         to->mirSurface = (MirSurface*)pool->dupArray(from->mirSurface, sizeof(MirSurface));
3489     }
3490 }
3491 
3492 #endif
3493 #ifdef VK_KHR_android_surface
deepcopy_VkAndroidSurfaceCreateInfoKHR(Pool * pool,const VkAndroidSurfaceCreateInfoKHR * from,VkAndroidSurfaceCreateInfoKHR * to)3494 void deepcopy_VkAndroidSurfaceCreateInfoKHR(
3495     Pool* pool,
3496     const VkAndroidSurfaceCreateInfoKHR* from,
3497     VkAndroidSurfaceCreateInfoKHR* to)
3498 {
3499     (void)pool;
3500     *to = *from;
3501     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3502     to->pNext = nullptr;
3503     if (pNext_size)
3504     {
3505         to->pNext = (const void*)pool->alloc(pNext_size);
3506         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3507     }
3508     to->window = nullptr;
3509     if (from->window)
3510     {
3511         to->window = (ANativeWindow*)pool->dupArray(from->window, sizeof(ANativeWindow));
3512     }
3513 }
3514 
3515 #endif
3516 #ifdef VK_KHR_win32_surface
deepcopy_VkWin32SurfaceCreateInfoKHR(Pool * pool,const VkWin32SurfaceCreateInfoKHR * from,VkWin32SurfaceCreateInfoKHR * to)3517 void deepcopy_VkWin32SurfaceCreateInfoKHR(
3518     Pool* pool,
3519     const VkWin32SurfaceCreateInfoKHR* from,
3520     VkWin32SurfaceCreateInfoKHR* to)
3521 {
3522     (void)pool;
3523     *to = *from;
3524     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3525     to->pNext = nullptr;
3526     if (pNext_size)
3527     {
3528         to->pNext = (const void*)pool->alloc(pNext_size);
3529         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3530     }
3531 }
3532 
3533 #endif
3534 #ifdef VK_KHR_sampler_mirror_clamp_to_edge
3535 #endif
3536 #ifdef VK_KHR_multiview
3537 #endif
3538 #ifdef VK_KHR_get_physical_device_properties2
3539 #endif
3540 #ifdef VK_KHR_device_group
3541 #endif
3542 #ifdef VK_KHR_shader_draw_parameters
3543 #endif
3544 #ifdef VK_KHR_maintenance1
3545 #endif
3546 #ifdef VK_KHR_device_group_creation
3547 #endif
3548 #ifdef VK_KHR_external_memory_capabilities
3549 #endif
3550 #ifdef VK_KHR_external_memory
3551 #endif
3552 #ifdef VK_KHR_external_memory_win32
deepcopy_VkImportMemoryWin32HandleInfoKHR(Pool * pool,const VkImportMemoryWin32HandleInfoKHR * from,VkImportMemoryWin32HandleInfoKHR * to)3553 void deepcopy_VkImportMemoryWin32HandleInfoKHR(
3554     Pool* pool,
3555     const VkImportMemoryWin32HandleInfoKHR* from,
3556     VkImportMemoryWin32HandleInfoKHR* to)
3557 {
3558     (void)pool;
3559     *to = *from;
3560     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3561     to->pNext = nullptr;
3562     if (pNext_size)
3563     {
3564         to->pNext = (const void*)pool->alloc(pNext_size);
3565         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3566     }
3567 }
3568 
deepcopy_VkExportMemoryWin32HandleInfoKHR(Pool * pool,const VkExportMemoryWin32HandleInfoKHR * from,VkExportMemoryWin32HandleInfoKHR * to)3569 void deepcopy_VkExportMemoryWin32HandleInfoKHR(
3570     Pool* pool,
3571     const VkExportMemoryWin32HandleInfoKHR* from,
3572     VkExportMemoryWin32HandleInfoKHR* to)
3573 {
3574     (void)pool;
3575     *to = *from;
3576     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3577     to->pNext = nullptr;
3578     if (pNext_size)
3579     {
3580         to->pNext = (const void*)pool->alloc(pNext_size);
3581         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3582     }
3583     to->pAttributes = nullptr;
3584     if (from->pAttributes)
3585     {
3586         to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
3587     }
3588 }
3589 
deepcopy_VkMemoryWin32HandlePropertiesKHR(Pool * pool,const VkMemoryWin32HandlePropertiesKHR * from,VkMemoryWin32HandlePropertiesKHR * to)3590 void deepcopy_VkMemoryWin32HandlePropertiesKHR(
3591     Pool* pool,
3592     const VkMemoryWin32HandlePropertiesKHR* from,
3593     VkMemoryWin32HandlePropertiesKHR* to)
3594 {
3595     (void)pool;
3596     *to = *from;
3597     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3598     to->pNext = nullptr;
3599     if (pNext_size)
3600     {
3601         to->pNext = (void*)pool->alloc(pNext_size);
3602         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3603     }
3604 }
3605 
deepcopy_VkMemoryGetWin32HandleInfoKHR(Pool * pool,const VkMemoryGetWin32HandleInfoKHR * from,VkMemoryGetWin32HandleInfoKHR * to)3606 void deepcopy_VkMemoryGetWin32HandleInfoKHR(
3607     Pool* pool,
3608     const VkMemoryGetWin32HandleInfoKHR* from,
3609     VkMemoryGetWin32HandleInfoKHR* to)
3610 {
3611     (void)pool;
3612     *to = *from;
3613     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3614     to->pNext = nullptr;
3615     if (pNext_size)
3616     {
3617         to->pNext = (const void*)pool->alloc(pNext_size);
3618         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3619     }
3620 }
3621 
3622 #endif
3623 #ifdef VK_KHR_external_memory_fd
deepcopy_VkImportMemoryFdInfoKHR(Pool * pool,const VkImportMemoryFdInfoKHR * from,VkImportMemoryFdInfoKHR * to)3624 void deepcopy_VkImportMemoryFdInfoKHR(
3625     Pool* pool,
3626     const VkImportMemoryFdInfoKHR* from,
3627     VkImportMemoryFdInfoKHR* to)
3628 {
3629     (void)pool;
3630     *to = *from;
3631     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3632     to->pNext = nullptr;
3633     if (pNext_size)
3634     {
3635         to->pNext = (const void*)pool->alloc(pNext_size);
3636         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3637     }
3638 }
3639 
deepcopy_VkMemoryFdPropertiesKHR(Pool * pool,const VkMemoryFdPropertiesKHR * from,VkMemoryFdPropertiesKHR * to)3640 void deepcopy_VkMemoryFdPropertiesKHR(
3641     Pool* pool,
3642     const VkMemoryFdPropertiesKHR* from,
3643     VkMemoryFdPropertiesKHR* to)
3644 {
3645     (void)pool;
3646     *to = *from;
3647     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3648     to->pNext = nullptr;
3649     if (pNext_size)
3650     {
3651         to->pNext = (void*)pool->alloc(pNext_size);
3652         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3653     }
3654 }
3655 
deepcopy_VkMemoryGetFdInfoKHR(Pool * pool,const VkMemoryGetFdInfoKHR * from,VkMemoryGetFdInfoKHR * to)3656 void deepcopy_VkMemoryGetFdInfoKHR(
3657     Pool* pool,
3658     const VkMemoryGetFdInfoKHR* from,
3659     VkMemoryGetFdInfoKHR* to)
3660 {
3661     (void)pool;
3662     *to = *from;
3663     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3664     to->pNext = nullptr;
3665     if (pNext_size)
3666     {
3667         to->pNext = (const void*)pool->alloc(pNext_size);
3668         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3669     }
3670 }
3671 
3672 #endif
3673 #ifdef VK_KHR_win32_keyed_mutex
deepcopy_VkWin32KeyedMutexAcquireReleaseInfoKHR(Pool * pool,const VkWin32KeyedMutexAcquireReleaseInfoKHR * from,VkWin32KeyedMutexAcquireReleaseInfoKHR * to)3674 void deepcopy_VkWin32KeyedMutexAcquireReleaseInfoKHR(
3675     Pool* pool,
3676     const VkWin32KeyedMutexAcquireReleaseInfoKHR* from,
3677     VkWin32KeyedMutexAcquireReleaseInfoKHR* to)
3678 {
3679     (void)pool;
3680     *to = *from;
3681     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3682     to->pNext = nullptr;
3683     if (pNext_size)
3684     {
3685         to->pNext = (const void*)pool->alloc(pNext_size);
3686         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3687     }
3688     to->pAcquireSyncs = nullptr;
3689     if (from->pAcquireSyncs)
3690     {
3691         to->pAcquireSyncs = (VkDeviceMemory*)pool->dupArray(from->pAcquireSyncs, from->acquireCount * sizeof(const VkDeviceMemory));
3692     }
3693     to->pAcquireKeys = nullptr;
3694     if (from->pAcquireKeys)
3695     {
3696         to->pAcquireKeys = (uint64_t*)pool->dupArray(from->pAcquireKeys, from->acquireCount * sizeof(const uint64_t));
3697     }
3698     to->pAcquireTimeouts = nullptr;
3699     if (from->pAcquireTimeouts)
3700     {
3701         to->pAcquireTimeouts = (uint32_t*)pool->dupArray(from->pAcquireTimeouts, from->acquireCount * sizeof(const uint32_t));
3702     }
3703     to->pReleaseSyncs = nullptr;
3704     if (from->pReleaseSyncs)
3705     {
3706         to->pReleaseSyncs = (VkDeviceMemory*)pool->dupArray(from->pReleaseSyncs, from->releaseCount * sizeof(const VkDeviceMemory));
3707     }
3708     to->pReleaseKeys = nullptr;
3709     if (from->pReleaseKeys)
3710     {
3711         to->pReleaseKeys = (uint64_t*)pool->dupArray(from->pReleaseKeys, from->releaseCount * sizeof(const uint64_t));
3712     }
3713 }
3714 
3715 #endif
3716 #ifdef VK_KHR_external_semaphore_capabilities
3717 #endif
3718 #ifdef VK_KHR_external_semaphore
3719 #endif
3720 #ifdef VK_KHR_external_semaphore_win32
deepcopy_VkImportSemaphoreWin32HandleInfoKHR(Pool * pool,const VkImportSemaphoreWin32HandleInfoKHR * from,VkImportSemaphoreWin32HandleInfoKHR * to)3721 void deepcopy_VkImportSemaphoreWin32HandleInfoKHR(
3722     Pool* pool,
3723     const VkImportSemaphoreWin32HandleInfoKHR* from,
3724     VkImportSemaphoreWin32HandleInfoKHR* to)
3725 {
3726     (void)pool;
3727     *to = *from;
3728     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3729     to->pNext = nullptr;
3730     if (pNext_size)
3731     {
3732         to->pNext = (const void*)pool->alloc(pNext_size);
3733         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3734     }
3735 }
3736 
deepcopy_VkExportSemaphoreWin32HandleInfoKHR(Pool * pool,const VkExportSemaphoreWin32HandleInfoKHR * from,VkExportSemaphoreWin32HandleInfoKHR * to)3737 void deepcopy_VkExportSemaphoreWin32HandleInfoKHR(
3738     Pool* pool,
3739     const VkExportSemaphoreWin32HandleInfoKHR* from,
3740     VkExportSemaphoreWin32HandleInfoKHR* to)
3741 {
3742     (void)pool;
3743     *to = *from;
3744     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3745     to->pNext = nullptr;
3746     if (pNext_size)
3747     {
3748         to->pNext = (const void*)pool->alloc(pNext_size);
3749         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3750     }
3751     to->pAttributes = nullptr;
3752     if (from->pAttributes)
3753     {
3754         to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
3755     }
3756 }
3757 
deepcopy_VkD3D12FenceSubmitInfoKHR(Pool * pool,const VkD3D12FenceSubmitInfoKHR * from,VkD3D12FenceSubmitInfoKHR * to)3758 void deepcopy_VkD3D12FenceSubmitInfoKHR(
3759     Pool* pool,
3760     const VkD3D12FenceSubmitInfoKHR* from,
3761     VkD3D12FenceSubmitInfoKHR* to)
3762 {
3763     (void)pool;
3764     *to = *from;
3765     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3766     to->pNext = nullptr;
3767     if (pNext_size)
3768     {
3769         to->pNext = (const void*)pool->alloc(pNext_size);
3770         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3771     }
3772     to->pWaitSemaphoreValues = nullptr;
3773     if (from->pWaitSemaphoreValues)
3774     {
3775         to->pWaitSemaphoreValues = (uint64_t*)pool->dupArray(from->pWaitSemaphoreValues, from->waitSemaphoreValuesCount * sizeof(const uint64_t));
3776     }
3777     to->pSignalSemaphoreValues = nullptr;
3778     if (from->pSignalSemaphoreValues)
3779     {
3780         to->pSignalSemaphoreValues = (uint64_t*)pool->dupArray(from->pSignalSemaphoreValues, from->signalSemaphoreValuesCount * sizeof(const uint64_t));
3781     }
3782 }
3783 
deepcopy_VkSemaphoreGetWin32HandleInfoKHR(Pool * pool,const VkSemaphoreGetWin32HandleInfoKHR * from,VkSemaphoreGetWin32HandleInfoKHR * to)3784 void deepcopy_VkSemaphoreGetWin32HandleInfoKHR(
3785     Pool* pool,
3786     const VkSemaphoreGetWin32HandleInfoKHR* from,
3787     VkSemaphoreGetWin32HandleInfoKHR* to)
3788 {
3789     (void)pool;
3790     *to = *from;
3791     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3792     to->pNext = nullptr;
3793     if (pNext_size)
3794     {
3795         to->pNext = (const void*)pool->alloc(pNext_size);
3796         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3797     }
3798 }
3799 
3800 #endif
3801 #ifdef VK_KHR_external_semaphore_fd
deepcopy_VkImportSemaphoreFdInfoKHR(Pool * pool,const VkImportSemaphoreFdInfoKHR * from,VkImportSemaphoreFdInfoKHR * to)3802 void deepcopy_VkImportSemaphoreFdInfoKHR(
3803     Pool* pool,
3804     const VkImportSemaphoreFdInfoKHR* from,
3805     VkImportSemaphoreFdInfoKHR* to)
3806 {
3807     (void)pool;
3808     *to = *from;
3809     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3810     to->pNext = nullptr;
3811     if (pNext_size)
3812     {
3813         to->pNext = (const void*)pool->alloc(pNext_size);
3814         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3815     }
3816 }
3817 
deepcopy_VkSemaphoreGetFdInfoKHR(Pool * pool,const VkSemaphoreGetFdInfoKHR * from,VkSemaphoreGetFdInfoKHR * to)3818 void deepcopy_VkSemaphoreGetFdInfoKHR(
3819     Pool* pool,
3820     const VkSemaphoreGetFdInfoKHR* from,
3821     VkSemaphoreGetFdInfoKHR* to)
3822 {
3823     (void)pool;
3824     *to = *from;
3825     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3826     to->pNext = nullptr;
3827     if (pNext_size)
3828     {
3829         to->pNext = (const void*)pool->alloc(pNext_size);
3830         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3831     }
3832 }
3833 
3834 #endif
3835 #ifdef VK_KHR_push_descriptor
deepcopy_VkPhysicalDevicePushDescriptorPropertiesKHR(Pool * pool,const VkPhysicalDevicePushDescriptorPropertiesKHR * from,VkPhysicalDevicePushDescriptorPropertiesKHR * to)3836 void deepcopy_VkPhysicalDevicePushDescriptorPropertiesKHR(
3837     Pool* pool,
3838     const VkPhysicalDevicePushDescriptorPropertiesKHR* from,
3839     VkPhysicalDevicePushDescriptorPropertiesKHR* to)
3840 {
3841     (void)pool;
3842     *to = *from;
3843     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3844     to->pNext = nullptr;
3845     if (pNext_size)
3846     {
3847         to->pNext = (void*)pool->alloc(pNext_size);
3848         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3849     }
3850 }
3851 
3852 #endif
3853 #ifdef VK_KHR_16bit_storage
3854 #endif
3855 #ifdef VK_KHR_incremental_present
deepcopy_VkRectLayerKHR(Pool * pool,const VkRectLayerKHR * from,VkRectLayerKHR * to)3856 void deepcopy_VkRectLayerKHR(
3857     Pool* pool,
3858     const VkRectLayerKHR* from,
3859     VkRectLayerKHR* to)
3860 {
3861     (void)pool;
3862     *to = *from;
3863     deepcopy_VkOffset2D(pool, &from->offset, (VkOffset2D*)(&to->offset));
3864     deepcopy_VkExtent2D(pool, &from->extent, (VkExtent2D*)(&to->extent));
3865 }
3866 
deepcopy_VkPresentRegionKHR(Pool * pool,const VkPresentRegionKHR * from,VkPresentRegionKHR * to)3867 void deepcopy_VkPresentRegionKHR(
3868     Pool* pool,
3869     const VkPresentRegionKHR* from,
3870     VkPresentRegionKHR* to)
3871 {
3872     (void)pool;
3873     *to = *from;
3874     to->pRectangles = nullptr;
3875     if (from->pRectangles)
3876     {
3877         to->pRectangles = (VkRectLayerKHR*)pool->alloc(from->rectangleCount * sizeof(const VkRectLayerKHR));
3878         to->rectangleCount = from->rectangleCount;
3879         for (uint32_t i = 0; i < (uint32_t)from->rectangleCount; ++i)
3880         {
3881             deepcopy_VkRectLayerKHR(pool, from->pRectangles + i, (VkRectLayerKHR*)(to->pRectangles + i));
3882         }
3883     }
3884 }
3885 
deepcopy_VkPresentRegionsKHR(Pool * pool,const VkPresentRegionsKHR * from,VkPresentRegionsKHR * to)3886 void deepcopy_VkPresentRegionsKHR(
3887     Pool* pool,
3888     const VkPresentRegionsKHR* from,
3889     VkPresentRegionsKHR* to)
3890 {
3891     (void)pool;
3892     *to = *from;
3893     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3894     to->pNext = nullptr;
3895     if (pNext_size)
3896     {
3897         to->pNext = (const void*)pool->alloc(pNext_size);
3898         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3899     }
3900     to->pRegions = nullptr;
3901     if (from->pRegions)
3902     {
3903         to->pRegions = (VkPresentRegionKHR*)pool->alloc(from->swapchainCount * sizeof(const VkPresentRegionKHR));
3904         to->swapchainCount = from->swapchainCount;
3905         for (uint32_t i = 0; i < (uint32_t)from->swapchainCount; ++i)
3906         {
3907             deepcopy_VkPresentRegionKHR(pool, from->pRegions + i, (VkPresentRegionKHR*)(to->pRegions + i));
3908         }
3909     }
3910 }
3911 
3912 #endif
3913 #ifdef VK_KHR_descriptor_update_template
3914 #endif
3915 #ifdef VK_KHR_create_renderpass2
deepcopy_VkAttachmentDescription2KHR(Pool * pool,const VkAttachmentDescription2KHR * from,VkAttachmentDescription2KHR * to)3916 void deepcopy_VkAttachmentDescription2KHR(
3917     Pool* pool,
3918     const VkAttachmentDescription2KHR* from,
3919     VkAttachmentDescription2KHR* to)
3920 {
3921     (void)pool;
3922     *to = *from;
3923     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3924     to->pNext = nullptr;
3925     if (pNext_size)
3926     {
3927         to->pNext = (const void*)pool->alloc(pNext_size);
3928         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3929     }
3930 }
3931 
deepcopy_VkAttachmentReference2KHR(Pool * pool,const VkAttachmentReference2KHR * from,VkAttachmentReference2KHR * to)3932 void deepcopy_VkAttachmentReference2KHR(
3933     Pool* pool,
3934     const VkAttachmentReference2KHR* from,
3935     VkAttachmentReference2KHR* to)
3936 {
3937     (void)pool;
3938     *to = *from;
3939     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3940     to->pNext = nullptr;
3941     if (pNext_size)
3942     {
3943         to->pNext = (const void*)pool->alloc(pNext_size);
3944         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3945     }
3946 }
3947 
deepcopy_VkSubpassDescription2KHR(Pool * pool,const VkSubpassDescription2KHR * from,VkSubpassDescription2KHR * to)3948 void deepcopy_VkSubpassDescription2KHR(
3949     Pool* pool,
3950     const VkSubpassDescription2KHR* from,
3951     VkSubpassDescription2KHR* to)
3952 {
3953     (void)pool;
3954     *to = *from;
3955     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
3956     to->pNext = nullptr;
3957     if (pNext_size)
3958     {
3959         to->pNext = (const void*)pool->alloc(pNext_size);
3960         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
3961     }
3962     to->pInputAttachments = nullptr;
3963     if (from->pInputAttachments)
3964     {
3965         to->pInputAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->inputAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3966         to->inputAttachmentCount = from->inputAttachmentCount;
3967         for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i)
3968         {
3969             deepcopy_VkAttachmentReference2KHR(pool, from->pInputAttachments + i, (VkAttachmentReference2KHR*)(to->pInputAttachments + i));
3970         }
3971     }
3972     to->pColorAttachments = nullptr;
3973     if (from->pColorAttachments)
3974     {
3975         to->pColorAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3976         to->colorAttachmentCount = from->colorAttachmentCount;
3977         for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
3978         {
3979             deepcopy_VkAttachmentReference2KHR(pool, from->pColorAttachments + i, (VkAttachmentReference2KHR*)(to->pColorAttachments + i));
3980         }
3981     }
3982     to->pResolveAttachments = nullptr;
3983     if (from->pResolveAttachments)
3984     {
3985         to->pResolveAttachments = (VkAttachmentReference2KHR*)pool->alloc(from->colorAttachmentCount * sizeof(const VkAttachmentReference2KHR));
3986         to->colorAttachmentCount = from->colorAttachmentCount;
3987         for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i)
3988         {
3989             deepcopy_VkAttachmentReference2KHR(pool, from->pResolveAttachments + i, (VkAttachmentReference2KHR*)(to->pResolveAttachments + i));
3990         }
3991     }
3992     to->pDepthStencilAttachment = nullptr;
3993     if (from->pDepthStencilAttachment)
3994     {
3995         to->pDepthStencilAttachment = (VkAttachmentReference2KHR*)pool->alloc(sizeof(const VkAttachmentReference2KHR));
3996         deepcopy_VkAttachmentReference2KHR(pool, from->pDepthStencilAttachment, (VkAttachmentReference2KHR*)(to->pDepthStencilAttachment));
3997     }
3998     to->pPreserveAttachments = nullptr;
3999     if (from->pPreserveAttachments)
4000     {
4001         to->pPreserveAttachments = (uint32_t*)pool->dupArray(from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
4002     }
4003 }
4004 
deepcopy_VkSubpassDependency2KHR(Pool * pool,const VkSubpassDependency2KHR * from,VkSubpassDependency2KHR * to)4005 void deepcopy_VkSubpassDependency2KHR(
4006     Pool* pool,
4007     const VkSubpassDependency2KHR* from,
4008     VkSubpassDependency2KHR* to)
4009 {
4010     (void)pool;
4011     *to = *from;
4012     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4013     to->pNext = nullptr;
4014     if (pNext_size)
4015     {
4016         to->pNext = (const void*)pool->alloc(pNext_size);
4017         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4018     }
4019 }
4020 
deepcopy_VkRenderPassCreateInfo2KHR(Pool * pool,const VkRenderPassCreateInfo2KHR * from,VkRenderPassCreateInfo2KHR * to)4021 void deepcopy_VkRenderPassCreateInfo2KHR(
4022     Pool* pool,
4023     const VkRenderPassCreateInfo2KHR* from,
4024     VkRenderPassCreateInfo2KHR* to)
4025 {
4026     (void)pool;
4027     *to = *from;
4028     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4029     to->pNext = nullptr;
4030     if (pNext_size)
4031     {
4032         to->pNext = (const void*)pool->alloc(pNext_size);
4033         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4034     }
4035     to->pAttachments = nullptr;
4036     if (from->pAttachments)
4037     {
4038         to->pAttachments = (VkAttachmentDescription2KHR*)pool->alloc(from->attachmentCount * sizeof(const VkAttachmentDescription2KHR));
4039         to->attachmentCount = from->attachmentCount;
4040         for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i)
4041         {
4042             deepcopy_VkAttachmentDescription2KHR(pool, from->pAttachments + i, (VkAttachmentDescription2KHR*)(to->pAttachments + i));
4043         }
4044     }
4045     to->pSubpasses = nullptr;
4046     if (from->pSubpasses)
4047     {
4048         to->pSubpasses = (VkSubpassDescription2KHR*)pool->alloc(from->subpassCount * sizeof(const VkSubpassDescription2KHR));
4049         to->subpassCount = from->subpassCount;
4050         for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i)
4051         {
4052             deepcopy_VkSubpassDescription2KHR(pool, from->pSubpasses + i, (VkSubpassDescription2KHR*)(to->pSubpasses + i));
4053         }
4054     }
4055     to->pDependencies = nullptr;
4056     if (from->pDependencies)
4057     {
4058         to->pDependencies = (VkSubpassDependency2KHR*)pool->alloc(from->dependencyCount * sizeof(const VkSubpassDependency2KHR));
4059         to->dependencyCount = from->dependencyCount;
4060         for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i)
4061         {
4062             deepcopy_VkSubpassDependency2KHR(pool, from->pDependencies + i, (VkSubpassDependency2KHR*)(to->pDependencies + i));
4063         }
4064     }
4065     to->pCorrelatedViewMasks = nullptr;
4066     if (from->pCorrelatedViewMasks)
4067     {
4068         to->pCorrelatedViewMasks = (uint32_t*)pool->dupArray(from->pCorrelatedViewMasks, from->correlatedViewMaskCount * sizeof(const uint32_t));
4069     }
4070 }
4071 
deepcopy_VkSubpassBeginInfoKHR(Pool * pool,const VkSubpassBeginInfoKHR * from,VkSubpassBeginInfoKHR * to)4072 void deepcopy_VkSubpassBeginInfoKHR(
4073     Pool* pool,
4074     const VkSubpassBeginInfoKHR* from,
4075     VkSubpassBeginInfoKHR* to)
4076 {
4077     (void)pool;
4078     *to = *from;
4079     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4080     to->pNext = nullptr;
4081     if (pNext_size)
4082     {
4083         to->pNext = (const void*)pool->alloc(pNext_size);
4084         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4085     }
4086 }
4087 
deepcopy_VkSubpassEndInfoKHR(Pool * pool,const VkSubpassEndInfoKHR * from,VkSubpassEndInfoKHR * to)4088 void deepcopy_VkSubpassEndInfoKHR(
4089     Pool* pool,
4090     const VkSubpassEndInfoKHR* from,
4091     VkSubpassEndInfoKHR* to)
4092 {
4093     (void)pool;
4094     *to = *from;
4095     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4096     to->pNext = nullptr;
4097     if (pNext_size)
4098     {
4099         to->pNext = (const void*)pool->alloc(pNext_size);
4100         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4101     }
4102 }
4103 
4104 #endif
4105 #ifdef VK_KHR_shared_presentable_image
deepcopy_VkSharedPresentSurfaceCapabilitiesKHR(Pool * pool,const VkSharedPresentSurfaceCapabilitiesKHR * from,VkSharedPresentSurfaceCapabilitiesKHR * to)4106 void deepcopy_VkSharedPresentSurfaceCapabilitiesKHR(
4107     Pool* pool,
4108     const VkSharedPresentSurfaceCapabilitiesKHR* from,
4109     VkSharedPresentSurfaceCapabilitiesKHR* to)
4110 {
4111     (void)pool;
4112     *to = *from;
4113     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4114     to->pNext = nullptr;
4115     if (pNext_size)
4116     {
4117         to->pNext = (void*)pool->alloc(pNext_size);
4118         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4119     }
4120 }
4121 
4122 #endif
4123 #ifdef VK_KHR_external_fence_capabilities
4124 #endif
4125 #ifdef VK_KHR_external_fence
4126 #endif
4127 #ifdef VK_KHR_external_fence_win32
deepcopy_VkImportFenceWin32HandleInfoKHR(Pool * pool,const VkImportFenceWin32HandleInfoKHR * from,VkImportFenceWin32HandleInfoKHR * to)4128 void deepcopy_VkImportFenceWin32HandleInfoKHR(
4129     Pool* pool,
4130     const VkImportFenceWin32HandleInfoKHR* from,
4131     VkImportFenceWin32HandleInfoKHR* to)
4132 {
4133     (void)pool;
4134     *to = *from;
4135     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4136     to->pNext = nullptr;
4137     if (pNext_size)
4138     {
4139         to->pNext = (const void*)pool->alloc(pNext_size);
4140         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4141     }
4142 }
4143 
deepcopy_VkExportFenceWin32HandleInfoKHR(Pool * pool,const VkExportFenceWin32HandleInfoKHR * from,VkExportFenceWin32HandleInfoKHR * to)4144 void deepcopy_VkExportFenceWin32HandleInfoKHR(
4145     Pool* pool,
4146     const VkExportFenceWin32HandleInfoKHR* from,
4147     VkExportFenceWin32HandleInfoKHR* to)
4148 {
4149     (void)pool;
4150     *to = *from;
4151     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4152     to->pNext = nullptr;
4153     if (pNext_size)
4154     {
4155         to->pNext = (const void*)pool->alloc(pNext_size);
4156         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4157     }
4158     to->pAttributes = nullptr;
4159     if (from->pAttributes)
4160     {
4161         to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
4162     }
4163 }
4164 
deepcopy_VkFenceGetWin32HandleInfoKHR(Pool * pool,const VkFenceGetWin32HandleInfoKHR * from,VkFenceGetWin32HandleInfoKHR * to)4165 void deepcopy_VkFenceGetWin32HandleInfoKHR(
4166     Pool* pool,
4167     const VkFenceGetWin32HandleInfoKHR* from,
4168     VkFenceGetWin32HandleInfoKHR* to)
4169 {
4170     (void)pool;
4171     *to = *from;
4172     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4173     to->pNext = nullptr;
4174     if (pNext_size)
4175     {
4176         to->pNext = (const void*)pool->alloc(pNext_size);
4177         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4178     }
4179 }
4180 
4181 #endif
4182 #ifdef VK_KHR_external_fence_fd
deepcopy_VkImportFenceFdInfoKHR(Pool * pool,const VkImportFenceFdInfoKHR * from,VkImportFenceFdInfoKHR * to)4183 void deepcopy_VkImportFenceFdInfoKHR(
4184     Pool* pool,
4185     const VkImportFenceFdInfoKHR* from,
4186     VkImportFenceFdInfoKHR* to)
4187 {
4188     (void)pool;
4189     *to = *from;
4190     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4191     to->pNext = nullptr;
4192     if (pNext_size)
4193     {
4194         to->pNext = (const void*)pool->alloc(pNext_size);
4195         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4196     }
4197 }
4198 
deepcopy_VkFenceGetFdInfoKHR(Pool * pool,const VkFenceGetFdInfoKHR * from,VkFenceGetFdInfoKHR * to)4199 void deepcopy_VkFenceGetFdInfoKHR(
4200     Pool* pool,
4201     const VkFenceGetFdInfoKHR* from,
4202     VkFenceGetFdInfoKHR* to)
4203 {
4204     (void)pool;
4205     *to = *from;
4206     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4207     to->pNext = nullptr;
4208     if (pNext_size)
4209     {
4210         to->pNext = (const void*)pool->alloc(pNext_size);
4211         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4212     }
4213 }
4214 
4215 #endif
4216 #ifdef VK_KHR_maintenance2
4217 #endif
4218 #ifdef VK_KHR_get_surface_capabilities2
deepcopy_VkPhysicalDeviceSurfaceInfo2KHR(Pool * pool,const VkPhysicalDeviceSurfaceInfo2KHR * from,VkPhysicalDeviceSurfaceInfo2KHR * to)4219 void deepcopy_VkPhysicalDeviceSurfaceInfo2KHR(
4220     Pool* pool,
4221     const VkPhysicalDeviceSurfaceInfo2KHR* from,
4222     VkPhysicalDeviceSurfaceInfo2KHR* to)
4223 {
4224     (void)pool;
4225     *to = *from;
4226     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4227     to->pNext = nullptr;
4228     if (pNext_size)
4229     {
4230         to->pNext = (const void*)pool->alloc(pNext_size);
4231         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4232     }
4233 }
4234 
deepcopy_VkSurfaceCapabilities2KHR(Pool * pool,const VkSurfaceCapabilities2KHR * from,VkSurfaceCapabilities2KHR * to)4235 void deepcopy_VkSurfaceCapabilities2KHR(
4236     Pool* pool,
4237     const VkSurfaceCapabilities2KHR* from,
4238     VkSurfaceCapabilities2KHR* to)
4239 {
4240     (void)pool;
4241     *to = *from;
4242     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4243     to->pNext = nullptr;
4244     if (pNext_size)
4245     {
4246         to->pNext = (void*)pool->alloc(pNext_size);
4247         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4248     }
4249     deepcopy_VkSurfaceCapabilitiesKHR(pool, &from->surfaceCapabilities, (VkSurfaceCapabilitiesKHR*)(&to->surfaceCapabilities));
4250 }
4251 
deepcopy_VkSurfaceFormat2KHR(Pool * pool,const VkSurfaceFormat2KHR * from,VkSurfaceFormat2KHR * to)4252 void deepcopy_VkSurfaceFormat2KHR(
4253     Pool* pool,
4254     const VkSurfaceFormat2KHR* from,
4255     VkSurfaceFormat2KHR* to)
4256 {
4257     (void)pool;
4258     *to = *from;
4259     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4260     to->pNext = nullptr;
4261     if (pNext_size)
4262     {
4263         to->pNext = (void*)pool->alloc(pNext_size);
4264         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4265     }
4266     deepcopy_VkSurfaceFormatKHR(pool, &from->surfaceFormat, (VkSurfaceFormatKHR*)(&to->surfaceFormat));
4267 }
4268 
4269 #endif
4270 #ifdef VK_KHR_variable_pointers
4271 #endif
4272 #ifdef VK_KHR_get_display_properties2
deepcopy_VkDisplayProperties2KHR(Pool * pool,const VkDisplayProperties2KHR * from,VkDisplayProperties2KHR * to)4273 void deepcopy_VkDisplayProperties2KHR(
4274     Pool* pool,
4275     const VkDisplayProperties2KHR* from,
4276     VkDisplayProperties2KHR* to)
4277 {
4278     (void)pool;
4279     *to = *from;
4280     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4281     to->pNext = nullptr;
4282     if (pNext_size)
4283     {
4284         to->pNext = (void*)pool->alloc(pNext_size);
4285         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4286     }
4287     deepcopy_VkDisplayPropertiesKHR(pool, &from->displayProperties, (VkDisplayPropertiesKHR*)(&to->displayProperties));
4288 }
4289 
deepcopy_VkDisplayPlaneProperties2KHR(Pool * pool,const VkDisplayPlaneProperties2KHR * from,VkDisplayPlaneProperties2KHR * to)4290 void deepcopy_VkDisplayPlaneProperties2KHR(
4291     Pool* pool,
4292     const VkDisplayPlaneProperties2KHR* from,
4293     VkDisplayPlaneProperties2KHR* to)
4294 {
4295     (void)pool;
4296     *to = *from;
4297     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4298     to->pNext = nullptr;
4299     if (pNext_size)
4300     {
4301         to->pNext = (void*)pool->alloc(pNext_size);
4302         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4303     }
4304     deepcopy_VkDisplayPlanePropertiesKHR(pool, &from->displayPlaneProperties, (VkDisplayPlanePropertiesKHR*)(&to->displayPlaneProperties));
4305 }
4306 
deepcopy_VkDisplayModeProperties2KHR(Pool * pool,const VkDisplayModeProperties2KHR * from,VkDisplayModeProperties2KHR * to)4307 void deepcopy_VkDisplayModeProperties2KHR(
4308     Pool* pool,
4309     const VkDisplayModeProperties2KHR* from,
4310     VkDisplayModeProperties2KHR* to)
4311 {
4312     (void)pool;
4313     *to = *from;
4314     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4315     to->pNext = nullptr;
4316     if (pNext_size)
4317     {
4318         to->pNext = (void*)pool->alloc(pNext_size);
4319         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4320     }
4321     deepcopy_VkDisplayModePropertiesKHR(pool, &from->displayModeProperties, (VkDisplayModePropertiesKHR*)(&to->displayModeProperties));
4322 }
4323 
deepcopy_VkDisplayPlaneInfo2KHR(Pool * pool,const VkDisplayPlaneInfo2KHR * from,VkDisplayPlaneInfo2KHR * to)4324 void deepcopy_VkDisplayPlaneInfo2KHR(
4325     Pool* pool,
4326     const VkDisplayPlaneInfo2KHR* from,
4327     VkDisplayPlaneInfo2KHR* to)
4328 {
4329     (void)pool;
4330     *to = *from;
4331     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4332     to->pNext = nullptr;
4333     if (pNext_size)
4334     {
4335         to->pNext = (const void*)pool->alloc(pNext_size);
4336         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4337     }
4338 }
4339 
deepcopy_VkDisplayPlaneCapabilities2KHR(Pool * pool,const VkDisplayPlaneCapabilities2KHR * from,VkDisplayPlaneCapabilities2KHR * to)4340 void deepcopy_VkDisplayPlaneCapabilities2KHR(
4341     Pool* pool,
4342     const VkDisplayPlaneCapabilities2KHR* from,
4343     VkDisplayPlaneCapabilities2KHR* to)
4344 {
4345     (void)pool;
4346     *to = *from;
4347     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4348     to->pNext = nullptr;
4349     if (pNext_size)
4350     {
4351         to->pNext = (void*)pool->alloc(pNext_size);
4352         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4353     }
4354     deepcopy_VkDisplayPlaneCapabilitiesKHR(pool, &from->capabilities, (VkDisplayPlaneCapabilitiesKHR*)(&to->capabilities));
4355 }
4356 
4357 #endif
4358 #ifdef VK_KHR_dedicated_allocation
4359 #endif
4360 #ifdef VK_KHR_storage_buffer_storage_class
4361 #endif
4362 #ifdef VK_KHR_relaxed_block_layout
4363 #endif
4364 #ifdef VK_KHR_get_memory_requirements2
4365 #endif
4366 #ifdef VK_KHR_image_format_list
deepcopy_VkImageFormatListCreateInfoKHR(Pool * pool,const VkImageFormatListCreateInfoKHR * from,VkImageFormatListCreateInfoKHR * to)4367 void deepcopy_VkImageFormatListCreateInfoKHR(
4368     Pool* pool,
4369     const VkImageFormatListCreateInfoKHR* from,
4370     VkImageFormatListCreateInfoKHR* to)
4371 {
4372     (void)pool;
4373     *to = *from;
4374     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4375     to->pNext = nullptr;
4376     if (pNext_size)
4377     {
4378         to->pNext = (const void*)pool->alloc(pNext_size);
4379         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4380     }
4381     to->pViewFormats = nullptr;
4382     if (from->pViewFormats)
4383     {
4384         to->pViewFormats = (VkFormat*)pool->dupArray(from->pViewFormats, from->viewFormatCount * sizeof(const VkFormat));
4385     }
4386 }
4387 
4388 #endif
4389 #ifdef VK_KHR_sampler_ycbcr_conversion
4390 #endif
4391 #ifdef VK_KHR_bind_memory2
4392 #endif
4393 #ifdef VK_KHR_maintenance3
4394 #endif
4395 #ifdef VK_KHR_draw_indirect_count
4396 #endif
4397 #ifdef VK_KHR_8bit_storage
deepcopy_VkPhysicalDevice8BitStorageFeaturesKHR(Pool * pool,const VkPhysicalDevice8BitStorageFeaturesKHR * from,VkPhysicalDevice8BitStorageFeaturesKHR * to)4398 void deepcopy_VkPhysicalDevice8BitStorageFeaturesKHR(
4399     Pool* pool,
4400     const VkPhysicalDevice8BitStorageFeaturesKHR* from,
4401     VkPhysicalDevice8BitStorageFeaturesKHR* to)
4402 {
4403     (void)pool;
4404     *to = *from;
4405     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4406     to->pNext = nullptr;
4407     if (pNext_size)
4408     {
4409         to->pNext = (void*)pool->alloc(pNext_size);
4410         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4411     }
4412 }
4413 
4414 #endif
4415 #ifdef VK_KHR_shader_float16_int8
deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(Pool * pool,const VkPhysicalDeviceShaderFloat16Int8Features * from,VkPhysicalDeviceShaderFloat16Int8Features * to)4416 void deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(
4417     Pool* pool,
4418     const VkPhysicalDeviceShaderFloat16Int8Features* from,
4419     VkPhysicalDeviceShaderFloat16Int8Features* to)
4420 {
4421     (void)pool;
4422     *to = *from;
4423     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4424     to->pNext = nullptr;
4425     if (pNext_size)
4426     {
4427         to->pNext = (void*)pool->alloc(pNext_size);
4428         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4429     }
4430 }
4431 
4432 #endif
4433 #ifdef VK_ANDROID_native_buffer
deepcopy_VkNativeBufferANDROID(Pool * pool,const VkNativeBufferANDROID * from,VkNativeBufferANDROID * to)4434 void deepcopy_VkNativeBufferANDROID(
4435     Pool* pool,
4436     const VkNativeBufferANDROID* from,
4437     VkNativeBufferANDROID* to)
4438 {
4439     (void)pool;
4440     *to = *from;
4441     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4442     to->pNext = nullptr;
4443     if (pNext_size)
4444     {
4445         to->pNext = (const void*)pool->alloc(pNext_size);
4446         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4447     }
4448     to->handle = nullptr;
4449     if (from->handle)
4450     {
4451         to->handle = (uint32_t*)pool->dupArray(from->handle, sizeof(const uint32_t));
4452     }
4453 }
4454 
4455 #endif
4456 #ifdef VK_EXT_debug_report
deepcopy_VkDebugReportCallbackCreateInfoEXT(Pool * pool,const VkDebugReportCallbackCreateInfoEXT * from,VkDebugReportCallbackCreateInfoEXT * to)4457 void deepcopy_VkDebugReportCallbackCreateInfoEXT(
4458     Pool* pool,
4459     const VkDebugReportCallbackCreateInfoEXT* from,
4460     VkDebugReportCallbackCreateInfoEXT* to)
4461 {
4462     (void)pool;
4463     *to = *from;
4464     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4465     to->pNext = nullptr;
4466     if (pNext_size)
4467     {
4468         to->pNext = (const void*)pool->alloc(pNext_size);
4469         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4470     }
4471     to->pUserData = nullptr;
4472     if (from->pUserData)
4473     {
4474         to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
4475     }
4476 }
4477 
4478 #endif
4479 #ifdef VK_NV_glsl_shader
4480 #endif
4481 #ifdef VK_EXT_depth_range_unrestricted
4482 #endif
4483 #ifdef VK_IMG_filter_cubic
4484 #endif
4485 #ifdef VK_AMD_rasterization_order
deepcopy_VkPipelineRasterizationStateRasterizationOrderAMD(Pool * pool,const VkPipelineRasterizationStateRasterizationOrderAMD * from,VkPipelineRasterizationStateRasterizationOrderAMD * to)4486 void deepcopy_VkPipelineRasterizationStateRasterizationOrderAMD(
4487     Pool* pool,
4488     const VkPipelineRasterizationStateRasterizationOrderAMD* from,
4489     VkPipelineRasterizationStateRasterizationOrderAMD* to)
4490 {
4491     (void)pool;
4492     *to = *from;
4493     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4494     to->pNext = nullptr;
4495     if (pNext_size)
4496     {
4497         to->pNext = (const void*)pool->alloc(pNext_size);
4498         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4499     }
4500 }
4501 
4502 #endif
4503 #ifdef VK_AMD_shader_trinary_minmax
4504 #endif
4505 #ifdef VK_AMD_shader_explicit_vertex_parameter
4506 #endif
4507 #ifdef VK_EXT_debug_marker
deepcopy_VkDebugMarkerObjectNameInfoEXT(Pool * pool,const VkDebugMarkerObjectNameInfoEXT * from,VkDebugMarkerObjectNameInfoEXT * to)4508 void deepcopy_VkDebugMarkerObjectNameInfoEXT(
4509     Pool* pool,
4510     const VkDebugMarkerObjectNameInfoEXT* from,
4511     VkDebugMarkerObjectNameInfoEXT* to)
4512 {
4513     (void)pool;
4514     *to = *from;
4515     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4516     to->pNext = nullptr;
4517     if (pNext_size)
4518     {
4519         to->pNext = (const void*)pool->alloc(pNext_size);
4520         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4521     }
4522     to->pObjectName = nullptr;
4523     if (from->pObjectName)
4524     {
4525         to->pObjectName = pool->strDup(from->pObjectName);
4526     }
4527 }
4528 
deepcopy_VkDebugMarkerObjectTagInfoEXT(Pool * pool,const VkDebugMarkerObjectTagInfoEXT * from,VkDebugMarkerObjectTagInfoEXT * to)4529 void deepcopy_VkDebugMarkerObjectTagInfoEXT(
4530     Pool* pool,
4531     const VkDebugMarkerObjectTagInfoEXT* from,
4532     VkDebugMarkerObjectTagInfoEXT* to)
4533 {
4534     (void)pool;
4535     *to = *from;
4536     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4537     to->pNext = nullptr;
4538     if (pNext_size)
4539     {
4540         to->pNext = (const void*)pool->alloc(pNext_size);
4541         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4542     }
4543     to->pTag = nullptr;
4544     if (from->pTag)
4545     {
4546         to->pTag = (void*)pool->dupArray(from->pTag, from->tagSize * sizeof(const uint8_t));
4547     }
4548 }
4549 
deepcopy_VkDebugMarkerMarkerInfoEXT(Pool * pool,const VkDebugMarkerMarkerInfoEXT * from,VkDebugMarkerMarkerInfoEXT * to)4550 void deepcopy_VkDebugMarkerMarkerInfoEXT(
4551     Pool* pool,
4552     const VkDebugMarkerMarkerInfoEXT* from,
4553     VkDebugMarkerMarkerInfoEXT* to)
4554 {
4555     (void)pool;
4556     *to = *from;
4557     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4558     to->pNext = nullptr;
4559     if (pNext_size)
4560     {
4561         to->pNext = (const void*)pool->alloc(pNext_size);
4562         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4563     }
4564     to->pMarkerName = nullptr;
4565     if (from->pMarkerName)
4566     {
4567         to->pMarkerName = pool->strDup(from->pMarkerName);
4568     }
4569     memcpy(to->color, from->color, 4 * sizeof(float));
4570 }
4571 
4572 #endif
4573 #ifdef VK_AMD_gcn_shader
4574 #endif
4575 #ifdef VK_NV_dedicated_allocation
deepcopy_VkDedicatedAllocationImageCreateInfoNV(Pool * pool,const VkDedicatedAllocationImageCreateInfoNV * from,VkDedicatedAllocationImageCreateInfoNV * to)4576 void deepcopy_VkDedicatedAllocationImageCreateInfoNV(
4577     Pool* pool,
4578     const VkDedicatedAllocationImageCreateInfoNV* from,
4579     VkDedicatedAllocationImageCreateInfoNV* to)
4580 {
4581     (void)pool;
4582     *to = *from;
4583     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4584     to->pNext = nullptr;
4585     if (pNext_size)
4586     {
4587         to->pNext = (const void*)pool->alloc(pNext_size);
4588         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4589     }
4590 }
4591 
deepcopy_VkDedicatedAllocationBufferCreateInfoNV(Pool * pool,const VkDedicatedAllocationBufferCreateInfoNV * from,VkDedicatedAllocationBufferCreateInfoNV * to)4592 void deepcopy_VkDedicatedAllocationBufferCreateInfoNV(
4593     Pool* pool,
4594     const VkDedicatedAllocationBufferCreateInfoNV* from,
4595     VkDedicatedAllocationBufferCreateInfoNV* to)
4596 {
4597     (void)pool;
4598     *to = *from;
4599     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4600     to->pNext = nullptr;
4601     if (pNext_size)
4602     {
4603         to->pNext = (const void*)pool->alloc(pNext_size);
4604         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4605     }
4606 }
4607 
deepcopy_VkDedicatedAllocationMemoryAllocateInfoNV(Pool * pool,const VkDedicatedAllocationMemoryAllocateInfoNV * from,VkDedicatedAllocationMemoryAllocateInfoNV * to)4608 void deepcopy_VkDedicatedAllocationMemoryAllocateInfoNV(
4609     Pool* pool,
4610     const VkDedicatedAllocationMemoryAllocateInfoNV* from,
4611     VkDedicatedAllocationMemoryAllocateInfoNV* to)
4612 {
4613     (void)pool;
4614     *to = *from;
4615     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4616     to->pNext = nullptr;
4617     if (pNext_size)
4618     {
4619         to->pNext = (const void*)pool->alloc(pNext_size);
4620         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4621     }
4622 }
4623 
4624 #endif
4625 #ifdef VK_AMD_draw_indirect_count
4626 #endif
4627 #ifdef VK_AMD_negative_viewport_height
4628 #endif
4629 #ifdef VK_AMD_gpu_shader_half_float
4630 #endif
4631 #ifdef VK_AMD_shader_ballot
4632 #endif
4633 #ifdef VK_AMD_texture_gather_bias_lod
deepcopy_VkTextureLODGatherFormatPropertiesAMD(Pool * pool,const VkTextureLODGatherFormatPropertiesAMD * from,VkTextureLODGatherFormatPropertiesAMD * to)4634 void deepcopy_VkTextureLODGatherFormatPropertiesAMD(
4635     Pool* pool,
4636     const VkTextureLODGatherFormatPropertiesAMD* from,
4637     VkTextureLODGatherFormatPropertiesAMD* to)
4638 {
4639     (void)pool;
4640     *to = *from;
4641     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4642     to->pNext = nullptr;
4643     if (pNext_size)
4644     {
4645         to->pNext = (void*)pool->alloc(pNext_size);
4646         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4647     }
4648 }
4649 
4650 #endif
4651 #ifdef VK_AMD_shader_info
deepcopy_VkShaderResourceUsageAMD(Pool * pool,const VkShaderResourceUsageAMD * from,VkShaderResourceUsageAMD * to)4652 void deepcopy_VkShaderResourceUsageAMD(
4653     Pool* pool,
4654     const VkShaderResourceUsageAMD* from,
4655     VkShaderResourceUsageAMD* to)
4656 {
4657     (void)pool;
4658     *to = *from;
4659 }
4660 
deepcopy_VkShaderStatisticsInfoAMD(Pool * pool,const VkShaderStatisticsInfoAMD * from,VkShaderStatisticsInfoAMD * to)4661 void deepcopy_VkShaderStatisticsInfoAMD(
4662     Pool* pool,
4663     const VkShaderStatisticsInfoAMD* from,
4664     VkShaderStatisticsInfoAMD* to)
4665 {
4666     (void)pool;
4667     *to = *from;
4668     deepcopy_VkShaderResourceUsageAMD(pool, &from->resourceUsage, (VkShaderResourceUsageAMD*)(&to->resourceUsage));
4669     memcpy(to->computeWorkGroupSize, from->computeWorkGroupSize, 3 * sizeof(uint32_t));
4670 }
4671 
4672 #endif
4673 #ifdef VK_AMD_shader_image_load_store_lod
4674 #endif
4675 #ifdef VK_IMG_format_pvrtc
4676 #endif
4677 #ifdef VK_NV_external_memory_capabilities
deepcopy_VkExternalImageFormatPropertiesNV(Pool * pool,const VkExternalImageFormatPropertiesNV * from,VkExternalImageFormatPropertiesNV * to)4678 void deepcopy_VkExternalImageFormatPropertiesNV(
4679     Pool* pool,
4680     const VkExternalImageFormatPropertiesNV* from,
4681     VkExternalImageFormatPropertiesNV* to)
4682 {
4683     (void)pool;
4684     *to = *from;
4685     deepcopy_VkImageFormatProperties(pool, &from->imageFormatProperties, (VkImageFormatProperties*)(&to->imageFormatProperties));
4686 }
4687 
4688 #endif
4689 #ifdef VK_NV_external_memory
deepcopy_VkExternalMemoryImageCreateInfoNV(Pool * pool,const VkExternalMemoryImageCreateInfoNV * from,VkExternalMemoryImageCreateInfoNV * to)4690 void deepcopy_VkExternalMemoryImageCreateInfoNV(
4691     Pool* pool,
4692     const VkExternalMemoryImageCreateInfoNV* from,
4693     VkExternalMemoryImageCreateInfoNV* to)
4694 {
4695     (void)pool;
4696     *to = *from;
4697     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4698     to->pNext = nullptr;
4699     if (pNext_size)
4700     {
4701         to->pNext = (const void*)pool->alloc(pNext_size);
4702         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4703     }
4704 }
4705 
deepcopy_VkExportMemoryAllocateInfoNV(Pool * pool,const VkExportMemoryAllocateInfoNV * from,VkExportMemoryAllocateInfoNV * to)4706 void deepcopy_VkExportMemoryAllocateInfoNV(
4707     Pool* pool,
4708     const VkExportMemoryAllocateInfoNV* from,
4709     VkExportMemoryAllocateInfoNV* to)
4710 {
4711     (void)pool;
4712     *to = *from;
4713     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4714     to->pNext = nullptr;
4715     if (pNext_size)
4716     {
4717         to->pNext = (const void*)pool->alloc(pNext_size);
4718         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4719     }
4720 }
4721 
4722 #endif
4723 #ifdef VK_NV_external_memory_win32
deepcopy_VkImportMemoryWin32HandleInfoNV(Pool * pool,const VkImportMemoryWin32HandleInfoNV * from,VkImportMemoryWin32HandleInfoNV * to)4724 void deepcopy_VkImportMemoryWin32HandleInfoNV(
4725     Pool* pool,
4726     const VkImportMemoryWin32HandleInfoNV* from,
4727     VkImportMemoryWin32HandleInfoNV* to)
4728 {
4729     (void)pool;
4730     *to = *from;
4731     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4732     to->pNext = nullptr;
4733     if (pNext_size)
4734     {
4735         to->pNext = (const void*)pool->alloc(pNext_size);
4736         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4737     }
4738 }
4739 
deepcopy_VkExportMemoryWin32HandleInfoNV(Pool * pool,const VkExportMemoryWin32HandleInfoNV * from,VkExportMemoryWin32HandleInfoNV * to)4740 void deepcopy_VkExportMemoryWin32HandleInfoNV(
4741     Pool* pool,
4742     const VkExportMemoryWin32HandleInfoNV* from,
4743     VkExportMemoryWin32HandleInfoNV* to)
4744 {
4745     (void)pool;
4746     *to = *from;
4747     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4748     to->pNext = nullptr;
4749     if (pNext_size)
4750     {
4751         to->pNext = (const void*)pool->alloc(pNext_size);
4752         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4753     }
4754     to->pAttributes = nullptr;
4755     if (from->pAttributes)
4756     {
4757         to->pAttributes = (SECURITY_ATTRIBUTES*)pool->dupArray(from->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
4758     }
4759 }
4760 
4761 #endif
4762 #ifdef VK_NV_win32_keyed_mutex
deepcopy_VkWin32KeyedMutexAcquireReleaseInfoNV(Pool * pool,const VkWin32KeyedMutexAcquireReleaseInfoNV * from,VkWin32KeyedMutexAcquireReleaseInfoNV * to)4763 void deepcopy_VkWin32KeyedMutexAcquireReleaseInfoNV(
4764     Pool* pool,
4765     const VkWin32KeyedMutexAcquireReleaseInfoNV* from,
4766     VkWin32KeyedMutexAcquireReleaseInfoNV* to)
4767 {
4768     (void)pool;
4769     *to = *from;
4770     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4771     to->pNext = nullptr;
4772     if (pNext_size)
4773     {
4774         to->pNext = (const void*)pool->alloc(pNext_size);
4775         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4776     }
4777     to->pAcquireSyncs = nullptr;
4778     if (from->pAcquireSyncs)
4779     {
4780         to->pAcquireSyncs = (VkDeviceMemory*)pool->dupArray(from->pAcquireSyncs, from->acquireCount * sizeof(const VkDeviceMemory));
4781     }
4782     to->pAcquireKeys = nullptr;
4783     if (from->pAcquireKeys)
4784     {
4785         to->pAcquireKeys = (uint64_t*)pool->dupArray(from->pAcquireKeys, from->acquireCount * sizeof(const uint64_t));
4786     }
4787     to->pAcquireTimeoutMilliseconds = nullptr;
4788     if (from->pAcquireTimeoutMilliseconds)
4789     {
4790         to->pAcquireTimeoutMilliseconds = (uint32_t*)pool->dupArray(from->pAcquireTimeoutMilliseconds, from->acquireCount * sizeof(const uint32_t));
4791     }
4792     to->pReleaseSyncs = nullptr;
4793     if (from->pReleaseSyncs)
4794     {
4795         to->pReleaseSyncs = (VkDeviceMemory*)pool->dupArray(from->pReleaseSyncs, from->releaseCount * sizeof(const VkDeviceMemory));
4796     }
4797     to->pReleaseKeys = nullptr;
4798     if (from->pReleaseKeys)
4799     {
4800         to->pReleaseKeys = (uint64_t*)pool->dupArray(from->pReleaseKeys, from->releaseCount * sizeof(const uint64_t));
4801     }
4802 }
4803 
4804 #endif
4805 #ifdef VK_EXT_validation_flags
deepcopy_VkValidationFlagsEXT(Pool * pool,const VkValidationFlagsEXT * from,VkValidationFlagsEXT * to)4806 void deepcopy_VkValidationFlagsEXT(
4807     Pool* pool,
4808     const VkValidationFlagsEXT* from,
4809     VkValidationFlagsEXT* to)
4810 {
4811     (void)pool;
4812     *to = *from;
4813     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4814     to->pNext = nullptr;
4815     if (pNext_size)
4816     {
4817         to->pNext = (const void*)pool->alloc(pNext_size);
4818         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4819     }
4820     to->pDisabledValidationChecks = nullptr;
4821     if (from->pDisabledValidationChecks)
4822     {
4823         to->pDisabledValidationChecks = (VkValidationCheckEXT*)pool->dupArray(from->pDisabledValidationChecks, from->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT));
4824     }
4825 }
4826 
4827 #endif
4828 #ifdef VK_NN_vi_surface
deepcopy_VkViSurfaceCreateInfoNN(Pool * pool,const VkViSurfaceCreateInfoNN * from,VkViSurfaceCreateInfoNN * to)4829 void deepcopy_VkViSurfaceCreateInfoNN(
4830     Pool* pool,
4831     const VkViSurfaceCreateInfoNN* from,
4832     VkViSurfaceCreateInfoNN* to)
4833 {
4834     (void)pool;
4835     *to = *from;
4836     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4837     to->pNext = nullptr;
4838     if (pNext_size)
4839     {
4840         to->pNext = (const void*)pool->alloc(pNext_size);
4841         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4842     }
4843     to->window = nullptr;
4844     if (from->window)
4845     {
4846         to->window = (void*)pool->dupArray(from->window, sizeof(uint8_t));
4847     }
4848 }
4849 
4850 #endif
4851 #ifdef VK_EXT_shader_subgroup_ballot
4852 #endif
4853 #ifdef VK_EXT_shader_subgroup_vote
4854 #endif
4855 #ifdef VK_EXT_conditional_rendering
deepcopy_VkConditionalRenderingBeginInfoEXT(Pool * pool,const VkConditionalRenderingBeginInfoEXT * from,VkConditionalRenderingBeginInfoEXT * to)4856 void deepcopy_VkConditionalRenderingBeginInfoEXT(
4857     Pool* pool,
4858     const VkConditionalRenderingBeginInfoEXT* from,
4859     VkConditionalRenderingBeginInfoEXT* to)
4860 {
4861     (void)pool;
4862     *to = *from;
4863     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4864     to->pNext = nullptr;
4865     if (pNext_size)
4866     {
4867         to->pNext = (const void*)pool->alloc(pNext_size);
4868         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4869     }
4870 }
4871 
deepcopy_VkPhysicalDeviceConditionalRenderingFeaturesEXT(Pool * pool,const VkPhysicalDeviceConditionalRenderingFeaturesEXT * from,VkPhysicalDeviceConditionalRenderingFeaturesEXT * to)4872 void deepcopy_VkPhysicalDeviceConditionalRenderingFeaturesEXT(
4873     Pool* pool,
4874     const VkPhysicalDeviceConditionalRenderingFeaturesEXT* from,
4875     VkPhysicalDeviceConditionalRenderingFeaturesEXT* to)
4876 {
4877     (void)pool;
4878     *to = *from;
4879     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4880     to->pNext = nullptr;
4881     if (pNext_size)
4882     {
4883         to->pNext = (void*)pool->alloc(pNext_size);
4884         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4885     }
4886 }
4887 
deepcopy_VkCommandBufferInheritanceConditionalRenderingInfoEXT(Pool * pool,const VkCommandBufferInheritanceConditionalRenderingInfoEXT * from,VkCommandBufferInheritanceConditionalRenderingInfoEXT * to)4888 void deepcopy_VkCommandBufferInheritanceConditionalRenderingInfoEXT(
4889     Pool* pool,
4890     const VkCommandBufferInheritanceConditionalRenderingInfoEXT* from,
4891     VkCommandBufferInheritanceConditionalRenderingInfoEXT* to)
4892 {
4893     (void)pool;
4894     *to = *from;
4895     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4896     to->pNext = nullptr;
4897     if (pNext_size)
4898     {
4899         to->pNext = (const void*)pool->alloc(pNext_size);
4900         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4901     }
4902 }
4903 
4904 #endif
4905 #ifdef VK_NVX_device_generated_commands
deepcopy_VkDeviceGeneratedCommandsFeaturesNVX(Pool * pool,const VkDeviceGeneratedCommandsFeaturesNVX * from,VkDeviceGeneratedCommandsFeaturesNVX * to)4906 void deepcopy_VkDeviceGeneratedCommandsFeaturesNVX(
4907     Pool* pool,
4908     const VkDeviceGeneratedCommandsFeaturesNVX* from,
4909     VkDeviceGeneratedCommandsFeaturesNVX* to)
4910 {
4911     (void)pool;
4912     *to = *from;
4913     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4914     to->pNext = nullptr;
4915     if (pNext_size)
4916     {
4917         to->pNext = (const void*)pool->alloc(pNext_size);
4918         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4919     }
4920 }
4921 
deepcopy_VkDeviceGeneratedCommandsLimitsNVX(Pool * pool,const VkDeviceGeneratedCommandsLimitsNVX * from,VkDeviceGeneratedCommandsLimitsNVX * to)4922 void deepcopy_VkDeviceGeneratedCommandsLimitsNVX(
4923     Pool* pool,
4924     const VkDeviceGeneratedCommandsLimitsNVX* from,
4925     VkDeviceGeneratedCommandsLimitsNVX* to)
4926 {
4927     (void)pool;
4928     *to = *from;
4929     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4930     to->pNext = nullptr;
4931     if (pNext_size)
4932     {
4933         to->pNext = (const void*)pool->alloc(pNext_size);
4934         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4935     }
4936 }
4937 
deepcopy_VkIndirectCommandsTokenNVX(Pool * pool,const VkIndirectCommandsTokenNVX * from,VkIndirectCommandsTokenNVX * to)4938 void deepcopy_VkIndirectCommandsTokenNVX(
4939     Pool* pool,
4940     const VkIndirectCommandsTokenNVX* from,
4941     VkIndirectCommandsTokenNVX* to)
4942 {
4943     (void)pool;
4944     *to = *from;
4945 }
4946 
deepcopy_VkIndirectCommandsLayoutTokenNVX(Pool * pool,const VkIndirectCommandsLayoutTokenNVX * from,VkIndirectCommandsLayoutTokenNVX * to)4947 void deepcopy_VkIndirectCommandsLayoutTokenNVX(
4948     Pool* pool,
4949     const VkIndirectCommandsLayoutTokenNVX* from,
4950     VkIndirectCommandsLayoutTokenNVX* to)
4951 {
4952     (void)pool;
4953     *to = *from;
4954 }
4955 
deepcopy_VkIndirectCommandsLayoutCreateInfoNVX(Pool * pool,const VkIndirectCommandsLayoutCreateInfoNVX * from,VkIndirectCommandsLayoutCreateInfoNVX * to)4956 void deepcopy_VkIndirectCommandsLayoutCreateInfoNVX(
4957     Pool* pool,
4958     const VkIndirectCommandsLayoutCreateInfoNVX* from,
4959     VkIndirectCommandsLayoutCreateInfoNVX* to)
4960 {
4961     (void)pool;
4962     *to = *from;
4963     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4964     to->pNext = nullptr;
4965     if (pNext_size)
4966     {
4967         to->pNext = (const void*)pool->alloc(pNext_size);
4968         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4969     }
4970     to->pTokens = nullptr;
4971     if (from->pTokens)
4972     {
4973         to->pTokens = (VkIndirectCommandsLayoutTokenNVX*)pool->alloc(from->tokenCount * sizeof(const VkIndirectCommandsLayoutTokenNVX));
4974         to->tokenCount = from->tokenCount;
4975         for (uint32_t i = 0; i < (uint32_t)from->tokenCount; ++i)
4976         {
4977             deepcopy_VkIndirectCommandsLayoutTokenNVX(pool, from->pTokens + i, (VkIndirectCommandsLayoutTokenNVX*)(to->pTokens + i));
4978         }
4979     }
4980 }
4981 
deepcopy_VkCmdProcessCommandsInfoNVX(Pool * pool,const VkCmdProcessCommandsInfoNVX * from,VkCmdProcessCommandsInfoNVX * to)4982 void deepcopy_VkCmdProcessCommandsInfoNVX(
4983     Pool* pool,
4984     const VkCmdProcessCommandsInfoNVX* from,
4985     VkCmdProcessCommandsInfoNVX* to)
4986 {
4987     (void)pool;
4988     *to = *from;
4989     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
4990     to->pNext = nullptr;
4991     if (pNext_size)
4992     {
4993         to->pNext = (const void*)pool->alloc(pNext_size);
4994         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
4995     }
4996     to->pIndirectCommandsTokens = nullptr;
4997     if (from->pIndirectCommandsTokens)
4998     {
4999         to->pIndirectCommandsTokens = (VkIndirectCommandsTokenNVX*)pool->alloc(from->indirectCommandsTokenCount * sizeof(const VkIndirectCommandsTokenNVX));
5000         to->indirectCommandsTokenCount = from->indirectCommandsTokenCount;
5001         for (uint32_t i = 0; i < (uint32_t)from->indirectCommandsTokenCount; ++i)
5002         {
5003             deepcopy_VkIndirectCommandsTokenNVX(pool, from->pIndirectCommandsTokens + i, (VkIndirectCommandsTokenNVX*)(to->pIndirectCommandsTokens + i));
5004         }
5005     }
5006 }
5007 
deepcopy_VkCmdReserveSpaceForCommandsInfoNVX(Pool * pool,const VkCmdReserveSpaceForCommandsInfoNVX * from,VkCmdReserveSpaceForCommandsInfoNVX * to)5008 void deepcopy_VkCmdReserveSpaceForCommandsInfoNVX(
5009     Pool* pool,
5010     const VkCmdReserveSpaceForCommandsInfoNVX* from,
5011     VkCmdReserveSpaceForCommandsInfoNVX* to)
5012 {
5013     (void)pool;
5014     *to = *from;
5015     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5016     to->pNext = nullptr;
5017     if (pNext_size)
5018     {
5019         to->pNext = (const void*)pool->alloc(pNext_size);
5020         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5021     }
5022 }
5023 
deepcopy_VkObjectTableCreateInfoNVX(Pool * pool,const VkObjectTableCreateInfoNVX * from,VkObjectTableCreateInfoNVX * to)5024 void deepcopy_VkObjectTableCreateInfoNVX(
5025     Pool* pool,
5026     const VkObjectTableCreateInfoNVX* from,
5027     VkObjectTableCreateInfoNVX* to)
5028 {
5029     (void)pool;
5030     *to = *from;
5031     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5032     to->pNext = nullptr;
5033     if (pNext_size)
5034     {
5035         to->pNext = (const void*)pool->alloc(pNext_size);
5036         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5037     }
5038     to->pObjectEntryTypes = nullptr;
5039     if (from->pObjectEntryTypes)
5040     {
5041         to->pObjectEntryTypes = (VkObjectEntryTypeNVX*)pool->dupArray(from->pObjectEntryTypes, from->objectCount * sizeof(const VkObjectEntryTypeNVX));
5042     }
5043     to->pObjectEntryCounts = nullptr;
5044     if (from->pObjectEntryCounts)
5045     {
5046         to->pObjectEntryCounts = (uint32_t*)pool->dupArray(from->pObjectEntryCounts, from->objectCount * sizeof(const uint32_t));
5047     }
5048     to->pObjectEntryUsageFlags = nullptr;
5049     if (from->pObjectEntryUsageFlags)
5050     {
5051         to->pObjectEntryUsageFlags = (VkObjectEntryUsageFlagsNVX*)pool->dupArray(from->pObjectEntryUsageFlags, from->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX));
5052     }
5053 }
5054 
deepcopy_VkObjectTableEntryNVX(Pool * pool,const VkObjectTableEntryNVX * from,VkObjectTableEntryNVX * to)5055 void deepcopy_VkObjectTableEntryNVX(
5056     Pool* pool,
5057     const VkObjectTableEntryNVX* from,
5058     VkObjectTableEntryNVX* to)
5059 {
5060     (void)pool;
5061     *to = *from;
5062 }
5063 
deepcopy_VkObjectTablePipelineEntryNVX(Pool * pool,const VkObjectTablePipelineEntryNVX * from,VkObjectTablePipelineEntryNVX * to)5064 void deepcopy_VkObjectTablePipelineEntryNVX(
5065     Pool* pool,
5066     const VkObjectTablePipelineEntryNVX* from,
5067     VkObjectTablePipelineEntryNVX* to)
5068 {
5069     (void)pool;
5070     *to = *from;
5071 }
5072 
deepcopy_VkObjectTableDescriptorSetEntryNVX(Pool * pool,const VkObjectTableDescriptorSetEntryNVX * from,VkObjectTableDescriptorSetEntryNVX * to)5073 void deepcopy_VkObjectTableDescriptorSetEntryNVX(
5074     Pool* pool,
5075     const VkObjectTableDescriptorSetEntryNVX* from,
5076     VkObjectTableDescriptorSetEntryNVX* to)
5077 {
5078     (void)pool;
5079     *to = *from;
5080 }
5081 
deepcopy_VkObjectTableVertexBufferEntryNVX(Pool * pool,const VkObjectTableVertexBufferEntryNVX * from,VkObjectTableVertexBufferEntryNVX * to)5082 void deepcopy_VkObjectTableVertexBufferEntryNVX(
5083     Pool* pool,
5084     const VkObjectTableVertexBufferEntryNVX* from,
5085     VkObjectTableVertexBufferEntryNVX* to)
5086 {
5087     (void)pool;
5088     *to = *from;
5089 }
5090 
deepcopy_VkObjectTableIndexBufferEntryNVX(Pool * pool,const VkObjectTableIndexBufferEntryNVX * from,VkObjectTableIndexBufferEntryNVX * to)5091 void deepcopy_VkObjectTableIndexBufferEntryNVX(
5092     Pool* pool,
5093     const VkObjectTableIndexBufferEntryNVX* from,
5094     VkObjectTableIndexBufferEntryNVX* to)
5095 {
5096     (void)pool;
5097     *to = *from;
5098 }
5099 
deepcopy_VkObjectTablePushConstantEntryNVX(Pool * pool,const VkObjectTablePushConstantEntryNVX * from,VkObjectTablePushConstantEntryNVX * to)5100 void deepcopy_VkObjectTablePushConstantEntryNVX(
5101     Pool* pool,
5102     const VkObjectTablePushConstantEntryNVX* from,
5103     VkObjectTablePushConstantEntryNVX* to)
5104 {
5105     (void)pool;
5106     *to = *from;
5107 }
5108 
5109 #endif
5110 #ifdef VK_NV_clip_space_w_scaling
deepcopy_VkViewportWScalingNV(Pool * pool,const VkViewportWScalingNV * from,VkViewportWScalingNV * to)5111 void deepcopy_VkViewportWScalingNV(
5112     Pool* pool,
5113     const VkViewportWScalingNV* from,
5114     VkViewportWScalingNV* to)
5115 {
5116     (void)pool;
5117     *to = *from;
5118 }
5119 
deepcopy_VkPipelineViewportWScalingStateCreateInfoNV(Pool * pool,const VkPipelineViewportWScalingStateCreateInfoNV * from,VkPipelineViewportWScalingStateCreateInfoNV * to)5120 void deepcopy_VkPipelineViewportWScalingStateCreateInfoNV(
5121     Pool* pool,
5122     const VkPipelineViewportWScalingStateCreateInfoNV* from,
5123     VkPipelineViewportWScalingStateCreateInfoNV* to)
5124 {
5125     (void)pool;
5126     *to = *from;
5127     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5128     to->pNext = nullptr;
5129     if (pNext_size)
5130     {
5131         to->pNext = (const void*)pool->alloc(pNext_size);
5132         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5133     }
5134     to->pViewportWScalings = nullptr;
5135     if (from->pViewportWScalings)
5136     {
5137         to->pViewportWScalings = (VkViewportWScalingNV*)pool->alloc(from->viewportCount * sizeof(const VkViewportWScalingNV));
5138         to->viewportCount = from->viewportCount;
5139         for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
5140         {
5141             deepcopy_VkViewportWScalingNV(pool, from->pViewportWScalings + i, (VkViewportWScalingNV*)(to->pViewportWScalings + i));
5142         }
5143     }
5144 }
5145 
5146 #endif
5147 #ifdef VK_EXT_direct_mode_display
5148 #endif
5149 #ifdef VK_EXT_acquire_xlib_display
5150 #endif
5151 #ifdef VK_EXT_display_surface_counter
deepcopy_VkSurfaceCapabilities2EXT(Pool * pool,const VkSurfaceCapabilities2EXT * from,VkSurfaceCapabilities2EXT * to)5152 void deepcopy_VkSurfaceCapabilities2EXT(
5153     Pool* pool,
5154     const VkSurfaceCapabilities2EXT* from,
5155     VkSurfaceCapabilities2EXT* to)
5156 {
5157     (void)pool;
5158     *to = *from;
5159     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5160     to->pNext = nullptr;
5161     if (pNext_size)
5162     {
5163         to->pNext = (void*)pool->alloc(pNext_size);
5164         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5165     }
5166     deepcopy_VkExtent2D(pool, &from->currentExtent, (VkExtent2D*)(&to->currentExtent));
5167     deepcopy_VkExtent2D(pool, &from->minImageExtent, (VkExtent2D*)(&to->minImageExtent));
5168     deepcopy_VkExtent2D(pool, &from->maxImageExtent, (VkExtent2D*)(&to->maxImageExtent));
5169 }
5170 
5171 #endif
5172 #ifdef VK_EXT_display_control
deepcopy_VkDisplayPowerInfoEXT(Pool * pool,const VkDisplayPowerInfoEXT * from,VkDisplayPowerInfoEXT * to)5173 void deepcopy_VkDisplayPowerInfoEXT(
5174     Pool* pool,
5175     const VkDisplayPowerInfoEXT* from,
5176     VkDisplayPowerInfoEXT* to)
5177 {
5178     (void)pool;
5179     *to = *from;
5180     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5181     to->pNext = nullptr;
5182     if (pNext_size)
5183     {
5184         to->pNext = (const void*)pool->alloc(pNext_size);
5185         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5186     }
5187 }
5188 
deepcopy_VkDeviceEventInfoEXT(Pool * pool,const VkDeviceEventInfoEXT * from,VkDeviceEventInfoEXT * to)5189 void deepcopy_VkDeviceEventInfoEXT(
5190     Pool* pool,
5191     const VkDeviceEventInfoEXT* from,
5192     VkDeviceEventInfoEXT* to)
5193 {
5194     (void)pool;
5195     *to = *from;
5196     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5197     to->pNext = nullptr;
5198     if (pNext_size)
5199     {
5200         to->pNext = (const void*)pool->alloc(pNext_size);
5201         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5202     }
5203 }
5204 
deepcopy_VkDisplayEventInfoEXT(Pool * pool,const VkDisplayEventInfoEXT * from,VkDisplayEventInfoEXT * to)5205 void deepcopy_VkDisplayEventInfoEXT(
5206     Pool* pool,
5207     const VkDisplayEventInfoEXT* from,
5208     VkDisplayEventInfoEXT* to)
5209 {
5210     (void)pool;
5211     *to = *from;
5212     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5213     to->pNext = nullptr;
5214     if (pNext_size)
5215     {
5216         to->pNext = (const void*)pool->alloc(pNext_size);
5217         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5218     }
5219 }
5220 
deepcopy_VkSwapchainCounterCreateInfoEXT(Pool * pool,const VkSwapchainCounterCreateInfoEXT * from,VkSwapchainCounterCreateInfoEXT * to)5221 void deepcopy_VkSwapchainCounterCreateInfoEXT(
5222     Pool* pool,
5223     const VkSwapchainCounterCreateInfoEXT* from,
5224     VkSwapchainCounterCreateInfoEXT* to)
5225 {
5226     (void)pool;
5227     *to = *from;
5228     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5229     to->pNext = nullptr;
5230     if (pNext_size)
5231     {
5232         to->pNext = (const void*)pool->alloc(pNext_size);
5233         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5234     }
5235 }
5236 
5237 #endif
5238 #ifdef VK_GOOGLE_display_timing
deepcopy_VkRefreshCycleDurationGOOGLE(Pool * pool,const VkRefreshCycleDurationGOOGLE * from,VkRefreshCycleDurationGOOGLE * to)5239 void deepcopy_VkRefreshCycleDurationGOOGLE(
5240     Pool* pool,
5241     const VkRefreshCycleDurationGOOGLE* from,
5242     VkRefreshCycleDurationGOOGLE* to)
5243 {
5244     (void)pool;
5245     *to = *from;
5246 }
5247 
deepcopy_VkPastPresentationTimingGOOGLE(Pool * pool,const VkPastPresentationTimingGOOGLE * from,VkPastPresentationTimingGOOGLE * to)5248 void deepcopy_VkPastPresentationTimingGOOGLE(
5249     Pool* pool,
5250     const VkPastPresentationTimingGOOGLE* from,
5251     VkPastPresentationTimingGOOGLE* to)
5252 {
5253     (void)pool;
5254     *to = *from;
5255 }
5256 
deepcopy_VkPresentTimeGOOGLE(Pool * pool,const VkPresentTimeGOOGLE * from,VkPresentTimeGOOGLE * to)5257 void deepcopy_VkPresentTimeGOOGLE(
5258     Pool* pool,
5259     const VkPresentTimeGOOGLE* from,
5260     VkPresentTimeGOOGLE* to)
5261 {
5262     (void)pool;
5263     *to = *from;
5264 }
5265 
deepcopy_VkPresentTimesInfoGOOGLE(Pool * pool,const VkPresentTimesInfoGOOGLE * from,VkPresentTimesInfoGOOGLE * to)5266 void deepcopy_VkPresentTimesInfoGOOGLE(
5267     Pool* pool,
5268     const VkPresentTimesInfoGOOGLE* from,
5269     VkPresentTimesInfoGOOGLE* to)
5270 {
5271     (void)pool;
5272     *to = *from;
5273     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5274     to->pNext = nullptr;
5275     if (pNext_size)
5276     {
5277         to->pNext = (const void*)pool->alloc(pNext_size);
5278         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5279     }
5280     to->pTimes = nullptr;
5281     if (from->pTimes)
5282     {
5283         to->pTimes = (VkPresentTimeGOOGLE*)pool->alloc(from->swapchainCount * sizeof(const VkPresentTimeGOOGLE));
5284         to->swapchainCount = from->swapchainCount;
5285         for (uint32_t i = 0; i < (uint32_t)from->swapchainCount; ++i)
5286         {
5287             deepcopy_VkPresentTimeGOOGLE(pool, from->pTimes + i, (VkPresentTimeGOOGLE*)(to->pTimes + i));
5288         }
5289     }
5290 }
5291 
5292 #endif
5293 #ifdef VK_NV_sample_mask_override_coverage
5294 #endif
5295 #ifdef VK_NV_geometry_shader_passthrough
5296 #endif
5297 #ifdef VK_NV_viewport_array2
5298 #endif
5299 #ifdef VK_NVX_multiview_per_view_attributes
deepcopy_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(Pool * pool,const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX * from,VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX * to)5300 void deepcopy_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(
5301     Pool* pool,
5302     const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* from,
5303     VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* to)
5304 {
5305     (void)pool;
5306     *to = *from;
5307     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5308     to->pNext = nullptr;
5309     if (pNext_size)
5310     {
5311         to->pNext = (void*)pool->alloc(pNext_size);
5312         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5313     }
5314 }
5315 
5316 #endif
5317 #ifdef VK_NV_viewport_swizzle
deepcopy_VkViewportSwizzleNV(Pool * pool,const VkViewportSwizzleNV * from,VkViewportSwizzleNV * to)5318 void deepcopy_VkViewportSwizzleNV(
5319     Pool* pool,
5320     const VkViewportSwizzleNV* from,
5321     VkViewportSwizzleNV* to)
5322 {
5323     (void)pool;
5324     *to = *from;
5325 }
5326 
deepcopy_VkPipelineViewportSwizzleStateCreateInfoNV(Pool * pool,const VkPipelineViewportSwizzleStateCreateInfoNV * from,VkPipelineViewportSwizzleStateCreateInfoNV * to)5327 void deepcopy_VkPipelineViewportSwizzleStateCreateInfoNV(
5328     Pool* pool,
5329     const VkPipelineViewportSwizzleStateCreateInfoNV* from,
5330     VkPipelineViewportSwizzleStateCreateInfoNV* to)
5331 {
5332     (void)pool;
5333     *to = *from;
5334     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5335     to->pNext = nullptr;
5336     if (pNext_size)
5337     {
5338         to->pNext = (const void*)pool->alloc(pNext_size);
5339         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5340     }
5341     to->pViewportSwizzles = nullptr;
5342     if (from->pViewportSwizzles)
5343     {
5344         to->pViewportSwizzles = (VkViewportSwizzleNV*)pool->alloc(from->viewportCount * sizeof(const VkViewportSwizzleNV));
5345         to->viewportCount = from->viewportCount;
5346         for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i)
5347         {
5348             deepcopy_VkViewportSwizzleNV(pool, from->pViewportSwizzles + i, (VkViewportSwizzleNV*)(to->pViewportSwizzles + i));
5349         }
5350     }
5351 }
5352 
5353 #endif
5354 #ifdef VK_EXT_discard_rectangles
deepcopy_VkPhysicalDeviceDiscardRectanglePropertiesEXT(Pool * pool,const VkPhysicalDeviceDiscardRectanglePropertiesEXT * from,VkPhysicalDeviceDiscardRectanglePropertiesEXT * to)5355 void deepcopy_VkPhysicalDeviceDiscardRectanglePropertiesEXT(
5356     Pool* pool,
5357     const VkPhysicalDeviceDiscardRectanglePropertiesEXT* from,
5358     VkPhysicalDeviceDiscardRectanglePropertiesEXT* to)
5359 {
5360     (void)pool;
5361     *to = *from;
5362     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5363     to->pNext = nullptr;
5364     if (pNext_size)
5365     {
5366         to->pNext = (void*)pool->alloc(pNext_size);
5367         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5368     }
5369 }
5370 
deepcopy_VkPipelineDiscardRectangleStateCreateInfoEXT(Pool * pool,const VkPipelineDiscardRectangleStateCreateInfoEXT * from,VkPipelineDiscardRectangleStateCreateInfoEXT * to)5371 void deepcopy_VkPipelineDiscardRectangleStateCreateInfoEXT(
5372     Pool* pool,
5373     const VkPipelineDiscardRectangleStateCreateInfoEXT* from,
5374     VkPipelineDiscardRectangleStateCreateInfoEXT* to)
5375 {
5376     (void)pool;
5377     *to = *from;
5378     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5379     to->pNext = nullptr;
5380     if (pNext_size)
5381     {
5382         to->pNext = (const void*)pool->alloc(pNext_size);
5383         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5384     }
5385     to->pDiscardRectangles = nullptr;
5386     if (from->pDiscardRectangles)
5387     {
5388         to->pDiscardRectangles = (VkRect2D*)pool->alloc(from->discardRectangleCount * sizeof(const VkRect2D));
5389         to->discardRectangleCount = from->discardRectangleCount;
5390         for (uint32_t i = 0; i < (uint32_t)from->discardRectangleCount; ++i)
5391         {
5392             deepcopy_VkRect2D(pool, from->pDiscardRectangles + i, (VkRect2D*)(to->pDiscardRectangles + i));
5393         }
5394     }
5395 }
5396 
5397 #endif
5398 #ifdef VK_EXT_conservative_rasterization
deepcopy_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(Pool * pool,const VkPhysicalDeviceConservativeRasterizationPropertiesEXT * from,VkPhysicalDeviceConservativeRasterizationPropertiesEXT * to)5399 void deepcopy_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(
5400     Pool* pool,
5401     const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* from,
5402     VkPhysicalDeviceConservativeRasterizationPropertiesEXT* to)
5403 {
5404     (void)pool;
5405     *to = *from;
5406     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5407     to->pNext = nullptr;
5408     if (pNext_size)
5409     {
5410         to->pNext = (void*)pool->alloc(pNext_size);
5411         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5412     }
5413 }
5414 
deepcopy_VkPipelineRasterizationConservativeStateCreateInfoEXT(Pool * pool,const VkPipelineRasterizationConservativeStateCreateInfoEXT * from,VkPipelineRasterizationConservativeStateCreateInfoEXT * to)5415 void deepcopy_VkPipelineRasterizationConservativeStateCreateInfoEXT(
5416     Pool* pool,
5417     const VkPipelineRasterizationConservativeStateCreateInfoEXT* from,
5418     VkPipelineRasterizationConservativeStateCreateInfoEXT* to)
5419 {
5420     (void)pool;
5421     *to = *from;
5422     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5423     to->pNext = nullptr;
5424     if (pNext_size)
5425     {
5426         to->pNext = (const void*)pool->alloc(pNext_size);
5427         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5428     }
5429 }
5430 
5431 #endif
5432 #ifdef VK_EXT_swapchain_colorspace
5433 #endif
5434 #ifdef VK_EXT_hdr_metadata
deepcopy_VkXYColorEXT(Pool * pool,const VkXYColorEXT * from,VkXYColorEXT * to)5435 void deepcopy_VkXYColorEXT(
5436     Pool* pool,
5437     const VkXYColorEXT* from,
5438     VkXYColorEXT* to)
5439 {
5440     (void)pool;
5441     *to = *from;
5442 }
5443 
deepcopy_VkHdrMetadataEXT(Pool * pool,const VkHdrMetadataEXT * from,VkHdrMetadataEXT * to)5444 void deepcopy_VkHdrMetadataEXT(
5445     Pool* pool,
5446     const VkHdrMetadataEXT* from,
5447     VkHdrMetadataEXT* to)
5448 {
5449     (void)pool;
5450     *to = *from;
5451     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5452     to->pNext = nullptr;
5453     if (pNext_size)
5454     {
5455         to->pNext = (const void*)pool->alloc(pNext_size);
5456         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5457     }
5458     deepcopy_VkXYColorEXT(pool, &from->displayPrimaryRed, (VkXYColorEXT*)(&to->displayPrimaryRed));
5459     deepcopy_VkXYColorEXT(pool, &from->displayPrimaryGreen, (VkXYColorEXT*)(&to->displayPrimaryGreen));
5460     deepcopy_VkXYColorEXT(pool, &from->displayPrimaryBlue, (VkXYColorEXT*)(&to->displayPrimaryBlue));
5461     deepcopy_VkXYColorEXT(pool, &from->whitePoint, (VkXYColorEXT*)(&to->whitePoint));
5462 }
5463 
5464 #endif
5465 #ifdef VK_MVK_ios_surface
deepcopy_VkIOSSurfaceCreateInfoMVK(Pool * pool,const VkIOSSurfaceCreateInfoMVK * from,VkIOSSurfaceCreateInfoMVK * to)5466 void deepcopy_VkIOSSurfaceCreateInfoMVK(
5467     Pool* pool,
5468     const VkIOSSurfaceCreateInfoMVK* from,
5469     VkIOSSurfaceCreateInfoMVK* to)
5470 {
5471     (void)pool;
5472     *to = *from;
5473     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5474     to->pNext = nullptr;
5475     if (pNext_size)
5476     {
5477         to->pNext = (const void*)pool->alloc(pNext_size);
5478         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5479     }
5480     to->pView = nullptr;
5481     if (from->pView)
5482     {
5483         to->pView = (void*)pool->dupArray(from->pView, sizeof(const uint8_t));
5484     }
5485 }
5486 
5487 #endif
5488 #ifdef VK_MVK_macos_surface
deepcopy_VkMacOSSurfaceCreateInfoMVK(Pool * pool,const VkMacOSSurfaceCreateInfoMVK * from,VkMacOSSurfaceCreateInfoMVK * to)5489 void deepcopy_VkMacOSSurfaceCreateInfoMVK(
5490     Pool* pool,
5491     const VkMacOSSurfaceCreateInfoMVK* from,
5492     VkMacOSSurfaceCreateInfoMVK* to)
5493 {
5494     (void)pool;
5495     *to = *from;
5496     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5497     to->pNext = nullptr;
5498     if (pNext_size)
5499     {
5500         to->pNext = (const void*)pool->alloc(pNext_size);
5501         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5502     }
5503     to->pView = nullptr;
5504     if (from->pView)
5505     {
5506         to->pView = (void*)pool->dupArray(from->pView, sizeof(const uint8_t));
5507     }
5508 }
5509 
5510 #endif
5511 #ifdef VK_EXT_external_memory_dma_buf
5512 #endif
5513 #ifdef VK_EXT_queue_family_foreign
5514 #endif
5515 #ifdef VK_EXT_debug_utils
deepcopy_VkDebugUtilsObjectNameInfoEXT(Pool * pool,const VkDebugUtilsObjectNameInfoEXT * from,VkDebugUtilsObjectNameInfoEXT * to)5516 void deepcopy_VkDebugUtilsObjectNameInfoEXT(
5517     Pool* pool,
5518     const VkDebugUtilsObjectNameInfoEXT* from,
5519     VkDebugUtilsObjectNameInfoEXT* to)
5520 {
5521     (void)pool;
5522     *to = *from;
5523     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5524     to->pNext = nullptr;
5525     if (pNext_size)
5526     {
5527         to->pNext = (const void*)pool->alloc(pNext_size);
5528         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5529     }
5530     to->pObjectName = nullptr;
5531     if (from->pObjectName)
5532     {
5533         to->pObjectName = pool->strDup(from->pObjectName);
5534     }
5535 }
5536 
deepcopy_VkDebugUtilsObjectTagInfoEXT(Pool * pool,const VkDebugUtilsObjectTagInfoEXT * from,VkDebugUtilsObjectTagInfoEXT * to)5537 void deepcopy_VkDebugUtilsObjectTagInfoEXT(
5538     Pool* pool,
5539     const VkDebugUtilsObjectTagInfoEXT* from,
5540     VkDebugUtilsObjectTagInfoEXT* to)
5541 {
5542     (void)pool;
5543     *to = *from;
5544     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5545     to->pNext = nullptr;
5546     if (pNext_size)
5547     {
5548         to->pNext = (const void*)pool->alloc(pNext_size);
5549         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5550     }
5551     to->pTag = nullptr;
5552     if (from->pTag)
5553     {
5554         to->pTag = (void*)pool->dupArray(from->pTag, from->tagSize * sizeof(const uint8_t));
5555     }
5556 }
5557 
deepcopy_VkDebugUtilsLabelEXT(Pool * pool,const VkDebugUtilsLabelEXT * from,VkDebugUtilsLabelEXT * to)5558 void deepcopy_VkDebugUtilsLabelEXT(
5559     Pool* pool,
5560     const VkDebugUtilsLabelEXT* from,
5561     VkDebugUtilsLabelEXT* to)
5562 {
5563     (void)pool;
5564     *to = *from;
5565     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5566     to->pNext = nullptr;
5567     if (pNext_size)
5568     {
5569         to->pNext = (const void*)pool->alloc(pNext_size);
5570         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5571     }
5572     to->pLabelName = nullptr;
5573     if (from->pLabelName)
5574     {
5575         to->pLabelName = pool->strDup(from->pLabelName);
5576     }
5577     memcpy(to->color, from->color, 4 * sizeof(float));
5578 }
5579 
deepcopy_VkDebugUtilsMessengerCallbackDataEXT(Pool * pool,const VkDebugUtilsMessengerCallbackDataEXT * from,VkDebugUtilsMessengerCallbackDataEXT * to)5580 void deepcopy_VkDebugUtilsMessengerCallbackDataEXT(
5581     Pool* pool,
5582     const VkDebugUtilsMessengerCallbackDataEXT* from,
5583     VkDebugUtilsMessengerCallbackDataEXT* to)
5584 {
5585     (void)pool;
5586     *to = *from;
5587     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5588     to->pNext = nullptr;
5589     if (pNext_size)
5590     {
5591         to->pNext = (const void*)pool->alloc(pNext_size);
5592         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5593     }
5594     to->pMessageIdName = nullptr;
5595     if (from->pMessageIdName)
5596     {
5597         to->pMessageIdName = pool->strDup(from->pMessageIdName);
5598     }
5599     to->pMessage = nullptr;
5600     if (from->pMessage)
5601     {
5602         to->pMessage = pool->strDup(from->pMessage);
5603     }
5604     to->pQueueLabels = nullptr;
5605     if (from->pQueueLabels)
5606     {
5607         to->pQueueLabels = (VkDebugUtilsLabelEXT*)pool->alloc(from->queueLabelCount * sizeof(VkDebugUtilsLabelEXT));
5608         to->queueLabelCount = from->queueLabelCount;
5609         for (uint32_t i = 0; i < (uint32_t)from->queueLabelCount; ++i)
5610         {
5611             deepcopy_VkDebugUtilsLabelEXT(pool, from->pQueueLabels + i, (VkDebugUtilsLabelEXT*)(to->pQueueLabels + i));
5612         }
5613     }
5614     to->pCmdBufLabels = nullptr;
5615     if (from->pCmdBufLabels)
5616     {
5617         to->pCmdBufLabels = (VkDebugUtilsLabelEXT*)pool->alloc(from->cmdBufLabelCount * sizeof(VkDebugUtilsLabelEXT));
5618         to->cmdBufLabelCount = from->cmdBufLabelCount;
5619         for (uint32_t i = 0; i < (uint32_t)from->cmdBufLabelCount; ++i)
5620         {
5621             deepcopy_VkDebugUtilsLabelEXT(pool, from->pCmdBufLabels + i, (VkDebugUtilsLabelEXT*)(to->pCmdBufLabels + i));
5622         }
5623     }
5624     to->pObjects = nullptr;
5625     if (from->pObjects)
5626     {
5627         to->pObjects = (VkDebugUtilsObjectNameInfoEXT*)pool->alloc(from->objectCount * sizeof(VkDebugUtilsObjectNameInfoEXT));
5628         to->objectCount = from->objectCount;
5629         for (uint32_t i = 0; i < (uint32_t)from->objectCount; ++i)
5630         {
5631             deepcopy_VkDebugUtilsObjectNameInfoEXT(pool, from->pObjects + i, (VkDebugUtilsObjectNameInfoEXT*)(to->pObjects + i));
5632         }
5633     }
5634 }
5635 
deepcopy_VkDebugUtilsMessengerCreateInfoEXT(Pool * pool,const VkDebugUtilsMessengerCreateInfoEXT * from,VkDebugUtilsMessengerCreateInfoEXT * to)5636 void deepcopy_VkDebugUtilsMessengerCreateInfoEXT(
5637     Pool* pool,
5638     const VkDebugUtilsMessengerCreateInfoEXT* from,
5639     VkDebugUtilsMessengerCreateInfoEXT* to)
5640 {
5641     (void)pool;
5642     *to = *from;
5643     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5644     to->pNext = nullptr;
5645     if (pNext_size)
5646     {
5647         to->pNext = (const void*)pool->alloc(pNext_size);
5648         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5649     }
5650     to->pUserData = nullptr;
5651     if (from->pUserData)
5652     {
5653         to->pUserData = (void*)pool->dupArray(from->pUserData, sizeof(uint8_t));
5654     }
5655 }
5656 
5657 #endif
5658 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
deepcopy_VkAndroidHardwareBufferUsageANDROID(Pool * pool,const VkAndroidHardwareBufferUsageANDROID * from,VkAndroidHardwareBufferUsageANDROID * to)5659 void deepcopy_VkAndroidHardwareBufferUsageANDROID(
5660     Pool* pool,
5661     const VkAndroidHardwareBufferUsageANDROID* from,
5662     VkAndroidHardwareBufferUsageANDROID* to)
5663 {
5664     (void)pool;
5665     *to = *from;
5666     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5667     to->pNext = nullptr;
5668     if (pNext_size)
5669     {
5670         to->pNext = (void*)pool->alloc(pNext_size);
5671         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5672     }
5673 }
5674 
deepcopy_VkAndroidHardwareBufferPropertiesANDROID(Pool * pool,const VkAndroidHardwareBufferPropertiesANDROID * from,VkAndroidHardwareBufferPropertiesANDROID * to)5675 void deepcopy_VkAndroidHardwareBufferPropertiesANDROID(
5676     Pool* pool,
5677     const VkAndroidHardwareBufferPropertiesANDROID* from,
5678     VkAndroidHardwareBufferPropertiesANDROID* to)
5679 {
5680     (void)pool;
5681     *to = *from;
5682     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5683     to->pNext = nullptr;
5684     if (pNext_size)
5685     {
5686         to->pNext = (void*)pool->alloc(pNext_size);
5687         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5688     }
5689 }
5690 
deepcopy_VkAndroidHardwareBufferFormatPropertiesANDROID(Pool * pool,const VkAndroidHardwareBufferFormatPropertiesANDROID * from,VkAndroidHardwareBufferFormatPropertiesANDROID * to)5691 void deepcopy_VkAndroidHardwareBufferFormatPropertiesANDROID(
5692     Pool* pool,
5693     const VkAndroidHardwareBufferFormatPropertiesANDROID* from,
5694     VkAndroidHardwareBufferFormatPropertiesANDROID* to)
5695 {
5696     (void)pool;
5697     *to = *from;
5698     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5699     to->pNext = nullptr;
5700     if (pNext_size)
5701     {
5702         to->pNext = (void*)pool->alloc(pNext_size);
5703         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5704     }
5705     deepcopy_VkComponentMapping(pool, &from->samplerYcbcrConversionComponents, (VkComponentMapping*)(&to->samplerYcbcrConversionComponents));
5706 }
5707 
deepcopy_VkImportAndroidHardwareBufferInfoANDROID(Pool * pool,const VkImportAndroidHardwareBufferInfoANDROID * from,VkImportAndroidHardwareBufferInfoANDROID * to)5708 void deepcopy_VkImportAndroidHardwareBufferInfoANDROID(
5709     Pool* pool,
5710     const VkImportAndroidHardwareBufferInfoANDROID* from,
5711     VkImportAndroidHardwareBufferInfoANDROID* to)
5712 {
5713     (void)pool;
5714     *to = *from;
5715     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5716     to->pNext = nullptr;
5717     if (pNext_size)
5718     {
5719         to->pNext = (const void*)pool->alloc(pNext_size);
5720         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5721     }
5722     to->buffer = nullptr;
5723     if (from->buffer)
5724     {
5725         to->buffer = (AHardwareBuffer*)pool->dupArray(from->buffer, sizeof(AHardwareBuffer));
5726     }
5727 }
5728 
deepcopy_VkMemoryGetAndroidHardwareBufferInfoANDROID(Pool * pool,const VkMemoryGetAndroidHardwareBufferInfoANDROID * from,VkMemoryGetAndroidHardwareBufferInfoANDROID * to)5729 void deepcopy_VkMemoryGetAndroidHardwareBufferInfoANDROID(
5730     Pool* pool,
5731     const VkMemoryGetAndroidHardwareBufferInfoANDROID* from,
5732     VkMemoryGetAndroidHardwareBufferInfoANDROID* to)
5733 {
5734     (void)pool;
5735     *to = *from;
5736     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5737     to->pNext = nullptr;
5738     if (pNext_size)
5739     {
5740         to->pNext = (const void*)pool->alloc(pNext_size);
5741         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5742     }
5743 }
5744 
deepcopy_VkExternalFormatANDROID(Pool * pool,const VkExternalFormatANDROID * from,VkExternalFormatANDROID * to)5745 void deepcopy_VkExternalFormatANDROID(
5746     Pool* pool,
5747     const VkExternalFormatANDROID* from,
5748     VkExternalFormatANDROID* to)
5749 {
5750     (void)pool;
5751     *to = *from;
5752     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5753     to->pNext = nullptr;
5754     if (pNext_size)
5755     {
5756         to->pNext = (void*)pool->alloc(pNext_size);
5757         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5758     }
5759 }
5760 
5761 #endif
5762 #ifdef VK_EXT_sampler_filter_minmax
deepcopy_VkSamplerReductionModeCreateInfoEXT(Pool * pool,const VkSamplerReductionModeCreateInfoEXT * from,VkSamplerReductionModeCreateInfoEXT * to)5763 void deepcopy_VkSamplerReductionModeCreateInfoEXT(
5764     Pool* pool,
5765     const VkSamplerReductionModeCreateInfoEXT* from,
5766     VkSamplerReductionModeCreateInfoEXT* to)
5767 {
5768     (void)pool;
5769     *to = *from;
5770     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5771     to->pNext = nullptr;
5772     if (pNext_size)
5773     {
5774         to->pNext = (const void*)pool->alloc(pNext_size);
5775         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5776     }
5777 }
5778 
deepcopy_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(Pool * pool,const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT * from,VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT * to)5779 void deepcopy_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(
5780     Pool* pool,
5781     const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* from,
5782     VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* to)
5783 {
5784     (void)pool;
5785     *to = *from;
5786     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5787     to->pNext = nullptr;
5788     if (pNext_size)
5789     {
5790         to->pNext = (void*)pool->alloc(pNext_size);
5791         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5792     }
5793 }
5794 
5795 #endif
5796 #ifdef VK_AMD_gpu_shader_int16
5797 #endif
5798 #ifdef VK_AMD_mixed_attachment_samples
5799 #endif
5800 #ifdef VK_AMD_shader_fragment_mask
5801 #endif
5802 #ifdef VK_EXT_shader_stencil_export
5803 #endif
5804 #ifdef VK_EXT_sample_locations
deepcopy_VkSampleLocationEXT(Pool * pool,const VkSampleLocationEXT * from,VkSampleLocationEXT * to)5805 void deepcopy_VkSampleLocationEXT(
5806     Pool* pool,
5807     const VkSampleLocationEXT* from,
5808     VkSampleLocationEXT* to)
5809 {
5810     (void)pool;
5811     *to = *from;
5812 }
5813 
deepcopy_VkSampleLocationsInfoEXT(Pool * pool,const VkSampleLocationsInfoEXT * from,VkSampleLocationsInfoEXT * to)5814 void deepcopy_VkSampleLocationsInfoEXT(
5815     Pool* pool,
5816     const VkSampleLocationsInfoEXT* from,
5817     VkSampleLocationsInfoEXT* to)
5818 {
5819     (void)pool;
5820     *to = *from;
5821     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5822     to->pNext = nullptr;
5823     if (pNext_size)
5824     {
5825         to->pNext = (const void*)pool->alloc(pNext_size);
5826         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5827     }
5828     deepcopy_VkExtent2D(pool, &from->sampleLocationGridSize, (VkExtent2D*)(&to->sampleLocationGridSize));
5829     to->pSampleLocations = nullptr;
5830     if (from->pSampleLocations)
5831     {
5832         to->pSampleLocations = (VkSampleLocationEXT*)pool->alloc(from->sampleLocationsCount * sizeof(const VkSampleLocationEXT));
5833         to->sampleLocationsCount = from->sampleLocationsCount;
5834         for (uint32_t i = 0; i < (uint32_t)from->sampleLocationsCount; ++i)
5835         {
5836             deepcopy_VkSampleLocationEXT(pool, from->pSampleLocations + i, (VkSampleLocationEXT*)(to->pSampleLocations + i));
5837         }
5838     }
5839 }
5840 
deepcopy_VkAttachmentSampleLocationsEXT(Pool * pool,const VkAttachmentSampleLocationsEXT * from,VkAttachmentSampleLocationsEXT * to)5841 void deepcopy_VkAttachmentSampleLocationsEXT(
5842     Pool* pool,
5843     const VkAttachmentSampleLocationsEXT* from,
5844     VkAttachmentSampleLocationsEXT* to)
5845 {
5846     (void)pool;
5847     *to = *from;
5848     deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
5849 }
5850 
deepcopy_VkSubpassSampleLocationsEXT(Pool * pool,const VkSubpassSampleLocationsEXT * from,VkSubpassSampleLocationsEXT * to)5851 void deepcopy_VkSubpassSampleLocationsEXT(
5852     Pool* pool,
5853     const VkSubpassSampleLocationsEXT* from,
5854     VkSubpassSampleLocationsEXT* to)
5855 {
5856     (void)pool;
5857     *to = *from;
5858     deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
5859 }
5860 
deepcopy_VkRenderPassSampleLocationsBeginInfoEXT(Pool * pool,const VkRenderPassSampleLocationsBeginInfoEXT * from,VkRenderPassSampleLocationsBeginInfoEXT * to)5861 void deepcopy_VkRenderPassSampleLocationsBeginInfoEXT(
5862     Pool* pool,
5863     const VkRenderPassSampleLocationsBeginInfoEXT* from,
5864     VkRenderPassSampleLocationsBeginInfoEXT* to)
5865 {
5866     (void)pool;
5867     *to = *from;
5868     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5869     to->pNext = nullptr;
5870     if (pNext_size)
5871     {
5872         to->pNext = (const void*)pool->alloc(pNext_size);
5873         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5874     }
5875     to->pAttachmentInitialSampleLocations = nullptr;
5876     if (from->pAttachmentInitialSampleLocations)
5877     {
5878         to->pAttachmentInitialSampleLocations = (VkAttachmentSampleLocationsEXT*)pool->alloc(from->attachmentInitialSampleLocationsCount * sizeof(const VkAttachmentSampleLocationsEXT));
5879         to->attachmentInitialSampleLocationsCount = from->attachmentInitialSampleLocationsCount;
5880         for (uint32_t i = 0; i < (uint32_t)from->attachmentInitialSampleLocationsCount; ++i)
5881         {
5882             deepcopy_VkAttachmentSampleLocationsEXT(pool, from->pAttachmentInitialSampleLocations + i, (VkAttachmentSampleLocationsEXT*)(to->pAttachmentInitialSampleLocations + i));
5883         }
5884     }
5885     to->pPostSubpassSampleLocations = nullptr;
5886     if (from->pPostSubpassSampleLocations)
5887     {
5888         to->pPostSubpassSampleLocations = (VkSubpassSampleLocationsEXT*)pool->alloc(from->postSubpassSampleLocationsCount * sizeof(const VkSubpassSampleLocationsEXT));
5889         to->postSubpassSampleLocationsCount = from->postSubpassSampleLocationsCount;
5890         for (uint32_t i = 0; i < (uint32_t)from->postSubpassSampleLocationsCount; ++i)
5891         {
5892             deepcopy_VkSubpassSampleLocationsEXT(pool, from->pPostSubpassSampleLocations + i, (VkSubpassSampleLocationsEXT*)(to->pPostSubpassSampleLocations + i));
5893         }
5894     }
5895 }
5896 
deepcopy_VkPipelineSampleLocationsStateCreateInfoEXT(Pool * pool,const VkPipelineSampleLocationsStateCreateInfoEXT * from,VkPipelineSampleLocationsStateCreateInfoEXT * to)5897 void deepcopy_VkPipelineSampleLocationsStateCreateInfoEXT(
5898     Pool* pool,
5899     const VkPipelineSampleLocationsStateCreateInfoEXT* from,
5900     VkPipelineSampleLocationsStateCreateInfoEXT* to)
5901 {
5902     (void)pool;
5903     *to = *from;
5904     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5905     to->pNext = nullptr;
5906     if (pNext_size)
5907     {
5908         to->pNext = (const void*)pool->alloc(pNext_size);
5909         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5910     }
5911     deepcopy_VkSampleLocationsInfoEXT(pool, &from->sampleLocationsInfo, (VkSampleLocationsInfoEXT*)(&to->sampleLocationsInfo));
5912 }
5913 
deepcopy_VkPhysicalDeviceSampleLocationsPropertiesEXT(Pool * pool,const VkPhysicalDeviceSampleLocationsPropertiesEXT * from,VkPhysicalDeviceSampleLocationsPropertiesEXT * to)5914 void deepcopy_VkPhysicalDeviceSampleLocationsPropertiesEXT(
5915     Pool* pool,
5916     const VkPhysicalDeviceSampleLocationsPropertiesEXT* from,
5917     VkPhysicalDeviceSampleLocationsPropertiesEXT* to)
5918 {
5919     (void)pool;
5920     *to = *from;
5921     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5922     to->pNext = nullptr;
5923     if (pNext_size)
5924     {
5925         to->pNext = (void*)pool->alloc(pNext_size);
5926         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5927     }
5928     deepcopy_VkExtent2D(pool, &from->maxSampleLocationGridSize, (VkExtent2D*)(&to->maxSampleLocationGridSize));
5929     memcpy(to->sampleLocationCoordinateRange, from->sampleLocationCoordinateRange, 2 * sizeof(float));
5930 }
5931 
deepcopy_VkMultisamplePropertiesEXT(Pool * pool,const VkMultisamplePropertiesEXT * from,VkMultisamplePropertiesEXT * to)5932 void deepcopy_VkMultisamplePropertiesEXT(
5933     Pool* pool,
5934     const VkMultisamplePropertiesEXT* from,
5935     VkMultisamplePropertiesEXT* to)
5936 {
5937     (void)pool;
5938     *to = *from;
5939     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5940     to->pNext = nullptr;
5941     if (pNext_size)
5942     {
5943         to->pNext = (void*)pool->alloc(pNext_size);
5944         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5945     }
5946     deepcopy_VkExtent2D(pool, &from->maxSampleLocationGridSize, (VkExtent2D*)(&to->maxSampleLocationGridSize));
5947 }
5948 
5949 #endif
5950 #ifdef VK_EXT_blend_operation_advanced
deepcopy_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(Pool * pool,const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT * from,VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT * to)5951 void deepcopy_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(
5952     Pool* pool,
5953     const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* from,
5954     VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* to)
5955 {
5956     (void)pool;
5957     *to = *from;
5958     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5959     to->pNext = nullptr;
5960     if (pNext_size)
5961     {
5962         to->pNext = (void*)pool->alloc(pNext_size);
5963         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5964     }
5965 }
5966 
deepcopy_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(Pool * pool,const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT * from,VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT * to)5967 void deepcopy_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(
5968     Pool* pool,
5969     const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* from,
5970     VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* to)
5971 {
5972     (void)pool;
5973     *to = *from;
5974     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5975     to->pNext = nullptr;
5976     if (pNext_size)
5977     {
5978         to->pNext = (void*)pool->alloc(pNext_size);
5979         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5980     }
5981 }
5982 
deepcopy_VkPipelineColorBlendAdvancedStateCreateInfoEXT(Pool * pool,const VkPipelineColorBlendAdvancedStateCreateInfoEXT * from,VkPipelineColorBlendAdvancedStateCreateInfoEXT * to)5983 void deepcopy_VkPipelineColorBlendAdvancedStateCreateInfoEXT(
5984     Pool* pool,
5985     const VkPipelineColorBlendAdvancedStateCreateInfoEXT* from,
5986     VkPipelineColorBlendAdvancedStateCreateInfoEXT* to)
5987 {
5988     (void)pool;
5989     *to = *from;
5990     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
5991     to->pNext = nullptr;
5992     if (pNext_size)
5993     {
5994         to->pNext = (const void*)pool->alloc(pNext_size);
5995         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
5996     }
5997 }
5998 
5999 #endif
6000 #ifdef VK_NV_fragment_coverage_to_color
deepcopy_VkPipelineCoverageToColorStateCreateInfoNV(Pool * pool,const VkPipelineCoverageToColorStateCreateInfoNV * from,VkPipelineCoverageToColorStateCreateInfoNV * to)6001 void deepcopy_VkPipelineCoverageToColorStateCreateInfoNV(
6002     Pool* pool,
6003     const VkPipelineCoverageToColorStateCreateInfoNV* from,
6004     VkPipelineCoverageToColorStateCreateInfoNV* to)
6005 {
6006     (void)pool;
6007     *to = *from;
6008     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6009     to->pNext = nullptr;
6010     if (pNext_size)
6011     {
6012         to->pNext = (const void*)pool->alloc(pNext_size);
6013         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6014     }
6015 }
6016 
6017 #endif
6018 #ifdef VK_NV_framebuffer_mixed_samples
deepcopy_VkPipelineCoverageModulationStateCreateInfoNV(Pool * pool,const VkPipelineCoverageModulationStateCreateInfoNV * from,VkPipelineCoverageModulationStateCreateInfoNV * to)6019 void deepcopy_VkPipelineCoverageModulationStateCreateInfoNV(
6020     Pool* pool,
6021     const VkPipelineCoverageModulationStateCreateInfoNV* from,
6022     VkPipelineCoverageModulationStateCreateInfoNV* to)
6023 {
6024     (void)pool;
6025     *to = *from;
6026     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6027     to->pNext = nullptr;
6028     if (pNext_size)
6029     {
6030         to->pNext = (const void*)pool->alloc(pNext_size);
6031         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6032     }
6033     to->pCoverageModulationTable = nullptr;
6034     if (from->pCoverageModulationTable)
6035     {
6036         to->pCoverageModulationTable = (float*)pool->dupArray(from->pCoverageModulationTable, from->coverageModulationTableCount * sizeof(const float));
6037     }
6038 }
6039 
6040 #endif
6041 #ifdef VK_NV_fill_rectangle
6042 #endif
6043 #ifdef VK_EXT_post_depth_coverage
6044 #endif
6045 #ifdef VK_EXT_validation_cache
deepcopy_VkValidationCacheCreateInfoEXT(Pool * pool,const VkValidationCacheCreateInfoEXT * from,VkValidationCacheCreateInfoEXT * to)6046 void deepcopy_VkValidationCacheCreateInfoEXT(
6047     Pool* pool,
6048     const VkValidationCacheCreateInfoEXT* from,
6049     VkValidationCacheCreateInfoEXT* to)
6050 {
6051     (void)pool;
6052     *to = *from;
6053     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6054     to->pNext = nullptr;
6055     if (pNext_size)
6056     {
6057         to->pNext = (const void*)pool->alloc(pNext_size);
6058         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6059     }
6060     to->pInitialData = nullptr;
6061     if (from->pInitialData)
6062     {
6063         to->pInitialData = (void*)pool->dupArray(from->pInitialData, from->initialDataSize * sizeof(const uint8_t));
6064     }
6065 }
6066 
deepcopy_VkShaderModuleValidationCacheCreateInfoEXT(Pool * pool,const VkShaderModuleValidationCacheCreateInfoEXT * from,VkShaderModuleValidationCacheCreateInfoEXT * to)6067 void deepcopy_VkShaderModuleValidationCacheCreateInfoEXT(
6068     Pool* pool,
6069     const VkShaderModuleValidationCacheCreateInfoEXT* from,
6070     VkShaderModuleValidationCacheCreateInfoEXT* to)
6071 {
6072     (void)pool;
6073     *to = *from;
6074     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6075     to->pNext = nullptr;
6076     if (pNext_size)
6077     {
6078         to->pNext = (const void*)pool->alloc(pNext_size);
6079         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6080     }
6081 }
6082 
6083 #endif
6084 #ifdef VK_EXT_descriptor_indexing
deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(Pool * pool,const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT * from,VkDescriptorSetLayoutBindingFlagsCreateInfoEXT * to)6085 void deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(
6086     Pool* pool,
6087     const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* from,
6088     VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* to)
6089 {
6090     (void)pool;
6091     *to = *from;
6092     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6093     to->pNext = nullptr;
6094     if (pNext_size)
6095     {
6096         to->pNext = (const void*)pool->alloc(pNext_size);
6097         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6098     }
6099     to->pBindingFlags = nullptr;
6100     if (from->pBindingFlags)
6101     {
6102         to->pBindingFlags = (VkDescriptorBindingFlagsEXT*)pool->dupArray(from->pBindingFlags, from->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT));
6103     }
6104 }
6105 
deepcopy_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(Pool * pool,const VkPhysicalDeviceDescriptorIndexingFeaturesEXT * from,VkPhysicalDeviceDescriptorIndexingFeaturesEXT * to)6106 void deepcopy_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(
6107     Pool* pool,
6108     const VkPhysicalDeviceDescriptorIndexingFeaturesEXT* from,
6109     VkPhysicalDeviceDescriptorIndexingFeaturesEXT* to)
6110 {
6111     (void)pool;
6112     *to = *from;
6113     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6114     to->pNext = nullptr;
6115     if (pNext_size)
6116     {
6117         to->pNext = (void*)pool->alloc(pNext_size);
6118         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6119     }
6120 }
6121 
deepcopy_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(Pool * pool,const VkPhysicalDeviceDescriptorIndexingPropertiesEXT * from,VkPhysicalDeviceDescriptorIndexingPropertiesEXT * to)6122 void deepcopy_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(
6123     Pool* pool,
6124     const VkPhysicalDeviceDescriptorIndexingPropertiesEXT* from,
6125     VkPhysicalDeviceDescriptorIndexingPropertiesEXT* to)
6126 {
6127     (void)pool;
6128     *to = *from;
6129     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6130     to->pNext = nullptr;
6131     if (pNext_size)
6132     {
6133         to->pNext = (void*)pool->alloc(pNext_size);
6134         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6135     }
6136 }
6137 
deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(Pool * pool,const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT * from,VkDescriptorSetVariableDescriptorCountAllocateInfoEXT * to)6138 void deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(
6139     Pool* pool,
6140     const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* from,
6141     VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* to)
6142 {
6143     (void)pool;
6144     *to = *from;
6145     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6146     to->pNext = nullptr;
6147     if (pNext_size)
6148     {
6149         to->pNext = (const void*)pool->alloc(pNext_size);
6150         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6151     }
6152     to->pDescriptorCounts = nullptr;
6153     if (from->pDescriptorCounts)
6154     {
6155         to->pDescriptorCounts = (uint32_t*)pool->dupArray(from->pDescriptorCounts, from->descriptorSetCount * sizeof(const uint32_t));
6156     }
6157 }
6158 
deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(Pool * pool,const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT * from,VkDescriptorSetVariableDescriptorCountLayoutSupportEXT * to)6159 void deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(
6160     Pool* pool,
6161     const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* from,
6162     VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* to)
6163 {
6164     (void)pool;
6165     *to = *from;
6166     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6167     to->pNext = nullptr;
6168     if (pNext_size)
6169     {
6170         to->pNext = (void*)pool->alloc(pNext_size);
6171         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6172     }
6173 }
6174 
6175 #endif
6176 #ifdef VK_EXT_shader_viewport_index_layer
6177 #endif
6178 #ifdef VK_EXT_global_priority
deepcopy_VkDeviceQueueGlobalPriorityCreateInfoEXT(Pool * pool,const VkDeviceQueueGlobalPriorityCreateInfoEXT * from,VkDeviceQueueGlobalPriorityCreateInfoEXT * to)6179 void deepcopy_VkDeviceQueueGlobalPriorityCreateInfoEXT(
6180     Pool* pool,
6181     const VkDeviceQueueGlobalPriorityCreateInfoEXT* from,
6182     VkDeviceQueueGlobalPriorityCreateInfoEXT* to)
6183 {
6184     (void)pool;
6185     *to = *from;
6186     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6187     to->pNext = nullptr;
6188     if (pNext_size)
6189     {
6190         to->pNext = (const void*)pool->alloc(pNext_size);
6191         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6192     }
6193 }
6194 
6195 #endif
6196 #ifdef VK_EXT_external_memory_host
deepcopy_VkImportMemoryHostPointerInfoEXT(Pool * pool,const VkImportMemoryHostPointerInfoEXT * from,VkImportMemoryHostPointerInfoEXT * to)6197 void deepcopy_VkImportMemoryHostPointerInfoEXT(
6198     Pool* pool,
6199     const VkImportMemoryHostPointerInfoEXT* from,
6200     VkImportMemoryHostPointerInfoEXT* to)
6201 {
6202     (void)pool;
6203     *to = *from;
6204     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6205     to->pNext = nullptr;
6206     if (pNext_size)
6207     {
6208         to->pNext = (const void*)pool->alloc(pNext_size);
6209         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6210     }
6211     to->pHostPointer = nullptr;
6212     if (from->pHostPointer)
6213     {
6214         to->pHostPointer = (void*)pool->dupArray(from->pHostPointer, sizeof(uint8_t));
6215     }
6216 }
6217 
deepcopy_VkMemoryHostPointerPropertiesEXT(Pool * pool,const VkMemoryHostPointerPropertiesEXT * from,VkMemoryHostPointerPropertiesEXT * to)6218 void deepcopy_VkMemoryHostPointerPropertiesEXT(
6219     Pool* pool,
6220     const VkMemoryHostPointerPropertiesEXT* from,
6221     VkMemoryHostPointerPropertiesEXT* to)
6222 {
6223     (void)pool;
6224     *to = *from;
6225     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6226     to->pNext = nullptr;
6227     if (pNext_size)
6228     {
6229         to->pNext = (void*)pool->alloc(pNext_size);
6230         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6231     }
6232 }
6233 
deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(Pool * pool,const VkPhysicalDeviceExternalMemoryHostPropertiesEXT * from,VkPhysicalDeviceExternalMemoryHostPropertiesEXT * to)6234 void deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
6235     Pool* pool,
6236     const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* from,
6237     VkPhysicalDeviceExternalMemoryHostPropertiesEXT* to)
6238 {
6239     (void)pool;
6240     *to = *from;
6241     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6242     to->pNext = nullptr;
6243     if (pNext_size)
6244     {
6245         to->pNext = (void*)pool->alloc(pNext_size);
6246         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6247     }
6248 }
6249 
6250 #endif
6251 #ifdef VK_AMD_buffer_marker
6252 #endif
6253 #ifdef VK_AMD_shader_core_properties
deepcopy_VkPhysicalDeviceShaderCorePropertiesAMD(Pool * pool,const VkPhysicalDeviceShaderCorePropertiesAMD * from,VkPhysicalDeviceShaderCorePropertiesAMD * to)6254 void deepcopy_VkPhysicalDeviceShaderCorePropertiesAMD(
6255     Pool* pool,
6256     const VkPhysicalDeviceShaderCorePropertiesAMD* from,
6257     VkPhysicalDeviceShaderCorePropertiesAMD* to)
6258 {
6259     (void)pool;
6260     *to = *from;
6261     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6262     to->pNext = nullptr;
6263     if (pNext_size)
6264     {
6265         to->pNext = (void*)pool->alloc(pNext_size);
6266         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6267     }
6268 }
6269 
6270 #endif
6271 #ifdef VK_EXT_vertex_attribute_divisor
deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(Pool * pool,const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * from,VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * to)6272 void deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
6273     Pool* pool,
6274     const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* from,
6275     VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* to)
6276 {
6277     (void)pool;
6278     *to = *from;
6279     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6280     to->pNext = nullptr;
6281     if (pNext_size)
6282     {
6283         to->pNext = (void*)pool->alloc(pNext_size);
6284         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6285     }
6286 }
6287 
deepcopy_VkVertexInputBindingDivisorDescriptionEXT(Pool * pool,const VkVertexInputBindingDivisorDescriptionEXT * from,VkVertexInputBindingDivisorDescriptionEXT * to)6288 void deepcopy_VkVertexInputBindingDivisorDescriptionEXT(
6289     Pool* pool,
6290     const VkVertexInputBindingDivisorDescriptionEXT* from,
6291     VkVertexInputBindingDivisorDescriptionEXT* to)
6292 {
6293     (void)pool;
6294     *to = *from;
6295 }
6296 
deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(Pool * pool,const VkPipelineVertexInputDivisorStateCreateInfoEXT * from,VkPipelineVertexInputDivisorStateCreateInfoEXT * to)6297 void deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(
6298     Pool* pool,
6299     const VkPipelineVertexInputDivisorStateCreateInfoEXT* from,
6300     VkPipelineVertexInputDivisorStateCreateInfoEXT* to)
6301 {
6302     (void)pool;
6303     *to = *from;
6304     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6305     to->pNext = nullptr;
6306     if (pNext_size)
6307     {
6308         to->pNext = (const void*)pool->alloc(pNext_size);
6309         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6310     }
6311     to->pVertexBindingDivisors = nullptr;
6312     if (from->pVertexBindingDivisors)
6313     {
6314         to->pVertexBindingDivisors = (VkVertexInputBindingDivisorDescriptionEXT*)pool->alloc(from->vertexBindingDivisorCount * sizeof(const VkVertexInputBindingDivisorDescriptionEXT));
6315         to->vertexBindingDivisorCount = from->vertexBindingDivisorCount;
6316         for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDivisorCount; ++i)
6317         {
6318             deepcopy_VkVertexInputBindingDivisorDescriptionEXT(pool, from->pVertexBindingDivisors + i, (VkVertexInputBindingDivisorDescriptionEXT*)(to->pVertexBindingDivisors + i));
6319         }
6320     }
6321 }
6322 
6323 #endif
6324 #ifdef VK_NV_shader_subgroup_partitioned
6325 #endif
6326 #ifdef VK_NV_device_diagnostic_checkpoints
deepcopy_VkQueueFamilyCheckpointPropertiesNV(Pool * pool,const VkQueueFamilyCheckpointPropertiesNV * from,VkQueueFamilyCheckpointPropertiesNV * to)6327 void deepcopy_VkQueueFamilyCheckpointPropertiesNV(
6328     Pool* pool,
6329     const VkQueueFamilyCheckpointPropertiesNV* from,
6330     VkQueueFamilyCheckpointPropertiesNV* to)
6331 {
6332     (void)pool;
6333     *to = *from;
6334     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6335     to->pNext = nullptr;
6336     if (pNext_size)
6337     {
6338         to->pNext = (void*)pool->alloc(pNext_size);
6339         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6340     }
6341 }
6342 
deepcopy_VkCheckpointDataNV(Pool * pool,const VkCheckpointDataNV * from,VkCheckpointDataNV * to)6343 void deepcopy_VkCheckpointDataNV(
6344     Pool* pool,
6345     const VkCheckpointDataNV* from,
6346     VkCheckpointDataNV* to)
6347 {
6348     (void)pool;
6349     *to = *from;
6350     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6351     to->pNext = nullptr;
6352     if (pNext_size)
6353     {
6354         to->pNext = (void*)pool->alloc(pNext_size);
6355         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6356     }
6357     to->pCheckpointMarker = nullptr;
6358     if (from->pCheckpointMarker)
6359     {
6360         to->pCheckpointMarker = (void*)pool->dupArray(from->pCheckpointMarker, sizeof(uint8_t));
6361     }
6362 }
6363 
6364 #endif
6365 #ifdef VK_GOOGLE_address_space
6366 #endif
6367 #ifdef VK_GOOGLE_color_buffer
deepcopy_VkImportColorBufferGOOGLE(Pool * pool,const VkImportColorBufferGOOGLE * from,VkImportColorBufferGOOGLE * to)6368 void deepcopy_VkImportColorBufferGOOGLE(
6369     Pool* pool,
6370     const VkImportColorBufferGOOGLE* from,
6371     VkImportColorBufferGOOGLE* to)
6372 {
6373     (void)pool;
6374     *to = *from;
6375     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6376     to->pNext = nullptr;
6377     if (pNext_size)
6378     {
6379         to->pNext = (void*)pool->alloc(pNext_size);
6380         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6381     }
6382 }
6383 
deepcopy_VkImportBufferGOOGLE(Pool * pool,const VkImportBufferGOOGLE * from,VkImportBufferGOOGLE * to)6384 void deepcopy_VkImportBufferGOOGLE(
6385     Pool* pool,
6386     const VkImportBufferGOOGLE* from,
6387     VkImportBufferGOOGLE* to)
6388 {
6389     (void)pool;
6390     *to = *from;
6391     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6392     to->pNext = nullptr;
6393     if (pNext_size)
6394     {
6395         to->pNext = (void*)pool->alloc(pNext_size);
6396         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6397     }
6398 }
6399 
deepcopy_VkImportPhysicalAddressGOOGLE(Pool * pool,const VkImportPhysicalAddressGOOGLE * from,VkImportPhysicalAddressGOOGLE * to)6400 void deepcopy_VkImportPhysicalAddressGOOGLE(
6401     Pool* pool,
6402     const VkImportPhysicalAddressGOOGLE* from,
6403     VkImportPhysicalAddressGOOGLE* to)
6404 {
6405     (void)pool;
6406     *to = *from;
6407     size_t pNext_size = goldfish_vk_extension_struct_size(from->pNext);
6408     to->pNext = nullptr;
6409     if (pNext_size)
6410     {
6411         to->pNext = (void*)pool->alloc(pNext_size);
6412         deepcopy_extension_struct(pool, from->pNext, (void*)(to->pNext));
6413     }
6414 }
6415 
6416 #endif
6417 #ifdef VK_GOOGLE_sized_descriptor_update_template
6418 #endif
6419 #ifdef VK_GOOGLE_async_command_buffers
6420 #endif
6421 #ifdef VK_GOOGLE_create_resources_with_requirements
6422 #endif
6423 #ifdef VK_GOOGLE_address_space_info
6424 #endif
6425 #ifdef VK_GOOGLE_free_memory_sync
6426 #endif
6427 #ifdef VK_GOOGLE_async_queue_submit
6428 #endif
deepcopy_extension_struct(Pool * pool,const void * structExtension,void * structExtension_out)6429 void deepcopy_extension_struct(
6430     Pool* pool,
6431     const void* structExtension,
6432     void* structExtension_out)
6433 {
6434     if (!structExtension)
6435     {
6436         return;
6437     }
6438     uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension);
6439     switch(structType)
6440     {
6441 #ifdef VK_VERSION_1_1
6442         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES:
6443         {
6444             deepcopy_VkPhysicalDeviceSubgroupProperties(pool, reinterpret_cast<const VkPhysicalDeviceSubgroupProperties*>(structExtension), reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(structExtension_out));
6445             break;
6446         }
6447         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES:
6448         {
6449             deepcopy_VkPhysicalDevice16BitStorageFeatures(pool, reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(structExtension), reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(structExtension_out));
6450             break;
6451         }
6452         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS:
6453         {
6454             deepcopy_VkMemoryDedicatedRequirements(pool, reinterpret_cast<const VkMemoryDedicatedRequirements*>(structExtension), reinterpret_cast<VkMemoryDedicatedRequirements*>(structExtension_out));
6455             break;
6456         }
6457         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
6458         {
6459             deepcopy_VkMemoryDedicatedAllocateInfo(pool, reinterpret_cast<const VkMemoryDedicatedAllocateInfo*>(structExtension), reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(structExtension_out));
6460             break;
6461         }
6462         case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO:
6463         {
6464             deepcopy_VkMemoryAllocateFlagsInfo(pool, reinterpret_cast<const VkMemoryAllocateFlagsInfo*>(structExtension), reinterpret_cast<VkMemoryAllocateFlagsInfo*>(structExtension_out));
6465             break;
6466         }
6467         case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO:
6468         {
6469             deepcopy_VkDeviceGroupRenderPassBeginInfo(pool, reinterpret_cast<const VkDeviceGroupRenderPassBeginInfo*>(structExtension), reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(structExtension_out));
6470             break;
6471         }
6472         case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO:
6473         {
6474             deepcopy_VkDeviceGroupCommandBufferBeginInfo(pool, reinterpret_cast<const VkDeviceGroupCommandBufferBeginInfo*>(structExtension), reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(structExtension_out));
6475             break;
6476         }
6477         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO:
6478         {
6479             deepcopy_VkDeviceGroupSubmitInfo(pool, reinterpret_cast<const VkDeviceGroupSubmitInfo*>(structExtension), reinterpret_cast<VkDeviceGroupSubmitInfo*>(structExtension_out));
6480             break;
6481         }
6482         case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO:
6483         {
6484             deepcopy_VkDeviceGroupBindSparseInfo(pool, reinterpret_cast<const VkDeviceGroupBindSparseInfo*>(structExtension), reinterpret_cast<VkDeviceGroupBindSparseInfo*>(structExtension_out));
6485             break;
6486         }
6487         case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO:
6488         {
6489             deepcopy_VkBindBufferMemoryDeviceGroupInfo(pool, reinterpret_cast<const VkBindBufferMemoryDeviceGroupInfo*>(structExtension), reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(structExtension_out));
6490             break;
6491         }
6492         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
6493         {
6494             deepcopy_VkBindImageMemoryDeviceGroupInfo(pool, reinterpret_cast<const VkBindImageMemoryDeviceGroupInfo*>(structExtension), reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(structExtension_out));
6495             break;
6496         }
6497         case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
6498         {
6499             deepcopy_VkDeviceGroupDeviceCreateInfo(pool, reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(structExtension), reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(structExtension_out));
6500             break;
6501         }
6502         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
6503         {
6504             deepcopy_VkPhysicalDeviceFeatures2(pool, reinterpret_cast<const VkPhysicalDeviceFeatures2*>(structExtension), reinterpret_cast<VkPhysicalDeviceFeatures2*>(structExtension_out));
6505             break;
6506         }
6507         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
6508         {
6509             deepcopy_VkPhysicalDevicePointClippingProperties(pool, reinterpret_cast<const VkPhysicalDevicePointClippingProperties*>(structExtension), reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(structExtension_out));
6510             break;
6511         }
6512         case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO:
6513         {
6514             deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(pool, reinterpret_cast<const VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension), reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension_out));
6515             break;
6516         }
6517         case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO:
6518         {
6519             deepcopy_VkImageViewUsageCreateInfo(pool, reinterpret_cast<const VkImageViewUsageCreateInfo*>(structExtension), reinterpret_cast<VkImageViewUsageCreateInfo*>(structExtension_out));
6520             break;
6521         }
6522         case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
6523         {
6524             deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(pool, reinterpret_cast<const VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension), reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension_out));
6525             break;
6526         }
6527         case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
6528         {
6529             deepcopy_VkRenderPassMultiviewCreateInfo(pool, reinterpret_cast<const VkRenderPassMultiviewCreateInfo*>(structExtension), reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(structExtension_out));
6530             break;
6531         }
6532         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
6533         {
6534             deepcopy_VkPhysicalDeviceMultiviewFeatures(pool, reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(structExtension), reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(structExtension_out));
6535             break;
6536         }
6537         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
6538         {
6539             deepcopy_VkPhysicalDeviceMultiviewProperties(pool, reinterpret_cast<const VkPhysicalDeviceMultiviewProperties*>(structExtension), reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(structExtension_out));
6540             break;
6541         }
6542         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES:
6543         {
6544             deepcopy_VkPhysicalDeviceVariablePointerFeatures(pool, reinterpret_cast<const VkPhysicalDeviceVariablePointerFeatures*>(structExtension), reinterpret_cast<VkPhysicalDeviceVariablePointerFeatures*>(structExtension_out));
6545             break;
6546         }
6547         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
6548         {
6549             deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(pool, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension), reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension_out));
6550             break;
6551         }
6552         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
6553         {
6554             deepcopy_VkPhysicalDeviceProtectedMemoryProperties(pool, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryProperties*>(structExtension), reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(structExtension_out));
6555             break;
6556         }
6557         case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO:
6558         {
6559             deepcopy_VkProtectedSubmitInfo(pool, reinterpret_cast<const VkProtectedSubmitInfo*>(structExtension), reinterpret_cast<VkProtectedSubmitInfo*>(structExtension_out));
6560             break;
6561         }
6562         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
6563         {
6564             deepcopy_VkSamplerYcbcrConversionInfo(pool, reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(structExtension), reinterpret_cast<VkSamplerYcbcrConversionInfo*>(structExtension_out));
6565             break;
6566         }
6567         case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
6568         {
6569             deepcopy_VkBindImagePlaneMemoryInfo(pool, reinterpret_cast<const VkBindImagePlaneMemoryInfo*>(structExtension), reinterpret_cast<VkBindImagePlaneMemoryInfo*>(structExtension_out));
6570             break;
6571         }
6572         case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
6573         {
6574             deepcopy_VkImagePlaneMemoryRequirementsInfo(pool, reinterpret_cast<const VkImagePlaneMemoryRequirementsInfo*>(structExtension), reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(structExtension_out));
6575             break;
6576         }
6577         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
6578         {
6579             deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(pool, reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension), reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension_out));
6580             break;
6581         }
6582         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES:
6583         {
6584             deepcopy_VkSamplerYcbcrConversionImageFormatProperties(pool, reinterpret_cast<const VkSamplerYcbcrConversionImageFormatProperties*>(structExtension), reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(structExtension_out));
6585             break;
6586         }
6587         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
6588         {
6589             deepcopy_VkPhysicalDeviceExternalImageFormatInfo(pool, reinterpret_cast<const VkPhysicalDeviceExternalImageFormatInfo*>(structExtension), reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(structExtension_out));
6590             break;
6591         }
6592         case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
6593         {
6594             deepcopy_VkExternalImageFormatProperties(pool, reinterpret_cast<const VkExternalImageFormatProperties*>(structExtension), reinterpret_cast<VkExternalImageFormatProperties*>(structExtension_out));
6595             break;
6596         }
6597         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
6598         {
6599             deepcopy_VkPhysicalDeviceIDProperties(pool, reinterpret_cast<const VkPhysicalDeviceIDProperties*>(structExtension), reinterpret_cast<VkPhysicalDeviceIDProperties*>(structExtension_out));
6600             break;
6601         }
6602         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
6603         {
6604             deepcopy_VkExternalMemoryImageCreateInfo(pool, reinterpret_cast<const VkExternalMemoryImageCreateInfo*>(structExtension), reinterpret_cast<VkExternalMemoryImageCreateInfo*>(structExtension_out));
6605             break;
6606         }
6607         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO:
6608         {
6609             deepcopy_VkExternalMemoryBufferCreateInfo(pool, reinterpret_cast<const VkExternalMemoryBufferCreateInfo*>(structExtension), reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(structExtension_out));
6610             break;
6611         }
6612         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO:
6613         {
6614             deepcopy_VkExportMemoryAllocateInfo(pool, reinterpret_cast<const VkExportMemoryAllocateInfo*>(structExtension), reinterpret_cast<VkExportMemoryAllocateInfo*>(structExtension_out));
6615             break;
6616         }
6617         case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
6618         {
6619             deepcopy_VkExportFenceCreateInfo(pool, reinterpret_cast<const VkExportFenceCreateInfo*>(structExtension), reinterpret_cast<VkExportFenceCreateInfo*>(structExtension_out));
6620             break;
6621         }
6622         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO:
6623         {
6624             deepcopy_VkExportSemaphoreCreateInfo(pool, reinterpret_cast<const VkExportSemaphoreCreateInfo*>(structExtension), reinterpret_cast<VkExportSemaphoreCreateInfo*>(structExtension_out));
6625             break;
6626         }
6627         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
6628         {
6629             deepcopy_VkPhysicalDeviceMaintenance3Properties(pool, reinterpret_cast<const VkPhysicalDeviceMaintenance3Properties*>(structExtension), reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(structExtension_out));
6630             break;
6631         }
6632         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES:
6633         {
6634             deepcopy_VkPhysicalDeviceShaderDrawParameterFeatures(pool, reinterpret_cast<const VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension), reinterpret_cast<VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension_out));
6635             break;
6636         }
6637 #endif
6638 #ifdef VK_KHR_swapchain
6639         case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
6640         {
6641             deepcopy_VkImageSwapchainCreateInfoKHR(pool, reinterpret_cast<const VkImageSwapchainCreateInfoKHR*>(structExtension), reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(structExtension_out));
6642             break;
6643         }
6644         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR:
6645         {
6646             deepcopy_VkBindImageMemorySwapchainInfoKHR(pool, reinterpret_cast<const VkBindImageMemorySwapchainInfoKHR*>(structExtension), reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(structExtension_out));
6647             break;
6648         }
6649         case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR:
6650         {
6651             deepcopy_VkDeviceGroupPresentInfoKHR(pool, reinterpret_cast<const VkDeviceGroupPresentInfoKHR*>(structExtension), reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(structExtension_out));
6652             break;
6653         }
6654         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR:
6655         {
6656             deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(pool, reinterpret_cast<const VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension), reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension_out));
6657             break;
6658         }
6659 #endif
6660 #ifdef VK_KHR_display_swapchain
6661         case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR:
6662         {
6663             deepcopy_VkDisplayPresentInfoKHR(pool, reinterpret_cast<const VkDisplayPresentInfoKHR*>(structExtension), reinterpret_cast<VkDisplayPresentInfoKHR*>(structExtension_out));
6664             break;
6665         }
6666 #endif
6667 #ifdef VK_KHR_external_memory_win32
6668         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
6669         {
6670             deepcopy_VkImportMemoryWin32HandleInfoKHR(pool, reinterpret_cast<const VkImportMemoryWin32HandleInfoKHR*>(structExtension), reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(structExtension_out));
6671             break;
6672         }
6673         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
6674         {
6675             deepcopy_VkExportMemoryWin32HandleInfoKHR(pool, reinterpret_cast<const VkExportMemoryWin32HandleInfoKHR*>(structExtension), reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(structExtension_out));
6676             break;
6677         }
6678 #endif
6679 #ifdef VK_KHR_external_memory_fd
6680         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR:
6681         {
6682             deepcopy_VkImportMemoryFdInfoKHR(pool, reinterpret_cast<const VkImportMemoryFdInfoKHR*>(structExtension), reinterpret_cast<VkImportMemoryFdInfoKHR*>(structExtension_out));
6683             break;
6684         }
6685 #endif
6686 #ifdef VK_KHR_win32_keyed_mutex
6687         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR:
6688         {
6689             deepcopy_VkWin32KeyedMutexAcquireReleaseInfoKHR(pool, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension), reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension_out));
6690             break;
6691         }
6692 #endif
6693 #ifdef VK_KHR_external_semaphore_win32
6694         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
6695         {
6696             deepcopy_VkExportSemaphoreWin32HandleInfoKHR(pool, reinterpret_cast<const VkExportSemaphoreWin32HandleInfoKHR*>(structExtension), reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(structExtension_out));
6697             break;
6698         }
6699         case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR:
6700         {
6701             deepcopy_VkD3D12FenceSubmitInfoKHR(pool, reinterpret_cast<const VkD3D12FenceSubmitInfoKHR*>(structExtension), reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(structExtension_out));
6702             break;
6703         }
6704 #endif
6705 #ifdef VK_KHR_push_descriptor
6706         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR:
6707         {
6708             deepcopy_VkPhysicalDevicePushDescriptorPropertiesKHR(pool, reinterpret_cast<const VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension), reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension_out));
6709             break;
6710         }
6711 #endif
6712 #ifdef VK_KHR_incremental_present
6713         case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
6714         {
6715             deepcopy_VkPresentRegionsKHR(pool, reinterpret_cast<const VkPresentRegionsKHR*>(structExtension), reinterpret_cast<VkPresentRegionsKHR*>(structExtension_out));
6716             break;
6717         }
6718 #endif
6719 #ifdef VK_KHR_shared_presentable_image
6720         case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR:
6721         {
6722             deepcopy_VkSharedPresentSurfaceCapabilitiesKHR(pool, reinterpret_cast<const VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension), reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension_out));
6723             break;
6724         }
6725 #endif
6726 #ifdef VK_KHR_external_fence_win32
6727         case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR:
6728         {
6729             deepcopy_VkExportFenceWin32HandleInfoKHR(pool, reinterpret_cast<const VkExportFenceWin32HandleInfoKHR*>(structExtension), reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(structExtension_out));
6730             break;
6731         }
6732 #endif
6733 #ifdef VK_KHR_image_format_list
6734         case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR:
6735         {
6736             deepcopy_VkImageFormatListCreateInfoKHR(pool, reinterpret_cast<const VkImageFormatListCreateInfoKHR*>(structExtension), reinterpret_cast<VkImageFormatListCreateInfoKHR*>(structExtension_out));
6737             break;
6738         }
6739 #endif
6740 #ifdef VK_KHR_8bit_storage
6741         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR:
6742         {
6743             deepcopy_VkPhysicalDevice8BitStorageFeaturesKHR(pool, reinterpret_cast<const VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension), reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension_out));
6744             break;
6745         }
6746 #endif
6747 #ifdef VK_KHR_shader_float16_int8
6748         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES:
6749         {
6750             deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(pool, reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension), reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension_out));
6751             break;
6752         }
6753 #endif
6754 #ifdef VK_ANDROID_native_buffer
6755         case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID:
6756         {
6757             deepcopy_VkNativeBufferANDROID(pool, reinterpret_cast<const VkNativeBufferANDROID*>(structExtension), reinterpret_cast<VkNativeBufferANDROID*>(structExtension_out));
6758             break;
6759         }
6760 #endif
6761 #ifdef VK_EXT_debug_report
6762         case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT:
6763         {
6764             deepcopy_VkDebugReportCallbackCreateInfoEXT(pool, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(structExtension), reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(structExtension_out));
6765             break;
6766         }
6767 #endif
6768 #ifdef VK_AMD_rasterization_order
6769         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD:
6770         {
6771             deepcopy_VkPipelineRasterizationStateRasterizationOrderAMD(pool, reinterpret_cast<const VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension), reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension_out));
6772             break;
6773         }
6774 #endif
6775 #ifdef VK_NV_dedicated_allocation
6776         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV:
6777         {
6778             deepcopy_VkDedicatedAllocationImageCreateInfoNV(pool, reinterpret_cast<const VkDedicatedAllocationImageCreateInfoNV*>(structExtension), reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(structExtension_out));
6779             break;
6780         }
6781         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV:
6782         {
6783             deepcopy_VkDedicatedAllocationBufferCreateInfoNV(pool, reinterpret_cast<const VkDedicatedAllocationBufferCreateInfoNV*>(structExtension), reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(structExtension_out));
6784             break;
6785         }
6786         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV:
6787         {
6788             deepcopy_VkDedicatedAllocationMemoryAllocateInfoNV(pool, reinterpret_cast<const VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension), reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension_out));
6789             break;
6790         }
6791 #endif
6792 #ifdef VK_AMD_texture_gather_bias_lod
6793         case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD:
6794         {
6795             deepcopy_VkTextureLODGatherFormatPropertiesAMD(pool, reinterpret_cast<const VkTextureLODGatherFormatPropertiesAMD*>(structExtension), reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(structExtension_out));
6796             break;
6797         }
6798 #endif
6799 #ifdef VK_NV_external_memory
6800         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV:
6801         {
6802             deepcopy_VkExternalMemoryImageCreateInfoNV(pool, reinterpret_cast<const VkExternalMemoryImageCreateInfoNV*>(structExtension), reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(structExtension_out));
6803             break;
6804         }
6805         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV:
6806         {
6807             deepcopy_VkExportMemoryAllocateInfoNV(pool, reinterpret_cast<const VkExportMemoryAllocateInfoNV*>(structExtension), reinterpret_cast<VkExportMemoryAllocateInfoNV*>(structExtension_out));
6808             break;
6809         }
6810 #endif
6811 #ifdef VK_NV_external_memory_win32
6812         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV:
6813         {
6814             deepcopy_VkImportMemoryWin32HandleInfoNV(pool, reinterpret_cast<const VkImportMemoryWin32HandleInfoNV*>(structExtension), reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(structExtension_out));
6815             break;
6816         }
6817         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV:
6818         {
6819             deepcopy_VkExportMemoryWin32HandleInfoNV(pool, reinterpret_cast<const VkExportMemoryWin32HandleInfoNV*>(structExtension), reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(structExtension_out));
6820             break;
6821         }
6822 #endif
6823 #ifdef VK_NV_win32_keyed_mutex
6824         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV:
6825         {
6826             deepcopy_VkWin32KeyedMutexAcquireReleaseInfoNV(pool, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension), reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension_out));
6827             break;
6828         }
6829 #endif
6830 #ifdef VK_EXT_validation_flags
6831         case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT:
6832         {
6833             deepcopy_VkValidationFlagsEXT(pool, reinterpret_cast<const VkValidationFlagsEXT*>(structExtension), reinterpret_cast<VkValidationFlagsEXT*>(structExtension_out));
6834             break;
6835         }
6836 #endif
6837 #ifdef VK_EXT_conditional_rendering
6838         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT:
6839         {
6840             deepcopy_VkPhysicalDeviceConditionalRenderingFeaturesEXT(pool, reinterpret_cast<const VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension_out));
6841             break;
6842         }
6843         case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT:
6844         {
6845             deepcopy_VkCommandBufferInheritanceConditionalRenderingInfoEXT(pool, reinterpret_cast<const VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension), reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension_out));
6846             break;
6847         }
6848 #endif
6849 #ifdef VK_NV_clip_space_w_scaling
6850         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV:
6851         {
6852             deepcopy_VkPipelineViewportWScalingStateCreateInfoNV(pool, reinterpret_cast<const VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension), reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension_out));
6853             break;
6854         }
6855 #endif
6856 #ifdef VK_EXT_display_control
6857         case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT:
6858         {
6859             deepcopy_VkSwapchainCounterCreateInfoEXT(pool, reinterpret_cast<const VkSwapchainCounterCreateInfoEXT*>(structExtension), reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(structExtension_out));
6860             break;
6861         }
6862 #endif
6863 #ifdef VK_GOOGLE_display_timing
6864         case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE:
6865         {
6866             deepcopy_VkPresentTimesInfoGOOGLE(pool, reinterpret_cast<const VkPresentTimesInfoGOOGLE*>(structExtension), reinterpret_cast<VkPresentTimesInfoGOOGLE*>(structExtension_out));
6867             break;
6868         }
6869 #endif
6870 #ifdef VK_NVX_multiview_per_view_attributes
6871         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX:
6872         {
6873             deepcopy_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(pool, reinterpret_cast<const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension), reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension_out));
6874             break;
6875         }
6876 #endif
6877 #ifdef VK_NV_viewport_swizzle
6878         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV:
6879         {
6880             deepcopy_VkPipelineViewportSwizzleStateCreateInfoNV(pool, reinterpret_cast<const VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension), reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension_out));
6881             break;
6882         }
6883 #endif
6884 #ifdef VK_EXT_discard_rectangles
6885         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT:
6886         {
6887             deepcopy_VkPhysicalDeviceDiscardRectanglePropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension_out));
6888             break;
6889         }
6890         case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT:
6891         {
6892             deepcopy_VkPipelineDiscardRectangleStateCreateInfoEXT(pool, reinterpret_cast<const VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension), reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension_out));
6893             break;
6894         }
6895 #endif
6896 #ifdef VK_EXT_conservative_rasterization
6897         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT:
6898         {
6899             deepcopy_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension_out));
6900             break;
6901         }
6902         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT:
6903         {
6904             deepcopy_VkPipelineRasterizationConservativeStateCreateInfoEXT(pool, reinterpret_cast<const VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension), reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension_out));
6905             break;
6906         }
6907 #endif
6908 #ifdef VK_EXT_debug_utils
6909         case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT:
6910         {
6911             deepcopy_VkDebugUtilsMessengerCreateInfoEXT(pool, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(structExtension), reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(structExtension_out));
6912             break;
6913         }
6914 #endif
6915 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
6916         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID:
6917         {
6918             deepcopy_VkAndroidHardwareBufferUsageANDROID(pool, reinterpret_cast<const VkAndroidHardwareBufferUsageANDROID*>(structExtension), reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(structExtension_out));
6919             break;
6920         }
6921         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID:
6922         {
6923             deepcopy_VkAndroidHardwareBufferFormatPropertiesANDROID(pool, reinterpret_cast<const VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension), reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension_out));
6924             break;
6925         }
6926         case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
6927         {
6928             deepcopy_VkImportAndroidHardwareBufferInfoANDROID(pool, reinterpret_cast<const VkImportAndroidHardwareBufferInfoANDROID*>(structExtension), reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(structExtension_out));
6929             break;
6930         }
6931         case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID:
6932         {
6933             deepcopy_VkExternalFormatANDROID(pool, reinterpret_cast<const VkExternalFormatANDROID*>(structExtension), reinterpret_cast<VkExternalFormatANDROID*>(structExtension_out));
6934             break;
6935         }
6936 #endif
6937 #ifdef VK_EXT_sampler_filter_minmax
6938         case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT:
6939         {
6940             deepcopy_VkSamplerReductionModeCreateInfoEXT(pool, reinterpret_cast<const VkSamplerReductionModeCreateInfoEXT*>(structExtension), reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(structExtension_out));
6941             break;
6942         }
6943         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT:
6944         {
6945             deepcopy_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension_out));
6946             break;
6947         }
6948 #endif
6949 #ifdef VK_EXT_sample_locations
6950         case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT:
6951         {
6952             deepcopy_VkSampleLocationsInfoEXT(pool, reinterpret_cast<const VkSampleLocationsInfoEXT*>(structExtension), reinterpret_cast<VkSampleLocationsInfoEXT*>(structExtension_out));
6953             break;
6954         }
6955         case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT:
6956         {
6957             deepcopy_VkRenderPassSampleLocationsBeginInfoEXT(pool, reinterpret_cast<const VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension), reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension_out));
6958             break;
6959         }
6960         case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT:
6961         {
6962             deepcopy_VkPipelineSampleLocationsStateCreateInfoEXT(pool, reinterpret_cast<const VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension), reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension_out));
6963             break;
6964         }
6965         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT:
6966         {
6967             deepcopy_VkPhysicalDeviceSampleLocationsPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension_out));
6968             break;
6969         }
6970 #endif
6971 #ifdef VK_EXT_blend_operation_advanced
6972         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT:
6973         {
6974             deepcopy_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(pool, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension_out));
6975             break;
6976         }
6977         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT:
6978         {
6979             deepcopy_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension_out));
6980             break;
6981         }
6982         case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT:
6983         {
6984             deepcopy_VkPipelineColorBlendAdvancedStateCreateInfoEXT(pool, reinterpret_cast<const VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension), reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension_out));
6985             break;
6986         }
6987 #endif
6988 #ifdef VK_NV_fragment_coverage_to_color
6989         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV:
6990         {
6991             deepcopy_VkPipelineCoverageToColorStateCreateInfoNV(pool, reinterpret_cast<const VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension), reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension_out));
6992             break;
6993         }
6994 #endif
6995 #ifdef VK_NV_framebuffer_mixed_samples
6996         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV:
6997         {
6998             deepcopy_VkPipelineCoverageModulationStateCreateInfoNV(pool, reinterpret_cast<const VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension), reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension_out));
6999             break;
7000         }
7001 #endif
7002 #ifdef VK_EXT_validation_cache
7003         case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT:
7004         {
7005             deepcopy_VkShaderModuleValidationCacheCreateInfoEXT(pool, reinterpret_cast<const VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension), reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension_out));
7006             break;
7007         }
7008 #endif
7009 #ifdef VK_EXT_descriptor_indexing
7010         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT:
7011         {
7012             deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(pool, reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension), reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension_out));
7013             break;
7014         }
7015         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT:
7016         {
7017             deepcopy_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(pool, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension_out));
7018             break;
7019         }
7020         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT:
7021         {
7022             deepcopy_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension_out));
7023             break;
7024         }
7025         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT:
7026         {
7027             deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(pool, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension), reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension_out));
7028             break;
7029         }
7030         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT:
7031         {
7032             deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(pool, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension), reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension_out));
7033             break;
7034         }
7035 #endif
7036 #ifdef VK_EXT_global_priority
7037         case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT:
7038         {
7039             deepcopy_VkDeviceQueueGlobalPriorityCreateInfoEXT(pool, reinterpret_cast<const VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension), reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension_out));
7040             break;
7041         }
7042 #endif
7043 #ifdef VK_EXT_external_memory_host
7044         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT:
7045         {
7046             deepcopy_VkImportMemoryHostPointerInfoEXT(pool, reinterpret_cast<const VkImportMemoryHostPointerInfoEXT*>(structExtension), reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(structExtension_out));
7047             break;
7048         }
7049         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT:
7050         {
7051             deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension_out));
7052             break;
7053         }
7054 #endif
7055 #ifdef VK_AMD_shader_core_properties
7056         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD:
7057         {
7058             deepcopy_VkPhysicalDeviceShaderCorePropertiesAMD(pool, reinterpret_cast<const VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension), reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension_out));
7059             break;
7060         }
7061 #endif
7062 #ifdef VK_EXT_vertex_attribute_divisor
7063         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
7064         {
7065             deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(pool, reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension), reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension_out));
7066             break;
7067         }
7068         case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
7069         {
7070             deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(pool, reinterpret_cast<const VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension), reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension_out));
7071             break;
7072         }
7073 #endif
7074 #ifdef VK_NV_device_diagnostic_checkpoints
7075         case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV:
7076         {
7077             deepcopy_VkQueueFamilyCheckpointPropertiesNV(pool, reinterpret_cast<const VkQueueFamilyCheckpointPropertiesNV*>(structExtension), reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(structExtension_out));
7078             break;
7079         }
7080 #endif
7081 #ifdef VK_GOOGLE_color_buffer
7082         case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE:
7083         {
7084             deepcopy_VkImportColorBufferGOOGLE(pool, reinterpret_cast<const VkImportColorBufferGOOGLE*>(structExtension), reinterpret_cast<VkImportColorBufferGOOGLE*>(structExtension_out));
7085             break;
7086         }
7087         case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE:
7088         {
7089             deepcopy_VkImportBufferGOOGLE(pool, reinterpret_cast<const VkImportBufferGOOGLE*>(structExtension), reinterpret_cast<VkImportBufferGOOGLE*>(structExtension_out));
7090             break;
7091         }
7092         case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE:
7093         {
7094             deepcopy_VkImportPhysicalAddressGOOGLE(pool, reinterpret_cast<const VkImportPhysicalAddressGOOGLE*>(structExtension), reinterpret_cast<VkImportPhysicalAddressGOOGLE*>(structExtension_out));
7095             break;
7096         }
7097 #endif
7098         default:
7099         {
7100             return;
7101         }
7102     }
7103 }
7104 
7105 
7106 } // namespace goldfish_vk
7107