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
17 //
18 // (impl) generated by scripts/genvk.py -registry
19 // ../../../../../hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/xml/vk.xml
20 // -registryGfxstream xml/vk_gfxstream.xml cereal -o
21 // ../../../../../hardware/google/gfxstream/host/vulkan/cereal
22 //
23 // Please do not modify directly;
24 // re-run mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh,
25 // or directly from Python by defining:
26 // VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml
27 // VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py
28 // CEREAL_OUTPUT_DIR: Where to put the generated sources.
29 //
30 // python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o
31 // $CEREAL_OUTPUT_DIR
32 //
33
34 #include "goldfish_vk_deepcopy.h"
35
36 #include <string.h>
37
38 #include "goldfish_vk_extension_structs.h"
39 #include "goldfish_vk_private_defs.h"
40 #include "vk_util.h"
41
42 namespace gfxstream {
43 namespace vk {
44
45 void deepcopy_extension_struct(Allocator* alloc, VkStructureType rootType,
46 const void* structExtension, void* structExtension_out);
47
48 #ifdef VK_VERSION_1_0
deepcopy_VkExtent2D(Allocator * alloc,VkStructureType rootType,const VkExtent2D * from,VkExtent2D * to)49 void deepcopy_VkExtent2D(Allocator* alloc, VkStructureType rootType, const VkExtent2D* from,
50 VkExtent2D* to) {
51 (void)alloc;
52 (void)rootType;
53 *to = *from;
54 }
55
deepcopy_VkExtent3D(Allocator * alloc,VkStructureType rootType,const VkExtent3D * from,VkExtent3D * to)56 void deepcopy_VkExtent3D(Allocator* alloc, VkStructureType rootType, const VkExtent3D* from,
57 VkExtent3D* to) {
58 (void)alloc;
59 (void)rootType;
60 *to = *from;
61 }
62
deepcopy_VkOffset2D(Allocator * alloc,VkStructureType rootType,const VkOffset2D * from,VkOffset2D * to)63 void deepcopy_VkOffset2D(Allocator* alloc, VkStructureType rootType, const VkOffset2D* from,
64 VkOffset2D* to) {
65 (void)alloc;
66 (void)rootType;
67 *to = *from;
68 }
69
deepcopy_VkOffset3D(Allocator * alloc,VkStructureType rootType,const VkOffset3D * from,VkOffset3D * to)70 void deepcopy_VkOffset3D(Allocator* alloc, VkStructureType rootType, const VkOffset3D* from,
71 VkOffset3D* to) {
72 (void)alloc;
73 (void)rootType;
74 *to = *from;
75 }
76
deepcopy_VkRect2D(Allocator * alloc,VkStructureType rootType,const VkRect2D * from,VkRect2D * to)77 void deepcopy_VkRect2D(Allocator* alloc, VkStructureType rootType, const VkRect2D* from,
78 VkRect2D* to) {
79 (void)alloc;
80 (void)rootType;
81 *to = *from;
82 deepcopy_VkOffset2D(alloc, rootType, &from->offset, (VkOffset2D*)(&to->offset));
83 deepcopy_VkExtent2D(alloc, rootType, &from->extent, (VkExtent2D*)(&to->extent));
84 }
85
deepcopy_VkBaseInStructure(Allocator * alloc,VkStructureType rootType,const VkBaseInStructure * from,VkBaseInStructure * to)86 void deepcopy_VkBaseInStructure(Allocator* alloc, VkStructureType rootType,
87 const VkBaseInStructure* from, VkBaseInStructure* to) {
88 (void)alloc;
89 (void)rootType;
90 *to = *from;
91 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
92 rootType = from->sType;
93 }
94 const void* from_pNext = from;
95 size_t pNext_size = 0u;
96 while (!pNext_size && from_pNext) {
97 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
98 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
99 }
100 to->pNext = nullptr;
101 if (pNext_size) {
102 to->pNext = (VkBaseInStructure*)alloc->alloc(pNext_size);
103 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
104 }
105 }
106
deepcopy_VkBaseOutStructure(Allocator * alloc,VkStructureType rootType,const VkBaseOutStructure * from,VkBaseOutStructure * to)107 void deepcopy_VkBaseOutStructure(Allocator* alloc, VkStructureType rootType,
108 const VkBaseOutStructure* from, VkBaseOutStructure* to) {
109 (void)alloc;
110 (void)rootType;
111 *to = *from;
112 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
113 rootType = from->sType;
114 }
115 const void* from_pNext = from;
116 size_t pNext_size = 0u;
117 while (!pNext_size && from_pNext) {
118 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
119 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
120 }
121 to->pNext = nullptr;
122 if (pNext_size) {
123 to->pNext = (VkBaseOutStructure*)alloc->alloc(pNext_size);
124 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
125 }
126 }
127
deepcopy_VkBufferMemoryBarrier(Allocator * alloc,VkStructureType rootType,const VkBufferMemoryBarrier * from,VkBufferMemoryBarrier * to)128 void deepcopy_VkBufferMemoryBarrier(Allocator* alloc, VkStructureType rootType,
129 const VkBufferMemoryBarrier* from, VkBufferMemoryBarrier* to) {
130 (void)alloc;
131 (void)rootType;
132 *to = *from;
133 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
134 rootType = from->sType;
135 }
136 const void* from_pNext = from;
137 size_t pNext_size = 0u;
138 while (!pNext_size && from_pNext) {
139 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
140 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
141 }
142 to->pNext = nullptr;
143 if (pNext_size) {
144 to->pNext = (void*)alloc->alloc(pNext_size);
145 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
146 }
147 }
148
deepcopy_VkDispatchIndirectCommand(Allocator * alloc,VkStructureType rootType,const VkDispatchIndirectCommand * from,VkDispatchIndirectCommand * to)149 void deepcopy_VkDispatchIndirectCommand(Allocator* alloc, VkStructureType rootType,
150 const VkDispatchIndirectCommand* from,
151 VkDispatchIndirectCommand* to) {
152 (void)alloc;
153 (void)rootType;
154 *to = *from;
155 }
156
deepcopy_VkDrawIndexedIndirectCommand(Allocator * alloc,VkStructureType rootType,const VkDrawIndexedIndirectCommand * from,VkDrawIndexedIndirectCommand * to)157 void deepcopy_VkDrawIndexedIndirectCommand(Allocator* alloc, VkStructureType rootType,
158 const VkDrawIndexedIndirectCommand* from,
159 VkDrawIndexedIndirectCommand* to) {
160 (void)alloc;
161 (void)rootType;
162 *to = *from;
163 }
164
deepcopy_VkDrawIndirectCommand(Allocator * alloc,VkStructureType rootType,const VkDrawIndirectCommand * from,VkDrawIndirectCommand * to)165 void deepcopy_VkDrawIndirectCommand(Allocator* alloc, VkStructureType rootType,
166 const VkDrawIndirectCommand* from, VkDrawIndirectCommand* to) {
167 (void)alloc;
168 (void)rootType;
169 *to = *from;
170 }
171
deepcopy_VkImageSubresourceRange(Allocator * alloc,VkStructureType rootType,const VkImageSubresourceRange * from,VkImageSubresourceRange * to)172 void deepcopy_VkImageSubresourceRange(Allocator* alloc, VkStructureType rootType,
173 const VkImageSubresourceRange* from,
174 VkImageSubresourceRange* to) {
175 (void)alloc;
176 (void)rootType;
177 *to = *from;
178 }
179
deepcopy_VkImageMemoryBarrier(Allocator * alloc,VkStructureType rootType,const VkImageMemoryBarrier * from,VkImageMemoryBarrier * to)180 void deepcopy_VkImageMemoryBarrier(Allocator* alloc, VkStructureType rootType,
181 const VkImageMemoryBarrier* from, VkImageMemoryBarrier* to) {
182 (void)alloc;
183 (void)rootType;
184 *to = *from;
185 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
186 rootType = from->sType;
187 }
188 const void* from_pNext = from;
189 size_t pNext_size = 0u;
190 while (!pNext_size && from_pNext) {
191 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
192 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
193 }
194 to->pNext = nullptr;
195 if (pNext_size) {
196 to->pNext = (void*)alloc->alloc(pNext_size);
197 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
198 }
199 deepcopy_VkImageSubresourceRange(alloc, rootType, &from->subresourceRange,
200 (VkImageSubresourceRange*)(&to->subresourceRange));
201 }
202
deepcopy_VkMemoryBarrier(Allocator * alloc,VkStructureType rootType,const VkMemoryBarrier * from,VkMemoryBarrier * to)203 void deepcopy_VkMemoryBarrier(Allocator* alloc, VkStructureType rootType,
204 const VkMemoryBarrier* from, VkMemoryBarrier* to) {
205 (void)alloc;
206 (void)rootType;
207 *to = *from;
208 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
209 rootType = from->sType;
210 }
211 const void* from_pNext = from;
212 size_t pNext_size = 0u;
213 while (!pNext_size && from_pNext) {
214 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
215 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
216 }
217 to->pNext = nullptr;
218 if (pNext_size) {
219 to->pNext = (void*)alloc->alloc(pNext_size);
220 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
221 }
222 }
223
deepcopy_VkPipelineCacheHeaderVersionOne(Allocator * alloc,VkStructureType rootType,const VkPipelineCacheHeaderVersionOne * from,VkPipelineCacheHeaderVersionOne * to)224 void deepcopy_VkPipelineCacheHeaderVersionOne(Allocator* alloc, VkStructureType rootType,
225 const VkPipelineCacheHeaderVersionOne* from,
226 VkPipelineCacheHeaderVersionOne* to) {
227 (void)alloc;
228 (void)rootType;
229 *to = *from;
230 memcpy(to->pipelineCacheUUID, from->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
231 }
232
deepcopy_VkAllocationCallbacks(Allocator * alloc,VkStructureType rootType,const VkAllocationCallbacks * from,VkAllocationCallbacks * to)233 void deepcopy_VkAllocationCallbacks(Allocator* alloc, VkStructureType rootType,
234 const VkAllocationCallbacks* from, VkAllocationCallbacks* to) {
235 (void)alloc;
236 (void)rootType;
237 *to = *from;
238 to->pUserData = nullptr;
239 if (from->pUserData) {
240 to->pUserData = (void*)alloc->dupArray(from->pUserData, sizeof(uint8_t));
241 }
242 }
243
deepcopy_VkApplicationInfo(Allocator * alloc,VkStructureType rootType,const VkApplicationInfo * from,VkApplicationInfo * to)244 void deepcopy_VkApplicationInfo(Allocator* alloc, VkStructureType rootType,
245 const VkApplicationInfo* from, VkApplicationInfo* to) {
246 (void)alloc;
247 (void)rootType;
248 *to = *from;
249 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
250 rootType = from->sType;
251 }
252 const void* from_pNext = from;
253 size_t pNext_size = 0u;
254 while (!pNext_size && from_pNext) {
255 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
256 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
257 }
258 to->pNext = nullptr;
259 if (pNext_size) {
260 to->pNext = (void*)alloc->alloc(pNext_size);
261 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
262 }
263 to->pApplicationName = nullptr;
264 if (from->pApplicationName) {
265 to->pApplicationName = alloc->strDup(from->pApplicationName);
266 }
267 to->pEngineName = nullptr;
268 if (from->pEngineName) {
269 to->pEngineName = alloc->strDup(from->pEngineName);
270 }
271 }
272
deepcopy_VkFormatProperties(Allocator * alloc,VkStructureType rootType,const VkFormatProperties * from,VkFormatProperties * to)273 void deepcopy_VkFormatProperties(Allocator* alloc, VkStructureType rootType,
274 const VkFormatProperties* from, VkFormatProperties* to) {
275 (void)alloc;
276 (void)rootType;
277 *to = *from;
278 }
279
deepcopy_VkImageFormatProperties(Allocator * alloc,VkStructureType rootType,const VkImageFormatProperties * from,VkImageFormatProperties * to)280 void deepcopy_VkImageFormatProperties(Allocator* alloc, VkStructureType rootType,
281 const VkImageFormatProperties* from,
282 VkImageFormatProperties* to) {
283 (void)alloc;
284 (void)rootType;
285 *to = *from;
286 deepcopy_VkExtent3D(alloc, rootType, &from->maxExtent, (VkExtent3D*)(&to->maxExtent));
287 }
288
deepcopy_VkInstanceCreateInfo(Allocator * alloc,VkStructureType rootType,const VkInstanceCreateInfo * from,VkInstanceCreateInfo * to)289 void deepcopy_VkInstanceCreateInfo(Allocator* alloc, VkStructureType rootType,
290 const VkInstanceCreateInfo* from, VkInstanceCreateInfo* to) {
291 (void)alloc;
292 (void)rootType;
293 *to = *from;
294 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
295 rootType = from->sType;
296 }
297 const void* from_pNext = from;
298 size_t pNext_size = 0u;
299 while (!pNext_size && from_pNext) {
300 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
301 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
302 }
303 to->pNext = nullptr;
304 if (pNext_size) {
305 to->pNext = (void*)alloc->alloc(pNext_size);
306 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
307 }
308 to->pApplicationInfo = nullptr;
309 if (from->pApplicationInfo) {
310 to->pApplicationInfo = (VkApplicationInfo*)alloc->alloc(sizeof(const VkApplicationInfo));
311 deepcopy_VkApplicationInfo(alloc, rootType, from->pApplicationInfo,
312 (VkApplicationInfo*)(to->pApplicationInfo));
313 }
314 to->ppEnabledLayerNames = nullptr;
315 if (from->ppEnabledLayerNames && from->enabledLayerCount) {
316 to->ppEnabledLayerNames =
317 alloc->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
318 }
319 to->ppEnabledExtensionNames = nullptr;
320 if (from->ppEnabledExtensionNames && from->enabledExtensionCount) {
321 to->ppEnabledExtensionNames =
322 alloc->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
323 }
324 }
325
deepcopy_VkMemoryHeap(Allocator * alloc,VkStructureType rootType,const VkMemoryHeap * from,VkMemoryHeap * to)326 void deepcopy_VkMemoryHeap(Allocator* alloc, VkStructureType rootType, const VkMemoryHeap* from,
327 VkMemoryHeap* to) {
328 (void)alloc;
329 (void)rootType;
330 *to = *from;
331 }
332
deepcopy_VkMemoryType(Allocator * alloc,VkStructureType rootType,const VkMemoryType * from,VkMemoryType * to)333 void deepcopy_VkMemoryType(Allocator* alloc, VkStructureType rootType, const VkMemoryType* from,
334 VkMemoryType* to) {
335 (void)alloc;
336 (void)rootType;
337 *to = *from;
338 }
339
deepcopy_VkPhysicalDeviceFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceFeatures * from,VkPhysicalDeviceFeatures * to)340 void deepcopy_VkPhysicalDeviceFeatures(Allocator* alloc, VkStructureType rootType,
341 const VkPhysicalDeviceFeatures* from,
342 VkPhysicalDeviceFeatures* to) {
343 (void)alloc;
344 (void)rootType;
345 *to = *from;
346 }
347
deepcopy_VkPhysicalDeviceLimits(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceLimits * from,VkPhysicalDeviceLimits * to)348 void deepcopy_VkPhysicalDeviceLimits(Allocator* alloc, VkStructureType rootType,
349 const VkPhysicalDeviceLimits* from,
350 VkPhysicalDeviceLimits* to) {
351 (void)alloc;
352 (void)rootType;
353 *to = *from;
354 memcpy(to->maxComputeWorkGroupCount, from->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
355 memcpy(to->maxComputeWorkGroupSize, from->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
356 memcpy(to->maxViewportDimensions, from->maxViewportDimensions, 2 * sizeof(uint32_t));
357 memcpy(to->viewportBoundsRange, from->viewportBoundsRange, 2 * sizeof(float));
358 memcpy(to->pointSizeRange, from->pointSizeRange, 2 * sizeof(float));
359 memcpy(to->lineWidthRange, from->lineWidthRange, 2 * sizeof(float));
360 }
361
deepcopy_VkPhysicalDeviceMemoryProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMemoryProperties * from,VkPhysicalDeviceMemoryProperties * to)362 void deepcopy_VkPhysicalDeviceMemoryProperties(Allocator* alloc, VkStructureType rootType,
363 const VkPhysicalDeviceMemoryProperties* from,
364 VkPhysicalDeviceMemoryProperties* to) {
365 (void)alloc;
366 (void)rootType;
367 *to = *from;
368 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i) {
369 deepcopy_VkMemoryType(alloc, rootType, from->memoryTypes + i,
370 (VkMemoryType*)(to->memoryTypes + i));
371 }
372 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i) {
373 deepcopy_VkMemoryHeap(alloc, rootType, from->memoryHeaps + i,
374 (VkMemoryHeap*)(to->memoryHeaps + i));
375 }
376 }
377
deepcopy_VkPhysicalDeviceSparseProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSparseProperties * from,VkPhysicalDeviceSparseProperties * to)378 void deepcopy_VkPhysicalDeviceSparseProperties(Allocator* alloc, VkStructureType rootType,
379 const VkPhysicalDeviceSparseProperties* from,
380 VkPhysicalDeviceSparseProperties* to) {
381 (void)alloc;
382 (void)rootType;
383 *to = *from;
384 }
385
deepcopy_VkPhysicalDeviceProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProperties * from,VkPhysicalDeviceProperties * to)386 void deepcopy_VkPhysicalDeviceProperties(Allocator* alloc, VkStructureType rootType,
387 const VkPhysicalDeviceProperties* from,
388 VkPhysicalDeviceProperties* to) {
389 (void)alloc;
390 (void)rootType;
391 *to = *from;
392 memcpy(to->deviceName, from->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
393 memcpy(to->pipelineCacheUUID, from->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
394 deepcopy_VkPhysicalDeviceLimits(alloc, rootType, &from->limits,
395 (VkPhysicalDeviceLimits*)(&to->limits));
396 deepcopy_VkPhysicalDeviceSparseProperties(
397 alloc, rootType, &from->sparseProperties,
398 (VkPhysicalDeviceSparseProperties*)(&to->sparseProperties));
399 }
400
deepcopy_VkQueueFamilyProperties(Allocator * alloc,VkStructureType rootType,const VkQueueFamilyProperties * from,VkQueueFamilyProperties * to)401 void deepcopy_VkQueueFamilyProperties(Allocator* alloc, VkStructureType rootType,
402 const VkQueueFamilyProperties* from,
403 VkQueueFamilyProperties* to) {
404 (void)alloc;
405 (void)rootType;
406 *to = *from;
407 deepcopy_VkExtent3D(alloc, rootType, &from->minImageTransferGranularity,
408 (VkExtent3D*)(&to->minImageTransferGranularity));
409 }
410
deepcopy_VkDeviceQueueCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceQueueCreateInfo * from,VkDeviceQueueCreateInfo * to)411 void deepcopy_VkDeviceQueueCreateInfo(Allocator* alloc, VkStructureType rootType,
412 const VkDeviceQueueCreateInfo* from,
413 VkDeviceQueueCreateInfo* to) {
414 (void)alloc;
415 (void)rootType;
416 *to = *from;
417 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
418 rootType = from->sType;
419 }
420 const void* from_pNext = from;
421 size_t pNext_size = 0u;
422 while (!pNext_size && from_pNext) {
423 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
424 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
425 }
426 to->pNext = nullptr;
427 if (pNext_size) {
428 to->pNext = (void*)alloc->alloc(pNext_size);
429 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
430 }
431 to->pQueuePriorities = nullptr;
432 if (from->pQueuePriorities) {
433 to->pQueuePriorities =
434 (float*)alloc->dupArray(from->pQueuePriorities, from->queueCount * sizeof(const float));
435 }
436 }
437
deepcopy_VkDeviceCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceCreateInfo * from,VkDeviceCreateInfo * to)438 void deepcopy_VkDeviceCreateInfo(Allocator* alloc, VkStructureType rootType,
439 const VkDeviceCreateInfo* from, VkDeviceCreateInfo* to) {
440 (void)alloc;
441 (void)rootType;
442 *to = *from;
443 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
444 rootType = from->sType;
445 }
446 const void* from_pNext = from;
447 size_t pNext_size = 0u;
448 while (!pNext_size && from_pNext) {
449 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
450 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
451 }
452 to->pNext = nullptr;
453 if (pNext_size) {
454 to->pNext = (void*)alloc->alloc(pNext_size);
455 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
456 }
457 if (from) {
458 to->pQueueCreateInfos = nullptr;
459 if (from->pQueueCreateInfos) {
460 to->pQueueCreateInfos = (VkDeviceQueueCreateInfo*)alloc->alloc(
461 from->queueCreateInfoCount * sizeof(const VkDeviceQueueCreateInfo));
462 to->queueCreateInfoCount = from->queueCreateInfoCount;
463 for (uint32_t i = 0; i < (uint32_t)from->queueCreateInfoCount; ++i) {
464 deepcopy_VkDeviceQueueCreateInfo(
465 alloc, rootType, from->pQueueCreateInfos + i,
466 (VkDeviceQueueCreateInfo*)(to->pQueueCreateInfos + i));
467 }
468 }
469 }
470 to->ppEnabledLayerNames = nullptr;
471 if (from->ppEnabledLayerNames && from->enabledLayerCount) {
472 to->ppEnabledLayerNames =
473 alloc->strDupArray(from->ppEnabledLayerNames, from->enabledLayerCount);
474 }
475 to->ppEnabledExtensionNames = nullptr;
476 if (from->ppEnabledExtensionNames && from->enabledExtensionCount) {
477 to->ppEnabledExtensionNames =
478 alloc->strDupArray(from->ppEnabledExtensionNames, from->enabledExtensionCount);
479 }
480 to->pEnabledFeatures = nullptr;
481 if (from->pEnabledFeatures) {
482 to->pEnabledFeatures =
483 (VkPhysicalDeviceFeatures*)alloc->alloc(sizeof(const VkPhysicalDeviceFeatures));
484 deepcopy_VkPhysicalDeviceFeatures(alloc, rootType, from->pEnabledFeatures,
485 (VkPhysicalDeviceFeatures*)(to->pEnabledFeatures));
486 }
487 }
488
deepcopy_VkExtensionProperties(Allocator * alloc,VkStructureType rootType,const VkExtensionProperties * from,VkExtensionProperties * to)489 void deepcopy_VkExtensionProperties(Allocator* alloc, VkStructureType rootType,
490 const VkExtensionProperties* from, VkExtensionProperties* to) {
491 (void)alloc;
492 (void)rootType;
493 *to = *from;
494 memcpy(to->extensionName, from->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
495 }
496
deepcopy_VkLayerProperties(Allocator * alloc,VkStructureType rootType,const VkLayerProperties * from,VkLayerProperties * to)497 void deepcopy_VkLayerProperties(Allocator* alloc, VkStructureType rootType,
498 const VkLayerProperties* from, VkLayerProperties* to) {
499 (void)alloc;
500 (void)rootType;
501 *to = *from;
502 memcpy(to->layerName, from->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
503 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
504 }
505
deepcopy_VkSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkSubmitInfo * from,VkSubmitInfo * to)506 void deepcopy_VkSubmitInfo(Allocator* alloc, VkStructureType rootType, const VkSubmitInfo* from,
507 VkSubmitInfo* to) {
508 (void)alloc;
509 (void)rootType;
510 *to = *from;
511 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
512 rootType = from->sType;
513 }
514 const void* from_pNext = from;
515 size_t pNext_size = 0u;
516 while (!pNext_size && from_pNext) {
517 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
518 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
519 }
520 to->pNext = nullptr;
521 if (pNext_size) {
522 to->pNext = (void*)alloc->alloc(pNext_size);
523 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
524 }
525 to->pWaitSemaphores = nullptr;
526 if (from->pWaitSemaphores) {
527 to->pWaitSemaphores = (VkSemaphore*)alloc->dupArray(
528 from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
529 }
530 to->pWaitDstStageMask = nullptr;
531 if (from->pWaitDstStageMask) {
532 to->pWaitDstStageMask = (VkPipelineStageFlags*)alloc->dupArray(
533 from->pWaitDstStageMask, from->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
534 }
535 to->pCommandBuffers = nullptr;
536 if (from->pCommandBuffers) {
537 to->pCommandBuffers = (VkCommandBuffer*)alloc->dupArray(
538 from->pCommandBuffers, from->commandBufferCount * sizeof(const VkCommandBuffer));
539 }
540 to->pSignalSemaphores = nullptr;
541 if (from->pSignalSemaphores) {
542 to->pSignalSemaphores = (VkSemaphore*)alloc->dupArray(
543 from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
544 }
545 }
546
deepcopy_VkMappedMemoryRange(Allocator * alloc,VkStructureType rootType,const VkMappedMemoryRange * from,VkMappedMemoryRange * to)547 void deepcopy_VkMappedMemoryRange(Allocator* alloc, VkStructureType rootType,
548 const VkMappedMemoryRange* from, VkMappedMemoryRange* to) {
549 (void)alloc;
550 (void)rootType;
551 *to = *from;
552 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
553 rootType = from->sType;
554 }
555 const void* from_pNext = from;
556 size_t pNext_size = 0u;
557 while (!pNext_size && from_pNext) {
558 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
559 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
560 }
561 to->pNext = nullptr;
562 if (pNext_size) {
563 to->pNext = (void*)alloc->alloc(pNext_size);
564 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
565 }
566 }
567
deepcopy_VkMemoryAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkMemoryAllocateInfo * from,VkMemoryAllocateInfo * to)568 void deepcopy_VkMemoryAllocateInfo(Allocator* alloc, VkStructureType rootType,
569 const VkMemoryAllocateInfo* from, VkMemoryAllocateInfo* to) {
570 (void)alloc;
571 (void)rootType;
572 *to = *from;
573 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
574 rootType = from->sType;
575 }
576 const void* from_pNext = from;
577 size_t pNext_size = 0u;
578 while (!pNext_size && from_pNext) {
579 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
580 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
581 }
582 to->pNext = nullptr;
583 if (pNext_size) {
584 to->pNext = (void*)alloc->alloc(pNext_size);
585 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
586 }
587 }
588
deepcopy_VkMemoryRequirements(Allocator * alloc,VkStructureType rootType,const VkMemoryRequirements * from,VkMemoryRequirements * to)589 void deepcopy_VkMemoryRequirements(Allocator* alloc, VkStructureType rootType,
590 const VkMemoryRequirements* from, VkMemoryRequirements* to) {
591 (void)alloc;
592 (void)rootType;
593 *to = *from;
594 }
595
deepcopy_VkSparseMemoryBind(Allocator * alloc,VkStructureType rootType,const VkSparseMemoryBind * from,VkSparseMemoryBind * to)596 void deepcopy_VkSparseMemoryBind(Allocator* alloc, VkStructureType rootType,
597 const VkSparseMemoryBind* from, VkSparseMemoryBind* to) {
598 (void)alloc;
599 (void)rootType;
600 *to = *from;
601 }
602
deepcopy_VkSparseBufferMemoryBindInfo(Allocator * alloc,VkStructureType rootType,const VkSparseBufferMemoryBindInfo * from,VkSparseBufferMemoryBindInfo * to)603 void deepcopy_VkSparseBufferMemoryBindInfo(Allocator* alloc, VkStructureType rootType,
604 const VkSparseBufferMemoryBindInfo* from,
605 VkSparseBufferMemoryBindInfo* to) {
606 (void)alloc;
607 (void)rootType;
608 *to = *from;
609 if (from) {
610 to->pBinds = nullptr;
611 if (from->pBinds) {
612 to->pBinds = (VkSparseMemoryBind*)alloc->alloc(from->bindCount *
613 sizeof(const VkSparseMemoryBind));
614 to->bindCount = from->bindCount;
615 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i) {
616 deepcopy_VkSparseMemoryBind(alloc, rootType, from->pBinds + i,
617 (VkSparseMemoryBind*)(to->pBinds + i));
618 }
619 }
620 }
621 }
622
deepcopy_VkSparseImageOpaqueMemoryBindInfo(Allocator * alloc,VkStructureType rootType,const VkSparseImageOpaqueMemoryBindInfo * from,VkSparseImageOpaqueMemoryBindInfo * to)623 void deepcopy_VkSparseImageOpaqueMemoryBindInfo(Allocator* alloc, VkStructureType rootType,
624 const VkSparseImageOpaqueMemoryBindInfo* from,
625 VkSparseImageOpaqueMemoryBindInfo* to) {
626 (void)alloc;
627 (void)rootType;
628 *to = *from;
629 if (from) {
630 to->pBinds = nullptr;
631 if (from->pBinds) {
632 to->pBinds = (VkSparseMemoryBind*)alloc->alloc(from->bindCount *
633 sizeof(const VkSparseMemoryBind));
634 to->bindCount = from->bindCount;
635 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i) {
636 deepcopy_VkSparseMemoryBind(alloc, rootType, from->pBinds + i,
637 (VkSparseMemoryBind*)(to->pBinds + i));
638 }
639 }
640 }
641 }
642
deepcopy_VkImageSubresource(Allocator * alloc,VkStructureType rootType,const VkImageSubresource * from,VkImageSubresource * to)643 void deepcopy_VkImageSubresource(Allocator* alloc, VkStructureType rootType,
644 const VkImageSubresource* from, VkImageSubresource* to) {
645 (void)alloc;
646 (void)rootType;
647 *to = *from;
648 }
649
deepcopy_VkSparseImageMemoryBind(Allocator * alloc,VkStructureType rootType,const VkSparseImageMemoryBind * from,VkSparseImageMemoryBind * to)650 void deepcopy_VkSparseImageMemoryBind(Allocator* alloc, VkStructureType rootType,
651 const VkSparseImageMemoryBind* from,
652 VkSparseImageMemoryBind* to) {
653 (void)alloc;
654 (void)rootType;
655 *to = *from;
656 deepcopy_VkImageSubresource(alloc, rootType, &from->subresource,
657 (VkImageSubresource*)(&to->subresource));
658 deepcopy_VkOffset3D(alloc, rootType, &from->offset, (VkOffset3D*)(&to->offset));
659 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
660 }
661
deepcopy_VkSparseImageMemoryBindInfo(Allocator * alloc,VkStructureType rootType,const VkSparseImageMemoryBindInfo * from,VkSparseImageMemoryBindInfo * to)662 void deepcopy_VkSparseImageMemoryBindInfo(Allocator* alloc, VkStructureType rootType,
663 const VkSparseImageMemoryBindInfo* from,
664 VkSparseImageMemoryBindInfo* to) {
665 (void)alloc;
666 (void)rootType;
667 *to = *from;
668 if (from) {
669 to->pBinds = nullptr;
670 if (from->pBinds) {
671 to->pBinds = (VkSparseImageMemoryBind*)alloc->alloc(
672 from->bindCount * sizeof(const VkSparseImageMemoryBind));
673 to->bindCount = from->bindCount;
674 for (uint32_t i = 0; i < (uint32_t)from->bindCount; ++i) {
675 deepcopy_VkSparseImageMemoryBind(alloc, rootType, from->pBinds + i,
676 (VkSparseImageMemoryBind*)(to->pBinds + i));
677 }
678 }
679 }
680 }
681
deepcopy_VkBindSparseInfo(Allocator * alloc,VkStructureType rootType,const VkBindSparseInfo * from,VkBindSparseInfo * to)682 void deepcopy_VkBindSparseInfo(Allocator* alloc, VkStructureType rootType,
683 const VkBindSparseInfo* from, VkBindSparseInfo* to) {
684 (void)alloc;
685 (void)rootType;
686 *to = *from;
687 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
688 rootType = from->sType;
689 }
690 const void* from_pNext = from;
691 size_t pNext_size = 0u;
692 while (!pNext_size && from_pNext) {
693 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
694 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
695 }
696 to->pNext = nullptr;
697 if (pNext_size) {
698 to->pNext = (void*)alloc->alloc(pNext_size);
699 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
700 }
701 to->pWaitSemaphores = nullptr;
702 if (from->pWaitSemaphores) {
703 to->pWaitSemaphores = (VkSemaphore*)alloc->dupArray(
704 from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
705 }
706 if (from) {
707 to->pBufferBinds = nullptr;
708 if (from->pBufferBinds) {
709 to->pBufferBinds = (VkSparseBufferMemoryBindInfo*)alloc->alloc(
710 from->bufferBindCount * sizeof(const VkSparseBufferMemoryBindInfo));
711 to->bufferBindCount = from->bufferBindCount;
712 for (uint32_t i = 0; i < (uint32_t)from->bufferBindCount; ++i) {
713 deepcopy_VkSparseBufferMemoryBindInfo(
714 alloc, rootType, from->pBufferBinds + i,
715 (VkSparseBufferMemoryBindInfo*)(to->pBufferBinds + i));
716 }
717 }
718 }
719 if (from) {
720 to->pImageOpaqueBinds = nullptr;
721 if (from->pImageOpaqueBinds) {
722 to->pImageOpaqueBinds = (VkSparseImageOpaqueMemoryBindInfo*)alloc->alloc(
723 from->imageOpaqueBindCount * sizeof(const VkSparseImageOpaqueMemoryBindInfo));
724 to->imageOpaqueBindCount = from->imageOpaqueBindCount;
725 for (uint32_t i = 0; i < (uint32_t)from->imageOpaqueBindCount; ++i) {
726 deepcopy_VkSparseImageOpaqueMemoryBindInfo(
727 alloc, rootType, from->pImageOpaqueBinds + i,
728 (VkSparseImageOpaqueMemoryBindInfo*)(to->pImageOpaqueBinds + i));
729 }
730 }
731 }
732 if (from) {
733 to->pImageBinds = nullptr;
734 if (from->pImageBinds) {
735 to->pImageBinds = (VkSparseImageMemoryBindInfo*)alloc->alloc(
736 from->imageBindCount * sizeof(const VkSparseImageMemoryBindInfo));
737 to->imageBindCount = from->imageBindCount;
738 for (uint32_t i = 0; i < (uint32_t)from->imageBindCount; ++i) {
739 deepcopy_VkSparseImageMemoryBindInfo(
740 alloc, rootType, from->pImageBinds + i,
741 (VkSparseImageMemoryBindInfo*)(to->pImageBinds + i));
742 }
743 }
744 }
745 to->pSignalSemaphores = nullptr;
746 if (from->pSignalSemaphores) {
747 to->pSignalSemaphores = (VkSemaphore*)alloc->dupArray(
748 from->pSignalSemaphores, from->signalSemaphoreCount * sizeof(const VkSemaphore));
749 }
750 }
751
deepcopy_VkSparseImageFormatProperties(Allocator * alloc,VkStructureType rootType,const VkSparseImageFormatProperties * from,VkSparseImageFormatProperties * to)752 void deepcopy_VkSparseImageFormatProperties(Allocator* alloc, VkStructureType rootType,
753 const VkSparseImageFormatProperties* from,
754 VkSparseImageFormatProperties* to) {
755 (void)alloc;
756 (void)rootType;
757 *to = *from;
758 deepcopy_VkExtent3D(alloc, rootType, &from->imageGranularity,
759 (VkExtent3D*)(&to->imageGranularity));
760 }
761
deepcopy_VkSparseImageMemoryRequirements(Allocator * alloc,VkStructureType rootType,const VkSparseImageMemoryRequirements * from,VkSparseImageMemoryRequirements * to)762 void deepcopy_VkSparseImageMemoryRequirements(Allocator* alloc, VkStructureType rootType,
763 const VkSparseImageMemoryRequirements* from,
764 VkSparseImageMemoryRequirements* to) {
765 (void)alloc;
766 (void)rootType;
767 *to = *from;
768 deepcopy_VkSparseImageFormatProperties(alloc, rootType, &from->formatProperties,
769 (VkSparseImageFormatProperties*)(&to->formatProperties));
770 }
771
deepcopy_VkFenceCreateInfo(Allocator * alloc,VkStructureType rootType,const VkFenceCreateInfo * from,VkFenceCreateInfo * to)772 void deepcopy_VkFenceCreateInfo(Allocator* alloc, VkStructureType rootType,
773 const VkFenceCreateInfo* from, VkFenceCreateInfo* to) {
774 (void)alloc;
775 (void)rootType;
776 *to = *from;
777 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
778 rootType = from->sType;
779 }
780 const void* from_pNext = from;
781 size_t pNext_size = 0u;
782 while (!pNext_size && from_pNext) {
783 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
784 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
785 }
786 to->pNext = nullptr;
787 if (pNext_size) {
788 to->pNext = (void*)alloc->alloc(pNext_size);
789 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
790 }
791 }
792
deepcopy_VkSemaphoreCreateInfo(Allocator * alloc,VkStructureType rootType,const VkSemaphoreCreateInfo * from,VkSemaphoreCreateInfo * to)793 void deepcopy_VkSemaphoreCreateInfo(Allocator* alloc, VkStructureType rootType,
794 const VkSemaphoreCreateInfo* from, VkSemaphoreCreateInfo* to) {
795 (void)alloc;
796 (void)rootType;
797 *to = *from;
798 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
799 rootType = from->sType;
800 }
801 const void* from_pNext = from;
802 size_t pNext_size = 0u;
803 while (!pNext_size && from_pNext) {
804 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
805 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
806 }
807 to->pNext = nullptr;
808 if (pNext_size) {
809 to->pNext = (void*)alloc->alloc(pNext_size);
810 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
811 }
812 }
813
deepcopy_VkEventCreateInfo(Allocator * alloc,VkStructureType rootType,const VkEventCreateInfo * from,VkEventCreateInfo * to)814 void deepcopy_VkEventCreateInfo(Allocator* alloc, VkStructureType rootType,
815 const VkEventCreateInfo* from, VkEventCreateInfo* to) {
816 (void)alloc;
817 (void)rootType;
818 *to = *from;
819 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
820 rootType = from->sType;
821 }
822 const void* from_pNext = from;
823 size_t pNext_size = 0u;
824 while (!pNext_size && from_pNext) {
825 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
826 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
827 }
828 to->pNext = nullptr;
829 if (pNext_size) {
830 to->pNext = (void*)alloc->alloc(pNext_size);
831 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
832 }
833 }
834
deepcopy_VkQueryPoolCreateInfo(Allocator * alloc,VkStructureType rootType,const VkQueryPoolCreateInfo * from,VkQueryPoolCreateInfo * to)835 void deepcopy_VkQueryPoolCreateInfo(Allocator* alloc, VkStructureType rootType,
836 const VkQueryPoolCreateInfo* from, VkQueryPoolCreateInfo* to) {
837 (void)alloc;
838 (void)rootType;
839 *to = *from;
840 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
841 rootType = from->sType;
842 }
843 const void* from_pNext = from;
844 size_t pNext_size = 0u;
845 while (!pNext_size && from_pNext) {
846 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
847 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
848 }
849 to->pNext = nullptr;
850 if (pNext_size) {
851 to->pNext = (void*)alloc->alloc(pNext_size);
852 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
853 }
854 }
855
deepcopy_VkBufferCreateInfo(Allocator * alloc,VkStructureType rootType,const VkBufferCreateInfo * from,VkBufferCreateInfo * to)856 void deepcopy_VkBufferCreateInfo(Allocator* alloc, VkStructureType rootType,
857 const VkBufferCreateInfo* from, VkBufferCreateInfo* to) {
858 (void)alloc;
859 (void)rootType;
860 *to = *from;
861 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
862 rootType = from->sType;
863 }
864 const void* from_pNext = from;
865 size_t pNext_size = 0u;
866 while (!pNext_size && from_pNext) {
867 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
868 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
869 }
870 to->pNext = nullptr;
871 if (pNext_size) {
872 to->pNext = (void*)alloc->alloc(pNext_size);
873 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
874 }
875 to->pQueueFamilyIndices = nullptr;
876 if (from->pQueueFamilyIndices) {
877 to->pQueueFamilyIndices = (uint32_t*)alloc->dupArray(
878 from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
879 }
880 }
881
deepcopy_VkBufferViewCreateInfo(Allocator * alloc,VkStructureType rootType,const VkBufferViewCreateInfo * from,VkBufferViewCreateInfo * to)882 void deepcopy_VkBufferViewCreateInfo(Allocator* alloc, VkStructureType rootType,
883 const VkBufferViewCreateInfo* from,
884 VkBufferViewCreateInfo* to) {
885 (void)alloc;
886 (void)rootType;
887 *to = *from;
888 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
889 rootType = from->sType;
890 }
891 const void* from_pNext = from;
892 size_t pNext_size = 0u;
893 while (!pNext_size && from_pNext) {
894 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
895 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
896 }
897 to->pNext = nullptr;
898 if (pNext_size) {
899 to->pNext = (void*)alloc->alloc(pNext_size);
900 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
901 }
902 }
903
deepcopy_VkImageCreateInfo(Allocator * alloc,VkStructureType rootType,const VkImageCreateInfo * from,VkImageCreateInfo * to)904 void deepcopy_VkImageCreateInfo(Allocator* alloc, VkStructureType rootType,
905 const VkImageCreateInfo* from, VkImageCreateInfo* to) {
906 (void)alloc;
907 (void)rootType;
908 *to = *from;
909 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
910 rootType = from->sType;
911 }
912 const void* from_pNext = from;
913 size_t pNext_size = 0u;
914 while (!pNext_size && from_pNext) {
915 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
916 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
917 }
918 to->pNext = nullptr;
919 if (pNext_size) {
920 to->pNext = (void*)alloc->alloc(pNext_size);
921 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
922 }
923 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
924 to->pQueueFamilyIndices = nullptr;
925 if (from->pQueueFamilyIndices) {
926 to->pQueueFamilyIndices = (uint32_t*)alloc->dupArray(
927 from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
928 }
929 }
930
deepcopy_VkSubresourceLayout(Allocator * alloc,VkStructureType rootType,const VkSubresourceLayout * from,VkSubresourceLayout * to)931 void deepcopy_VkSubresourceLayout(Allocator* alloc, VkStructureType rootType,
932 const VkSubresourceLayout* from, VkSubresourceLayout* to) {
933 (void)alloc;
934 (void)rootType;
935 *to = *from;
936 }
937
deepcopy_VkComponentMapping(Allocator * alloc,VkStructureType rootType,const VkComponentMapping * from,VkComponentMapping * to)938 void deepcopy_VkComponentMapping(Allocator* alloc, VkStructureType rootType,
939 const VkComponentMapping* from, VkComponentMapping* to) {
940 (void)alloc;
941 (void)rootType;
942 *to = *from;
943 }
944
deepcopy_VkImageViewCreateInfo(Allocator * alloc,VkStructureType rootType,const VkImageViewCreateInfo * from,VkImageViewCreateInfo * to)945 void deepcopy_VkImageViewCreateInfo(Allocator* alloc, VkStructureType rootType,
946 const VkImageViewCreateInfo* from, VkImageViewCreateInfo* to) {
947 (void)alloc;
948 (void)rootType;
949 *to = *from;
950 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
951 rootType = from->sType;
952 }
953 const void* from_pNext = from;
954 size_t pNext_size = 0u;
955 while (!pNext_size && from_pNext) {
956 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
957 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
958 }
959 to->pNext = nullptr;
960 if (pNext_size) {
961 to->pNext = (void*)alloc->alloc(pNext_size);
962 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
963 }
964 deepcopy_VkComponentMapping(alloc, rootType, &from->components,
965 (VkComponentMapping*)(&to->components));
966 deepcopy_VkImageSubresourceRange(alloc, rootType, &from->subresourceRange,
967 (VkImageSubresourceRange*)(&to->subresourceRange));
968 }
969
deepcopy_VkShaderModuleCreateInfo(Allocator * alloc,VkStructureType rootType,const VkShaderModuleCreateInfo * from,VkShaderModuleCreateInfo * to)970 void deepcopy_VkShaderModuleCreateInfo(Allocator* alloc, VkStructureType rootType,
971 const VkShaderModuleCreateInfo* from,
972 VkShaderModuleCreateInfo* to) {
973 (void)alloc;
974 (void)rootType;
975 *to = *from;
976 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
977 rootType = from->sType;
978 }
979 const void* from_pNext = from;
980 size_t pNext_size = 0u;
981 while (!pNext_size && from_pNext) {
982 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
983 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
984 }
985 to->pNext = nullptr;
986 if (pNext_size) {
987 to->pNext = (void*)alloc->alloc(pNext_size);
988 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
989 }
990 to->pCode = nullptr;
991 if (from->pCode) {
992 to->pCode =
993 (uint32_t*)alloc->dupArray(from->pCode, (from->codeSize / 4) * sizeof(const uint32_t));
994 }
995 }
996
deepcopy_VkPipelineCacheCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineCacheCreateInfo * from,VkPipelineCacheCreateInfo * to)997 void deepcopy_VkPipelineCacheCreateInfo(Allocator* alloc, VkStructureType rootType,
998 const VkPipelineCacheCreateInfo* from,
999 VkPipelineCacheCreateInfo* to) {
1000 (void)alloc;
1001 (void)rootType;
1002 *to = *from;
1003 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1004 rootType = from->sType;
1005 }
1006 const void* from_pNext = from;
1007 size_t pNext_size = 0u;
1008 while (!pNext_size && from_pNext) {
1009 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1010 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1011 }
1012 to->pNext = nullptr;
1013 if (pNext_size) {
1014 to->pNext = (void*)alloc->alloc(pNext_size);
1015 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1016 }
1017 to->pInitialData = nullptr;
1018 if (from->pInitialData) {
1019 to->pInitialData = (void*)alloc->dupArray(from->pInitialData,
1020 from->initialDataSize * sizeof(const uint8_t));
1021 }
1022 }
1023
deepcopy_VkSpecializationMapEntry(Allocator * alloc,VkStructureType rootType,const VkSpecializationMapEntry * from,VkSpecializationMapEntry * to)1024 void deepcopy_VkSpecializationMapEntry(Allocator* alloc, VkStructureType rootType,
1025 const VkSpecializationMapEntry* from,
1026 VkSpecializationMapEntry* to) {
1027 (void)alloc;
1028 (void)rootType;
1029 *to = *from;
1030 }
1031
deepcopy_VkSpecializationInfo(Allocator * alloc,VkStructureType rootType,const VkSpecializationInfo * from,VkSpecializationInfo * to)1032 void deepcopy_VkSpecializationInfo(Allocator* alloc, VkStructureType rootType,
1033 const VkSpecializationInfo* from, VkSpecializationInfo* to) {
1034 (void)alloc;
1035 (void)rootType;
1036 *to = *from;
1037 if (from) {
1038 to->pMapEntries = nullptr;
1039 if (from->pMapEntries) {
1040 to->pMapEntries = (VkSpecializationMapEntry*)alloc->alloc(
1041 from->mapEntryCount * sizeof(const VkSpecializationMapEntry));
1042 to->mapEntryCount = from->mapEntryCount;
1043 for (uint32_t i = 0; i < (uint32_t)from->mapEntryCount; ++i) {
1044 deepcopy_VkSpecializationMapEntry(alloc, rootType, from->pMapEntries + i,
1045 (VkSpecializationMapEntry*)(to->pMapEntries + i));
1046 }
1047 }
1048 }
1049 to->pData = nullptr;
1050 if (from->pData) {
1051 to->pData = (void*)alloc->dupArray(from->pData, from->dataSize * sizeof(const uint8_t));
1052 }
1053 }
1054
deepcopy_VkPipelineShaderStageCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineShaderStageCreateInfo * from,VkPipelineShaderStageCreateInfo * to)1055 void deepcopy_VkPipelineShaderStageCreateInfo(Allocator* alloc, VkStructureType rootType,
1056 const VkPipelineShaderStageCreateInfo* from,
1057 VkPipelineShaderStageCreateInfo* to) {
1058 (void)alloc;
1059 (void)rootType;
1060 *to = *from;
1061 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1062 rootType = from->sType;
1063 }
1064 const void* from_pNext = from;
1065 size_t pNext_size = 0u;
1066 while (!pNext_size && from_pNext) {
1067 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1068 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1069 }
1070 to->pNext = nullptr;
1071 if (pNext_size) {
1072 to->pNext = (void*)alloc->alloc(pNext_size);
1073 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1074 }
1075 to->pName = nullptr;
1076 if (from->pName) {
1077 to->pName = alloc->strDup(from->pName);
1078 }
1079 to->pSpecializationInfo = nullptr;
1080 if (from->pSpecializationInfo) {
1081 to->pSpecializationInfo =
1082 (VkSpecializationInfo*)alloc->alloc(sizeof(const VkSpecializationInfo));
1083 deepcopy_VkSpecializationInfo(alloc, rootType, from->pSpecializationInfo,
1084 (VkSpecializationInfo*)(to->pSpecializationInfo));
1085 }
1086 }
1087
deepcopy_VkComputePipelineCreateInfo(Allocator * alloc,VkStructureType rootType,const VkComputePipelineCreateInfo * from,VkComputePipelineCreateInfo * to)1088 void deepcopy_VkComputePipelineCreateInfo(Allocator* alloc, VkStructureType rootType,
1089 const VkComputePipelineCreateInfo* from,
1090 VkComputePipelineCreateInfo* to) {
1091 (void)alloc;
1092 (void)rootType;
1093 *to = *from;
1094 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1095 rootType = from->sType;
1096 }
1097 const void* from_pNext = from;
1098 size_t pNext_size = 0u;
1099 while (!pNext_size && from_pNext) {
1100 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1101 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1102 }
1103 to->pNext = nullptr;
1104 if (pNext_size) {
1105 to->pNext = (void*)alloc->alloc(pNext_size);
1106 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1107 }
1108 deepcopy_VkPipelineShaderStageCreateInfo(alloc, rootType, &from->stage,
1109 (VkPipelineShaderStageCreateInfo*)(&to->stage));
1110 }
1111
deepcopy_VkVertexInputBindingDescription(Allocator * alloc,VkStructureType rootType,const VkVertexInputBindingDescription * from,VkVertexInputBindingDescription * to)1112 void deepcopy_VkVertexInputBindingDescription(Allocator* alloc, VkStructureType rootType,
1113 const VkVertexInputBindingDescription* from,
1114 VkVertexInputBindingDescription* to) {
1115 (void)alloc;
1116 (void)rootType;
1117 *to = *from;
1118 }
1119
deepcopy_VkVertexInputAttributeDescription(Allocator * alloc,VkStructureType rootType,const VkVertexInputAttributeDescription * from,VkVertexInputAttributeDescription * to)1120 void deepcopy_VkVertexInputAttributeDescription(Allocator* alloc, VkStructureType rootType,
1121 const VkVertexInputAttributeDescription* from,
1122 VkVertexInputAttributeDescription* to) {
1123 (void)alloc;
1124 (void)rootType;
1125 *to = *from;
1126 }
1127
deepcopy_VkPipelineVertexInputStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineVertexInputStateCreateInfo * from,VkPipelineVertexInputStateCreateInfo * to)1128 void deepcopy_VkPipelineVertexInputStateCreateInfo(Allocator* alloc, VkStructureType rootType,
1129 const VkPipelineVertexInputStateCreateInfo* from,
1130 VkPipelineVertexInputStateCreateInfo* to) {
1131 (void)alloc;
1132 (void)rootType;
1133 *to = *from;
1134 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1135 rootType = from->sType;
1136 }
1137 const void* from_pNext = from;
1138 size_t pNext_size = 0u;
1139 while (!pNext_size && from_pNext) {
1140 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1141 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1142 }
1143 to->pNext = nullptr;
1144 if (pNext_size) {
1145 to->pNext = (void*)alloc->alloc(pNext_size);
1146 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1147 }
1148 if (from) {
1149 to->pVertexBindingDescriptions = nullptr;
1150 if (from->pVertexBindingDescriptions) {
1151 to->pVertexBindingDescriptions = (VkVertexInputBindingDescription*)alloc->alloc(
1152 from->vertexBindingDescriptionCount *
1153 sizeof(const VkVertexInputBindingDescription));
1154 to->vertexBindingDescriptionCount = from->vertexBindingDescriptionCount;
1155 for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDescriptionCount; ++i) {
1156 deepcopy_VkVertexInputBindingDescription(
1157 alloc, rootType, from->pVertexBindingDescriptions + i,
1158 (VkVertexInputBindingDescription*)(to->pVertexBindingDescriptions + i));
1159 }
1160 }
1161 }
1162 if (from) {
1163 to->pVertexAttributeDescriptions = nullptr;
1164 if (from->pVertexAttributeDescriptions) {
1165 to->pVertexAttributeDescriptions = (VkVertexInputAttributeDescription*)alloc->alloc(
1166 from->vertexAttributeDescriptionCount *
1167 sizeof(const VkVertexInputAttributeDescription));
1168 to->vertexAttributeDescriptionCount = from->vertexAttributeDescriptionCount;
1169 for (uint32_t i = 0; i < (uint32_t)from->vertexAttributeDescriptionCount; ++i) {
1170 deepcopy_VkVertexInputAttributeDescription(
1171 alloc, rootType, from->pVertexAttributeDescriptions + i,
1172 (VkVertexInputAttributeDescription*)(to->pVertexAttributeDescriptions + i));
1173 }
1174 }
1175 }
1176 }
1177
deepcopy_VkPipelineInputAssemblyStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineInputAssemblyStateCreateInfo * from,VkPipelineInputAssemblyStateCreateInfo * to)1178 void deepcopy_VkPipelineInputAssemblyStateCreateInfo(
1179 Allocator* alloc, VkStructureType rootType, const VkPipelineInputAssemblyStateCreateInfo* from,
1180 VkPipelineInputAssemblyStateCreateInfo* to) {
1181 (void)alloc;
1182 (void)rootType;
1183 *to = *from;
1184 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1185 rootType = from->sType;
1186 }
1187 const void* from_pNext = from;
1188 size_t pNext_size = 0u;
1189 while (!pNext_size && from_pNext) {
1190 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1191 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1192 }
1193 to->pNext = nullptr;
1194 if (pNext_size) {
1195 to->pNext = (void*)alloc->alloc(pNext_size);
1196 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1197 }
1198 }
1199
deepcopy_VkPipelineTessellationStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineTessellationStateCreateInfo * from,VkPipelineTessellationStateCreateInfo * to)1200 void deepcopy_VkPipelineTessellationStateCreateInfo(
1201 Allocator* alloc, VkStructureType rootType, const VkPipelineTessellationStateCreateInfo* from,
1202 VkPipelineTessellationStateCreateInfo* to) {
1203 (void)alloc;
1204 (void)rootType;
1205 *to = *from;
1206 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1207 rootType = from->sType;
1208 }
1209 const void* from_pNext = from;
1210 size_t pNext_size = 0u;
1211 while (!pNext_size && from_pNext) {
1212 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1213 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1214 }
1215 to->pNext = nullptr;
1216 if (pNext_size) {
1217 to->pNext = (void*)alloc->alloc(pNext_size);
1218 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1219 }
1220 }
1221
deepcopy_VkViewport(Allocator * alloc,VkStructureType rootType,const VkViewport * from,VkViewport * to)1222 void deepcopy_VkViewport(Allocator* alloc, VkStructureType rootType, const VkViewport* from,
1223 VkViewport* to) {
1224 (void)alloc;
1225 (void)rootType;
1226 *to = *from;
1227 }
1228
deepcopy_VkPipelineViewportStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineViewportStateCreateInfo * from,VkPipelineViewportStateCreateInfo * to)1229 void deepcopy_VkPipelineViewportStateCreateInfo(Allocator* alloc, VkStructureType rootType,
1230 const VkPipelineViewportStateCreateInfo* from,
1231 VkPipelineViewportStateCreateInfo* to) {
1232 (void)alloc;
1233 (void)rootType;
1234 *to = *from;
1235 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1236 rootType = from->sType;
1237 }
1238 const void* from_pNext = from;
1239 size_t pNext_size = 0u;
1240 while (!pNext_size && from_pNext) {
1241 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1242 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1243 }
1244 to->pNext = nullptr;
1245 if (pNext_size) {
1246 to->pNext = (void*)alloc->alloc(pNext_size);
1247 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1248 }
1249 if (from) {
1250 to->pViewports = nullptr;
1251 if (from->pViewports) {
1252 to->pViewports =
1253 (VkViewport*)alloc->alloc(from->viewportCount * sizeof(const VkViewport));
1254 to->viewportCount = from->viewportCount;
1255 for (uint32_t i = 0; i < (uint32_t)from->viewportCount; ++i) {
1256 deepcopy_VkViewport(alloc, rootType, from->pViewports + i,
1257 (VkViewport*)(to->pViewports + i));
1258 }
1259 }
1260 }
1261 if (from) {
1262 to->pScissors = nullptr;
1263 if (from->pScissors) {
1264 to->pScissors = (VkRect2D*)alloc->alloc(from->scissorCount * sizeof(const VkRect2D));
1265 to->scissorCount = from->scissorCount;
1266 for (uint32_t i = 0; i < (uint32_t)from->scissorCount; ++i) {
1267 deepcopy_VkRect2D(alloc, rootType, from->pScissors + i,
1268 (VkRect2D*)(to->pScissors + i));
1269 }
1270 }
1271 }
1272 }
1273
deepcopy_VkPipelineRasterizationStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineRasterizationStateCreateInfo * from,VkPipelineRasterizationStateCreateInfo * to)1274 void deepcopy_VkPipelineRasterizationStateCreateInfo(
1275 Allocator* alloc, VkStructureType rootType, const VkPipelineRasterizationStateCreateInfo* from,
1276 VkPipelineRasterizationStateCreateInfo* to) {
1277 (void)alloc;
1278 (void)rootType;
1279 *to = *from;
1280 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1281 rootType = from->sType;
1282 }
1283 const void* from_pNext = from;
1284 size_t pNext_size = 0u;
1285 while (!pNext_size && from_pNext) {
1286 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1287 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1288 }
1289 to->pNext = nullptr;
1290 if (pNext_size) {
1291 to->pNext = (void*)alloc->alloc(pNext_size);
1292 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1293 }
1294 }
1295
deepcopy_VkPipelineMultisampleStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineMultisampleStateCreateInfo * from,VkPipelineMultisampleStateCreateInfo * to)1296 void deepcopy_VkPipelineMultisampleStateCreateInfo(Allocator* alloc, VkStructureType rootType,
1297 const VkPipelineMultisampleStateCreateInfo* from,
1298 VkPipelineMultisampleStateCreateInfo* to) {
1299 (void)alloc;
1300 (void)rootType;
1301 *to = *from;
1302 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1303 rootType = from->sType;
1304 }
1305 const void* from_pNext = from;
1306 size_t pNext_size = 0u;
1307 while (!pNext_size && from_pNext) {
1308 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1309 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1310 }
1311 to->pNext = nullptr;
1312 if (pNext_size) {
1313 to->pNext = (void*)alloc->alloc(pNext_size);
1314 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1315 }
1316 to->pSampleMask = nullptr;
1317 if (from->pSampleMask) {
1318 to->pSampleMask = (VkSampleMask*)alloc->dupArray(
1319 from->pSampleMask,
1320 (((from->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
1321 }
1322 }
1323
deepcopy_VkStencilOpState(Allocator * alloc,VkStructureType rootType,const VkStencilOpState * from,VkStencilOpState * to)1324 void deepcopy_VkStencilOpState(Allocator* alloc, VkStructureType rootType,
1325 const VkStencilOpState* from, VkStencilOpState* to) {
1326 (void)alloc;
1327 (void)rootType;
1328 *to = *from;
1329 }
1330
deepcopy_VkPipelineDepthStencilStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineDepthStencilStateCreateInfo * from,VkPipelineDepthStencilStateCreateInfo * to)1331 void deepcopy_VkPipelineDepthStencilStateCreateInfo(
1332 Allocator* alloc, VkStructureType rootType, const VkPipelineDepthStencilStateCreateInfo* from,
1333 VkPipelineDepthStencilStateCreateInfo* to) {
1334 (void)alloc;
1335 (void)rootType;
1336 *to = *from;
1337 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1338 rootType = from->sType;
1339 }
1340 const void* from_pNext = from;
1341 size_t pNext_size = 0u;
1342 while (!pNext_size && from_pNext) {
1343 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1344 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1345 }
1346 to->pNext = nullptr;
1347 if (pNext_size) {
1348 to->pNext = (void*)alloc->alloc(pNext_size);
1349 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1350 }
1351 deepcopy_VkStencilOpState(alloc, rootType, &from->front, (VkStencilOpState*)(&to->front));
1352 deepcopy_VkStencilOpState(alloc, rootType, &from->back, (VkStencilOpState*)(&to->back));
1353 }
1354
deepcopy_VkPipelineColorBlendAttachmentState(Allocator * alloc,VkStructureType rootType,const VkPipelineColorBlendAttachmentState * from,VkPipelineColorBlendAttachmentState * to)1355 void deepcopy_VkPipelineColorBlendAttachmentState(Allocator* alloc, VkStructureType rootType,
1356 const VkPipelineColorBlendAttachmentState* from,
1357 VkPipelineColorBlendAttachmentState* to) {
1358 (void)alloc;
1359 (void)rootType;
1360 *to = *from;
1361 }
1362
deepcopy_VkPipelineColorBlendStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineColorBlendStateCreateInfo * from,VkPipelineColorBlendStateCreateInfo * to)1363 void deepcopy_VkPipelineColorBlendStateCreateInfo(Allocator* alloc, VkStructureType rootType,
1364 const VkPipelineColorBlendStateCreateInfo* from,
1365 VkPipelineColorBlendStateCreateInfo* to) {
1366 (void)alloc;
1367 (void)rootType;
1368 *to = *from;
1369 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1370 rootType = from->sType;
1371 }
1372 const void* from_pNext = from;
1373 size_t pNext_size = 0u;
1374 while (!pNext_size && from_pNext) {
1375 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1376 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1377 }
1378 to->pNext = nullptr;
1379 if (pNext_size) {
1380 to->pNext = (void*)alloc->alloc(pNext_size);
1381 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1382 }
1383 if (from) {
1384 to->pAttachments = nullptr;
1385 if (from->pAttachments) {
1386 to->pAttachments = (VkPipelineColorBlendAttachmentState*)alloc->alloc(
1387 from->attachmentCount * sizeof(const VkPipelineColorBlendAttachmentState));
1388 to->attachmentCount = from->attachmentCount;
1389 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i) {
1390 deepcopy_VkPipelineColorBlendAttachmentState(
1391 alloc, rootType, from->pAttachments + i,
1392 (VkPipelineColorBlendAttachmentState*)(to->pAttachments + i));
1393 }
1394 }
1395 }
1396 memcpy(to->blendConstants, from->blendConstants, 4 * sizeof(float));
1397 }
1398
deepcopy_VkPipelineDynamicStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineDynamicStateCreateInfo * from,VkPipelineDynamicStateCreateInfo * to)1399 void deepcopy_VkPipelineDynamicStateCreateInfo(Allocator* alloc, VkStructureType rootType,
1400 const VkPipelineDynamicStateCreateInfo* from,
1401 VkPipelineDynamicStateCreateInfo* to) {
1402 (void)alloc;
1403 (void)rootType;
1404 *to = *from;
1405 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1406 rootType = from->sType;
1407 }
1408 const void* from_pNext = from;
1409 size_t pNext_size = 0u;
1410 while (!pNext_size && from_pNext) {
1411 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1412 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1413 }
1414 to->pNext = nullptr;
1415 if (pNext_size) {
1416 to->pNext = (void*)alloc->alloc(pNext_size);
1417 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1418 }
1419 to->pDynamicStates = nullptr;
1420 if (from->pDynamicStates) {
1421 to->pDynamicStates = (VkDynamicState*)alloc->dupArray(
1422 from->pDynamicStates, from->dynamicStateCount * sizeof(const VkDynamicState));
1423 }
1424 }
1425
deepcopy_VkGraphicsPipelineCreateInfo(Allocator * alloc,VkStructureType rootType,const VkGraphicsPipelineCreateInfo * from,VkGraphicsPipelineCreateInfo * to)1426 void deepcopy_VkGraphicsPipelineCreateInfo(Allocator* alloc, VkStructureType rootType,
1427 const VkGraphicsPipelineCreateInfo* from,
1428 VkGraphicsPipelineCreateInfo* to) {
1429 (void)alloc;
1430 (void)rootType;
1431 *to = *from;
1432 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1433 rootType = from->sType;
1434 }
1435 const void* from_pNext = from;
1436 size_t pNext_size = 0u;
1437 while (!pNext_size && from_pNext) {
1438 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1439 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1440 }
1441 to->pNext = nullptr;
1442 if (pNext_size) {
1443 to->pNext = (void*)alloc->alloc(pNext_size);
1444 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1445 }
1446 if (from) {
1447 to->pStages = nullptr;
1448 if (from->pStages) {
1449 to->pStages = (VkPipelineShaderStageCreateInfo*)alloc->alloc(
1450 from->stageCount * sizeof(const VkPipelineShaderStageCreateInfo));
1451 to->stageCount = from->stageCount;
1452 for (uint32_t i = 0; i < (uint32_t)from->stageCount; ++i) {
1453 deepcopy_VkPipelineShaderStageCreateInfo(
1454 alloc, rootType, from->pStages + i,
1455 (VkPipelineShaderStageCreateInfo*)(to->pStages + i));
1456 }
1457 }
1458 }
1459 to->pVertexInputState = nullptr;
1460 if (from->pVertexInputState) {
1461 to->pVertexInputState = (VkPipelineVertexInputStateCreateInfo*)alloc->alloc(
1462 sizeof(const VkPipelineVertexInputStateCreateInfo));
1463 deepcopy_VkPipelineVertexInputStateCreateInfo(
1464 alloc, rootType, from->pVertexInputState,
1465 (VkPipelineVertexInputStateCreateInfo*)(to->pVertexInputState));
1466 }
1467 to->pInputAssemblyState = nullptr;
1468 if (from->pInputAssemblyState) {
1469 to->pInputAssemblyState = (VkPipelineInputAssemblyStateCreateInfo*)alloc->alloc(
1470 sizeof(const VkPipelineInputAssemblyStateCreateInfo));
1471 deepcopy_VkPipelineInputAssemblyStateCreateInfo(
1472 alloc, rootType, from->pInputAssemblyState,
1473 (VkPipelineInputAssemblyStateCreateInfo*)(to->pInputAssemblyState));
1474 }
1475 to->pTessellationState = nullptr;
1476 if (from->pTessellationState) {
1477 to->pTessellationState = (VkPipelineTessellationStateCreateInfo*)alloc->alloc(
1478 sizeof(const VkPipelineTessellationStateCreateInfo));
1479 deepcopy_VkPipelineTessellationStateCreateInfo(
1480 alloc, rootType, from->pTessellationState,
1481 (VkPipelineTessellationStateCreateInfo*)(to->pTessellationState));
1482 }
1483 to->pViewportState = nullptr;
1484 if (from->pViewportState) {
1485 to->pViewportState = (VkPipelineViewportStateCreateInfo*)alloc->alloc(
1486 sizeof(const VkPipelineViewportStateCreateInfo));
1487 deepcopy_VkPipelineViewportStateCreateInfo(
1488 alloc, rootType, from->pViewportState,
1489 (VkPipelineViewportStateCreateInfo*)(to->pViewportState));
1490 }
1491 to->pRasterizationState = nullptr;
1492 if (from->pRasterizationState) {
1493 to->pRasterizationState = (VkPipelineRasterizationStateCreateInfo*)alloc->alloc(
1494 sizeof(const VkPipelineRasterizationStateCreateInfo));
1495 deepcopy_VkPipelineRasterizationStateCreateInfo(
1496 alloc, rootType, from->pRasterizationState,
1497 (VkPipelineRasterizationStateCreateInfo*)(to->pRasterizationState));
1498 }
1499 to->pMultisampleState = nullptr;
1500 if (from->pMultisampleState) {
1501 to->pMultisampleState = (VkPipelineMultisampleStateCreateInfo*)alloc->alloc(
1502 sizeof(const VkPipelineMultisampleStateCreateInfo));
1503 deepcopy_VkPipelineMultisampleStateCreateInfo(
1504 alloc, rootType, from->pMultisampleState,
1505 (VkPipelineMultisampleStateCreateInfo*)(to->pMultisampleState));
1506 }
1507 to->pDepthStencilState = nullptr;
1508 if (from->pDepthStencilState) {
1509 to->pDepthStencilState = (VkPipelineDepthStencilStateCreateInfo*)alloc->alloc(
1510 sizeof(const VkPipelineDepthStencilStateCreateInfo));
1511 deepcopy_VkPipelineDepthStencilStateCreateInfo(
1512 alloc, rootType, from->pDepthStencilState,
1513 (VkPipelineDepthStencilStateCreateInfo*)(to->pDepthStencilState));
1514 }
1515 to->pColorBlendState = nullptr;
1516 if (from->pColorBlendState) {
1517 to->pColorBlendState = (VkPipelineColorBlendStateCreateInfo*)alloc->alloc(
1518 sizeof(const VkPipelineColorBlendStateCreateInfo));
1519 deepcopy_VkPipelineColorBlendStateCreateInfo(
1520 alloc, rootType, from->pColorBlendState,
1521 (VkPipelineColorBlendStateCreateInfo*)(to->pColorBlendState));
1522 }
1523 to->pDynamicState = nullptr;
1524 if (from->pDynamicState) {
1525 to->pDynamicState = (VkPipelineDynamicStateCreateInfo*)alloc->alloc(
1526 sizeof(const VkPipelineDynamicStateCreateInfo));
1527 deepcopy_VkPipelineDynamicStateCreateInfo(
1528 alloc, rootType, from->pDynamicState,
1529 (VkPipelineDynamicStateCreateInfo*)(to->pDynamicState));
1530 }
1531 }
1532
deepcopy_VkPushConstantRange(Allocator * alloc,VkStructureType rootType,const VkPushConstantRange * from,VkPushConstantRange * to)1533 void deepcopy_VkPushConstantRange(Allocator* alloc, VkStructureType rootType,
1534 const VkPushConstantRange* from, VkPushConstantRange* to) {
1535 (void)alloc;
1536 (void)rootType;
1537 *to = *from;
1538 }
1539
deepcopy_VkPipelineLayoutCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineLayoutCreateInfo * from,VkPipelineLayoutCreateInfo * to)1540 void deepcopy_VkPipelineLayoutCreateInfo(Allocator* alloc, VkStructureType rootType,
1541 const VkPipelineLayoutCreateInfo* from,
1542 VkPipelineLayoutCreateInfo* to) {
1543 (void)alloc;
1544 (void)rootType;
1545 *to = *from;
1546 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1547 rootType = from->sType;
1548 }
1549 const void* from_pNext = from;
1550 size_t pNext_size = 0u;
1551 while (!pNext_size && from_pNext) {
1552 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1553 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1554 }
1555 to->pNext = nullptr;
1556 if (pNext_size) {
1557 to->pNext = (void*)alloc->alloc(pNext_size);
1558 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1559 }
1560 to->pSetLayouts = nullptr;
1561 if (from->pSetLayouts) {
1562 to->pSetLayouts = (VkDescriptorSetLayout*)alloc->dupArray(
1563 from->pSetLayouts, from->setLayoutCount * sizeof(const VkDescriptorSetLayout));
1564 }
1565 if (from) {
1566 to->pPushConstantRanges = nullptr;
1567 if (from->pPushConstantRanges) {
1568 to->pPushConstantRanges = (VkPushConstantRange*)alloc->alloc(
1569 from->pushConstantRangeCount * sizeof(const VkPushConstantRange));
1570 to->pushConstantRangeCount = from->pushConstantRangeCount;
1571 for (uint32_t i = 0; i < (uint32_t)from->pushConstantRangeCount; ++i) {
1572 deepcopy_VkPushConstantRange(alloc, rootType, from->pPushConstantRanges + i,
1573 (VkPushConstantRange*)(to->pPushConstantRanges + i));
1574 }
1575 }
1576 }
1577 }
1578
deepcopy_VkSamplerCreateInfo(Allocator * alloc,VkStructureType rootType,const VkSamplerCreateInfo * from,VkSamplerCreateInfo * to)1579 void deepcopy_VkSamplerCreateInfo(Allocator* alloc, VkStructureType rootType,
1580 const VkSamplerCreateInfo* from, VkSamplerCreateInfo* to) {
1581 (void)alloc;
1582 (void)rootType;
1583 *to = *from;
1584 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1585 rootType = from->sType;
1586 }
1587 const void* from_pNext = from;
1588 size_t pNext_size = 0u;
1589 while (!pNext_size && from_pNext) {
1590 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1591 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1592 }
1593 to->pNext = nullptr;
1594 if (pNext_size) {
1595 to->pNext = (void*)alloc->alloc(pNext_size);
1596 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1597 }
1598 }
1599
deepcopy_VkCopyDescriptorSet(Allocator * alloc,VkStructureType rootType,const VkCopyDescriptorSet * from,VkCopyDescriptorSet * to)1600 void deepcopy_VkCopyDescriptorSet(Allocator* alloc, VkStructureType rootType,
1601 const VkCopyDescriptorSet* from, VkCopyDescriptorSet* to) {
1602 (void)alloc;
1603 (void)rootType;
1604 *to = *from;
1605 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1606 rootType = from->sType;
1607 }
1608 const void* from_pNext = from;
1609 size_t pNext_size = 0u;
1610 while (!pNext_size && from_pNext) {
1611 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1612 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1613 }
1614 to->pNext = nullptr;
1615 if (pNext_size) {
1616 to->pNext = (void*)alloc->alloc(pNext_size);
1617 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1618 }
1619 }
1620
deepcopy_VkDescriptorBufferInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorBufferInfo * from,VkDescriptorBufferInfo * to)1621 void deepcopy_VkDescriptorBufferInfo(Allocator* alloc, VkStructureType rootType,
1622 const VkDescriptorBufferInfo* from,
1623 VkDescriptorBufferInfo* to) {
1624 (void)alloc;
1625 (void)rootType;
1626 *to = *from;
1627 }
1628
deepcopy_VkDescriptorImageInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorImageInfo * from,VkDescriptorImageInfo * to)1629 void deepcopy_VkDescriptorImageInfo(Allocator* alloc, VkStructureType rootType,
1630 const VkDescriptorImageInfo* from, VkDescriptorImageInfo* to) {
1631 (void)alloc;
1632 (void)rootType;
1633 *to = *from;
1634 }
1635
deepcopy_VkDescriptorPoolSize(Allocator * alloc,VkStructureType rootType,const VkDescriptorPoolSize * from,VkDescriptorPoolSize * to)1636 void deepcopy_VkDescriptorPoolSize(Allocator* alloc, VkStructureType rootType,
1637 const VkDescriptorPoolSize* from, VkDescriptorPoolSize* to) {
1638 (void)alloc;
1639 (void)rootType;
1640 *to = *from;
1641 }
1642
deepcopy_VkDescriptorPoolCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorPoolCreateInfo * from,VkDescriptorPoolCreateInfo * to)1643 void deepcopy_VkDescriptorPoolCreateInfo(Allocator* alloc, VkStructureType rootType,
1644 const VkDescriptorPoolCreateInfo* from,
1645 VkDescriptorPoolCreateInfo* to) {
1646 (void)alloc;
1647 (void)rootType;
1648 *to = *from;
1649 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1650 rootType = from->sType;
1651 }
1652 const void* from_pNext = from;
1653 size_t pNext_size = 0u;
1654 while (!pNext_size && from_pNext) {
1655 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1656 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1657 }
1658 to->pNext = nullptr;
1659 if (pNext_size) {
1660 to->pNext = (void*)alloc->alloc(pNext_size);
1661 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1662 }
1663 if (from) {
1664 to->pPoolSizes = nullptr;
1665 if (from->pPoolSizes) {
1666 to->pPoolSizes = (VkDescriptorPoolSize*)alloc->alloc(
1667 from->poolSizeCount * sizeof(const VkDescriptorPoolSize));
1668 to->poolSizeCount = from->poolSizeCount;
1669 for (uint32_t i = 0; i < (uint32_t)from->poolSizeCount; ++i) {
1670 deepcopy_VkDescriptorPoolSize(alloc, rootType, from->pPoolSizes + i,
1671 (VkDescriptorPoolSize*)(to->pPoolSizes + i));
1672 }
1673 }
1674 }
1675 }
1676
deepcopy_VkDescriptorSetAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetAllocateInfo * from,VkDescriptorSetAllocateInfo * to)1677 void deepcopy_VkDescriptorSetAllocateInfo(Allocator* alloc, VkStructureType rootType,
1678 const VkDescriptorSetAllocateInfo* from,
1679 VkDescriptorSetAllocateInfo* to) {
1680 (void)alloc;
1681 (void)rootType;
1682 *to = *from;
1683 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1684 rootType = from->sType;
1685 }
1686 const void* from_pNext = from;
1687 size_t pNext_size = 0u;
1688 while (!pNext_size && from_pNext) {
1689 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1690 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1691 }
1692 to->pNext = nullptr;
1693 if (pNext_size) {
1694 to->pNext = (void*)alloc->alloc(pNext_size);
1695 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1696 }
1697 to->pSetLayouts = nullptr;
1698 if (from->pSetLayouts) {
1699 to->pSetLayouts = (VkDescriptorSetLayout*)alloc->dupArray(
1700 from->pSetLayouts, from->descriptorSetCount * sizeof(const VkDescriptorSetLayout));
1701 }
1702 }
1703
deepcopy_VkDescriptorSetLayoutBinding(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetLayoutBinding * from,VkDescriptorSetLayoutBinding * to)1704 void deepcopy_VkDescriptorSetLayoutBinding(Allocator* alloc, VkStructureType rootType,
1705 const VkDescriptorSetLayoutBinding* from,
1706 VkDescriptorSetLayoutBinding* to) {
1707 (void)alloc;
1708 (void)rootType;
1709 *to = *from;
1710 to->pImmutableSamplers = nullptr;
1711 if (from->pImmutableSamplers) {
1712 to->pImmutableSamplers = (VkSampler*)alloc->dupArray(
1713 from->pImmutableSamplers, from->descriptorCount * sizeof(const VkSampler));
1714 }
1715 }
1716
deepcopy_VkDescriptorSetLayoutCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetLayoutCreateInfo * from,VkDescriptorSetLayoutCreateInfo * to)1717 void deepcopy_VkDescriptorSetLayoutCreateInfo(Allocator* alloc, VkStructureType rootType,
1718 const VkDescriptorSetLayoutCreateInfo* from,
1719 VkDescriptorSetLayoutCreateInfo* to) {
1720 (void)alloc;
1721 (void)rootType;
1722 *to = *from;
1723 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1724 rootType = from->sType;
1725 }
1726 const void* from_pNext = from;
1727 size_t pNext_size = 0u;
1728 while (!pNext_size && from_pNext) {
1729 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1730 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1731 }
1732 to->pNext = nullptr;
1733 if (pNext_size) {
1734 to->pNext = (void*)alloc->alloc(pNext_size);
1735 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1736 }
1737 if (from) {
1738 to->pBindings = nullptr;
1739 if (from->pBindings) {
1740 to->pBindings = (VkDescriptorSetLayoutBinding*)alloc->alloc(
1741 from->bindingCount * sizeof(const VkDescriptorSetLayoutBinding));
1742 to->bindingCount = from->bindingCount;
1743 for (uint32_t i = 0; i < (uint32_t)from->bindingCount; ++i) {
1744 deepcopy_VkDescriptorSetLayoutBinding(
1745 alloc, rootType, from->pBindings + i,
1746 (VkDescriptorSetLayoutBinding*)(to->pBindings + i));
1747 }
1748 }
1749 }
1750 }
1751
deepcopy_VkWriteDescriptorSet(Allocator * alloc,VkStructureType rootType,const VkWriteDescriptorSet * from,VkWriteDescriptorSet * to)1752 void deepcopy_VkWriteDescriptorSet(Allocator* alloc, VkStructureType rootType,
1753 const VkWriteDescriptorSet* from, VkWriteDescriptorSet* to) {
1754 (void)alloc;
1755 (void)rootType;
1756 *to = *from;
1757 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1758 rootType = from->sType;
1759 }
1760 const void* from_pNext = from;
1761 size_t pNext_size = 0u;
1762 while (!pNext_size && from_pNext) {
1763 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1764 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1765 }
1766 to->pNext = nullptr;
1767 if (pNext_size) {
1768 to->pNext = (void*)alloc->alloc(pNext_size);
1769 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1770 }
1771 if (from) {
1772 to->pImageInfo = nullptr;
1773 if (from->pImageInfo) {
1774 to->pImageInfo = (VkDescriptorImageInfo*)alloc->alloc(
1775 from->descriptorCount * sizeof(const VkDescriptorImageInfo));
1776 to->descriptorCount = from->descriptorCount;
1777 for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i) {
1778 deepcopy_VkDescriptorImageInfo(alloc, rootType, from->pImageInfo + i,
1779 (VkDescriptorImageInfo*)(to->pImageInfo + i));
1780 }
1781 }
1782 }
1783 if (from) {
1784 to->pBufferInfo = nullptr;
1785 if (from->pBufferInfo) {
1786 to->pBufferInfo = (VkDescriptorBufferInfo*)alloc->alloc(
1787 from->descriptorCount * sizeof(const VkDescriptorBufferInfo));
1788 to->descriptorCount = from->descriptorCount;
1789 for (uint32_t i = 0; i < (uint32_t)from->descriptorCount; ++i) {
1790 deepcopy_VkDescriptorBufferInfo(alloc, rootType, from->pBufferInfo + i,
1791 (VkDescriptorBufferInfo*)(to->pBufferInfo + i));
1792 }
1793 }
1794 }
1795 to->pTexelBufferView = nullptr;
1796 if (from->pTexelBufferView) {
1797 to->pTexelBufferView = (VkBufferView*)alloc->dupArray(
1798 from->pTexelBufferView, from->descriptorCount * sizeof(const VkBufferView));
1799 }
1800 }
1801
deepcopy_VkAttachmentDescription(Allocator * alloc,VkStructureType rootType,const VkAttachmentDescription * from,VkAttachmentDescription * to)1802 void deepcopy_VkAttachmentDescription(Allocator* alloc, VkStructureType rootType,
1803 const VkAttachmentDescription* from,
1804 VkAttachmentDescription* to) {
1805 (void)alloc;
1806 (void)rootType;
1807 *to = *from;
1808 }
1809
deepcopy_VkAttachmentReference(Allocator * alloc,VkStructureType rootType,const VkAttachmentReference * from,VkAttachmentReference * to)1810 void deepcopy_VkAttachmentReference(Allocator* alloc, VkStructureType rootType,
1811 const VkAttachmentReference* from, VkAttachmentReference* to) {
1812 (void)alloc;
1813 (void)rootType;
1814 *to = *from;
1815 }
1816
deepcopy_VkFramebufferCreateInfo(Allocator * alloc,VkStructureType rootType,const VkFramebufferCreateInfo * from,VkFramebufferCreateInfo * to)1817 void deepcopy_VkFramebufferCreateInfo(Allocator* alloc, VkStructureType rootType,
1818 const VkFramebufferCreateInfo* from,
1819 VkFramebufferCreateInfo* to) {
1820 (void)alloc;
1821 (void)rootType;
1822 *to = *from;
1823 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1824 rootType = from->sType;
1825 }
1826 const void* from_pNext = from;
1827 size_t pNext_size = 0u;
1828 while (!pNext_size && from_pNext) {
1829 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1830 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1831 }
1832 to->pNext = nullptr;
1833 if (pNext_size) {
1834 to->pNext = (void*)alloc->alloc(pNext_size);
1835 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1836 }
1837 to->pAttachments = nullptr;
1838 if (from->pAttachments) {
1839 to->pAttachments = (VkImageView*)alloc->dupArray(
1840 from->pAttachments, from->attachmentCount * sizeof(const VkImageView));
1841 }
1842 }
1843
deepcopy_VkSubpassDescription(Allocator * alloc,VkStructureType rootType,const VkSubpassDescription * from,VkSubpassDescription * to)1844 void deepcopy_VkSubpassDescription(Allocator* alloc, VkStructureType rootType,
1845 const VkSubpassDescription* from, VkSubpassDescription* to) {
1846 (void)alloc;
1847 (void)rootType;
1848 *to = *from;
1849 if (from) {
1850 to->pInputAttachments = nullptr;
1851 if (from->pInputAttachments) {
1852 to->pInputAttachments = (VkAttachmentReference*)alloc->alloc(
1853 from->inputAttachmentCount * sizeof(const VkAttachmentReference));
1854 to->inputAttachmentCount = from->inputAttachmentCount;
1855 for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i) {
1856 deepcopy_VkAttachmentReference(alloc, rootType, from->pInputAttachments + i,
1857 (VkAttachmentReference*)(to->pInputAttachments + i));
1858 }
1859 }
1860 }
1861 if (from) {
1862 to->pColorAttachments = nullptr;
1863 if (from->pColorAttachments) {
1864 to->pColorAttachments = (VkAttachmentReference*)alloc->alloc(
1865 from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1866 to->colorAttachmentCount = from->colorAttachmentCount;
1867 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i) {
1868 deepcopy_VkAttachmentReference(alloc, rootType, from->pColorAttachments + i,
1869 (VkAttachmentReference*)(to->pColorAttachments + i));
1870 }
1871 }
1872 }
1873 if (from) {
1874 to->pResolveAttachments = nullptr;
1875 if (from->pResolveAttachments) {
1876 to->pResolveAttachments = (VkAttachmentReference*)alloc->alloc(
1877 from->colorAttachmentCount * sizeof(const VkAttachmentReference));
1878 to->colorAttachmentCount = from->colorAttachmentCount;
1879 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i) {
1880 deepcopy_VkAttachmentReference(
1881 alloc, rootType, from->pResolveAttachments + i,
1882 (VkAttachmentReference*)(to->pResolveAttachments + i));
1883 }
1884 }
1885 }
1886 to->pDepthStencilAttachment = nullptr;
1887 if (from->pDepthStencilAttachment) {
1888 to->pDepthStencilAttachment =
1889 (VkAttachmentReference*)alloc->alloc(sizeof(const VkAttachmentReference));
1890 deepcopy_VkAttachmentReference(alloc, rootType, from->pDepthStencilAttachment,
1891 (VkAttachmentReference*)(to->pDepthStencilAttachment));
1892 }
1893 to->pPreserveAttachments = nullptr;
1894 if (from->pPreserveAttachments) {
1895 to->pPreserveAttachments = (uint32_t*)alloc->dupArray(
1896 from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
1897 }
1898 }
1899
deepcopy_VkSubpassDependency(Allocator * alloc,VkStructureType rootType,const VkSubpassDependency * from,VkSubpassDependency * to)1900 void deepcopy_VkSubpassDependency(Allocator* alloc, VkStructureType rootType,
1901 const VkSubpassDependency* from, VkSubpassDependency* to) {
1902 (void)alloc;
1903 (void)rootType;
1904 *to = *from;
1905 }
1906
deepcopy_VkRenderPassCreateInfo(Allocator * alloc,VkStructureType rootType,const VkRenderPassCreateInfo * from,VkRenderPassCreateInfo * to)1907 void deepcopy_VkRenderPassCreateInfo(Allocator* alloc, VkStructureType rootType,
1908 const VkRenderPassCreateInfo* from,
1909 VkRenderPassCreateInfo* to) {
1910 (void)alloc;
1911 (void)rootType;
1912 *to = *from;
1913 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1914 rootType = from->sType;
1915 }
1916 const void* from_pNext = from;
1917 size_t pNext_size = 0u;
1918 while (!pNext_size && from_pNext) {
1919 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1920 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1921 }
1922 to->pNext = nullptr;
1923 if (pNext_size) {
1924 to->pNext = (void*)alloc->alloc(pNext_size);
1925 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1926 }
1927 if (from) {
1928 to->pAttachments = nullptr;
1929 if (from->pAttachments) {
1930 to->pAttachments = (VkAttachmentDescription*)alloc->alloc(
1931 from->attachmentCount * sizeof(const VkAttachmentDescription));
1932 to->attachmentCount = from->attachmentCount;
1933 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i) {
1934 deepcopy_VkAttachmentDescription(alloc, rootType, from->pAttachments + i,
1935 (VkAttachmentDescription*)(to->pAttachments + i));
1936 }
1937 }
1938 }
1939 if (from) {
1940 to->pSubpasses = nullptr;
1941 if (from->pSubpasses) {
1942 to->pSubpasses = (VkSubpassDescription*)alloc->alloc(
1943 from->subpassCount * sizeof(const VkSubpassDescription));
1944 to->subpassCount = from->subpassCount;
1945 for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i) {
1946 deepcopy_VkSubpassDescription(alloc, rootType, from->pSubpasses + i,
1947 (VkSubpassDescription*)(to->pSubpasses + i));
1948 }
1949 }
1950 }
1951 if (from) {
1952 to->pDependencies = nullptr;
1953 if (from->pDependencies) {
1954 to->pDependencies = (VkSubpassDependency*)alloc->alloc(
1955 from->dependencyCount * sizeof(const VkSubpassDependency));
1956 to->dependencyCount = from->dependencyCount;
1957 for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i) {
1958 deepcopy_VkSubpassDependency(alloc, rootType, from->pDependencies + i,
1959 (VkSubpassDependency*)(to->pDependencies + i));
1960 }
1961 }
1962 }
1963 }
1964
deepcopy_VkCommandPoolCreateInfo(Allocator * alloc,VkStructureType rootType,const VkCommandPoolCreateInfo * from,VkCommandPoolCreateInfo * to)1965 void deepcopy_VkCommandPoolCreateInfo(Allocator* alloc, VkStructureType rootType,
1966 const VkCommandPoolCreateInfo* from,
1967 VkCommandPoolCreateInfo* to) {
1968 (void)alloc;
1969 (void)rootType;
1970 *to = *from;
1971 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1972 rootType = from->sType;
1973 }
1974 const void* from_pNext = from;
1975 size_t pNext_size = 0u;
1976 while (!pNext_size && from_pNext) {
1977 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
1978 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
1979 }
1980 to->pNext = nullptr;
1981 if (pNext_size) {
1982 to->pNext = (void*)alloc->alloc(pNext_size);
1983 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
1984 }
1985 }
1986
deepcopy_VkCommandBufferAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkCommandBufferAllocateInfo * from,VkCommandBufferAllocateInfo * to)1987 void deepcopy_VkCommandBufferAllocateInfo(Allocator* alloc, VkStructureType rootType,
1988 const VkCommandBufferAllocateInfo* from,
1989 VkCommandBufferAllocateInfo* to) {
1990 (void)alloc;
1991 (void)rootType;
1992 *to = *from;
1993 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
1994 rootType = from->sType;
1995 }
1996 const void* from_pNext = from;
1997 size_t pNext_size = 0u;
1998 while (!pNext_size && from_pNext) {
1999 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2000 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2001 }
2002 to->pNext = nullptr;
2003 if (pNext_size) {
2004 to->pNext = (void*)alloc->alloc(pNext_size);
2005 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2006 }
2007 }
2008
deepcopy_VkCommandBufferInheritanceInfo(Allocator * alloc,VkStructureType rootType,const VkCommandBufferInheritanceInfo * from,VkCommandBufferInheritanceInfo * to)2009 void deepcopy_VkCommandBufferInheritanceInfo(Allocator* alloc, VkStructureType rootType,
2010 const VkCommandBufferInheritanceInfo* from,
2011 VkCommandBufferInheritanceInfo* to) {
2012 (void)alloc;
2013 (void)rootType;
2014 *to = *from;
2015 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2016 rootType = from->sType;
2017 }
2018 const void* from_pNext = from;
2019 size_t pNext_size = 0u;
2020 while (!pNext_size && from_pNext) {
2021 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2022 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2023 }
2024 to->pNext = nullptr;
2025 if (pNext_size) {
2026 to->pNext = (void*)alloc->alloc(pNext_size);
2027 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2028 }
2029 }
2030
deepcopy_VkCommandBufferBeginInfo(Allocator * alloc,VkStructureType rootType,const VkCommandBufferBeginInfo * from,VkCommandBufferBeginInfo * to)2031 void deepcopy_VkCommandBufferBeginInfo(Allocator* alloc, VkStructureType rootType,
2032 const VkCommandBufferBeginInfo* from,
2033 VkCommandBufferBeginInfo* to) {
2034 (void)alloc;
2035 (void)rootType;
2036 *to = *from;
2037 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2038 rootType = from->sType;
2039 }
2040 const void* from_pNext = from;
2041 size_t pNext_size = 0u;
2042 while (!pNext_size && from_pNext) {
2043 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2044 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2045 }
2046 to->pNext = nullptr;
2047 if (pNext_size) {
2048 to->pNext = (void*)alloc->alloc(pNext_size);
2049 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2050 }
2051 to->pInheritanceInfo = nullptr;
2052 if (from->pInheritanceInfo) {
2053 to->pInheritanceInfo = (VkCommandBufferInheritanceInfo*)alloc->alloc(
2054 sizeof(const VkCommandBufferInheritanceInfo));
2055 deepcopy_VkCommandBufferInheritanceInfo(
2056 alloc, rootType, from->pInheritanceInfo,
2057 (VkCommandBufferInheritanceInfo*)(to->pInheritanceInfo));
2058 }
2059 }
2060
deepcopy_VkBufferCopy(Allocator * alloc,VkStructureType rootType,const VkBufferCopy * from,VkBufferCopy * to)2061 void deepcopy_VkBufferCopy(Allocator* alloc, VkStructureType rootType, const VkBufferCopy* from,
2062 VkBufferCopy* to) {
2063 (void)alloc;
2064 (void)rootType;
2065 *to = *from;
2066 }
2067
deepcopy_VkImageSubresourceLayers(Allocator * alloc,VkStructureType rootType,const VkImageSubresourceLayers * from,VkImageSubresourceLayers * to)2068 void deepcopy_VkImageSubresourceLayers(Allocator* alloc, VkStructureType rootType,
2069 const VkImageSubresourceLayers* from,
2070 VkImageSubresourceLayers* to) {
2071 (void)alloc;
2072 (void)rootType;
2073 *to = *from;
2074 }
2075
deepcopy_VkBufferImageCopy(Allocator * alloc,VkStructureType rootType,const VkBufferImageCopy * from,VkBufferImageCopy * to)2076 void deepcopy_VkBufferImageCopy(Allocator* alloc, VkStructureType rootType,
2077 const VkBufferImageCopy* from, VkBufferImageCopy* to) {
2078 (void)alloc;
2079 (void)rootType;
2080 *to = *from;
2081 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->imageSubresource,
2082 (VkImageSubresourceLayers*)(&to->imageSubresource));
2083 deepcopy_VkOffset3D(alloc, rootType, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
2084 deepcopy_VkExtent3D(alloc, rootType, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
2085 }
2086
deepcopy_VkClearColorValue(Allocator * alloc,VkStructureType rootType,const VkClearColorValue * from,VkClearColorValue * to)2087 void deepcopy_VkClearColorValue(Allocator* alloc, VkStructureType rootType,
2088 const VkClearColorValue* from, VkClearColorValue* to) {
2089 (void)alloc;
2090 (void)rootType;
2091 *to = *from;
2092 memcpy(to->float32, from->float32, 4 * sizeof(float));
2093 memcpy(to->int32, from->int32, 4 * sizeof(int32_t));
2094 memcpy(to->uint32, from->uint32, 4 * sizeof(uint32_t));
2095 }
2096
deepcopy_VkClearDepthStencilValue(Allocator * alloc,VkStructureType rootType,const VkClearDepthStencilValue * from,VkClearDepthStencilValue * to)2097 void deepcopy_VkClearDepthStencilValue(Allocator* alloc, VkStructureType rootType,
2098 const VkClearDepthStencilValue* from,
2099 VkClearDepthStencilValue* to) {
2100 (void)alloc;
2101 (void)rootType;
2102 *to = *from;
2103 }
2104
deepcopy_VkClearValue(Allocator * alloc,VkStructureType rootType,const VkClearValue * from,VkClearValue * to)2105 void deepcopy_VkClearValue(Allocator* alloc, VkStructureType rootType, const VkClearValue* from,
2106 VkClearValue* to) {
2107 (void)alloc;
2108 (void)rootType;
2109 *to = *from;
2110 deepcopy_VkClearColorValue(alloc, rootType, &from->color, (VkClearColorValue*)(&to->color));
2111 deepcopy_VkClearDepthStencilValue(alloc, rootType, &from->depthStencil,
2112 (VkClearDepthStencilValue*)(&to->depthStencil));
2113 }
2114
deepcopy_VkClearAttachment(Allocator * alloc,VkStructureType rootType,const VkClearAttachment * from,VkClearAttachment * to)2115 void deepcopy_VkClearAttachment(Allocator* alloc, VkStructureType rootType,
2116 const VkClearAttachment* from, VkClearAttachment* to) {
2117 (void)alloc;
2118 (void)rootType;
2119 *to = *from;
2120 deepcopy_VkClearValue(alloc, rootType, &from->clearValue, (VkClearValue*)(&to->clearValue));
2121 }
2122
deepcopy_VkClearRect(Allocator * alloc,VkStructureType rootType,const VkClearRect * from,VkClearRect * to)2123 void deepcopy_VkClearRect(Allocator* alloc, VkStructureType rootType, const VkClearRect* from,
2124 VkClearRect* to) {
2125 (void)alloc;
2126 (void)rootType;
2127 *to = *from;
2128 deepcopy_VkRect2D(alloc, rootType, &from->rect, (VkRect2D*)(&to->rect));
2129 }
2130
deepcopy_VkImageBlit(Allocator * alloc,VkStructureType rootType,const VkImageBlit * from,VkImageBlit * to)2131 void deepcopy_VkImageBlit(Allocator* alloc, VkStructureType rootType, const VkImageBlit* from,
2132 VkImageBlit* to) {
2133 (void)alloc;
2134 (void)rootType;
2135 *to = *from;
2136 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
2137 (VkImageSubresourceLayers*)(&to->srcSubresource));
2138 for (uint32_t i = 0; i < (uint32_t)2; ++i) {
2139 deepcopy_VkOffset3D(alloc, rootType, from->srcOffsets + i,
2140 (VkOffset3D*)(to->srcOffsets + i));
2141 }
2142 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
2143 (VkImageSubresourceLayers*)(&to->dstSubresource));
2144 for (uint32_t i = 0; i < (uint32_t)2; ++i) {
2145 deepcopy_VkOffset3D(alloc, rootType, from->dstOffsets + i,
2146 (VkOffset3D*)(to->dstOffsets + i));
2147 }
2148 }
2149
deepcopy_VkImageCopy(Allocator * alloc,VkStructureType rootType,const VkImageCopy * from,VkImageCopy * to)2150 void deepcopy_VkImageCopy(Allocator* alloc, VkStructureType rootType, const VkImageCopy* from,
2151 VkImageCopy* to) {
2152 (void)alloc;
2153 (void)rootType;
2154 *to = *from;
2155 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
2156 (VkImageSubresourceLayers*)(&to->srcSubresource));
2157 deepcopy_VkOffset3D(alloc, rootType, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
2158 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
2159 (VkImageSubresourceLayers*)(&to->dstSubresource));
2160 deepcopy_VkOffset3D(alloc, rootType, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
2161 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
2162 }
2163
deepcopy_VkImageResolve(Allocator * alloc,VkStructureType rootType,const VkImageResolve * from,VkImageResolve * to)2164 void deepcopy_VkImageResolve(Allocator* alloc, VkStructureType rootType, const VkImageResolve* from,
2165 VkImageResolve* to) {
2166 (void)alloc;
2167 (void)rootType;
2168 *to = *from;
2169 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
2170 (VkImageSubresourceLayers*)(&to->srcSubresource));
2171 deepcopy_VkOffset3D(alloc, rootType, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
2172 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
2173 (VkImageSubresourceLayers*)(&to->dstSubresource));
2174 deepcopy_VkOffset3D(alloc, rootType, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
2175 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
2176 }
2177
deepcopy_VkRenderPassBeginInfo(Allocator * alloc,VkStructureType rootType,const VkRenderPassBeginInfo * from,VkRenderPassBeginInfo * to)2178 void deepcopy_VkRenderPassBeginInfo(Allocator* alloc, VkStructureType rootType,
2179 const VkRenderPassBeginInfo* from, VkRenderPassBeginInfo* to) {
2180 (void)alloc;
2181 (void)rootType;
2182 *to = *from;
2183 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2184 rootType = from->sType;
2185 }
2186 const void* from_pNext = from;
2187 size_t pNext_size = 0u;
2188 while (!pNext_size && from_pNext) {
2189 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2190 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2191 }
2192 to->pNext = nullptr;
2193 if (pNext_size) {
2194 to->pNext = (void*)alloc->alloc(pNext_size);
2195 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2196 }
2197 deepcopy_VkRect2D(alloc, rootType, &from->renderArea, (VkRect2D*)(&to->renderArea));
2198 if (from) {
2199 to->pClearValues = nullptr;
2200 if (from->pClearValues) {
2201 to->pClearValues =
2202 (VkClearValue*)alloc->alloc(from->clearValueCount * sizeof(const VkClearValue));
2203 to->clearValueCount = from->clearValueCount;
2204 for (uint32_t i = 0; i < (uint32_t)from->clearValueCount; ++i) {
2205 deepcopy_VkClearValue(alloc, rootType, from->pClearValues + i,
2206 (VkClearValue*)(to->pClearValues + i));
2207 }
2208 }
2209 }
2210 }
2211
2212 #endif
2213 #ifdef VK_VERSION_1_1
deepcopy_VkPhysicalDeviceSubgroupProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSubgroupProperties * from,VkPhysicalDeviceSubgroupProperties * to)2214 void deepcopy_VkPhysicalDeviceSubgroupProperties(Allocator* alloc, VkStructureType rootType,
2215 const VkPhysicalDeviceSubgroupProperties* from,
2216 VkPhysicalDeviceSubgroupProperties* to) {
2217 (void)alloc;
2218 (void)rootType;
2219 *to = *from;
2220 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2221 rootType = from->sType;
2222 }
2223 const void* from_pNext = from;
2224 size_t pNext_size = 0u;
2225 while (!pNext_size && from_pNext) {
2226 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2227 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2228 }
2229 to->pNext = nullptr;
2230 if (pNext_size) {
2231 to->pNext = (void*)alloc->alloc(pNext_size);
2232 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2233 }
2234 }
2235
deepcopy_VkBindBufferMemoryInfo(Allocator * alloc,VkStructureType rootType,const VkBindBufferMemoryInfo * from,VkBindBufferMemoryInfo * to)2236 void deepcopy_VkBindBufferMemoryInfo(Allocator* alloc, VkStructureType rootType,
2237 const VkBindBufferMemoryInfo* from,
2238 VkBindBufferMemoryInfo* to) {
2239 (void)alloc;
2240 (void)rootType;
2241 *to = *from;
2242 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2243 rootType = from->sType;
2244 }
2245 const void* from_pNext = from;
2246 size_t pNext_size = 0u;
2247 while (!pNext_size && from_pNext) {
2248 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2249 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2250 }
2251 to->pNext = nullptr;
2252 if (pNext_size) {
2253 to->pNext = (void*)alloc->alloc(pNext_size);
2254 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2255 }
2256 }
2257
deepcopy_VkBindImageMemoryInfo(Allocator * alloc,VkStructureType rootType,const VkBindImageMemoryInfo * from,VkBindImageMemoryInfo * to)2258 void deepcopy_VkBindImageMemoryInfo(Allocator* alloc, VkStructureType rootType,
2259 const VkBindImageMemoryInfo* from, VkBindImageMemoryInfo* to) {
2260 (void)alloc;
2261 (void)rootType;
2262 *to = *from;
2263 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2264 rootType = from->sType;
2265 }
2266 const void* from_pNext = from;
2267 size_t pNext_size = 0u;
2268 while (!pNext_size && from_pNext) {
2269 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2270 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2271 }
2272 to->pNext = nullptr;
2273 if (pNext_size) {
2274 to->pNext = (void*)alloc->alloc(pNext_size);
2275 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2276 }
2277 }
2278
deepcopy_VkPhysicalDevice16BitStorageFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevice16BitStorageFeatures * from,VkPhysicalDevice16BitStorageFeatures * to)2279 void deepcopy_VkPhysicalDevice16BitStorageFeatures(Allocator* alloc, VkStructureType rootType,
2280 const VkPhysicalDevice16BitStorageFeatures* from,
2281 VkPhysicalDevice16BitStorageFeatures* to) {
2282 (void)alloc;
2283 (void)rootType;
2284 *to = *from;
2285 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2286 rootType = from->sType;
2287 }
2288 const void* from_pNext = from;
2289 size_t pNext_size = 0u;
2290 while (!pNext_size && from_pNext) {
2291 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2292 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2293 }
2294 to->pNext = nullptr;
2295 if (pNext_size) {
2296 to->pNext = (void*)alloc->alloc(pNext_size);
2297 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2298 }
2299 }
2300
deepcopy_VkMemoryDedicatedRequirements(Allocator * alloc,VkStructureType rootType,const VkMemoryDedicatedRequirements * from,VkMemoryDedicatedRequirements * to)2301 void deepcopy_VkMemoryDedicatedRequirements(Allocator* alloc, VkStructureType rootType,
2302 const VkMemoryDedicatedRequirements* from,
2303 VkMemoryDedicatedRequirements* to) {
2304 (void)alloc;
2305 (void)rootType;
2306 *to = *from;
2307 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2308 rootType = from->sType;
2309 }
2310 const void* from_pNext = from;
2311 size_t pNext_size = 0u;
2312 while (!pNext_size && from_pNext) {
2313 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2314 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2315 }
2316 to->pNext = nullptr;
2317 if (pNext_size) {
2318 to->pNext = (void*)alloc->alloc(pNext_size);
2319 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2320 }
2321 }
2322
deepcopy_VkMemoryDedicatedAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkMemoryDedicatedAllocateInfo * from,VkMemoryDedicatedAllocateInfo * to)2323 void deepcopy_VkMemoryDedicatedAllocateInfo(Allocator* alloc, VkStructureType rootType,
2324 const VkMemoryDedicatedAllocateInfo* from,
2325 VkMemoryDedicatedAllocateInfo* to) {
2326 (void)alloc;
2327 (void)rootType;
2328 *to = *from;
2329 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2330 rootType = from->sType;
2331 }
2332 const void* from_pNext = from;
2333 size_t pNext_size = 0u;
2334 while (!pNext_size && from_pNext) {
2335 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2336 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2337 }
2338 to->pNext = nullptr;
2339 if (pNext_size) {
2340 to->pNext = (void*)alloc->alloc(pNext_size);
2341 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2342 }
2343 }
2344
deepcopy_VkMemoryAllocateFlagsInfo(Allocator * alloc,VkStructureType rootType,const VkMemoryAllocateFlagsInfo * from,VkMemoryAllocateFlagsInfo * to)2345 void deepcopy_VkMemoryAllocateFlagsInfo(Allocator* alloc, VkStructureType rootType,
2346 const VkMemoryAllocateFlagsInfo* from,
2347 VkMemoryAllocateFlagsInfo* to) {
2348 (void)alloc;
2349 (void)rootType;
2350 *to = *from;
2351 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2352 rootType = from->sType;
2353 }
2354 const void* from_pNext = from;
2355 size_t pNext_size = 0u;
2356 while (!pNext_size && from_pNext) {
2357 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2358 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2359 }
2360 to->pNext = nullptr;
2361 if (pNext_size) {
2362 to->pNext = (void*)alloc->alloc(pNext_size);
2363 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2364 }
2365 }
2366
deepcopy_VkDeviceGroupRenderPassBeginInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupRenderPassBeginInfo * from,VkDeviceGroupRenderPassBeginInfo * to)2367 void deepcopy_VkDeviceGroupRenderPassBeginInfo(Allocator* alloc, VkStructureType rootType,
2368 const VkDeviceGroupRenderPassBeginInfo* from,
2369 VkDeviceGroupRenderPassBeginInfo* to) {
2370 (void)alloc;
2371 (void)rootType;
2372 *to = *from;
2373 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2374 rootType = from->sType;
2375 }
2376 const void* from_pNext = from;
2377 size_t pNext_size = 0u;
2378 while (!pNext_size && from_pNext) {
2379 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2380 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2381 }
2382 to->pNext = nullptr;
2383 if (pNext_size) {
2384 to->pNext = (void*)alloc->alloc(pNext_size);
2385 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2386 }
2387 if (from) {
2388 to->pDeviceRenderAreas = nullptr;
2389 if (from->pDeviceRenderAreas) {
2390 to->pDeviceRenderAreas =
2391 (VkRect2D*)alloc->alloc(from->deviceRenderAreaCount * sizeof(const VkRect2D));
2392 to->deviceRenderAreaCount = from->deviceRenderAreaCount;
2393 for (uint32_t i = 0; i < (uint32_t)from->deviceRenderAreaCount; ++i) {
2394 deepcopy_VkRect2D(alloc, rootType, from->pDeviceRenderAreas + i,
2395 (VkRect2D*)(to->pDeviceRenderAreas + i));
2396 }
2397 }
2398 }
2399 }
2400
deepcopy_VkDeviceGroupCommandBufferBeginInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupCommandBufferBeginInfo * from,VkDeviceGroupCommandBufferBeginInfo * to)2401 void deepcopy_VkDeviceGroupCommandBufferBeginInfo(Allocator* alloc, VkStructureType rootType,
2402 const VkDeviceGroupCommandBufferBeginInfo* from,
2403 VkDeviceGroupCommandBufferBeginInfo* to) {
2404 (void)alloc;
2405 (void)rootType;
2406 *to = *from;
2407 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2408 rootType = from->sType;
2409 }
2410 const void* from_pNext = from;
2411 size_t pNext_size = 0u;
2412 while (!pNext_size && from_pNext) {
2413 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2414 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2415 }
2416 to->pNext = nullptr;
2417 if (pNext_size) {
2418 to->pNext = (void*)alloc->alloc(pNext_size);
2419 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2420 }
2421 }
2422
deepcopy_VkDeviceGroupSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupSubmitInfo * from,VkDeviceGroupSubmitInfo * to)2423 void deepcopy_VkDeviceGroupSubmitInfo(Allocator* alloc, VkStructureType rootType,
2424 const VkDeviceGroupSubmitInfo* from,
2425 VkDeviceGroupSubmitInfo* to) {
2426 (void)alloc;
2427 (void)rootType;
2428 *to = *from;
2429 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2430 rootType = from->sType;
2431 }
2432 const void* from_pNext = from;
2433 size_t pNext_size = 0u;
2434 while (!pNext_size && from_pNext) {
2435 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2436 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2437 }
2438 to->pNext = nullptr;
2439 if (pNext_size) {
2440 to->pNext = (void*)alloc->alloc(pNext_size);
2441 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2442 }
2443 to->pWaitSemaphoreDeviceIndices = nullptr;
2444 if (from->pWaitSemaphoreDeviceIndices) {
2445 to->pWaitSemaphoreDeviceIndices = (uint32_t*)alloc->dupArray(
2446 from->pWaitSemaphoreDeviceIndices, from->waitSemaphoreCount * sizeof(const uint32_t));
2447 }
2448 to->pCommandBufferDeviceMasks = nullptr;
2449 if (from->pCommandBufferDeviceMasks) {
2450 to->pCommandBufferDeviceMasks = (uint32_t*)alloc->dupArray(
2451 from->pCommandBufferDeviceMasks, from->commandBufferCount * sizeof(const uint32_t));
2452 }
2453 to->pSignalSemaphoreDeviceIndices = nullptr;
2454 if (from->pSignalSemaphoreDeviceIndices) {
2455 to->pSignalSemaphoreDeviceIndices =
2456 (uint32_t*)alloc->dupArray(from->pSignalSemaphoreDeviceIndices,
2457 from->signalSemaphoreCount * sizeof(const uint32_t));
2458 }
2459 }
2460
deepcopy_VkDeviceGroupBindSparseInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupBindSparseInfo * from,VkDeviceGroupBindSparseInfo * to)2461 void deepcopy_VkDeviceGroupBindSparseInfo(Allocator* alloc, VkStructureType rootType,
2462 const VkDeviceGroupBindSparseInfo* from,
2463 VkDeviceGroupBindSparseInfo* to) {
2464 (void)alloc;
2465 (void)rootType;
2466 *to = *from;
2467 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2468 rootType = from->sType;
2469 }
2470 const void* from_pNext = from;
2471 size_t pNext_size = 0u;
2472 while (!pNext_size && from_pNext) {
2473 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2474 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2475 }
2476 to->pNext = nullptr;
2477 if (pNext_size) {
2478 to->pNext = (void*)alloc->alloc(pNext_size);
2479 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2480 }
2481 }
2482
deepcopy_VkBindBufferMemoryDeviceGroupInfo(Allocator * alloc,VkStructureType rootType,const VkBindBufferMemoryDeviceGroupInfo * from,VkBindBufferMemoryDeviceGroupInfo * to)2483 void deepcopy_VkBindBufferMemoryDeviceGroupInfo(Allocator* alloc, VkStructureType rootType,
2484 const VkBindBufferMemoryDeviceGroupInfo* from,
2485 VkBindBufferMemoryDeviceGroupInfo* to) {
2486 (void)alloc;
2487 (void)rootType;
2488 *to = *from;
2489 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2490 rootType = from->sType;
2491 }
2492 const void* from_pNext = from;
2493 size_t pNext_size = 0u;
2494 while (!pNext_size && from_pNext) {
2495 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2496 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2497 }
2498 to->pNext = nullptr;
2499 if (pNext_size) {
2500 to->pNext = (void*)alloc->alloc(pNext_size);
2501 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2502 }
2503 to->pDeviceIndices = nullptr;
2504 if (from->pDeviceIndices) {
2505 to->pDeviceIndices = (uint32_t*)alloc->dupArray(
2506 from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
2507 }
2508 }
2509
deepcopy_VkBindImageMemoryDeviceGroupInfo(Allocator * alloc,VkStructureType rootType,const VkBindImageMemoryDeviceGroupInfo * from,VkBindImageMemoryDeviceGroupInfo * to)2510 void deepcopy_VkBindImageMemoryDeviceGroupInfo(Allocator* alloc, VkStructureType rootType,
2511 const VkBindImageMemoryDeviceGroupInfo* from,
2512 VkBindImageMemoryDeviceGroupInfo* to) {
2513 (void)alloc;
2514 (void)rootType;
2515 *to = *from;
2516 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2517 rootType = from->sType;
2518 }
2519 const void* from_pNext = from;
2520 size_t pNext_size = 0u;
2521 while (!pNext_size && from_pNext) {
2522 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2523 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2524 }
2525 to->pNext = nullptr;
2526 if (pNext_size) {
2527 to->pNext = (void*)alloc->alloc(pNext_size);
2528 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2529 }
2530 to->pDeviceIndices = nullptr;
2531 if (from->pDeviceIndices) {
2532 to->pDeviceIndices = (uint32_t*)alloc->dupArray(
2533 from->pDeviceIndices, from->deviceIndexCount * sizeof(const uint32_t));
2534 }
2535 if (from) {
2536 to->pSplitInstanceBindRegions = nullptr;
2537 if (from->pSplitInstanceBindRegions) {
2538 to->pSplitInstanceBindRegions = (VkRect2D*)alloc->alloc(
2539 from->splitInstanceBindRegionCount * sizeof(const VkRect2D));
2540 to->splitInstanceBindRegionCount = from->splitInstanceBindRegionCount;
2541 for (uint32_t i = 0; i < (uint32_t)from->splitInstanceBindRegionCount; ++i) {
2542 deepcopy_VkRect2D(alloc, rootType, from->pSplitInstanceBindRegions + i,
2543 (VkRect2D*)(to->pSplitInstanceBindRegions + i));
2544 }
2545 }
2546 }
2547 }
2548
deepcopy_VkPhysicalDeviceGroupProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceGroupProperties * from,VkPhysicalDeviceGroupProperties * to)2549 void deepcopy_VkPhysicalDeviceGroupProperties(Allocator* alloc, VkStructureType rootType,
2550 const VkPhysicalDeviceGroupProperties* from,
2551 VkPhysicalDeviceGroupProperties* to) {
2552 (void)alloc;
2553 (void)rootType;
2554 *to = *from;
2555 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2556 rootType = from->sType;
2557 }
2558 const void* from_pNext = from;
2559 size_t pNext_size = 0u;
2560 while (!pNext_size && from_pNext) {
2561 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2562 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2563 }
2564 to->pNext = nullptr;
2565 if (pNext_size) {
2566 to->pNext = (void*)alloc->alloc(pNext_size);
2567 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2568 }
2569 memcpy(to->physicalDevices, from->physicalDevices,
2570 VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
2571 }
2572
deepcopy_VkDeviceGroupDeviceCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupDeviceCreateInfo * from,VkDeviceGroupDeviceCreateInfo * to)2573 void deepcopy_VkDeviceGroupDeviceCreateInfo(Allocator* alloc, VkStructureType rootType,
2574 const VkDeviceGroupDeviceCreateInfo* from,
2575 VkDeviceGroupDeviceCreateInfo* to) {
2576 (void)alloc;
2577 (void)rootType;
2578 *to = *from;
2579 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2580 rootType = from->sType;
2581 }
2582 const void* from_pNext = from;
2583 size_t pNext_size = 0u;
2584 while (!pNext_size && from_pNext) {
2585 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2586 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2587 }
2588 to->pNext = nullptr;
2589 if (pNext_size) {
2590 to->pNext = (void*)alloc->alloc(pNext_size);
2591 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2592 }
2593 to->pPhysicalDevices = nullptr;
2594 if (from->pPhysicalDevices) {
2595 to->pPhysicalDevices = (VkPhysicalDevice*)alloc->dupArray(
2596 from->pPhysicalDevices, from->physicalDeviceCount * sizeof(const VkPhysicalDevice));
2597 }
2598 }
2599
deepcopy_VkBufferMemoryRequirementsInfo2(Allocator * alloc,VkStructureType rootType,const VkBufferMemoryRequirementsInfo2 * from,VkBufferMemoryRequirementsInfo2 * to)2600 void deepcopy_VkBufferMemoryRequirementsInfo2(Allocator* alloc, VkStructureType rootType,
2601 const VkBufferMemoryRequirementsInfo2* from,
2602 VkBufferMemoryRequirementsInfo2* to) {
2603 (void)alloc;
2604 (void)rootType;
2605 *to = *from;
2606 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2607 rootType = from->sType;
2608 }
2609 const void* from_pNext = from;
2610 size_t pNext_size = 0u;
2611 while (!pNext_size && from_pNext) {
2612 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2613 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2614 }
2615 to->pNext = nullptr;
2616 if (pNext_size) {
2617 to->pNext = (void*)alloc->alloc(pNext_size);
2618 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2619 }
2620 }
2621
deepcopy_VkImageMemoryRequirementsInfo2(Allocator * alloc,VkStructureType rootType,const VkImageMemoryRequirementsInfo2 * from,VkImageMemoryRequirementsInfo2 * to)2622 void deepcopy_VkImageMemoryRequirementsInfo2(Allocator* alloc, VkStructureType rootType,
2623 const VkImageMemoryRequirementsInfo2* from,
2624 VkImageMemoryRequirementsInfo2* to) {
2625 (void)alloc;
2626 (void)rootType;
2627 *to = *from;
2628 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2629 rootType = from->sType;
2630 }
2631 const void* from_pNext = from;
2632 size_t pNext_size = 0u;
2633 while (!pNext_size && from_pNext) {
2634 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2635 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2636 }
2637 to->pNext = nullptr;
2638 if (pNext_size) {
2639 to->pNext = (void*)alloc->alloc(pNext_size);
2640 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2641 }
2642 }
2643
deepcopy_VkImageSparseMemoryRequirementsInfo2(Allocator * alloc,VkStructureType rootType,const VkImageSparseMemoryRequirementsInfo2 * from,VkImageSparseMemoryRequirementsInfo2 * to)2644 void deepcopy_VkImageSparseMemoryRequirementsInfo2(Allocator* alloc, VkStructureType rootType,
2645 const VkImageSparseMemoryRequirementsInfo2* from,
2646 VkImageSparseMemoryRequirementsInfo2* to) {
2647 (void)alloc;
2648 (void)rootType;
2649 *to = *from;
2650 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2651 rootType = from->sType;
2652 }
2653 const void* from_pNext = from;
2654 size_t pNext_size = 0u;
2655 while (!pNext_size && from_pNext) {
2656 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2657 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2658 }
2659 to->pNext = nullptr;
2660 if (pNext_size) {
2661 to->pNext = (void*)alloc->alloc(pNext_size);
2662 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2663 }
2664 }
2665
deepcopy_VkMemoryRequirements2(Allocator * alloc,VkStructureType rootType,const VkMemoryRequirements2 * from,VkMemoryRequirements2 * to)2666 void deepcopy_VkMemoryRequirements2(Allocator* alloc, VkStructureType rootType,
2667 const VkMemoryRequirements2* from, VkMemoryRequirements2* to) {
2668 (void)alloc;
2669 (void)rootType;
2670 *to = *from;
2671 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2672 rootType = from->sType;
2673 }
2674 const void* from_pNext = from;
2675 size_t pNext_size = 0u;
2676 while (!pNext_size && from_pNext) {
2677 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2678 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2679 }
2680 to->pNext = nullptr;
2681 if (pNext_size) {
2682 to->pNext = (void*)alloc->alloc(pNext_size);
2683 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2684 }
2685 deepcopy_VkMemoryRequirements(alloc, rootType, &from->memoryRequirements,
2686 (VkMemoryRequirements*)(&to->memoryRequirements));
2687 }
2688
deepcopy_VkSparseImageMemoryRequirements2(Allocator * alloc,VkStructureType rootType,const VkSparseImageMemoryRequirements2 * from,VkSparseImageMemoryRequirements2 * to)2689 void deepcopy_VkSparseImageMemoryRequirements2(Allocator* alloc, VkStructureType rootType,
2690 const VkSparseImageMemoryRequirements2* from,
2691 VkSparseImageMemoryRequirements2* to) {
2692 (void)alloc;
2693 (void)rootType;
2694 *to = *from;
2695 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2696 rootType = from->sType;
2697 }
2698 const void* from_pNext = from;
2699 size_t pNext_size = 0u;
2700 while (!pNext_size && from_pNext) {
2701 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2702 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2703 }
2704 to->pNext = nullptr;
2705 if (pNext_size) {
2706 to->pNext = (void*)alloc->alloc(pNext_size);
2707 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2708 }
2709 deepcopy_VkSparseImageMemoryRequirements(
2710 alloc, rootType, &from->memoryRequirements,
2711 (VkSparseImageMemoryRequirements*)(&to->memoryRequirements));
2712 }
2713
deepcopy_VkPhysicalDeviceFeatures2(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceFeatures2 * from,VkPhysicalDeviceFeatures2 * to)2714 void deepcopy_VkPhysicalDeviceFeatures2(Allocator* alloc, VkStructureType rootType,
2715 const VkPhysicalDeviceFeatures2* from,
2716 VkPhysicalDeviceFeatures2* to) {
2717 (void)alloc;
2718 (void)rootType;
2719 *to = *from;
2720 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2721 rootType = from->sType;
2722 }
2723 const void* from_pNext = from;
2724 size_t pNext_size = 0u;
2725 while (!pNext_size && from_pNext) {
2726 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2727 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2728 }
2729 to->pNext = nullptr;
2730 if (pNext_size) {
2731 to->pNext = (void*)alloc->alloc(pNext_size);
2732 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2733 }
2734 deepcopy_VkPhysicalDeviceFeatures(alloc, rootType, &from->features,
2735 (VkPhysicalDeviceFeatures*)(&to->features));
2736 }
2737
deepcopy_VkPhysicalDeviceProperties2(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProperties2 * from,VkPhysicalDeviceProperties2 * to)2738 void deepcopy_VkPhysicalDeviceProperties2(Allocator* alloc, VkStructureType rootType,
2739 const VkPhysicalDeviceProperties2* from,
2740 VkPhysicalDeviceProperties2* to) {
2741 (void)alloc;
2742 (void)rootType;
2743 *to = *from;
2744 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2745 rootType = from->sType;
2746 }
2747 const void* from_pNext = from;
2748 size_t pNext_size = 0u;
2749 while (!pNext_size && from_pNext) {
2750 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2751 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2752 }
2753 to->pNext = nullptr;
2754 if (pNext_size) {
2755 to->pNext = (void*)alloc->alloc(pNext_size);
2756 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2757 }
2758 deepcopy_VkPhysicalDeviceProperties(alloc, rootType, &from->properties,
2759 (VkPhysicalDeviceProperties*)(&to->properties));
2760 }
2761
deepcopy_VkFormatProperties2(Allocator * alloc,VkStructureType rootType,const VkFormatProperties2 * from,VkFormatProperties2 * to)2762 void deepcopy_VkFormatProperties2(Allocator* alloc, VkStructureType rootType,
2763 const VkFormatProperties2* from, VkFormatProperties2* to) {
2764 (void)alloc;
2765 (void)rootType;
2766 *to = *from;
2767 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2768 rootType = from->sType;
2769 }
2770 const void* from_pNext = from;
2771 size_t pNext_size = 0u;
2772 while (!pNext_size && from_pNext) {
2773 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2774 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2775 }
2776 to->pNext = nullptr;
2777 if (pNext_size) {
2778 to->pNext = (void*)alloc->alloc(pNext_size);
2779 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2780 }
2781 deepcopy_VkFormatProperties(alloc, rootType, &from->formatProperties,
2782 (VkFormatProperties*)(&to->formatProperties));
2783 }
2784
deepcopy_VkImageFormatProperties2(Allocator * alloc,VkStructureType rootType,const VkImageFormatProperties2 * from,VkImageFormatProperties2 * to)2785 void deepcopy_VkImageFormatProperties2(Allocator* alloc, VkStructureType rootType,
2786 const VkImageFormatProperties2* from,
2787 VkImageFormatProperties2* to) {
2788 (void)alloc;
2789 (void)rootType;
2790 *to = *from;
2791 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2792 rootType = from->sType;
2793 }
2794 const void* from_pNext = from;
2795 size_t pNext_size = 0u;
2796 while (!pNext_size && from_pNext) {
2797 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2798 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2799 }
2800 to->pNext = nullptr;
2801 if (pNext_size) {
2802 to->pNext = (void*)alloc->alloc(pNext_size);
2803 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2804 }
2805 deepcopy_VkImageFormatProperties(alloc, rootType, &from->imageFormatProperties,
2806 (VkImageFormatProperties*)(&to->imageFormatProperties));
2807 }
2808
deepcopy_VkPhysicalDeviceImageFormatInfo2(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImageFormatInfo2 * from,VkPhysicalDeviceImageFormatInfo2 * to)2809 void deepcopy_VkPhysicalDeviceImageFormatInfo2(Allocator* alloc, VkStructureType rootType,
2810 const VkPhysicalDeviceImageFormatInfo2* from,
2811 VkPhysicalDeviceImageFormatInfo2* to) {
2812 (void)alloc;
2813 (void)rootType;
2814 *to = *from;
2815 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2816 rootType = from->sType;
2817 }
2818 const void* from_pNext = from;
2819 size_t pNext_size = 0u;
2820 while (!pNext_size && from_pNext) {
2821 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2822 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2823 }
2824 to->pNext = nullptr;
2825 if (pNext_size) {
2826 to->pNext = (void*)alloc->alloc(pNext_size);
2827 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2828 }
2829 }
2830
deepcopy_VkQueueFamilyProperties2(Allocator * alloc,VkStructureType rootType,const VkQueueFamilyProperties2 * from,VkQueueFamilyProperties2 * to)2831 void deepcopy_VkQueueFamilyProperties2(Allocator* alloc, VkStructureType rootType,
2832 const VkQueueFamilyProperties2* from,
2833 VkQueueFamilyProperties2* to) {
2834 (void)alloc;
2835 (void)rootType;
2836 *to = *from;
2837 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2838 rootType = from->sType;
2839 }
2840 const void* from_pNext = from;
2841 size_t pNext_size = 0u;
2842 while (!pNext_size && from_pNext) {
2843 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2844 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2845 }
2846 to->pNext = nullptr;
2847 if (pNext_size) {
2848 to->pNext = (void*)alloc->alloc(pNext_size);
2849 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2850 }
2851 deepcopy_VkQueueFamilyProperties(alloc, rootType, &from->queueFamilyProperties,
2852 (VkQueueFamilyProperties*)(&to->queueFamilyProperties));
2853 }
2854
deepcopy_VkPhysicalDeviceMemoryProperties2(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMemoryProperties2 * from,VkPhysicalDeviceMemoryProperties2 * to)2855 void deepcopy_VkPhysicalDeviceMemoryProperties2(Allocator* alloc, VkStructureType rootType,
2856 const VkPhysicalDeviceMemoryProperties2* from,
2857 VkPhysicalDeviceMemoryProperties2* to) {
2858 (void)alloc;
2859 (void)rootType;
2860 *to = *from;
2861 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2862 rootType = from->sType;
2863 }
2864 const void* from_pNext = from;
2865 size_t pNext_size = 0u;
2866 while (!pNext_size && from_pNext) {
2867 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2868 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2869 }
2870 to->pNext = nullptr;
2871 if (pNext_size) {
2872 to->pNext = (void*)alloc->alloc(pNext_size);
2873 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2874 }
2875 deepcopy_VkPhysicalDeviceMemoryProperties(
2876 alloc, rootType, &from->memoryProperties,
2877 (VkPhysicalDeviceMemoryProperties*)(&to->memoryProperties));
2878 }
2879
deepcopy_VkSparseImageFormatProperties2(Allocator * alloc,VkStructureType rootType,const VkSparseImageFormatProperties2 * from,VkSparseImageFormatProperties2 * to)2880 void deepcopy_VkSparseImageFormatProperties2(Allocator* alloc, VkStructureType rootType,
2881 const VkSparseImageFormatProperties2* from,
2882 VkSparseImageFormatProperties2* to) {
2883 (void)alloc;
2884 (void)rootType;
2885 *to = *from;
2886 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2887 rootType = from->sType;
2888 }
2889 const void* from_pNext = from;
2890 size_t pNext_size = 0u;
2891 while (!pNext_size && from_pNext) {
2892 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2893 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2894 }
2895 to->pNext = nullptr;
2896 if (pNext_size) {
2897 to->pNext = (void*)alloc->alloc(pNext_size);
2898 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2899 }
2900 deepcopy_VkSparseImageFormatProperties(alloc, rootType, &from->properties,
2901 (VkSparseImageFormatProperties*)(&to->properties));
2902 }
2903
deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSparseImageFormatInfo2 * from,VkPhysicalDeviceSparseImageFormatInfo2 * to)2904 void deepcopy_VkPhysicalDeviceSparseImageFormatInfo2(
2905 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceSparseImageFormatInfo2* from,
2906 VkPhysicalDeviceSparseImageFormatInfo2* to) {
2907 (void)alloc;
2908 (void)rootType;
2909 *to = *from;
2910 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2911 rootType = from->sType;
2912 }
2913 const void* from_pNext = from;
2914 size_t pNext_size = 0u;
2915 while (!pNext_size && from_pNext) {
2916 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2917 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2918 }
2919 to->pNext = nullptr;
2920 if (pNext_size) {
2921 to->pNext = (void*)alloc->alloc(pNext_size);
2922 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2923 }
2924 }
2925
deepcopy_VkPhysicalDevicePointClippingProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePointClippingProperties * from,VkPhysicalDevicePointClippingProperties * to)2926 void deepcopy_VkPhysicalDevicePointClippingProperties(
2927 Allocator* alloc, VkStructureType rootType, const VkPhysicalDevicePointClippingProperties* from,
2928 VkPhysicalDevicePointClippingProperties* to) {
2929 (void)alloc;
2930 (void)rootType;
2931 *to = *from;
2932 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2933 rootType = from->sType;
2934 }
2935 const void* from_pNext = from;
2936 size_t pNext_size = 0u;
2937 while (!pNext_size && from_pNext) {
2938 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2939 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2940 }
2941 to->pNext = nullptr;
2942 if (pNext_size) {
2943 to->pNext = (void*)alloc->alloc(pNext_size);
2944 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2945 }
2946 }
2947
deepcopy_VkInputAttachmentAspectReference(Allocator * alloc,VkStructureType rootType,const VkInputAttachmentAspectReference * from,VkInputAttachmentAspectReference * to)2948 void deepcopy_VkInputAttachmentAspectReference(Allocator* alloc, VkStructureType rootType,
2949 const VkInputAttachmentAspectReference* from,
2950 VkInputAttachmentAspectReference* to) {
2951 (void)alloc;
2952 (void)rootType;
2953 *to = *from;
2954 }
2955
deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(Allocator * alloc,VkStructureType rootType,const VkRenderPassInputAttachmentAspectCreateInfo * from,VkRenderPassInputAttachmentAspectCreateInfo * to)2956 void deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(
2957 Allocator* alloc, VkStructureType rootType,
2958 const VkRenderPassInputAttachmentAspectCreateInfo* from,
2959 VkRenderPassInputAttachmentAspectCreateInfo* to) {
2960 (void)alloc;
2961 (void)rootType;
2962 *to = *from;
2963 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2964 rootType = from->sType;
2965 }
2966 const void* from_pNext = from;
2967 size_t pNext_size = 0u;
2968 while (!pNext_size && from_pNext) {
2969 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
2970 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
2971 }
2972 to->pNext = nullptr;
2973 if (pNext_size) {
2974 to->pNext = (void*)alloc->alloc(pNext_size);
2975 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
2976 }
2977 if (from) {
2978 to->pAspectReferences = nullptr;
2979 if (from->pAspectReferences) {
2980 to->pAspectReferences = (VkInputAttachmentAspectReference*)alloc->alloc(
2981 from->aspectReferenceCount * sizeof(const VkInputAttachmentAspectReference));
2982 to->aspectReferenceCount = from->aspectReferenceCount;
2983 for (uint32_t i = 0; i < (uint32_t)from->aspectReferenceCount; ++i) {
2984 deepcopy_VkInputAttachmentAspectReference(
2985 alloc, rootType, from->pAspectReferences + i,
2986 (VkInputAttachmentAspectReference*)(to->pAspectReferences + i));
2987 }
2988 }
2989 }
2990 }
2991
deepcopy_VkImageViewUsageCreateInfo(Allocator * alloc,VkStructureType rootType,const VkImageViewUsageCreateInfo * from,VkImageViewUsageCreateInfo * to)2992 void deepcopy_VkImageViewUsageCreateInfo(Allocator* alloc, VkStructureType rootType,
2993 const VkImageViewUsageCreateInfo* from,
2994 VkImageViewUsageCreateInfo* to) {
2995 (void)alloc;
2996 (void)rootType;
2997 *to = *from;
2998 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
2999 rootType = from->sType;
3000 }
3001 const void* from_pNext = from;
3002 size_t pNext_size = 0u;
3003 while (!pNext_size && from_pNext) {
3004 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3005 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3006 }
3007 to->pNext = nullptr;
3008 if (pNext_size) {
3009 to->pNext = (void*)alloc->alloc(pNext_size);
3010 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3011 }
3012 }
3013
deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineTessellationDomainOriginStateCreateInfo * from,VkPipelineTessellationDomainOriginStateCreateInfo * to)3014 void deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(
3015 Allocator* alloc, VkStructureType rootType,
3016 const VkPipelineTessellationDomainOriginStateCreateInfo* from,
3017 VkPipelineTessellationDomainOriginStateCreateInfo* to) {
3018 (void)alloc;
3019 (void)rootType;
3020 *to = *from;
3021 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3022 rootType = from->sType;
3023 }
3024 const void* from_pNext = from;
3025 size_t pNext_size = 0u;
3026 while (!pNext_size && from_pNext) {
3027 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3028 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3029 }
3030 to->pNext = nullptr;
3031 if (pNext_size) {
3032 to->pNext = (void*)alloc->alloc(pNext_size);
3033 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3034 }
3035 }
3036
deepcopy_VkRenderPassMultiviewCreateInfo(Allocator * alloc,VkStructureType rootType,const VkRenderPassMultiviewCreateInfo * from,VkRenderPassMultiviewCreateInfo * to)3037 void deepcopy_VkRenderPassMultiviewCreateInfo(Allocator* alloc, VkStructureType rootType,
3038 const VkRenderPassMultiviewCreateInfo* from,
3039 VkRenderPassMultiviewCreateInfo* to) {
3040 (void)alloc;
3041 (void)rootType;
3042 *to = *from;
3043 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3044 rootType = from->sType;
3045 }
3046 const void* from_pNext = from;
3047 size_t pNext_size = 0u;
3048 while (!pNext_size && from_pNext) {
3049 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3050 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3051 }
3052 to->pNext = nullptr;
3053 if (pNext_size) {
3054 to->pNext = (void*)alloc->alloc(pNext_size);
3055 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3056 }
3057 to->pViewMasks = nullptr;
3058 if (from->pViewMasks) {
3059 to->pViewMasks = (uint32_t*)alloc->dupArray(from->pViewMasks,
3060 from->subpassCount * sizeof(const uint32_t));
3061 }
3062 to->pViewOffsets = nullptr;
3063 if (from->pViewOffsets) {
3064 to->pViewOffsets = (int32_t*)alloc->dupArray(from->pViewOffsets,
3065 from->dependencyCount * sizeof(const int32_t));
3066 }
3067 to->pCorrelationMasks = nullptr;
3068 if (from->pCorrelationMasks) {
3069 to->pCorrelationMasks = (uint32_t*)alloc->dupArray(
3070 from->pCorrelationMasks, from->correlationMaskCount * sizeof(const uint32_t));
3071 }
3072 }
3073
deepcopy_VkPhysicalDeviceMultiviewFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMultiviewFeatures * from,VkPhysicalDeviceMultiviewFeatures * to)3074 void deepcopy_VkPhysicalDeviceMultiviewFeatures(Allocator* alloc, VkStructureType rootType,
3075 const VkPhysicalDeviceMultiviewFeatures* from,
3076 VkPhysicalDeviceMultiviewFeatures* to) {
3077 (void)alloc;
3078 (void)rootType;
3079 *to = *from;
3080 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3081 rootType = from->sType;
3082 }
3083 const void* from_pNext = from;
3084 size_t pNext_size = 0u;
3085 while (!pNext_size && from_pNext) {
3086 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3087 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3088 }
3089 to->pNext = nullptr;
3090 if (pNext_size) {
3091 to->pNext = (void*)alloc->alloc(pNext_size);
3092 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3093 }
3094 }
3095
deepcopy_VkPhysicalDeviceMultiviewProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMultiviewProperties * from,VkPhysicalDeviceMultiviewProperties * to)3096 void deepcopy_VkPhysicalDeviceMultiviewProperties(Allocator* alloc, VkStructureType rootType,
3097 const VkPhysicalDeviceMultiviewProperties* from,
3098 VkPhysicalDeviceMultiviewProperties* to) {
3099 (void)alloc;
3100 (void)rootType;
3101 *to = *from;
3102 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3103 rootType = from->sType;
3104 }
3105 const void* from_pNext = from;
3106 size_t pNext_size = 0u;
3107 while (!pNext_size && from_pNext) {
3108 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3109 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3110 }
3111 to->pNext = nullptr;
3112 if (pNext_size) {
3113 to->pNext = (void*)alloc->alloc(pNext_size);
3114 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3115 }
3116 }
3117
deepcopy_VkPhysicalDeviceVariablePointersFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVariablePointersFeatures * from,VkPhysicalDeviceVariablePointersFeatures * to)3118 void deepcopy_VkPhysicalDeviceVariablePointersFeatures(
3119 Allocator* alloc, VkStructureType rootType,
3120 const VkPhysicalDeviceVariablePointersFeatures* from,
3121 VkPhysicalDeviceVariablePointersFeatures* to) {
3122 (void)alloc;
3123 (void)rootType;
3124 *to = *from;
3125 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3126 rootType = from->sType;
3127 }
3128 const void* from_pNext = from;
3129 size_t pNext_size = 0u;
3130 while (!pNext_size && from_pNext) {
3131 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3132 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3133 }
3134 to->pNext = nullptr;
3135 if (pNext_size) {
3136 to->pNext = (void*)alloc->alloc(pNext_size);
3137 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3138 }
3139 }
3140
deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProtectedMemoryFeatures * from,VkPhysicalDeviceProtectedMemoryFeatures * to)3141 void deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(
3142 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceProtectedMemoryFeatures* from,
3143 VkPhysicalDeviceProtectedMemoryFeatures* to) {
3144 (void)alloc;
3145 (void)rootType;
3146 *to = *from;
3147 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3148 rootType = from->sType;
3149 }
3150 const void* from_pNext = from;
3151 size_t pNext_size = 0u;
3152 while (!pNext_size && from_pNext) {
3153 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3154 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3155 }
3156 to->pNext = nullptr;
3157 if (pNext_size) {
3158 to->pNext = (void*)alloc->alloc(pNext_size);
3159 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3160 }
3161 }
3162
deepcopy_VkPhysicalDeviceProtectedMemoryProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProtectedMemoryProperties * from,VkPhysicalDeviceProtectedMemoryProperties * to)3163 void deepcopy_VkPhysicalDeviceProtectedMemoryProperties(
3164 Allocator* alloc, VkStructureType rootType,
3165 const VkPhysicalDeviceProtectedMemoryProperties* from,
3166 VkPhysicalDeviceProtectedMemoryProperties* to) {
3167 (void)alloc;
3168 (void)rootType;
3169 *to = *from;
3170 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3171 rootType = from->sType;
3172 }
3173 const void* from_pNext = from;
3174 size_t pNext_size = 0u;
3175 while (!pNext_size && from_pNext) {
3176 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3177 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3178 }
3179 to->pNext = nullptr;
3180 if (pNext_size) {
3181 to->pNext = (void*)alloc->alloc(pNext_size);
3182 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3183 }
3184 }
3185
deepcopy_VkDeviceQueueInfo2(Allocator * alloc,VkStructureType rootType,const VkDeviceQueueInfo2 * from,VkDeviceQueueInfo2 * to)3186 void deepcopy_VkDeviceQueueInfo2(Allocator* alloc, VkStructureType rootType,
3187 const VkDeviceQueueInfo2* from, VkDeviceQueueInfo2* to) {
3188 (void)alloc;
3189 (void)rootType;
3190 *to = *from;
3191 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3192 rootType = from->sType;
3193 }
3194 const void* from_pNext = from;
3195 size_t pNext_size = 0u;
3196 while (!pNext_size && from_pNext) {
3197 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3198 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3199 }
3200 to->pNext = nullptr;
3201 if (pNext_size) {
3202 to->pNext = (void*)alloc->alloc(pNext_size);
3203 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3204 }
3205 }
3206
deepcopy_VkProtectedSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkProtectedSubmitInfo * from,VkProtectedSubmitInfo * to)3207 void deepcopy_VkProtectedSubmitInfo(Allocator* alloc, VkStructureType rootType,
3208 const VkProtectedSubmitInfo* from, VkProtectedSubmitInfo* to) {
3209 (void)alloc;
3210 (void)rootType;
3211 *to = *from;
3212 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3213 rootType = from->sType;
3214 }
3215 const void* from_pNext = from;
3216 size_t pNext_size = 0u;
3217 while (!pNext_size && from_pNext) {
3218 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3219 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3220 }
3221 to->pNext = nullptr;
3222 if (pNext_size) {
3223 to->pNext = (void*)alloc->alloc(pNext_size);
3224 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3225 }
3226 }
3227
deepcopy_VkSamplerYcbcrConversionCreateInfo(Allocator * alloc,VkStructureType rootType,const VkSamplerYcbcrConversionCreateInfo * from,VkSamplerYcbcrConversionCreateInfo * to)3228 void deepcopy_VkSamplerYcbcrConversionCreateInfo(Allocator* alloc, VkStructureType rootType,
3229 const VkSamplerYcbcrConversionCreateInfo* from,
3230 VkSamplerYcbcrConversionCreateInfo* to) {
3231 (void)alloc;
3232 (void)rootType;
3233 *to = *from;
3234 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3235 rootType = from->sType;
3236 }
3237 const void* from_pNext = from;
3238 size_t pNext_size = 0u;
3239 while (!pNext_size && from_pNext) {
3240 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3241 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3242 }
3243 to->pNext = nullptr;
3244 if (pNext_size) {
3245 to->pNext = (void*)alloc->alloc(pNext_size);
3246 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3247 }
3248 deepcopy_VkComponentMapping(alloc, rootType, &from->components,
3249 (VkComponentMapping*)(&to->components));
3250 }
3251
deepcopy_VkSamplerYcbcrConversionInfo(Allocator * alloc,VkStructureType rootType,const VkSamplerYcbcrConversionInfo * from,VkSamplerYcbcrConversionInfo * to)3252 void deepcopy_VkSamplerYcbcrConversionInfo(Allocator* alloc, VkStructureType rootType,
3253 const VkSamplerYcbcrConversionInfo* from,
3254 VkSamplerYcbcrConversionInfo* to) {
3255 (void)alloc;
3256 (void)rootType;
3257 *to = *from;
3258 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3259 rootType = from->sType;
3260 }
3261 const void* from_pNext = from;
3262 size_t pNext_size = 0u;
3263 while (!pNext_size && from_pNext) {
3264 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3265 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3266 }
3267 to->pNext = nullptr;
3268 if (pNext_size) {
3269 to->pNext = (void*)alloc->alloc(pNext_size);
3270 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3271 }
3272 }
3273
deepcopy_VkBindImagePlaneMemoryInfo(Allocator * alloc,VkStructureType rootType,const VkBindImagePlaneMemoryInfo * from,VkBindImagePlaneMemoryInfo * to)3274 void deepcopy_VkBindImagePlaneMemoryInfo(Allocator* alloc, VkStructureType rootType,
3275 const VkBindImagePlaneMemoryInfo* from,
3276 VkBindImagePlaneMemoryInfo* to) {
3277 (void)alloc;
3278 (void)rootType;
3279 *to = *from;
3280 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3281 rootType = from->sType;
3282 }
3283 const void* from_pNext = from;
3284 size_t pNext_size = 0u;
3285 while (!pNext_size && from_pNext) {
3286 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3287 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3288 }
3289 to->pNext = nullptr;
3290 if (pNext_size) {
3291 to->pNext = (void*)alloc->alloc(pNext_size);
3292 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3293 }
3294 }
3295
deepcopy_VkImagePlaneMemoryRequirementsInfo(Allocator * alloc,VkStructureType rootType,const VkImagePlaneMemoryRequirementsInfo * from,VkImagePlaneMemoryRequirementsInfo * to)3296 void deepcopy_VkImagePlaneMemoryRequirementsInfo(Allocator* alloc, VkStructureType rootType,
3297 const VkImagePlaneMemoryRequirementsInfo* from,
3298 VkImagePlaneMemoryRequirementsInfo* to) {
3299 (void)alloc;
3300 (void)rootType;
3301 *to = *from;
3302 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3303 rootType = from->sType;
3304 }
3305 const void* from_pNext = from;
3306 size_t pNext_size = 0u;
3307 while (!pNext_size && from_pNext) {
3308 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3309 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3310 }
3311 to->pNext = nullptr;
3312 if (pNext_size) {
3313 to->pNext = (void*)alloc->alloc(pNext_size);
3314 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3315 }
3316 }
3317
deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSamplerYcbcrConversionFeatures * from,VkPhysicalDeviceSamplerYcbcrConversionFeatures * to)3318 void deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
3319 Allocator* alloc, VkStructureType rootType,
3320 const VkPhysicalDeviceSamplerYcbcrConversionFeatures* from,
3321 VkPhysicalDeviceSamplerYcbcrConversionFeatures* to) {
3322 (void)alloc;
3323 (void)rootType;
3324 *to = *from;
3325 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3326 rootType = from->sType;
3327 }
3328 const void* from_pNext = from;
3329 size_t pNext_size = 0u;
3330 while (!pNext_size && from_pNext) {
3331 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3332 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3333 }
3334 to->pNext = nullptr;
3335 if (pNext_size) {
3336 to->pNext = (void*)alloc->alloc(pNext_size);
3337 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3338 }
3339 }
3340
deepcopy_VkSamplerYcbcrConversionImageFormatProperties(Allocator * alloc,VkStructureType rootType,const VkSamplerYcbcrConversionImageFormatProperties * from,VkSamplerYcbcrConversionImageFormatProperties * to)3341 void deepcopy_VkSamplerYcbcrConversionImageFormatProperties(
3342 Allocator* alloc, VkStructureType rootType,
3343 const VkSamplerYcbcrConversionImageFormatProperties* from,
3344 VkSamplerYcbcrConversionImageFormatProperties* to) {
3345 (void)alloc;
3346 (void)rootType;
3347 *to = *from;
3348 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3349 rootType = from->sType;
3350 }
3351 const void* from_pNext = from;
3352 size_t pNext_size = 0u;
3353 while (!pNext_size && from_pNext) {
3354 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3355 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3356 }
3357 to->pNext = nullptr;
3358 if (pNext_size) {
3359 to->pNext = (void*)alloc->alloc(pNext_size);
3360 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3361 }
3362 }
3363
deepcopy_VkDescriptorUpdateTemplateEntry(Allocator * alloc,VkStructureType rootType,const VkDescriptorUpdateTemplateEntry * from,VkDescriptorUpdateTemplateEntry * to)3364 void deepcopy_VkDescriptorUpdateTemplateEntry(Allocator* alloc, VkStructureType rootType,
3365 const VkDescriptorUpdateTemplateEntry* from,
3366 VkDescriptorUpdateTemplateEntry* to) {
3367 (void)alloc;
3368 (void)rootType;
3369 *to = *from;
3370 }
3371
deepcopy_VkDescriptorUpdateTemplateCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorUpdateTemplateCreateInfo * from,VkDescriptorUpdateTemplateCreateInfo * to)3372 void deepcopy_VkDescriptorUpdateTemplateCreateInfo(Allocator* alloc, VkStructureType rootType,
3373 const VkDescriptorUpdateTemplateCreateInfo* from,
3374 VkDescriptorUpdateTemplateCreateInfo* to) {
3375 (void)alloc;
3376 (void)rootType;
3377 *to = *from;
3378 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3379 rootType = from->sType;
3380 }
3381 const void* from_pNext = from;
3382 size_t pNext_size = 0u;
3383 while (!pNext_size && from_pNext) {
3384 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3385 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3386 }
3387 to->pNext = nullptr;
3388 if (pNext_size) {
3389 to->pNext = (void*)alloc->alloc(pNext_size);
3390 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3391 }
3392 if (from) {
3393 to->pDescriptorUpdateEntries = nullptr;
3394 if (from->pDescriptorUpdateEntries) {
3395 to->pDescriptorUpdateEntries = (VkDescriptorUpdateTemplateEntry*)alloc->alloc(
3396 from->descriptorUpdateEntryCount * sizeof(const VkDescriptorUpdateTemplateEntry));
3397 to->descriptorUpdateEntryCount = from->descriptorUpdateEntryCount;
3398 for (uint32_t i = 0; i < (uint32_t)from->descriptorUpdateEntryCount; ++i) {
3399 deepcopy_VkDescriptorUpdateTemplateEntry(
3400 alloc, rootType, from->pDescriptorUpdateEntries + i,
3401 (VkDescriptorUpdateTemplateEntry*)(to->pDescriptorUpdateEntries + i));
3402 }
3403 }
3404 }
3405 }
3406
deepcopy_VkExternalMemoryProperties(Allocator * alloc,VkStructureType rootType,const VkExternalMemoryProperties * from,VkExternalMemoryProperties * to)3407 void deepcopy_VkExternalMemoryProperties(Allocator* alloc, VkStructureType rootType,
3408 const VkExternalMemoryProperties* from,
3409 VkExternalMemoryProperties* to) {
3410 (void)alloc;
3411 (void)rootType;
3412 *to = *from;
3413 }
3414
deepcopy_VkPhysicalDeviceExternalImageFormatInfo(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExternalImageFormatInfo * from,VkPhysicalDeviceExternalImageFormatInfo * to)3415 void deepcopy_VkPhysicalDeviceExternalImageFormatInfo(
3416 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceExternalImageFormatInfo* from,
3417 VkPhysicalDeviceExternalImageFormatInfo* to) {
3418 (void)alloc;
3419 (void)rootType;
3420 *to = *from;
3421 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3422 rootType = from->sType;
3423 }
3424 const void* from_pNext = from;
3425 size_t pNext_size = 0u;
3426 while (!pNext_size && from_pNext) {
3427 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3428 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3429 }
3430 to->pNext = nullptr;
3431 if (pNext_size) {
3432 to->pNext = (void*)alloc->alloc(pNext_size);
3433 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3434 }
3435 }
3436
deepcopy_VkExternalImageFormatProperties(Allocator * alloc,VkStructureType rootType,const VkExternalImageFormatProperties * from,VkExternalImageFormatProperties * to)3437 void deepcopy_VkExternalImageFormatProperties(Allocator* alloc, VkStructureType rootType,
3438 const VkExternalImageFormatProperties* from,
3439 VkExternalImageFormatProperties* to) {
3440 (void)alloc;
3441 (void)rootType;
3442 *to = *from;
3443 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3444 rootType = from->sType;
3445 }
3446 const void* from_pNext = from;
3447 size_t pNext_size = 0u;
3448 while (!pNext_size && from_pNext) {
3449 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3450 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3451 }
3452 to->pNext = nullptr;
3453 if (pNext_size) {
3454 to->pNext = (void*)alloc->alloc(pNext_size);
3455 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3456 }
3457 deepcopy_VkExternalMemoryProperties(
3458 alloc, rootType, &from->externalMemoryProperties,
3459 (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
3460 }
3461
deepcopy_VkPhysicalDeviceExternalBufferInfo(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExternalBufferInfo * from,VkPhysicalDeviceExternalBufferInfo * to)3462 void deepcopy_VkPhysicalDeviceExternalBufferInfo(Allocator* alloc, VkStructureType rootType,
3463 const VkPhysicalDeviceExternalBufferInfo* from,
3464 VkPhysicalDeviceExternalBufferInfo* to) {
3465 (void)alloc;
3466 (void)rootType;
3467 *to = *from;
3468 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3469 rootType = from->sType;
3470 }
3471 const void* from_pNext = from;
3472 size_t pNext_size = 0u;
3473 while (!pNext_size && from_pNext) {
3474 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3475 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3476 }
3477 to->pNext = nullptr;
3478 if (pNext_size) {
3479 to->pNext = (void*)alloc->alloc(pNext_size);
3480 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3481 }
3482 }
3483
deepcopy_VkExternalBufferProperties(Allocator * alloc,VkStructureType rootType,const VkExternalBufferProperties * from,VkExternalBufferProperties * to)3484 void deepcopy_VkExternalBufferProperties(Allocator* alloc, VkStructureType rootType,
3485 const VkExternalBufferProperties* from,
3486 VkExternalBufferProperties* to) {
3487 (void)alloc;
3488 (void)rootType;
3489 *to = *from;
3490 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3491 rootType = from->sType;
3492 }
3493 const void* from_pNext = from;
3494 size_t pNext_size = 0u;
3495 while (!pNext_size && from_pNext) {
3496 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3497 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3498 }
3499 to->pNext = nullptr;
3500 if (pNext_size) {
3501 to->pNext = (void*)alloc->alloc(pNext_size);
3502 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3503 }
3504 deepcopy_VkExternalMemoryProperties(
3505 alloc, rootType, &from->externalMemoryProperties,
3506 (VkExternalMemoryProperties*)(&to->externalMemoryProperties));
3507 }
3508
deepcopy_VkPhysicalDeviceIDProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceIDProperties * from,VkPhysicalDeviceIDProperties * to)3509 void deepcopy_VkPhysicalDeviceIDProperties(Allocator* alloc, VkStructureType rootType,
3510 const VkPhysicalDeviceIDProperties* from,
3511 VkPhysicalDeviceIDProperties* to) {
3512 (void)alloc;
3513 (void)rootType;
3514 *to = *from;
3515 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3516 rootType = from->sType;
3517 }
3518 const void* from_pNext = from;
3519 size_t pNext_size = 0u;
3520 while (!pNext_size && from_pNext) {
3521 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3522 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3523 }
3524 to->pNext = nullptr;
3525 if (pNext_size) {
3526 to->pNext = (void*)alloc->alloc(pNext_size);
3527 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3528 }
3529 memcpy(to->deviceUUID, from->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
3530 memcpy(to->driverUUID, from->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
3531 memcpy(to->deviceLUID, from->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
3532 }
3533
deepcopy_VkExternalMemoryImageCreateInfo(Allocator * alloc,VkStructureType rootType,const VkExternalMemoryImageCreateInfo * from,VkExternalMemoryImageCreateInfo * to)3534 void deepcopy_VkExternalMemoryImageCreateInfo(Allocator* alloc, VkStructureType rootType,
3535 const VkExternalMemoryImageCreateInfo* from,
3536 VkExternalMemoryImageCreateInfo* to) {
3537 (void)alloc;
3538 (void)rootType;
3539 *to = *from;
3540 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3541 rootType = from->sType;
3542 }
3543 const void* from_pNext = from;
3544 size_t pNext_size = 0u;
3545 while (!pNext_size && from_pNext) {
3546 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3547 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3548 }
3549 to->pNext = nullptr;
3550 if (pNext_size) {
3551 to->pNext = (void*)alloc->alloc(pNext_size);
3552 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3553 }
3554 }
3555
deepcopy_VkExternalMemoryBufferCreateInfo(Allocator * alloc,VkStructureType rootType,const VkExternalMemoryBufferCreateInfo * from,VkExternalMemoryBufferCreateInfo * to)3556 void deepcopy_VkExternalMemoryBufferCreateInfo(Allocator* alloc, VkStructureType rootType,
3557 const VkExternalMemoryBufferCreateInfo* from,
3558 VkExternalMemoryBufferCreateInfo* to) {
3559 (void)alloc;
3560 (void)rootType;
3561 *to = *from;
3562 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3563 rootType = from->sType;
3564 }
3565 const void* from_pNext = from;
3566 size_t pNext_size = 0u;
3567 while (!pNext_size && from_pNext) {
3568 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3569 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3570 }
3571 to->pNext = nullptr;
3572 if (pNext_size) {
3573 to->pNext = (void*)alloc->alloc(pNext_size);
3574 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3575 }
3576 }
3577
deepcopy_VkExportMemoryAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkExportMemoryAllocateInfo * from,VkExportMemoryAllocateInfo * to)3578 void deepcopy_VkExportMemoryAllocateInfo(Allocator* alloc, VkStructureType rootType,
3579 const VkExportMemoryAllocateInfo* from,
3580 VkExportMemoryAllocateInfo* to) {
3581 (void)alloc;
3582 (void)rootType;
3583 *to = *from;
3584 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3585 rootType = from->sType;
3586 }
3587 const void* from_pNext = from;
3588 size_t pNext_size = 0u;
3589 while (!pNext_size && from_pNext) {
3590 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3591 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3592 }
3593 to->pNext = nullptr;
3594 if (pNext_size) {
3595 to->pNext = (void*)alloc->alloc(pNext_size);
3596 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3597 }
3598 }
3599
deepcopy_VkPhysicalDeviceExternalFenceInfo(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExternalFenceInfo * from,VkPhysicalDeviceExternalFenceInfo * to)3600 void deepcopy_VkPhysicalDeviceExternalFenceInfo(Allocator* alloc, VkStructureType rootType,
3601 const VkPhysicalDeviceExternalFenceInfo* from,
3602 VkPhysicalDeviceExternalFenceInfo* to) {
3603 (void)alloc;
3604 (void)rootType;
3605 *to = *from;
3606 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3607 rootType = from->sType;
3608 }
3609 const void* from_pNext = from;
3610 size_t pNext_size = 0u;
3611 while (!pNext_size && from_pNext) {
3612 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3613 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3614 }
3615 to->pNext = nullptr;
3616 if (pNext_size) {
3617 to->pNext = (void*)alloc->alloc(pNext_size);
3618 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3619 }
3620 }
3621
deepcopy_VkExternalFenceProperties(Allocator * alloc,VkStructureType rootType,const VkExternalFenceProperties * from,VkExternalFenceProperties * to)3622 void deepcopy_VkExternalFenceProperties(Allocator* alloc, VkStructureType rootType,
3623 const VkExternalFenceProperties* from,
3624 VkExternalFenceProperties* to) {
3625 (void)alloc;
3626 (void)rootType;
3627 *to = *from;
3628 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3629 rootType = from->sType;
3630 }
3631 const void* from_pNext = from;
3632 size_t pNext_size = 0u;
3633 while (!pNext_size && from_pNext) {
3634 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3635 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3636 }
3637 to->pNext = nullptr;
3638 if (pNext_size) {
3639 to->pNext = (void*)alloc->alloc(pNext_size);
3640 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3641 }
3642 }
3643
deepcopy_VkExportFenceCreateInfo(Allocator * alloc,VkStructureType rootType,const VkExportFenceCreateInfo * from,VkExportFenceCreateInfo * to)3644 void deepcopy_VkExportFenceCreateInfo(Allocator* alloc, VkStructureType rootType,
3645 const VkExportFenceCreateInfo* from,
3646 VkExportFenceCreateInfo* to) {
3647 (void)alloc;
3648 (void)rootType;
3649 *to = *from;
3650 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3651 rootType = from->sType;
3652 }
3653 const void* from_pNext = from;
3654 size_t pNext_size = 0u;
3655 while (!pNext_size && from_pNext) {
3656 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3657 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3658 }
3659 to->pNext = nullptr;
3660 if (pNext_size) {
3661 to->pNext = (void*)alloc->alloc(pNext_size);
3662 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3663 }
3664 }
3665
deepcopy_VkExportSemaphoreCreateInfo(Allocator * alloc,VkStructureType rootType,const VkExportSemaphoreCreateInfo * from,VkExportSemaphoreCreateInfo * to)3666 void deepcopy_VkExportSemaphoreCreateInfo(Allocator* alloc, VkStructureType rootType,
3667 const VkExportSemaphoreCreateInfo* from,
3668 VkExportSemaphoreCreateInfo* to) {
3669 (void)alloc;
3670 (void)rootType;
3671 *to = *from;
3672 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3673 rootType = from->sType;
3674 }
3675 const void* from_pNext = from;
3676 size_t pNext_size = 0u;
3677 while (!pNext_size && from_pNext) {
3678 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3679 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3680 }
3681 to->pNext = nullptr;
3682 if (pNext_size) {
3683 to->pNext = (void*)alloc->alloc(pNext_size);
3684 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3685 }
3686 }
3687
deepcopy_VkPhysicalDeviceExternalSemaphoreInfo(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExternalSemaphoreInfo * from,VkPhysicalDeviceExternalSemaphoreInfo * to)3688 void deepcopy_VkPhysicalDeviceExternalSemaphoreInfo(
3689 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceExternalSemaphoreInfo* from,
3690 VkPhysicalDeviceExternalSemaphoreInfo* to) {
3691 (void)alloc;
3692 (void)rootType;
3693 *to = *from;
3694 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3695 rootType = from->sType;
3696 }
3697 const void* from_pNext = from;
3698 size_t pNext_size = 0u;
3699 while (!pNext_size && from_pNext) {
3700 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3701 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3702 }
3703 to->pNext = nullptr;
3704 if (pNext_size) {
3705 to->pNext = (void*)alloc->alloc(pNext_size);
3706 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3707 }
3708 }
3709
deepcopy_VkExternalSemaphoreProperties(Allocator * alloc,VkStructureType rootType,const VkExternalSemaphoreProperties * from,VkExternalSemaphoreProperties * to)3710 void deepcopy_VkExternalSemaphoreProperties(Allocator* alloc, VkStructureType rootType,
3711 const VkExternalSemaphoreProperties* from,
3712 VkExternalSemaphoreProperties* to) {
3713 (void)alloc;
3714 (void)rootType;
3715 *to = *from;
3716 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3717 rootType = from->sType;
3718 }
3719 const void* from_pNext = from;
3720 size_t pNext_size = 0u;
3721 while (!pNext_size && from_pNext) {
3722 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3723 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3724 }
3725 to->pNext = nullptr;
3726 if (pNext_size) {
3727 to->pNext = (void*)alloc->alloc(pNext_size);
3728 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3729 }
3730 }
3731
deepcopy_VkPhysicalDeviceMaintenance3Properties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMaintenance3Properties * from,VkPhysicalDeviceMaintenance3Properties * to)3732 void deepcopy_VkPhysicalDeviceMaintenance3Properties(
3733 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceMaintenance3Properties* from,
3734 VkPhysicalDeviceMaintenance3Properties* to) {
3735 (void)alloc;
3736 (void)rootType;
3737 *to = *from;
3738 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3739 rootType = from->sType;
3740 }
3741 const void* from_pNext = from;
3742 size_t pNext_size = 0u;
3743 while (!pNext_size && from_pNext) {
3744 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3745 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3746 }
3747 to->pNext = nullptr;
3748 if (pNext_size) {
3749 to->pNext = (void*)alloc->alloc(pNext_size);
3750 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3751 }
3752 }
3753
deepcopy_VkDescriptorSetLayoutSupport(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetLayoutSupport * from,VkDescriptorSetLayoutSupport * to)3754 void deepcopy_VkDescriptorSetLayoutSupport(Allocator* alloc, VkStructureType rootType,
3755 const VkDescriptorSetLayoutSupport* from,
3756 VkDescriptorSetLayoutSupport* to) {
3757 (void)alloc;
3758 (void)rootType;
3759 *to = *from;
3760 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3761 rootType = from->sType;
3762 }
3763 const void* from_pNext = from;
3764 size_t pNext_size = 0u;
3765 while (!pNext_size && from_pNext) {
3766 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3767 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3768 }
3769 to->pNext = nullptr;
3770 if (pNext_size) {
3771 to->pNext = (void*)alloc->alloc(pNext_size);
3772 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3773 }
3774 }
3775
deepcopy_VkPhysicalDeviceShaderDrawParametersFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderDrawParametersFeatures * from,VkPhysicalDeviceShaderDrawParametersFeatures * to)3776 void deepcopy_VkPhysicalDeviceShaderDrawParametersFeatures(
3777 Allocator* alloc, VkStructureType rootType,
3778 const VkPhysicalDeviceShaderDrawParametersFeatures* from,
3779 VkPhysicalDeviceShaderDrawParametersFeatures* to) {
3780 (void)alloc;
3781 (void)rootType;
3782 *to = *from;
3783 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3784 rootType = from->sType;
3785 }
3786 const void* from_pNext = from;
3787 size_t pNext_size = 0u;
3788 while (!pNext_size && from_pNext) {
3789 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3790 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3791 }
3792 to->pNext = nullptr;
3793 if (pNext_size) {
3794 to->pNext = (void*)alloc->alloc(pNext_size);
3795 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3796 }
3797 }
3798
3799 #endif
3800 #ifdef VK_VERSION_1_2
deepcopy_VkPhysicalDeviceVulkan11Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan11Features * from,VkPhysicalDeviceVulkan11Features * to)3801 void deepcopy_VkPhysicalDeviceVulkan11Features(Allocator* alloc, VkStructureType rootType,
3802 const VkPhysicalDeviceVulkan11Features* from,
3803 VkPhysicalDeviceVulkan11Features* to) {
3804 (void)alloc;
3805 (void)rootType;
3806 *to = *from;
3807 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3808 rootType = from->sType;
3809 }
3810 const void* from_pNext = from;
3811 size_t pNext_size = 0u;
3812 while (!pNext_size && from_pNext) {
3813 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3814 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3815 }
3816 to->pNext = nullptr;
3817 if (pNext_size) {
3818 to->pNext = (void*)alloc->alloc(pNext_size);
3819 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3820 }
3821 }
3822
deepcopy_VkPhysicalDeviceVulkan11Properties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan11Properties * from,VkPhysicalDeviceVulkan11Properties * to)3823 void deepcopy_VkPhysicalDeviceVulkan11Properties(Allocator* alloc, VkStructureType rootType,
3824 const VkPhysicalDeviceVulkan11Properties* from,
3825 VkPhysicalDeviceVulkan11Properties* to) {
3826 (void)alloc;
3827 (void)rootType;
3828 *to = *from;
3829 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3830 rootType = from->sType;
3831 }
3832 const void* from_pNext = from;
3833 size_t pNext_size = 0u;
3834 while (!pNext_size && from_pNext) {
3835 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3836 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3837 }
3838 to->pNext = nullptr;
3839 if (pNext_size) {
3840 to->pNext = (void*)alloc->alloc(pNext_size);
3841 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3842 }
3843 memcpy(to->deviceUUID, from->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
3844 memcpy(to->driverUUID, from->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
3845 memcpy(to->deviceLUID, from->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
3846 }
3847
deepcopy_VkPhysicalDeviceVulkan12Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan12Features * from,VkPhysicalDeviceVulkan12Features * to)3848 void deepcopy_VkPhysicalDeviceVulkan12Features(Allocator* alloc, VkStructureType rootType,
3849 const VkPhysicalDeviceVulkan12Features* from,
3850 VkPhysicalDeviceVulkan12Features* to) {
3851 (void)alloc;
3852 (void)rootType;
3853 *to = *from;
3854 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3855 rootType = from->sType;
3856 }
3857 const void* from_pNext = from;
3858 size_t pNext_size = 0u;
3859 while (!pNext_size && from_pNext) {
3860 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3861 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3862 }
3863 to->pNext = nullptr;
3864 if (pNext_size) {
3865 to->pNext = (void*)alloc->alloc(pNext_size);
3866 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3867 }
3868 }
3869
deepcopy_VkConformanceVersion(Allocator * alloc,VkStructureType rootType,const VkConformanceVersion * from,VkConformanceVersion * to)3870 void deepcopy_VkConformanceVersion(Allocator* alloc, VkStructureType rootType,
3871 const VkConformanceVersion* from, VkConformanceVersion* to) {
3872 (void)alloc;
3873 (void)rootType;
3874 *to = *from;
3875 }
3876
deepcopy_VkPhysicalDeviceVulkan12Properties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan12Properties * from,VkPhysicalDeviceVulkan12Properties * to)3877 void deepcopy_VkPhysicalDeviceVulkan12Properties(Allocator* alloc, VkStructureType rootType,
3878 const VkPhysicalDeviceVulkan12Properties* from,
3879 VkPhysicalDeviceVulkan12Properties* to) {
3880 (void)alloc;
3881 (void)rootType;
3882 *to = *from;
3883 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3884 rootType = from->sType;
3885 }
3886 const void* from_pNext = from;
3887 size_t pNext_size = 0u;
3888 while (!pNext_size && from_pNext) {
3889 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3890 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3891 }
3892 to->pNext = nullptr;
3893 if (pNext_size) {
3894 to->pNext = (void*)alloc->alloc(pNext_size);
3895 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3896 }
3897 memcpy(to->driverName, from->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
3898 memcpy(to->driverInfo, from->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
3899 deepcopy_VkConformanceVersion(alloc, rootType, &from->conformanceVersion,
3900 (VkConformanceVersion*)(&to->conformanceVersion));
3901 }
3902
deepcopy_VkImageFormatListCreateInfo(Allocator * alloc,VkStructureType rootType,const VkImageFormatListCreateInfo * from,VkImageFormatListCreateInfo * to)3903 void deepcopy_VkImageFormatListCreateInfo(Allocator* alloc, VkStructureType rootType,
3904 const VkImageFormatListCreateInfo* from,
3905 VkImageFormatListCreateInfo* to) {
3906 (void)alloc;
3907 (void)rootType;
3908 *to = *from;
3909 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3910 rootType = from->sType;
3911 }
3912 const void* from_pNext = from;
3913 size_t pNext_size = 0u;
3914 while (!pNext_size && from_pNext) {
3915 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3916 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3917 }
3918 to->pNext = nullptr;
3919 if (pNext_size) {
3920 to->pNext = (void*)alloc->alloc(pNext_size);
3921 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3922 }
3923 to->pViewFormats = nullptr;
3924 if (from->pViewFormats) {
3925 to->pViewFormats = (VkFormat*)alloc->dupArray(
3926 from->pViewFormats, from->viewFormatCount * sizeof(const VkFormat));
3927 }
3928 }
3929
deepcopy_VkAttachmentDescription2(Allocator * alloc,VkStructureType rootType,const VkAttachmentDescription2 * from,VkAttachmentDescription2 * to)3930 void deepcopy_VkAttachmentDescription2(Allocator* alloc, VkStructureType rootType,
3931 const VkAttachmentDescription2* from,
3932 VkAttachmentDescription2* to) {
3933 (void)alloc;
3934 (void)rootType;
3935 *to = *from;
3936 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3937 rootType = from->sType;
3938 }
3939 const void* from_pNext = from;
3940 size_t pNext_size = 0u;
3941 while (!pNext_size && from_pNext) {
3942 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3943 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3944 }
3945 to->pNext = nullptr;
3946 if (pNext_size) {
3947 to->pNext = (void*)alloc->alloc(pNext_size);
3948 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3949 }
3950 }
3951
deepcopy_VkAttachmentReference2(Allocator * alloc,VkStructureType rootType,const VkAttachmentReference2 * from,VkAttachmentReference2 * to)3952 void deepcopy_VkAttachmentReference2(Allocator* alloc, VkStructureType rootType,
3953 const VkAttachmentReference2* from,
3954 VkAttachmentReference2* to) {
3955 (void)alloc;
3956 (void)rootType;
3957 *to = *from;
3958 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3959 rootType = from->sType;
3960 }
3961 const void* from_pNext = from;
3962 size_t pNext_size = 0u;
3963 while (!pNext_size && from_pNext) {
3964 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3965 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3966 }
3967 to->pNext = nullptr;
3968 if (pNext_size) {
3969 to->pNext = (void*)alloc->alloc(pNext_size);
3970 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3971 }
3972 }
3973
deepcopy_VkSubpassDescription2(Allocator * alloc,VkStructureType rootType,const VkSubpassDescription2 * from,VkSubpassDescription2 * to)3974 void deepcopy_VkSubpassDescription2(Allocator* alloc, VkStructureType rootType,
3975 const VkSubpassDescription2* from, VkSubpassDescription2* to) {
3976 (void)alloc;
3977 (void)rootType;
3978 *to = *from;
3979 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
3980 rootType = from->sType;
3981 }
3982 const void* from_pNext = from;
3983 size_t pNext_size = 0u;
3984 while (!pNext_size && from_pNext) {
3985 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
3986 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
3987 }
3988 to->pNext = nullptr;
3989 if (pNext_size) {
3990 to->pNext = (void*)alloc->alloc(pNext_size);
3991 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
3992 }
3993 if (from) {
3994 to->pInputAttachments = nullptr;
3995 if (from->pInputAttachments) {
3996 to->pInputAttachments = (VkAttachmentReference2*)alloc->alloc(
3997 from->inputAttachmentCount * sizeof(const VkAttachmentReference2));
3998 to->inputAttachmentCount = from->inputAttachmentCount;
3999 for (uint32_t i = 0; i < (uint32_t)from->inputAttachmentCount; ++i) {
4000 deepcopy_VkAttachmentReference2(
4001 alloc, rootType, from->pInputAttachments + i,
4002 (VkAttachmentReference2*)(to->pInputAttachments + i));
4003 }
4004 }
4005 }
4006 if (from) {
4007 to->pColorAttachments = nullptr;
4008 if (from->pColorAttachments) {
4009 to->pColorAttachments = (VkAttachmentReference2*)alloc->alloc(
4010 from->colorAttachmentCount * sizeof(const VkAttachmentReference2));
4011 to->colorAttachmentCount = from->colorAttachmentCount;
4012 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i) {
4013 deepcopy_VkAttachmentReference2(
4014 alloc, rootType, from->pColorAttachments + i,
4015 (VkAttachmentReference2*)(to->pColorAttachments + i));
4016 }
4017 }
4018 }
4019 if (from) {
4020 to->pResolveAttachments = nullptr;
4021 if (from->pResolveAttachments) {
4022 to->pResolveAttachments = (VkAttachmentReference2*)alloc->alloc(
4023 from->colorAttachmentCount * sizeof(const VkAttachmentReference2));
4024 to->colorAttachmentCount = from->colorAttachmentCount;
4025 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i) {
4026 deepcopy_VkAttachmentReference2(
4027 alloc, rootType, from->pResolveAttachments + i,
4028 (VkAttachmentReference2*)(to->pResolveAttachments + i));
4029 }
4030 }
4031 }
4032 to->pDepthStencilAttachment = nullptr;
4033 if (from->pDepthStencilAttachment) {
4034 to->pDepthStencilAttachment =
4035 (VkAttachmentReference2*)alloc->alloc(sizeof(const VkAttachmentReference2));
4036 deepcopy_VkAttachmentReference2(alloc, rootType, from->pDepthStencilAttachment,
4037 (VkAttachmentReference2*)(to->pDepthStencilAttachment));
4038 }
4039 to->pPreserveAttachments = nullptr;
4040 if (from->pPreserveAttachments) {
4041 to->pPreserveAttachments = (uint32_t*)alloc->dupArray(
4042 from->pPreserveAttachments, from->preserveAttachmentCount * sizeof(const uint32_t));
4043 }
4044 }
4045
deepcopy_VkSubpassDependency2(Allocator * alloc,VkStructureType rootType,const VkSubpassDependency2 * from,VkSubpassDependency2 * to)4046 void deepcopy_VkSubpassDependency2(Allocator* alloc, VkStructureType rootType,
4047 const VkSubpassDependency2* from, VkSubpassDependency2* to) {
4048 (void)alloc;
4049 (void)rootType;
4050 *to = *from;
4051 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4052 rootType = from->sType;
4053 }
4054 const void* from_pNext = from;
4055 size_t pNext_size = 0u;
4056 while (!pNext_size && from_pNext) {
4057 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4058 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4059 }
4060 to->pNext = nullptr;
4061 if (pNext_size) {
4062 to->pNext = (void*)alloc->alloc(pNext_size);
4063 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4064 }
4065 }
4066
deepcopy_VkRenderPassCreateInfo2(Allocator * alloc,VkStructureType rootType,const VkRenderPassCreateInfo2 * from,VkRenderPassCreateInfo2 * to)4067 void deepcopy_VkRenderPassCreateInfo2(Allocator* alloc, VkStructureType rootType,
4068 const VkRenderPassCreateInfo2* from,
4069 VkRenderPassCreateInfo2* to) {
4070 (void)alloc;
4071 (void)rootType;
4072 *to = *from;
4073 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4074 rootType = from->sType;
4075 }
4076 const void* from_pNext = from;
4077 size_t pNext_size = 0u;
4078 while (!pNext_size && from_pNext) {
4079 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4080 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4081 }
4082 to->pNext = nullptr;
4083 if (pNext_size) {
4084 to->pNext = (void*)alloc->alloc(pNext_size);
4085 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4086 }
4087 if (from) {
4088 to->pAttachments = nullptr;
4089 if (from->pAttachments) {
4090 to->pAttachments = (VkAttachmentDescription2*)alloc->alloc(
4091 from->attachmentCount * sizeof(const VkAttachmentDescription2));
4092 to->attachmentCount = from->attachmentCount;
4093 for (uint32_t i = 0; i < (uint32_t)from->attachmentCount; ++i) {
4094 deepcopy_VkAttachmentDescription2(
4095 alloc, rootType, from->pAttachments + i,
4096 (VkAttachmentDescription2*)(to->pAttachments + i));
4097 }
4098 }
4099 }
4100 if (from) {
4101 to->pSubpasses = nullptr;
4102 if (from->pSubpasses) {
4103 to->pSubpasses = (VkSubpassDescription2*)alloc->alloc(
4104 from->subpassCount * sizeof(const VkSubpassDescription2));
4105 to->subpassCount = from->subpassCount;
4106 for (uint32_t i = 0; i < (uint32_t)from->subpassCount; ++i) {
4107 deepcopy_VkSubpassDescription2(alloc, rootType, from->pSubpasses + i,
4108 (VkSubpassDescription2*)(to->pSubpasses + i));
4109 }
4110 }
4111 }
4112 if (from) {
4113 to->pDependencies = nullptr;
4114 if (from->pDependencies) {
4115 to->pDependencies = (VkSubpassDependency2*)alloc->alloc(
4116 from->dependencyCount * sizeof(const VkSubpassDependency2));
4117 to->dependencyCount = from->dependencyCount;
4118 for (uint32_t i = 0; i < (uint32_t)from->dependencyCount; ++i) {
4119 deepcopy_VkSubpassDependency2(alloc, rootType, from->pDependencies + i,
4120 (VkSubpassDependency2*)(to->pDependencies + i));
4121 }
4122 }
4123 }
4124 to->pCorrelatedViewMasks = nullptr;
4125 if (from->pCorrelatedViewMasks) {
4126 to->pCorrelatedViewMasks = (uint32_t*)alloc->dupArray(
4127 from->pCorrelatedViewMasks, from->correlatedViewMaskCount * sizeof(const uint32_t));
4128 }
4129 }
4130
deepcopy_VkSubpassBeginInfo(Allocator * alloc,VkStructureType rootType,const VkSubpassBeginInfo * from,VkSubpassBeginInfo * to)4131 void deepcopy_VkSubpassBeginInfo(Allocator* alloc, VkStructureType rootType,
4132 const VkSubpassBeginInfo* from, VkSubpassBeginInfo* to) {
4133 (void)alloc;
4134 (void)rootType;
4135 *to = *from;
4136 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4137 rootType = from->sType;
4138 }
4139 const void* from_pNext = from;
4140 size_t pNext_size = 0u;
4141 while (!pNext_size && from_pNext) {
4142 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4143 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4144 }
4145 to->pNext = nullptr;
4146 if (pNext_size) {
4147 to->pNext = (void*)alloc->alloc(pNext_size);
4148 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4149 }
4150 }
4151
deepcopy_VkSubpassEndInfo(Allocator * alloc,VkStructureType rootType,const VkSubpassEndInfo * from,VkSubpassEndInfo * to)4152 void deepcopy_VkSubpassEndInfo(Allocator* alloc, VkStructureType rootType,
4153 const VkSubpassEndInfo* from, VkSubpassEndInfo* to) {
4154 (void)alloc;
4155 (void)rootType;
4156 *to = *from;
4157 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4158 rootType = from->sType;
4159 }
4160 const void* from_pNext = from;
4161 size_t pNext_size = 0u;
4162 while (!pNext_size && from_pNext) {
4163 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4164 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4165 }
4166 to->pNext = nullptr;
4167 if (pNext_size) {
4168 to->pNext = (void*)alloc->alloc(pNext_size);
4169 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4170 }
4171 }
4172
deepcopy_VkPhysicalDevice8BitStorageFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevice8BitStorageFeatures * from,VkPhysicalDevice8BitStorageFeatures * to)4173 void deepcopy_VkPhysicalDevice8BitStorageFeatures(Allocator* alloc, VkStructureType rootType,
4174 const VkPhysicalDevice8BitStorageFeatures* from,
4175 VkPhysicalDevice8BitStorageFeatures* to) {
4176 (void)alloc;
4177 (void)rootType;
4178 *to = *from;
4179 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4180 rootType = from->sType;
4181 }
4182 const void* from_pNext = from;
4183 size_t pNext_size = 0u;
4184 while (!pNext_size && from_pNext) {
4185 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4186 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4187 }
4188 to->pNext = nullptr;
4189 if (pNext_size) {
4190 to->pNext = (void*)alloc->alloc(pNext_size);
4191 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4192 }
4193 }
4194
deepcopy_VkPhysicalDeviceDriverProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDriverProperties * from,VkPhysicalDeviceDriverProperties * to)4195 void deepcopy_VkPhysicalDeviceDriverProperties(Allocator* alloc, VkStructureType rootType,
4196 const VkPhysicalDeviceDriverProperties* from,
4197 VkPhysicalDeviceDriverProperties* to) {
4198 (void)alloc;
4199 (void)rootType;
4200 *to = *from;
4201 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4202 rootType = from->sType;
4203 }
4204 const void* from_pNext = from;
4205 size_t pNext_size = 0u;
4206 while (!pNext_size && from_pNext) {
4207 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4208 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4209 }
4210 to->pNext = nullptr;
4211 if (pNext_size) {
4212 to->pNext = (void*)alloc->alloc(pNext_size);
4213 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4214 }
4215 memcpy(to->driverName, from->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
4216 memcpy(to->driverInfo, from->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
4217 deepcopy_VkConformanceVersion(alloc, rootType, &from->conformanceVersion,
4218 (VkConformanceVersion*)(&to->conformanceVersion));
4219 }
4220
deepcopy_VkPhysicalDeviceShaderAtomicInt64Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderAtomicInt64Features * from,VkPhysicalDeviceShaderAtomicInt64Features * to)4221 void deepcopy_VkPhysicalDeviceShaderAtomicInt64Features(
4222 Allocator* alloc, VkStructureType rootType,
4223 const VkPhysicalDeviceShaderAtomicInt64Features* from,
4224 VkPhysicalDeviceShaderAtomicInt64Features* to) {
4225 (void)alloc;
4226 (void)rootType;
4227 *to = *from;
4228 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4229 rootType = from->sType;
4230 }
4231 const void* from_pNext = from;
4232 size_t pNext_size = 0u;
4233 while (!pNext_size && from_pNext) {
4234 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4235 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4236 }
4237 to->pNext = nullptr;
4238 if (pNext_size) {
4239 to->pNext = (void*)alloc->alloc(pNext_size);
4240 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4241 }
4242 }
4243
deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderFloat16Int8Features * from,VkPhysicalDeviceShaderFloat16Int8Features * to)4244 void deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(
4245 Allocator* alloc, VkStructureType rootType,
4246 const VkPhysicalDeviceShaderFloat16Int8Features* from,
4247 VkPhysicalDeviceShaderFloat16Int8Features* to) {
4248 (void)alloc;
4249 (void)rootType;
4250 *to = *from;
4251 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4252 rootType = from->sType;
4253 }
4254 const void* from_pNext = from;
4255 size_t pNext_size = 0u;
4256 while (!pNext_size && from_pNext) {
4257 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4258 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4259 }
4260 to->pNext = nullptr;
4261 if (pNext_size) {
4262 to->pNext = (void*)alloc->alloc(pNext_size);
4263 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4264 }
4265 }
4266
deepcopy_VkPhysicalDeviceFloatControlsProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceFloatControlsProperties * from,VkPhysicalDeviceFloatControlsProperties * to)4267 void deepcopy_VkPhysicalDeviceFloatControlsProperties(
4268 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceFloatControlsProperties* from,
4269 VkPhysicalDeviceFloatControlsProperties* to) {
4270 (void)alloc;
4271 (void)rootType;
4272 *to = *from;
4273 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4274 rootType = from->sType;
4275 }
4276 const void* from_pNext = from;
4277 size_t pNext_size = 0u;
4278 while (!pNext_size && from_pNext) {
4279 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4280 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4281 }
4282 to->pNext = nullptr;
4283 if (pNext_size) {
4284 to->pNext = (void*)alloc->alloc(pNext_size);
4285 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4286 }
4287 }
4288
deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetLayoutBindingFlagsCreateInfo * from,VkDescriptorSetLayoutBindingFlagsCreateInfo * to)4289 void deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfo(
4290 Allocator* alloc, VkStructureType rootType,
4291 const VkDescriptorSetLayoutBindingFlagsCreateInfo* from,
4292 VkDescriptorSetLayoutBindingFlagsCreateInfo* to) {
4293 (void)alloc;
4294 (void)rootType;
4295 *to = *from;
4296 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4297 rootType = from->sType;
4298 }
4299 const void* from_pNext = from;
4300 size_t pNext_size = 0u;
4301 while (!pNext_size && from_pNext) {
4302 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4303 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4304 }
4305 to->pNext = nullptr;
4306 if (pNext_size) {
4307 to->pNext = (void*)alloc->alloc(pNext_size);
4308 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4309 }
4310 to->pBindingFlags = nullptr;
4311 if (from->pBindingFlags) {
4312 to->pBindingFlags = (VkDescriptorBindingFlags*)alloc->dupArray(
4313 from->pBindingFlags, from->bindingCount * sizeof(const VkDescriptorBindingFlags));
4314 }
4315 }
4316
deepcopy_VkPhysicalDeviceDescriptorIndexingFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDescriptorIndexingFeatures * from,VkPhysicalDeviceDescriptorIndexingFeatures * to)4317 void deepcopy_VkPhysicalDeviceDescriptorIndexingFeatures(
4318 Allocator* alloc, VkStructureType rootType,
4319 const VkPhysicalDeviceDescriptorIndexingFeatures* from,
4320 VkPhysicalDeviceDescriptorIndexingFeatures* to) {
4321 (void)alloc;
4322 (void)rootType;
4323 *to = *from;
4324 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4325 rootType = from->sType;
4326 }
4327 const void* from_pNext = from;
4328 size_t pNext_size = 0u;
4329 while (!pNext_size && from_pNext) {
4330 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4331 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4332 }
4333 to->pNext = nullptr;
4334 if (pNext_size) {
4335 to->pNext = (void*)alloc->alloc(pNext_size);
4336 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4337 }
4338 }
4339
deepcopy_VkPhysicalDeviceDescriptorIndexingProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDescriptorIndexingProperties * from,VkPhysicalDeviceDescriptorIndexingProperties * to)4340 void deepcopy_VkPhysicalDeviceDescriptorIndexingProperties(
4341 Allocator* alloc, VkStructureType rootType,
4342 const VkPhysicalDeviceDescriptorIndexingProperties* from,
4343 VkPhysicalDeviceDescriptorIndexingProperties* to) {
4344 (void)alloc;
4345 (void)rootType;
4346 *to = *from;
4347 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4348 rootType = from->sType;
4349 }
4350 const void* from_pNext = from;
4351 size_t pNext_size = 0u;
4352 while (!pNext_size && from_pNext) {
4353 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4354 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4355 }
4356 to->pNext = nullptr;
4357 if (pNext_size) {
4358 to->pNext = (void*)alloc->alloc(pNext_size);
4359 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4360 }
4361 }
4362
deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetVariableDescriptorCountAllocateInfo * from,VkDescriptorSetVariableDescriptorCountAllocateInfo * to)4363 void deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfo(
4364 Allocator* alloc, VkStructureType rootType,
4365 const VkDescriptorSetVariableDescriptorCountAllocateInfo* from,
4366 VkDescriptorSetVariableDescriptorCountAllocateInfo* to) {
4367 (void)alloc;
4368 (void)rootType;
4369 *to = *from;
4370 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4371 rootType = from->sType;
4372 }
4373 const void* from_pNext = from;
4374 size_t pNext_size = 0u;
4375 while (!pNext_size && from_pNext) {
4376 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4377 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4378 }
4379 to->pNext = nullptr;
4380 if (pNext_size) {
4381 to->pNext = (void*)alloc->alloc(pNext_size);
4382 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4383 }
4384 to->pDescriptorCounts = nullptr;
4385 if (from->pDescriptorCounts) {
4386 to->pDescriptorCounts = (uint32_t*)alloc->dupArray(
4387 from->pDescriptorCounts, from->descriptorSetCount * sizeof(const uint32_t));
4388 }
4389 }
4390
deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupport(Allocator * alloc,VkStructureType rootType,const VkDescriptorSetVariableDescriptorCountLayoutSupport * from,VkDescriptorSetVariableDescriptorCountLayoutSupport * to)4391 void deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupport(
4392 Allocator* alloc, VkStructureType rootType,
4393 const VkDescriptorSetVariableDescriptorCountLayoutSupport* from,
4394 VkDescriptorSetVariableDescriptorCountLayoutSupport* to) {
4395 (void)alloc;
4396 (void)rootType;
4397 *to = *from;
4398 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4399 rootType = from->sType;
4400 }
4401 const void* from_pNext = from;
4402 size_t pNext_size = 0u;
4403 while (!pNext_size && from_pNext) {
4404 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4405 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4406 }
4407 to->pNext = nullptr;
4408 if (pNext_size) {
4409 to->pNext = (void*)alloc->alloc(pNext_size);
4410 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4411 }
4412 }
4413
deepcopy_VkSubpassDescriptionDepthStencilResolve(Allocator * alloc,VkStructureType rootType,const VkSubpassDescriptionDepthStencilResolve * from,VkSubpassDescriptionDepthStencilResolve * to)4414 void deepcopy_VkSubpassDescriptionDepthStencilResolve(
4415 Allocator* alloc, VkStructureType rootType, const VkSubpassDescriptionDepthStencilResolve* from,
4416 VkSubpassDescriptionDepthStencilResolve* to) {
4417 (void)alloc;
4418 (void)rootType;
4419 *to = *from;
4420 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4421 rootType = from->sType;
4422 }
4423 const void* from_pNext = from;
4424 size_t pNext_size = 0u;
4425 while (!pNext_size && from_pNext) {
4426 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4427 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4428 }
4429 to->pNext = nullptr;
4430 if (pNext_size) {
4431 to->pNext = (void*)alloc->alloc(pNext_size);
4432 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4433 }
4434 to->pDepthStencilResolveAttachment = nullptr;
4435 if (from->pDepthStencilResolveAttachment) {
4436 to->pDepthStencilResolveAttachment =
4437 (VkAttachmentReference2*)alloc->alloc(sizeof(const VkAttachmentReference2));
4438 deepcopy_VkAttachmentReference2(
4439 alloc, rootType, from->pDepthStencilResolveAttachment,
4440 (VkAttachmentReference2*)(to->pDepthStencilResolveAttachment));
4441 }
4442 }
4443
deepcopy_VkPhysicalDeviceDepthStencilResolveProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDepthStencilResolveProperties * from,VkPhysicalDeviceDepthStencilResolveProperties * to)4444 void deepcopy_VkPhysicalDeviceDepthStencilResolveProperties(
4445 Allocator* alloc, VkStructureType rootType,
4446 const VkPhysicalDeviceDepthStencilResolveProperties* from,
4447 VkPhysicalDeviceDepthStencilResolveProperties* to) {
4448 (void)alloc;
4449 (void)rootType;
4450 *to = *from;
4451 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4452 rootType = from->sType;
4453 }
4454 const void* from_pNext = from;
4455 size_t pNext_size = 0u;
4456 while (!pNext_size && from_pNext) {
4457 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4458 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4459 }
4460 to->pNext = nullptr;
4461 if (pNext_size) {
4462 to->pNext = (void*)alloc->alloc(pNext_size);
4463 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4464 }
4465 }
4466
deepcopy_VkPhysicalDeviceScalarBlockLayoutFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceScalarBlockLayoutFeatures * from,VkPhysicalDeviceScalarBlockLayoutFeatures * to)4467 void deepcopy_VkPhysicalDeviceScalarBlockLayoutFeatures(
4468 Allocator* alloc, VkStructureType rootType,
4469 const VkPhysicalDeviceScalarBlockLayoutFeatures* from,
4470 VkPhysicalDeviceScalarBlockLayoutFeatures* to) {
4471 (void)alloc;
4472 (void)rootType;
4473 *to = *from;
4474 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4475 rootType = from->sType;
4476 }
4477 const void* from_pNext = from;
4478 size_t pNext_size = 0u;
4479 while (!pNext_size && from_pNext) {
4480 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4481 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4482 }
4483 to->pNext = nullptr;
4484 if (pNext_size) {
4485 to->pNext = (void*)alloc->alloc(pNext_size);
4486 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4487 }
4488 }
4489
deepcopy_VkImageStencilUsageCreateInfo(Allocator * alloc,VkStructureType rootType,const VkImageStencilUsageCreateInfo * from,VkImageStencilUsageCreateInfo * to)4490 void deepcopy_VkImageStencilUsageCreateInfo(Allocator* alloc, VkStructureType rootType,
4491 const VkImageStencilUsageCreateInfo* from,
4492 VkImageStencilUsageCreateInfo* to) {
4493 (void)alloc;
4494 (void)rootType;
4495 *to = *from;
4496 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4497 rootType = from->sType;
4498 }
4499 const void* from_pNext = from;
4500 size_t pNext_size = 0u;
4501 while (!pNext_size && from_pNext) {
4502 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4503 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4504 }
4505 to->pNext = nullptr;
4506 if (pNext_size) {
4507 to->pNext = (void*)alloc->alloc(pNext_size);
4508 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4509 }
4510 }
4511
deepcopy_VkSamplerReductionModeCreateInfo(Allocator * alloc,VkStructureType rootType,const VkSamplerReductionModeCreateInfo * from,VkSamplerReductionModeCreateInfo * to)4512 void deepcopy_VkSamplerReductionModeCreateInfo(Allocator* alloc, VkStructureType rootType,
4513 const VkSamplerReductionModeCreateInfo* from,
4514 VkSamplerReductionModeCreateInfo* to) {
4515 (void)alloc;
4516 (void)rootType;
4517 *to = *from;
4518 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4519 rootType = from->sType;
4520 }
4521 const void* from_pNext = from;
4522 size_t pNext_size = 0u;
4523 while (!pNext_size && from_pNext) {
4524 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4525 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4526 }
4527 to->pNext = nullptr;
4528 if (pNext_size) {
4529 to->pNext = (void*)alloc->alloc(pNext_size);
4530 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4531 }
4532 }
4533
deepcopy_VkPhysicalDeviceSamplerFilterMinmaxProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSamplerFilterMinmaxProperties * from,VkPhysicalDeviceSamplerFilterMinmaxProperties * to)4534 void deepcopy_VkPhysicalDeviceSamplerFilterMinmaxProperties(
4535 Allocator* alloc, VkStructureType rootType,
4536 const VkPhysicalDeviceSamplerFilterMinmaxProperties* from,
4537 VkPhysicalDeviceSamplerFilterMinmaxProperties* to) {
4538 (void)alloc;
4539 (void)rootType;
4540 *to = *from;
4541 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4542 rootType = from->sType;
4543 }
4544 const void* from_pNext = from;
4545 size_t pNext_size = 0u;
4546 while (!pNext_size && from_pNext) {
4547 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4548 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4549 }
4550 to->pNext = nullptr;
4551 if (pNext_size) {
4552 to->pNext = (void*)alloc->alloc(pNext_size);
4553 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4554 }
4555 }
4556
deepcopy_VkPhysicalDeviceVulkanMemoryModelFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkanMemoryModelFeatures * from,VkPhysicalDeviceVulkanMemoryModelFeatures * to)4557 void deepcopy_VkPhysicalDeviceVulkanMemoryModelFeatures(
4558 Allocator* alloc, VkStructureType rootType,
4559 const VkPhysicalDeviceVulkanMemoryModelFeatures* from,
4560 VkPhysicalDeviceVulkanMemoryModelFeatures* to) {
4561 (void)alloc;
4562 (void)rootType;
4563 *to = *from;
4564 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4565 rootType = from->sType;
4566 }
4567 const void* from_pNext = from;
4568 size_t pNext_size = 0u;
4569 while (!pNext_size && from_pNext) {
4570 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4571 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4572 }
4573 to->pNext = nullptr;
4574 if (pNext_size) {
4575 to->pNext = (void*)alloc->alloc(pNext_size);
4576 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4577 }
4578 }
4579
deepcopy_VkPhysicalDeviceImagelessFramebufferFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImagelessFramebufferFeatures * from,VkPhysicalDeviceImagelessFramebufferFeatures * to)4580 void deepcopy_VkPhysicalDeviceImagelessFramebufferFeatures(
4581 Allocator* alloc, VkStructureType rootType,
4582 const VkPhysicalDeviceImagelessFramebufferFeatures* from,
4583 VkPhysicalDeviceImagelessFramebufferFeatures* to) {
4584 (void)alloc;
4585 (void)rootType;
4586 *to = *from;
4587 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4588 rootType = from->sType;
4589 }
4590 const void* from_pNext = from;
4591 size_t pNext_size = 0u;
4592 while (!pNext_size && from_pNext) {
4593 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4594 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4595 }
4596 to->pNext = nullptr;
4597 if (pNext_size) {
4598 to->pNext = (void*)alloc->alloc(pNext_size);
4599 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4600 }
4601 }
4602
deepcopy_VkFramebufferAttachmentImageInfo(Allocator * alloc,VkStructureType rootType,const VkFramebufferAttachmentImageInfo * from,VkFramebufferAttachmentImageInfo * to)4603 void deepcopy_VkFramebufferAttachmentImageInfo(Allocator* alloc, VkStructureType rootType,
4604 const VkFramebufferAttachmentImageInfo* from,
4605 VkFramebufferAttachmentImageInfo* to) {
4606 (void)alloc;
4607 (void)rootType;
4608 *to = *from;
4609 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4610 rootType = from->sType;
4611 }
4612 const void* from_pNext = from;
4613 size_t pNext_size = 0u;
4614 while (!pNext_size && from_pNext) {
4615 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4616 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4617 }
4618 to->pNext = nullptr;
4619 if (pNext_size) {
4620 to->pNext = (void*)alloc->alloc(pNext_size);
4621 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4622 }
4623 to->pViewFormats = nullptr;
4624 if (from->pViewFormats) {
4625 to->pViewFormats = (VkFormat*)alloc->dupArray(
4626 from->pViewFormats, from->viewFormatCount * sizeof(const VkFormat));
4627 }
4628 }
4629
deepcopy_VkFramebufferAttachmentsCreateInfo(Allocator * alloc,VkStructureType rootType,const VkFramebufferAttachmentsCreateInfo * from,VkFramebufferAttachmentsCreateInfo * to)4630 void deepcopy_VkFramebufferAttachmentsCreateInfo(Allocator* alloc, VkStructureType rootType,
4631 const VkFramebufferAttachmentsCreateInfo* from,
4632 VkFramebufferAttachmentsCreateInfo* to) {
4633 (void)alloc;
4634 (void)rootType;
4635 *to = *from;
4636 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4637 rootType = from->sType;
4638 }
4639 const void* from_pNext = from;
4640 size_t pNext_size = 0u;
4641 while (!pNext_size && from_pNext) {
4642 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4643 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4644 }
4645 to->pNext = nullptr;
4646 if (pNext_size) {
4647 to->pNext = (void*)alloc->alloc(pNext_size);
4648 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4649 }
4650 if (from) {
4651 to->pAttachmentImageInfos = nullptr;
4652 if (from->pAttachmentImageInfos) {
4653 to->pAttachmentImageInfos = (VkFramebufferAttachmentImageInfo*)alloc->alloc(
4654 from->attachmentImageInfoCount * sizeof(const VkFramebufferAttachmentImageInfo));
4655 to->attachmentImageInfoCount = from->attachmentImageInfoCount;
4656 for (uint32_t i = 0; i < (uint32_t)from->attachmentImageInfoCount; ++i) {
4657 deepcopy_VkFramebufferAttachmentImageInfo(
4658 alloc, rootType, from->pAttachmentImageInfos + i,
4659 (VkFramebufferAttachmentImageInfo*)(to->pAttachmentImageInfos + i));
4660 }
4661 }
4662 }
4663 }
4664
deepcopy_VkRenderPassAttachmentBeginInfo(Allocator * alloc,VkStructureType rootType,const VkRenderPassAttachmentBeginInfo * from,VkRenderPassAttachmentBeginInfo * to)4665 void deepcopy_VkRenderPassAttachmentBeginInfo(Allocator* alloc, VkStructureType rootType,
4666 const VkRenderPassAttachmentBeginInfo* from,
4667 VkRenderPassAttachmentBeginInfo* to) {
4668 (void)alloc;
4669 (void)rootType;
4670 *to = *from;
4671 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4672 rootType = from->sType;
4673 }
4674 const void* from_pNext = from;
4675 size_t pNext_size = 0u;
4676 while (!pNext_size && from_pNext) {
4677 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4678 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4679 }
4680 to->pNext = nullptr;
4681 if (pNext_size) {
4682 to->pNext = (void*)alloc->alloc(pNext_size);
4683 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4684 }
4685 to->pAttachments = nullptr;
4686 if (from->pAttachments) {
4687 to->pAttachments = (VkImageView*)alloc->dupArray(
4688 from->pAttachments, from->attachmentCount * sizeof(const VkImageView));
4689 }
4690 }
4691
deepcopy_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceUniformBufferStandardLayoutFeatures * from,VkPhysicalDeviceUniformBufferStandardLayoutFeatures * to)4692 void deepcopy_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(
4693 Allocator* alloc, VkStructureType rootType,
4694 const VkPhysicalDeviceUniformBufferStandardLayoutFeatures* from,
4695 VkPhysicalDeviceUniformBufferStandardLayoutFeatures* to) {
4696 (void)alloc;
4697 (void)rootType;
4698 *to = *from;
4699 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4700 rootType = from->sType;
4701 }
4702 const void* from_pNext = from;
4703 size_t pNext_size = 0u;
4704 while (!pNext_size && from_pNext) {
4705 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4706 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4707 }
4708 to->pNext = nullptr;
4709 if (pNext_size) {
4710 to->pNext = (void*)alloc->alloc(pNext_size);
4711 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4712 }
4713 }
4714
deepcopy_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures * from,VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures * to)4715 void deepcopy_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(
4716 Allocator* alloc, VkStructureType rootType,
4717 const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* from,
4718 VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* to) {
4719 (void)alloc;
4720 (void)rootType;
4721 *to = *from;
4722 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4723 rootType = from->sType;
4724 }
4725 const void* from_pNext = from;
4726 size_t pNext_size = 0u;
4727 while (!pNext_size && from_pNext) {
4728 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4729 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4730 }
4731 to->pNext = nullptr;
4732 if (pNext_size) {
4733 to->pNext = (void*)alloc->alloc(pNext_size);
4734 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4735 }
4736 }
4737
deepcopy_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures * from,VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures * to)4738 void deepcopy_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(
4739 Allocator* alloc, VkStructureType rootType,
4740 const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* from,
4741 VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* to) {
4742 (void)alloc;
4743 (void)rootType;
4744 *to = *from;
4745 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4746 rootType = from->sType;
4747 }
4748 const void* from_pNext = from;
4749 size_t pNext_size = 0u;
4750 while (!pNext_size && from_pNext) {
4751 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4752 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4753 }
4754 to->pNext = nullptr;
4755 if (pNext_size) {
4756 to->pNext = (void*)alloc->alloc(pNext_size);
4757 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4758 }
4759 }
4760
deepcopy_VkAttachmentReferenceStencilLayout(Allocator * alloc,VkStructureType rootType,const VkAttachmentReferenceStencilLayout * from,VkAttachmentReferenceStencilLayout * to)4761 void deepcopy_VkAttachmentReferenceStencilLayout(Allocator* alloc, VkStructureType rootType,
4762 const VkAttachmentReferenceStencilLayout* from,
4763 VkAttachmentReferenceStencilLayout* to) {
4764 (void)alloc;
4765 (void)rootType;
4766 *to = *from;
4767 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4768 rootType = from->sType;
4769 }
4770 const void* from_pNext = from;
4771 size_t pNext_size = 0u;
4772 while (!pNext_size && from_pNext) {
4773 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4774 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4775 }
4776 to->pNext = nullptr;
4777 if (pNext_size) {
4778 to->pNext = (void*)alloc->alloc(pNext_size);
4779 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4780 }
4781 }
4782
deepcopy_VkAttachmentDescriptionStencilLayout(Allocator * alloc,VkStructureType rootType,const VkAttachmentDescriptionStencilLayout * from,VkAttachmentDescriptionStencilLayout * to)4783 void deepcopy_VkAttachmentDescriptionStencilLayout(Allocator* alloc, VkStructureType rootType,
4784 const VkAttachmentDescriptionStencilLayout* from,
4785 VkAttachmentDescriptionStencilLayout* to) {
4786 (void)alloc;
4787 (void)rootType;
4788 *to = *from;
4789 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4790 rootType = from->sType;
4791 }
4792 const void* from_pNext = from;
4793 size_t pNext_size = 0u;
4794 while (!pNext_size && from_pNext) {
4795 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4796 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4797 }
4798 to->pNext = nullptr;
4799 if (pNext_size) {
4800 to->pNext = (void*)alloc->alloc(pNext_size);
4801 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4802 }
4803 }
4804
deepcopy_VkPhysicalDeviceHostQueryResetFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceHostQueryResetFeatures * from,VkPhysicalDeviceHostQueryResetFeatures * to)4805 void deepcopy_VkPhysicalDeviceHostQueryResetFeatures(
4806 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceHostQueryResetFeatures* from,
4807 VkPhysicalDeviceHostQueryResetFeatures* to) {
4808 (void)alloc;
4809 (void)rootType;
4810 *to = *from;
4811 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4812 rootType = from->sType;
4813 }
4814 const void* from_pNext = from;
4815 size_t pNext_size = 0u;
4816 while (!pNext_size && from_pNext) {
4817 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4818 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4819 }
4820 to->pNext = nullptr;
4821 if (pNext_size) {
4822 to->pNext = (void*)alloc->alloc(pNext_size);
4823 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4824 }
4825 }
4826
deepcopy_VkPhysicalDeviceTimelineSemaphoreFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTimelineSemaphoreFeatures * from,VkPhysicalDeviceTimelineSemaphoreFeatures * to)4827 void deepcopy_VkPhysicalDeviceTimelineSemaphoreFeatures(
4828 Allocator* alloc, VkStructureType rootType,
4829 const VkPhysicalDeviceTimelineSemaphoreFeatures* from,
4830 VkPhysicalDeviceTimelineSemaphoreFeatures* to) {
4831 (void)alloc;
4832 (void)rootType;
4833 *to = *from;
4834 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4835 rootType = from->sType;
4836 }
4837 const void* from_pNext = from;
4838 size_t pNext_size = 0u;
4839 while (!pNext_size && from_pNext) {
4840 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4841 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4842 }
4843 to->pNext = nullptr;
4844 if (pNext_size) {
4845 to->pNext = (void*)alloc->alloc(pNext_size);
4846 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4847 }
4848 }
4849
deepcopy_VkPhysicalDeviceTimelineSemaphoreProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTimelineSemaphoreProperties * from,VkPhysicalDeviceTimelineSemaphoreProperties * to)4850 void deepcopy_VkPhysicalDeviceTimelineSemaphoreProperties(
4851 Allocator* alloc, VkStructureType rootType,
4852 const VkPhysicalDeviceTimelineSemaphoreProperties* from,
4853 VkPhysicalDeviceTimelineSemaphoreProperties* to) {
4854 (void)alloc;
4855 (void)rootType;
4856 *to = *from;
4857 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4858 rootType = from->sType;
4859 }
4860 const void* from_pNext = from;
4861 size_t pNext_size = 0u;
4862 while (!pNext_size && from_pNext) {
4863 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4864 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4865 }
4866 to->pNext = nullptr;
4867 if (pNext_size) {
4868 to->pNext = (void*)alloc->alloc(pNext_size);
4869 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4870 }
4871 }
4872
deepcopy_VkSemaphoreTypeCreateInfo(Allocator * alloc,VkStructureType rootType,const VkSemaphoreTypeCreateInfo * from,VkSemaphoreTypeCreateInfo * to)4873 void deepcopy_VkSemaphoreTypeCreateInfo(Allocator* alloc, VkStructureType rootType,
4874 const VkSemaphoreTypeCreateInfo* from,
4875 VkSemaphoreTypeCreateInfo* to) {
4876 (void)alloc;
4877 (void)rootType;
4878 *to = *from;
4879 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4880 rootType = from->sType;
4881 }
4882 const void* from_pNext = from;
4883 size_t pNext_size = 0u;
4884 while (!pNext_size && from_pNext) {
4885 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4886 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4887 }
4888 to->pNext = nullptr;
4889 if (pNext_size) {
4890 to->pNext = (void*)alloc->alloc(pNext_size);
4891 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4892 }
4893 }
4894
deepcopy_VkTimelineSemaphoreSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkTimelineSemaphoreSubmitInfo * from,VkTimelineSemaphoreSubmitInfo * to)4895 void deepcopy_VkTimelineSemaphoreSubmitInfo(Allocator* alloc, VkStructureType rootType,
4896 const VkTimelineSemaphoreSubmitInfo* from,
4897 VkTimelineSemaphoreSubmitInfo* to) {
4898 (void)alloc;
4899 (void)rootType;
4900 *to = *from;
4901 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4902 rootType = from->sType;
4903 }
4904 const void* from_pNext = from;
4905 size_t pNext_size = 0u;
4906 while (!pNext_size && from_pNext) {
4907 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4908 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4909 }
4910 to->pNext = nullptr;
4911 if (pNext_size) {
4912 to->pNext = (void*)alloc->alloc(pNext_size);
4913 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4914 }
4915 to->pWaitSemaphoreValues = nullptr;
4916 if (from->pWaitSemaphoreValues) {
4917 to->pWaitSemaphoreValues = (uint64_t*)alloc->dupArray(
4918 from->pWaitSemaphoreValues, from->waitSemaphoreValueCount * sizeof(const uint64_t));
4919 }
4920 to->pSignalSemaphoreValues = nullptr;
4921 if (from->pSignalSemaphoreValues) {
4922 to->pSignalSemaphoreValues = (uint64_t*)alloc->dupArray(
4923 from->pSignalSemaphoreValues, from->signalSemaphoreValueCount * sizeof(const uint64_t));
4924 }
4925 }
4926
deepcopy_VkSemaphoreWaitInfo(Allocator * alloc,VkStructureType rootType,const VkSemaphoreWaitInfo * from,VkSemaphoreWaitInfo * to)4927 void deepcopy_VkSemaphoreWaitInfo(Allocator* alloc, VkStructureType rootType,
4928 const VkSemaphoreWaitInfo* from, VkSemaphoreWaitInfo* to) {
4929 (void)alloc;
4930 (void)rootType;
4931 *to = *from;
4932 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4933 rootType = from->sType;
4934 }
4935 const void* from_pNext = from;
4936 size_t pNext_size = 0u;
4937 while (!pNext_size && from_pNext) {
4938 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4939 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4940 }
4941 to->pNext = nullptr;
4942 if (pNext_size) {
4943 to->pNext = (void*)alloc->alloc(pNext_size);
4944 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4945 }
4946 to->pSemaphores = nullptr;
4947 if (from->pSemaphores) {
4948 to->pSemaphores = (VkSemaphore*)alloc->dupArray(
4949 from->pSemaphores, from->semaphoreCount * sizeof(const VkSemaphore));
4950 }
4951 to->pValues = nullptr;
4952 if (from->pValues) {
4953 to->pValues = (uint64_t*)alloc->dupArray(from->pValues,
4954 from->semaphoreCount * sizeof(const uint64_t));
4955 }
4956 }
4957
deepcopy_VkSemaphoreSignalInfo(Allocator * alloc,VkStructureType rootType,const VkSemaphoreSignalInfo * from,VkSemaphoreSignalInfo * to)4958 void deepcopy_VkSemaphoreSignalInfo(Allocator* alloc, VkStructureType rootType,
4959 const VkSemaphoreSignalInfo* from, VkSemaphoreSignalInfo* to) {
4960 (void)alloc;
4961 (void)rootType;
4962 *to = *from;
4963 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4964 rootType = from->sType;
4965 }
4966 const void* from_pNext = from;
4967 size_t pNext_size = 0u;
4968 while (!pNext_size && from_pNext) {
4969 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4970 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4971 }
4972 to->pNext = nullptr;
4973 if (pNext_size) {
4974 to->pNext = (void*)alloc->alloc(pNext_size);
4975 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4976 }
4977 }
4978
deepcopy_VkPhysicalDeviceBufferDeviceAddressFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceBufferDeviceAddressFeatures * from,VkPhysicalDeviceBufferDeviceAddressFeatures * to)4979 void deepcopy_VkPhysicalDeviceBufferDeviceAddressFeatures(
4980 Allocator* alloc, VkStructureType rootType,
4981 const VkPhysicalDeviceBufferDeviceAddressFeatures* from,
4982 VkPhysicalDeviceBufferDeviceAddressFeatures* to) {
4983 (void)alloc;
4984 (void)rootType;
4985 *to = *from;
4986 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
4987 rootType = from->sType;
4988 }
4989 const void* from_pNext = from;
4990 size_t pNext_size = 0u;
4991 while (!pNext_size && from_pNext) {
4992 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
4993 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
4994 }
4995 to->pNext = nullptr;
4996 if (pNext_size) {
4997 to->pNext = (void*)alloc->alloc(pNext_size);
4998 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
4999 }
5000 }
5001
deepcopy_VkBufferDeviceAddressInfo(Allocator * alloc,VkStructureType rootType,const VkBufferDeviceAddressInfo * from,VkBufferDeviceAddressInfo * to)5002 void deepcopy_VkBufferDeviceAddressInfo(Allocator* alloc, VkStructureType rootType,
5003 const VkBufferDeviceAddressInfo* from,
5004 VkBufferDeviceAddressInfo* to) {
5005 (void)alloc;
5006 (void)rootType;
5007 *to = *from;
5008 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5009 rootType = from->sType;
5010 }
5011 const void* from_pNext = from;
5012 size_t pNext_size = 0u;
5013 while (!pNext_size && from_pNext) {
5014 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5015 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5016 }
5017 to->pNext = nullptr;
5018 if (pNext_size) {
5019 to->pNext = (void*)alloc->alloc(pNext_size);
5020 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5021 }
5022 }
5023
deepcopy_VkBufferOpaqueCaptureAddressCreateInfo(Allocator * alloc,VkStructureType rootType,const VkBufferOpaqueCaptureAddressCreateInfo * from,VkBufferOpaqueCaptureAddressCreateInfo * to)5024 void deepcopy_VkBufferOpaqueCaptureAddressCreateInfo(
5025 Allocator* alloc, VkStructureType rootType, const VkBufferOpaqueCaptureAddressCreateInfo* from,
5026 VkBufferOpaqueCaptureAddressCreateInfo* to) {
5027 (void)alloc;
5028 (void)rootType;
5029 *to = *from;
5030 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5031 rootType = from->sType;
5032 }
5033 const void* from_pNext = from;
5034 size_t pNext_size = 0u;
5035 while (!pNext_size && from_pNext) {
5036 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5037 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5038 }
5039 to->pNext = nullptr;
5040 if (pNext_size) {
5041 to->pNext = (void*)alloc->alloc(pNext_size);
5042 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5043 }
5044 }
5045
deepcopy_VkMemoryOpaqueCaptureAddressAllocateInfo(Allocator * alloc,VkStructureType rootType,const VkMemoryOpaqueCaptureAddressAllocateInfo * from,VkMemoryOpaqueCaptureAddressAllocateInfo * to)5046 void deepcopy_VkMemoryOpaqueCaptureAddressAllocateInfo(
5047 Allocator* alloc, VkStructureType rootType,
5048 const VkMemoryOpaqueCaptureAddressAllocateInfo* from,
5049 VkMemoryOpaqueCaptureAddressAllocateInfo* to) {
5050 (void)alloc;
5051 (void)rootType;
5052 *to = *from;
5053 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5054 rootType = from->sType;
5055 }
5056 const void* from_pNext = from;
5057 size_t pNext_size = 0u;
5058 while (!pNext_size && from_pNext) {
5059 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5060 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5061 }
5062 to->pNext = nullptr;
5063 if (pNext_size) {
5064 to->pNext = (void*)alloc->alloc(pNext_size);
5065 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5066 }
5067 }
5068
deepcopy_VkDeviceMemoryOpaqueCaptureAddressInfo(Allocator * alloc,VkStructureType rootType,const VkDeviceMemoryOpaqueCaptureAddressInfo * from,VkDeviceMemoryOpaqueCaptureAddressInfo * to)5069 void deepcopy_VkDeviceMemoryOpaqueCaptureAddressInfo(
5070 Allocator* alloc, VkStructureType rootType, const VkDeviceMemoryOpaqueCaptureAddressInfo* from,
5071 VkDeviceMemoryOpaqueCaptureAddressInfo* to) {
5072 (void)alloc;
5073 (void)rootType;
5074 *to = *from;
5075 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5076 rootType = from->sType;
5077 }
5078 const void* from_pNext = from;
5079 size_t pNext_size = 0u;
5080 while (!pNext_size && from_pNext) {
5081 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5082 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5083 }
5084 to->pNext = nullptr;
5085 if (pNext_size) {
5086 to->pNext = (void*)alloc->alloc(pNext_size);
5087 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5088 }
5089 }
5090
5091 #endif
5092 #ifdef VK_VERSION_1_3
deepcopy_VkPhysicalDeviceVulkan13Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan13Features * from,VkPhysicalDeviceVulkan13Features * to)5093 void deepcopy_VkPhysicalDeviceVulkan13Features(Allocator* alloc, VkStructureType rootType,
5094 const VkPhysicalDeviceVulkan13Features* from,
5095 VkPhysicalDeviceVulkan13Features* to) {
5096 (void)alloc;
5097 (void)rootType;
5098 *to = *from;
5099 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5100 rootType = from->sType;
5101 }
5102 const void* from_pNext = from;
5103 size_t pNext_size = 0u;
5104 while (!pNext_size && from_pNext) {
5105 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5106 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5107 }
5108 to->pNext = nullptr;
5109 if (pNext_size) {
5110 to->pNext = (void*)alloc->alloc(pNext_size);
5111 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5112 }
5113 }
5114
deepcopy_VkPhysicalDeviceVulkan13Properties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVulkan13Properties * from,VkPhysicalDeviceVulkan13Properties * to)5115 void deepcopy_VkPhysicalDeviceVulkan13Properties(Allocator* alloc, VkStructureType rootType,
5116 const VkPhysicalDeviceVulkan13Properties* from,
5117 VkPhysicalDeviceVulkan13Properties* to) {
5118 (void)alloc;
5119 (void)rootType;
5120 *to = *from;
5121 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5122 rootType = from->sType;
5123 }
5124 const void* from_pNext = from;
5125 size_t pNext_size = 0u;
5126 while (!pNext_size && from_pNext) {
5127 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5128 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5129 }
5130 to->pNext = nullptr;
5131 if (pNext_size) {
5132 to->pNext = (void*)alloc->alloc(pNext_size);
5133 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5134 }
5135 }
5136
deepcopy_VkPipelineCreationFeedback(Allocator * alloc,VkStructureType rootType,const VkPipelineCreationFeedback * from,VkPipelineCreationFeedback * to)5137 void deepcopy_VkPipelineCreationFeedback(Allocator* alloc, VkStructureType rootType,
5138 const VkPipelineCreationFeedback* from,
5139 VkPipelineCreationFeedback* to) {
5140 (void)alloc;
5141 (void)rootType;
5142 *to = *from;
5143 }
5144
deepcopy_VkPipelineCreationFeedbackCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineCreationFeedbackCreateInfo * from,VkPipelineCreationFeedbackCreateInfo * to)5145 void deepcopy_VkPipelineCreationFeedbackCreateInfo(Allocator* alloc, VkStructureType rootType,
5146 const VkPipelineCreationFeedbackCreateInfo* from,
5147 VkPipelineCreationFeedbackCreateInfo* to) {
5148 (void)alloc;
5149 (void)rootType;
5150 *to = *from;
5151 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5152 rootType = from->sType;
5153 }
5154 const void* from_pNext = from;
5155 size_t pNext_size = 0u;
5156 while (!pNext_size && from_pNext) {
5157 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5158 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5159 }
5160 to->pNext = nullptr;
5161 if (pNext_size) {
5162 to->pNext = (void*)alloc->alloc(pNext_size);
5163 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5164 }
5165 to->pPipelineCreationFeedback = nullptr;
5166 if (from->pPipelineCreationFeedback) {
5167 to->pPipelineCreationFeedback =
5168 (VkPipelineCreationFeedback*)alloc->alloc(sizeof(VkPipelineCreationFeedback));
5169 deepcopy_VkPipelineCreationFeedback(
5170 alloc, rootType, from->pPipelineCreationFeedback,
5171 (VkPipelineCreationFeedback*)(to->pPipelineCreationFeedback));
5172 }
5173 if (from) {
5174 to->pPipelineStageCreationFeedbacks = nullptr;
5175 if (from->pPipelineStageCreationFeedbacks) {
5176 to->pPipelineStageCreationFeedbacks = (VkPipelineCreationFeedback*)alloc->alloc(
5177 from->pipelineStageCreationFeedbackCount * sizeof(VkPipelineCreationFeedback));
5178 to->pipelineStageCreationFeedbackCount = from->pipelineStageCreationFeedbackCount;
5179 for (uint32_t i = 0; i < (uint32_t)from->pipelineStageCreationFeedbackCount; ++i) {
5180 deepcopy_VkPipelineCreationFeedback(
5181 alloc, rootType, from->pPipelineStageCreationFeedbacks + i,
5182 (VkPipelineCreationFeedback*)(to->pPipelineStageCreationFeedbacks + i));
5183 }
5184 }
5185 }
5186 }
5187
deepcopy_VkPhysicalDeviceShaderTerminateInvocationFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderTerminateInvocationFeatures * from,VkPhysicalDeviceShaderTerminateInvocationFeatures * to)5188 void deepcopy_VkPhysicalDeviceShaderTerminateInvocationFeatures(
5189 Allocator* alloc, VkStructureType rootType,
5190 const VkPhysicalDeviceShaderTerminateInvocationFeatures* from,
5191 VkPhysicalDeviceShaderTerminateInvocationFeatures* to) {
5192 (void)alloc;
5193 (void)rootType;
5194 *to = *from;
5195 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5196 rootType = from->sType;
5197 }
5198 const void* from_pNext = from;
5199 size_t pNext_size = 0u;
5200 while (!pNext_size && from_pNext) {
5201 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5202 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5203 }
5204 to->pNext = nullptr;
5205 if (pNext_size) {
5206 to->pNext = (void*)alloc->alloc(pNext_size);
5207 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5208 }
5209 }
5210
deepcopy_VkPhysicalDeviceToolProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceToolProperties * from,VkPhysicalDeviceToolProperties * to)5211 void deepcopy_VkPhysicalDeviceToolProperties(Allocator* alloc, VkStructureType rootType,
5212 const VkPhysicalDeviceToolProperties* from,
5213 VkPhysicalDeviceToolProperties* to) {
5214 (void)alloc;
5215 (void)rootType;
5216 *to = *from;
5217 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5218 rootType = from->sType;
5219 }
5220 const void* from_pNext = from;
5221 size_t pNext_size = 0u;
5222 while (!pNext_size && from_pNext) {
5223 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5224 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5225 }
5226 to->pNext = nullptr;
5227 if (pNext_size) {
5228 to->pNext = (void*)alloc->alloc(pNext_size);
5229 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5230 }
5231 memcpy(to->name, from->name, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
5232 memcpy(to->version, from->version, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
5233 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
5234 memcpy(to->layer, from->layer, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
5235 }
5236
deepcopy_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures * from,VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures * to)5237 void deepcopy_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(
5238 Allocator* alloc, VkStructureType rootType,
5239 const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures* from,
5240 VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures* to) {
5241 (void)alloc;
5242 (void)rootType;
5243 *to = *from;
5244 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5245 rootType = from->sType;
5246 }
5247 const void* from_pNext = from;
5248 size_t pNext_size = 0u;
5249 while (!pNext_size && from_pNext) {
5250 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5251 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5252 }
5253 to->pNext = nullptr;
5254 if (pNext_size) {
5255 to->pNext = (void*)alloc->alloc(pNext_size);
5256 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5257 }
5258 }
5259
deepcopy_VkPhysicalDevicePrivateDataFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePrivateDataFeatures * from,VkPhysicalDevicePrivateDataFeatures * to)5260 void deepcopy_VkPhysicalDevicePrivateDataFeatures(Allocator* alloc, VkStructureType rootType,
5261 const VkPhysicalDevicePrivateDataFeatures* from,
5262 VkPhysicalDevicePrivateDataFeatures* to) {
5263 (void)alloc;
5264 (void)rootType;
5265 *to = *from;
5266 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5267 rootType = from->sType;
5268 }
5269 const void* from_pNext = from;
5270 size_t pNext_size = 0u;
5271 while (!pNext_size && from_pNext) {
5272 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5273 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5274 }
5275 to->pNext = nullptr;
5276 if (pNext_size) {
5277 to->pNext = (void*)alloc->alloc(pNext_size);
5278 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5279 }
5280 }
5281
deepcopy_VkDevicePrivateDataCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDevicePrivateDataCreateInfo * from,VkDevicePrivateDataCreateInfo * to)5282 void deepcopy_VkDevicePrivateDataCreateInfo(Allocator* alloc, VkStructureType rootType,
5283 const VkDevicePrivateDataCreateInfo* from,
5284 VkDevicePrivateDataCreateInfo* to) {
5285 (void)alloc;
5286 (void)rootType;
5287 *to = *from;
5288 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5289 rootType = from->sType;
5290 }
5291 const void* from_pNext = from;
5292 size_t pNext_size = 0u;
5293 while (!pNext_size && from_pNext) {
5294 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5295 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5296 }
5297 to->pNext = nullptr;
5298 if (pNext_size) {
5299 to->pNext = (void*)alloc->alloc(pNext_size);
5300 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5301 }
5302 }
5303
deepcopy_VkPrivateDataSlotCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPrivateDataSlotCreateInfo * from,VkPrivateDataSlotCreateInfo * to)5304 void deepcopy_VkPrivateDataSlotCreateInfo(Allocator* alloc, VkStructureType rootType,
5305 const VkPrivateDataSlotCreateInfo* from,
5306 VkPrivateDataSlotCreateInfo* to) {
5307 (void)alloc;
5308 (void)rootType;
5309 *to = *from;
5310 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5311 rootType = from->sType;
5312 }
5313 const void* from_pNext = from;
5314 size_t pNext_size = 0u;
5315 while (!pNext_size && from_pNext) {
5316 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5317 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5318 }
5319 to->pNext = nullptr;
5320 if (pNext_size) {
5321 to->pNext = (void*)alloc->alloc(pNext_size);
5322 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5323 }
5324 }
5325
deepcopy_VkPhysicalDevicePipelineCreationCacheControlFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePipelineCreationCacheControlFeatures * from,VkPhysicalDevicePipelineCreationCacheControlFeatures * to)5326 void deepcopy_VkPhysicalDevicePipelineCreationCacheControlFeatures(
5327 Allocator* alloc, VkStructureType rootType,
5328 const VkPhysicalDevicePipelineCreationCacheControlFeatures* from,
5329 VkPhysicalDevicePipelineCreationCacheControlFeatures* to) {
5330 (void)alloc;
5331 (void)rootType;
5332 *to = *from;
5333 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5334 rootType = from->sType;
5335 }
5336 const void* from_pNext = from;
5337 size_t pNext_size = 0u;
5338 while (!pNext_size && from_pNext) {
5339 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5340 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5341 }
5342 to->pNext = nullptr;
5343 if (pNext_size) {
5344 to->pNext = (void*)alloc->alloc(pNext_size);
5345 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5346 }
5347 }
5348
deepcopy_VkMemoryBarrier2(Allocator * alloc,VkStructureType rootType,const VkMemoryBarrier2 * from,VkMemoryBarrier2 * to)5349 void deepcopy_VkMemoryBarrier2(Allocator* alloc, VkStructureType rootType,
5350 const VkMemoryBarrier2* from, VkMemoryBarrier2* to) {
5351 (void)alloc;
5352 (void)rootType;
5353 *to = *from;
5354 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5355 rootType = from->sType;
5356 }
5357 const void* from_pNext = from;
5358 size_t pNext_size = 0u;
5359 while (!pNext_size && from_pNext) {
5360 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5361 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5362 }
5363 to->pNext = nullptr;
5364 if (pNext_size) {
5365 to->pNext = (void*)alloc->alloc(pNext_size);
5366 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5367 }
5368 }
5369
deepcopy_VkBufferMemoryBarrier2(Allocator * alloc,VkStructureType rootType,const VkBufferMemoryBarrier2 * from,VkBufferMemoryBarrier2 * to)5370 void deepcopy_VkBufferMemoryBarrier2(Allocator* alloc, VkStructureType rootType,
5371 const VkBufferMemoryBarrier2* from,
5372 VkBufferMemoryBarrier2* to) {
5373 (void)alloc;
5374 (void)rootType;
5375 *to = *from;
5376 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5377 rootType = from->sType;
5378 }
5379 const void* from_pNext = from;
5380 size_t pNext_size = 0u;
5381 while (!pNext_size && from_pNext) {
5382 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5383 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5384 }
5385 to->pNext = nullptr;
5386 if (pNext_size) {
5387 to->pNext = (void*)alloc->alloc(pNext_size);
5388 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5389 }
5390 }
5391
deepcopy_VkImageMemoryBarrier2(Allocator * alloc,VkStructureType rootType,const VkImageMemoryBarrier2 * from,VkImageMemoryBarrier2 * to)5392 void deepcopy_VkImageMemoryBarrier2(Allocator* alloc, VkStructureType rootType,
5393 const VkImageMemoryBarrier2* from, VkImageMemoryBarrier2* to) {
5394 (void)alloc;
5395 (void)rootType;
5396 *to = *from;
5397 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5398 rootType = from->sType;
5399 }
5400 const void* from_pNext = from;
5401 size_t pNext_size = 0u;
5402 while (!pNext_size && from_pNext) {
5403 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5404 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5405 }
5406 to->pNext = nullptr;
5407 if (pNext_size) {
5408 to->pNext = (void*)alloc->alloc(pNext_size);
5409 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5410 }
5411 deepcopy_VkImageSubresourceRange(alloc, rootType, &from->subresourceRange,
5412 (VkImageSubresourceRange*)(&to->subresourceRange));
5413 }
5414
deepcopy_VkDependencyInfo(Allocator * alloc,VkStructureType rootType,const VkDependencyInfo * from,VkDependencyInfo * to)5415 void deepcopy_VkDependencyInfo(Allocator* alloc, VkStructureType rootType,
5416 const VkDependencyInfo* from, VkDependencyInfo* to) {
5417 (void)alloc;
5418 (void)rootType;
5419 *to = *from;
5420 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5421 rootType = from->sType;
5422 }
5423 const void* from_pNext = from;
5424 size_t pNext_size = 0u;
5425 while (!pNext_size && from_pNext) {
5426 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5427 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5428 }
5429 to->pNext = nullptr;
5430 if (pNext_size) {
5431 to->pNext = (void*)alloc->alloc(pNext_size);
5432 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5433 }
5434 if (from) {
5435 to->pMemoryBarriers = nullptr;
5436 if (from->pMemoryBarriers) {
5437 to->pMemoryBarriers = (VkMemoryBarrier2*)alloc->alloc(from->memoryBarrierCount *
5438 sizeof(const VkMemoryBarrier2));
5439 to->memoryBarrierCount = from->memoryBarrierCount;
5440 for (uint32_t i = 0; i < (uint32_t)from->memoryBarrierCount; ++i) {
5441 deepcopy_VkMemoryBarrier2(alloc, rootType, from->pMemoryBarriers + i,
5442 (VkMemoryBarrier2*)(to->pMemoryBarriers + i));
5443 }
5444 }
5445 }
5446 if (from) {
5447 to->pBufferMemoryBarriers = nullptr;
5448 if (from->pBufferMemoryBarriers) {
5449 to->pBufferMemoryBarriers = (VkBufferMemoryBarrier2*)alloc->alloc(
5450 from->bufferMemoryBarrierCount * sizeof(const VkBufferMemoryBarrier2));
5451 to->bufferMemoryBarrierCount = from->bufferMemoryBarrierCount;
5452 for (uint32_t i = 0; i < (uint32_t)from->bufferMemoryBarrierCount; ++i) {
5453 deepcopy_VkBufferMemoryBarrier2(
5454 alloc, rootType, from->pBufferMemoryBarriers + i,
5455 (VkBufferMemoryBarrier2*)(to->pBufferMemoryBarriers + i));
5456 }
5457 }
5458 }
5459 if (from) {
5460 to->pImageMemoryBarriers = nullptr;
5461 if (from->pImageMemoryBarriers) {
5462 to->pImageMemoryBarriers = (VkImageMemoryBarrier2*)alloc->alloc(
5463 from->imageMemoryBarrierCount * sizeof(const VkImageMemoryBarrier2));
5464 to->imageMemoryBarrierCount = from->imageMemoryBarrierCount;
5465 for (uint32_t i = 0; i < (uint32_t)from->imageMemoryBarrierCount; ++i) {
5466 deepcopy_VkImageMemoryBarrier2(
5467 alloc, rootType, from->pImageMemoryBarriers + i,
5468 (VkImageMemoryBarrier2*)(to->pImageMemoryBarriers + i));
5469 }
5470 }
5471 }
5472 }
5473
deepcopy_VkSemaphoreSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkSemaphoreSubmitInfo * from,VkSemaphoreSubmitInfo * to)5474 void deepcopy_VkSemaphoreSubmitInfo(Allocator* alloc, VkStructureType rootType,
5475 const VkSemaphoreSubmitInfo* from, VkSemaphoreSubmitInfo* to) {
5476 (void)alloc;
5477 (void)rootType;
5478 *to = *from;
5479 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5480 rootType = from->sType;
5481 }
5482 const void* from_pNext = from;
5483 size_t pNext_size = 0u;
5484 while (!pNext_size && from_pNext) {
5485 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5486 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5487 }
5488 to->pNext = nullptr;
5489 if (pNext_size) {
5490 to->pNext = (void*)alloc->alloc(pNext_size);
5491 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5492 }
5493 }
5494
deepcopy_VkCommandBufferSubmitInfo(Allocator * alloc,VkStructureType rootType,const VkCommandBufferSubmitInfo * from,VkCommandBufferSubmitInfo * to)5495 void deepcopy_VkCommandBufferSubmitInfo(Allocator* alloc, VkStructureType rootType,
5496 const VkCommandBufferSubmitInfo* from,
5497 VkCommandBufferSubmitInfo* to) {
5498 (void)alloc;
5499 (void)rootType;
5500 *to = *from;
5501 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5502 rootType = from->sType;
5503 }
5504 const void* from_pNext = from;
5505 size_t pNext_size = 0u;
5506 while (!pNext_size && from_pNext) {
5507 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5508 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5509 }
5510 to->pNext = nullptr;
5511 if (pNext_size) {
5512 to->pNext = (void*)alloc->alloc(pNext_size);
5513 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5514 }
5515 }
5516
deepcopy_VkSubmitInfo2(Allocator * alloc,VkStructureType rootType,const VkSubmitInfo2 * from,VkSubmitInfo2 * to)5517 void deepcopy_VkSubmitInfo2(Allocator* alloc, VkStructureType rootType, const VkSubmitInfo2* from,
5518 VkSubmitInfo2* to) {
5519 (void)alloc;
5520 (void)rootType;
5521 *to = *from;
5522 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5523 rootType = from->sType;
5524 }
5525 const void* from_pNext = from;
5526 size_t pNext_size = 0u;
5527 while (!pNext_size && from_pNext) {
5528 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5529 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5530 }
5531 to->pNext = nullptr;
5532 if (pNext_size) {
5533 to->pNext = (void*)alloc->alloc(pNext_size);
5534 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5535 }
5536 if (from) {
5537 to->pWaitSemaphoreInfos = nullptr;
5538 if (from->pWaitSemaphoreInfos) {
5539 to->pWaitSemaphoreInfos = (VkSemaphoreSubmitInfo*)alloc->alloc(
5540 from->waitSemaphoreInfoCount * sizeof(const VkSemaphoreSubmitInfo));
5541 to->waitSemaphoreInfoCount = from->waitSemaphoreInfoCount;
5542 for (uint32_t i = 0; i < (uint32_t)from->waitSemaphoreInfoCount; ++i) {
5543 deepcopy_VkSemaphoreSubmitInfo(
5544 alloc, rootType, from->pWaitSemaphoreInfos + i,
5545 (VkSemaphoreSubmitInfo*)(to->pWaitSemaphoreInfos + i));
5546 }
5547 }
5548 }
5549 if (from) {
5550 to->pCommandBufferInfos = nullptr;
5551 if (from->pCommandBufferInfos) {
5552 to->pCommandBufferInfos = (VkCommandBufferSubmitInfo*)alloc->alloc(
5553 from->commandBufferInfoCount * sizeof(const VkCommandBufferSubmitInfo));
5554 to->commandBufferInfoCount = from->commandBufferInfoCount;
5555 for (uint32_t i = 0; i < (uint32_t)from->commandBufferInfoCount; ++i) {
5556 deepcopy_VkCommandBufferSubmitInfo(
5557 alloc, rootType, from->pCommandBufferInfos + i,
5558 (VkCommandBufferSubmitInfo*)(to->pCommandBufferInfos + i));
5559 }
5560 }
5561 }
5562 if (from) {
5563 to->pSignalSemaphoreInfos = nullptr;
5564 if (from->pSignalSemaphoreInfos) {
5565 to->pSignalSemaphoreInfos = (VkSemaphoreSubmitInfo*)alloc->alloc(
5566 from->signalSemaphoreInfoCount * sizeof(const VkSemaphoreSubmitInfo));
5567 to->signalSemaphoreInfoCount = from->signalSemaphoreInfoCount;
5568 for (uint32_t i = 0; i < (uint32_t)from->signalSemaphoreInfoCount; ++i) {
5569 deepcopy_VkSemaphoreSubmitInfo(
5570 alloc, rootType, from->pSignalSemaphoreInfos + i,
5571 (VkSemaphoreSubmitInfo*)(to->pSignalSemaphoreInfos + i));
5572 }
5573 }
5574 }
5575 }
5576
deepcopy_VkPhysicalDeviceSynchronization2Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSynchronization2Features * from,VkPhysicalDeviceSynchronization2Features * to)5577 void deepcopy_VkPhysicalDeviceSynchronization2Features(
5578 Allocator* alloc, VkStructureType rootType,
5579 const VkPhysicalDeviceSynchronization2Features* from,
5580 VkPhysicalDeviceSynchronization2Features* to) {
5581 (void)alloc;
5582 (void)rootType;
5583 *to = *from;
5584 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5585 rootType = from->sType;
5586 }
5587 const void* from_pNext = from;
5588 size_t pNext_size = 0u;
5589 while (!pNext_size && from_pNext) {
5590 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5591 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5592 }
5593 to->pNext = nullptr;
5594 if (pNext_size) {
5595 to->pNext = (void*)alloc->alloc(pNext_size);
5596 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5597 }
5598 }
5599
deepcopy_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures * from,VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures * to)5600 void deepcopy_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(
5601 Allocator* alloc, VkStructureType rootType,
5602 const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures* from,
5603 VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures* to) {
5604 (void)alloc;
5605 (void)rootType;
5606 *to = *from;
5607 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5608 rootType = from->sType;
5609 }
5610 const void* from_pNext = from;
5611 size_t pNext_size = 0u;
5612 while (!pNext_size && from_pNext) {
5613 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5614 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5615 }
5616 to->pNext = nullptr;
5617 if (pNext_size) {
5618 to->pNext = (void*)alloc->alloc(pNext_size);
5619 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5620 }
5621 }
5622
deepcopy_VkPhysicalDeviceImageRobustnessFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImageRobustnessFeatures * from,VkPhysicalDeviceImageRobustnessFeatures * to)5623 void deepcopy_VkPhysicalDeviceImageRobustnessFeatures(
5624 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceImageRobustnessFeatures* from,
5625 VkPhysicalDeviceImageRobustnessFeatures* to) {
5626 (void)alloc;
5627 (void)rootType;
5628 *to = *from;
5629 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5630 rootType = from->sType;
5631 }
5632 const void* from_pNext = from;
5633 size_t pNext_size = 0u;
5634 while (!pNext_size && from_pNext) {
5635 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5636 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5637 }
5638 to->pNext = nullptr;
5639 if (pNext_size) {
5640 to->pNext = (void*)alloc->alloc(pNext_size);
5641 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5642 }
5643 }
5644
deepcopy_VkBufferCopy2(Allocator * alloc,VkStructureType rootType,const VkBufferCopy2 * from,VkBufferCopy2 * to)5645 void deepcopy_VkBufferCopy2(Allocator* alloc, VkStructureType rootType, const VkBufferCopy2* from,
5646 VkBufferCopy2* to) {
5647 (void)alloc;
5648 (void)rootType;
5649 *to = *from;
5650 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5651 rootType = from->sType;
5652 }
5653 const void* from_pNext = from;
5654 size_t pNext_size = 0u;
5655 while (!pNext_size && from_pNext) {
5656 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5657 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5658 }
5659 to->pNext = nullptr;
5660 if (pNext_size) {
5661 to->pNext = (void*)alloc->alloc(pNext_size);
5662 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5663 }
5664 }
5665
deepcopy_VkCopyBufferInfo2(Allocator * alloc,VkStructureType rootType,const VkCopyBufferInfo2 * from,VkCopyBufferInfo2 * to)5666 void deepcopy_VkCopyBufferInfo2(Allocator* alloc, VkStructureType rootType,
5667 const VkCopyBufferInfo2* from, VkCopyBufferInfo2* to) {
5668 (void)alloc;
5669 (void)rootType;
5670 *to = *from;
5671 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5672 rootType = from->sType;
5673 }
5674 const void* from_pNext = from;
5675 size_t pNext_size = 0u;
5676 while (!pNext_size && from_pNext) {
5677 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5678 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5679 }
5680 to->pNext = nullptr;
5681 if (pNext_size) {
5682 to->pNext = (void*)alloc->alloc(pNext_size);
5683 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5684 }
5685 if (from) {
5686 to->pRegions = nullptr;
5687 if (from->pRegions) {
5688 to->pRegions =
5689 (VkBufferCopy2*)alloc->alloc(from->regionCount * sizeof(const VkBufferCopy2));
5690 to->regionCount = from->regionCount;
5691 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5692 deepcopy_VkBufferCopy2(alloc, rootType, from->pRegions + i,
5693 (VkBufferCopy2*)(to->pRegions + i));
5694 }
5695 }
5696 }
5697 }
5698
deepcopy_VkImageCopy2(Allocator * alloc,VkStructureType rootType,const VkImageCopy2 * from,VkImageCopy2 * to)5699 void deepcopy_VkImageCopy2(Allocator* alloc, VkStructureType rootType, const VkImageCopy2* from,
5700 VkImageCopy2* to) {
5701 (void)alloc;
5702 (void)rootType;
5703 *to = *from;
5704 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5705 rootType = from->sType;
5706 }
5707 const void* from_pNext = from;
5708 size_t pNext_size = 0u;
5709 while (!pNext_size && from_pNext) {
5710 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5711 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5712 }
5713 to->pNext = nullptr;
5714 if (pNext_size) {
5715 to->pNext = (void*)alloc->alloc(pNext_size);
5716 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5717 }
5718 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
5719 (VkImageSubresourceLayers*)(&to->srcSubresource));
5720 deepcopy_VkOffset3D(alloc, rootType, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
5721 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
5722 (VkImageSubresourceLayers*)(&to->dstSubresource));
5723 deepcopy_VkOffset3D(alloc, rootType, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
5724 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
5725 }
5726
deepcopy_VkCopyImageInfo2(Allocator * alloc,VkStructureType rootType,const VkCopyImageInfo2 * from,VkCopyImageInfo2 * to)5727 void deepcopy_VkCopyImageInfo2(Allocator* alloc, VkStructureType rootType,
5728 const VkCopyImageInfo2* from, VkCopyImageInfo2* to) {
5729 (void)alloc;
5730 (void)rootType;
5731 *to = *from;
5732 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5733 rootType = from->sType;
5734 }
5735 const void* from_pNext = from;
5736 size_t pNext_size = 0u;
5737 while (!pNext_size && from_pNext) {
5738 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5739 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5740 }
5741 to->pNext = nullptr;
5742 if (pNext_size) {
5743 to->pNext = (void*)alloc->alloc(pNext_size);
5744 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5745 }
5746 if (from) {
5747 to->pRegions = nullptr;
5748 if (from->pRegions) {
5749 to->pRegions =
5750 (VkImageCopy2*)alloc->alloc(from->regionCount * sizeof(const VkImageCopy2));
5751 to->regionCount = from->regionCount;
5752 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5753 deepcopy_VkImageCopy2(alloc, rootType, from->pRegions + i,
5754 (VkImageCopy2*)(to->pRegions + i));
5755 }
5756 }
5757 }
5758 }
5759
deepcopy_VkBufferImageCopy2(Allocator * alloc,VkStructureType rootType,const VkBufferImageCopy2 * from,VkBufferImageCopy2 * to)5760 void deepcopy_VkBufferImageCopy2(Allocator* alloc, VkStructureType rootType,
5761 const VkBufferImageCopy2* from, VkBufferImageCopy2* to) {
5762 (void)alloc;
5763 (void)rootType;
5764 *to = *from;
5765 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5766 rootType = from->sType;
5767 }
5768 const void* from_pNext = from;
5769 size_t pNext_size = 0u;
5770 while (!pNext_size && from_pNext) {
5771 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5772 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5773 }
5774 to->pNext = nullptr;
5775 if (pNext_size) {
5776 to->pNext = (void*)alloc->alloc(pNext_size);
5777 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5778 }
5779 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->imageSubresource,
5780 (VkImageSubresourceLayers*)(&to->imageSubresource));
5781 deepcopy_VkOffset3D(alloc, rootType, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
5782 deepcopy_VkExtent3D(alloc, rootType, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
5783 }
5784
deepcopy_VkCopyBufferToImageInfo2(Allocator * alloc,VkStructureType rootType,const VkCopyBufferToImageInfo2 * from,VkCopyBufferToImageInfo2 * to)5785 void deepcopy_VkCopyBufferToImageInfo2(Allocator* alloc, VkStructureType rootType,
5786 const VkCopyBufferToImageInfo2* from,
5787 VkCopyBufferToImageInfo2* to) {
5788 (void)alloc;
5789 (void)rootType;
5790 *to = *from;
5791 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5792 rootType = from->sType;
5793 }
5794 const void* from_pNext = from;
5795 size_t pNext_size = 0u;
5796 while (!pNext_size && from_pNext) {
5797 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5798 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5799 }
5800 to->pNext = nullptr;
5801 if (pNext_size) {
5802 to->pNext = (void*)alloc->alloc(pNext_size);
5803 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5804 }
5805 if (from) {
5806 to->pRegions = nullptr;
5807 if (from->pRegions) {
5808 to->pRegions = (VkBufferImageCopy2*)alloc->alloc(from->regionCount *
5809 sizeof(const VkBufferImageCopy2));
5810 to->regionCount = from->regionCount;
5811 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5812 deepcopy_VkBufferImageCopy2(alloc, rootType, from->pRegions + i,
5813 (VkBufferImageCopy2*)(to->pRegions + i));
5814 }
5815 }
5816 }
5817 }
5818
deepcopy_VkCopyImageToBufferInfo2(Allocator * alloc,VkStructureType rootType,const VkCopyImageToBufferInfo2 * from,VkCopyImageToBufferInfo2 * to)5819 void deepcopy_VkCopyImageToBufferInfo2(Allocator* alloc, VkStructureType rootType,
5820 const VkCopyImageToBufferInfo2* from,
5821 VkCopyImageToBufferInfo2* to) {
5822 (void)alloc;
5823 (void)rootType;
5824 *to = *from;
5825 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5826 rootType = from->sType;
5827 }
5828 const void* from_pNext = from;
5829 size_t pNext_size = 0u;
5830 while (!pNext_size && from_pNext) {
5831 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5832 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5833 }
5834 to->pNext = nullptr;
5835 if (pNext_size) {
5836 to->pNext = (void*)alloc->alloc(pNext_size);
5837 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5838 }
5839 if (from) {
5840 to->pRegions = nullptr;
5841 if (from->pRegions) {
5842 to->pRegions = (VkBufferImageCopy2*)alloc->alloc(from->regionCount *
5843 sizeof(const VkBufferImageCopy2));
5844 to->regionCount = from->regionCount;
5845 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5846 deepcopy_VkBufferImageCopy2(alloc, rootType, from->pRegions + i,
5847 (VkBufferImageCopy2*)(to->pRegions + i));
5848 }
5849 }
5850 }
5851 }
5852
deepcopy_VkImageBlit2(Allocator * alloc,VkStructureType rootType,const VkImageBlit2 * from,VkImageBlit2 * to)5853 void deepcopy_VkImageBlit2(Allocator* alloc, VkStructureType rootType, const VkImageBlit2* from,
5854 VkImageBlit2* to) {
5855 (void)alloc;
5856 (void)rootType;
5857 *to = *from;
5858 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5859 rootType = from->sType;
5860 }
5861 const void* from_pNext = from;
5862 size_t pNext_size = 0u;
5863 while (!pNext_size && from_pNext) {
5864 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5865 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5866 }
5867 to->pNext = nullptr;
5868 if (pNext_size) {
5869 to->pNext = (void*)alloc->alloc(pNext_size);
5870 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5871 }
5872 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
5873 (VkImageSubresourceLayers*)(&to->srcSubresource));
5874 for (uint32_t i = 0; i < (uint32_t)2; ++i) {
5875 deepcopy_VkOffset3D(alloc, rootType, from->srcOffsets + i,
5876 (VkOffset3D*)(to->srcOffsets + i));
5877 }
5878 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
5879 (VkImageSubresourceLayers*)(&to->dstSubresource));
5880 for (uint32_t i = 0; i < (uint32_t)2; ++i) {
5881 deepcopy_VkOffset3D(alloc, rootType, from->dstOffsets + i,
5882 (VkOffset3D*)(to->dstOffsets + i));
5883 }
5884 }
5885
deepcopy_VkBlitImageInfo2(Allocator * alloc,VkStructureType rootType,const VkBlitImageInfo2 * from,VkBlitImageInfo2 * to)5886 void deepcopy_VkBlitImageInfo2(Allocator* alloc, VkStructureType rootType,
5887 const VkBlitImageInfo2* from, VkBlitImageInfo2* to) {
5888 (void)alloc;
5889 (void)rootType;
5890 *to = *from;
5891 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5892 rootType = from->sType;
5893 }
5894 const void* from_pNext = from;
5895 size_t pNext_size = 0u;
5896 while (!pNext_size && from_pNext) {
5897 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5898 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5899 }
5900 to->pNext = nullptr;
5901 if (pNext_size) {
5902 to->pNext = (void*)alloc->alloc(pNext_size);
5903 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5904 }
5905 if (from) {
5906 to->pRegions = nullptr;
5907 if (from->pRegions) {
5908 to->pRegions =
5909 (VkImageBlit2*)alloc->alloc(from->regionCount * sizeof(const VkImageBlit2));
5910 to->regionCount = from->regionCount;
5911 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5912 deepcopy_VkImageBlit2(alloc, rootType, from->pRegions + i,
5913 (VkImageBlit2*)(to->pRegions + i));
5914 }
5915 }
5916 }
5917 }
5918
deepcopy_VkImageResolve2(Allocator * alloc,VkStructureType rootType,const VkImageResolve2 * from,VkImageResolve2 * to)5919 void deepcopy_VkImageResolve2(Allocator* alloc, VkStructureType rootType,
5920 const VkImageResolve2* from, VkImageResolve2* to) {
5921 (void)alloc;
5922 (void)rootType;
5923 *to = *from;
5924 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5925 rootType = from->sType;
5926 }
5927 const void* from_pNext = from;
5928 size_t pNext_size = 0u;
5929 while (!pNext_size && from_pNext) {
5930 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5931 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5932 }
5933 to->pNext = nullptr;
5934 if (pNext_size) {
5935 to->pNext = (void*)alloc->alloc(pNext_size);
5936 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5937 }
5938 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->srcSubresource,
5939 (VkImageSubresourceLayers*)(&to->srcSubresource));
5940 deepcopy_VkOffset3D(alloc, rootType, &from->srcOffset, (VkOffset3D*)(&to->srcOffset));
5941 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->dstSubresource,
5942 (VkImageSubresourceLayers*)(&to->dstSubresource));
5943 deepcopy_VkOffset3D(alloc, rootType, &from->dstOffset, (VkOffset3D*)(&to->dstOffset));
5944 deepcopy_VkExtent3D(alloc, rootType, &from->extent, (VkExtent3D*)(&to->extent));
5945 }
5946
deepcopy_VkResolveImageInfo2(Allocator * alloc,VkStructureType rootType,const VkResolveImageInfo2 * from,VkResolveImageInfo2 * to)5947 void deepcopy_VkResolveImageInfo2(Allocator* alloc, VkStructureType rootType,
5948 const VkResolveImageInfo2* from, VkResolveImageInfo2* to) {
5949 (void)alloc;
5950 (void)rootType;
5951 *to = *from;
5952 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5953 rootType = from->sType;
5954 }
5955 const void* from_pNext = from;
5956 size_t pNext_size = 0u;
5957 while (!pNext_size && from_pNext) {
5958 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5959 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5960 }
5961 to->pNext = nullptr;
5962 if (pNext_size) {
5963 to->pNext = (void*)alloc->alloc(pNext_size);
5964 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
5965 }
5966 if (from) {
5967 to->pRegions = nullptr;
5968 if (from->pRegions) {
5969 to->pRegions =
5970 (VkImageResolve2*)alloc->alloc(from->regionCount * sizeof(const VkImageResolve2));
5971 to->regionCount = from->regionCount;
5972 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
5973 deepcopy_VkImageResolve2(alloc, rootType, from->pRegions + i,
5974 (VkImageResolve2*)(to->pRegions + i));
5975 }
5976 }
5977 }
5978 }
5979
deepcopy_VkPhysicalDeviceSubgroupSizeControlFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSubgroupSizeControlFeatures * from,VkPhysicalDeviceSubgroupSizeControlFeatures * to)5980 void deepcopy_VkPhysicalDeviceSubgroupSizeControlFeatures(
5981 Allocator* alloc, VkStructureType rootType,
5982 const VkPhysicalDeviceSubgroupSizeControlFeatures* from,
5983 VkPhysicalDeviceSubgroupSizeControlFeatures* to) {
5984 (void)alloc;
5985 (void)rootType;
5986 *to = *from;
5987 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
5988 rootType = from->sType;
5989 }
5990 const void* from_pNext = from;
5991 size_t pNext_size = 0u;
5992 while (!pNext_size && from_pNext) {
5993 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
5994 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
5995 }
5996 to->pNext = nullptr;
5997 if (pNext_size) {
5998 to->pNext = (void*)alloc->alloc(pNext_size);
5999 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6000 }
6001 }
6002
deepcopy_VkPhysicalDeviceSubgroupSizeControlProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSubgroupSizeControlProperties * from,VkPhysicalDeviceSubgroupSizeControlProperties * to)6003 void deepcopy_VkPhysicalDeviceSubgroupSizeControlProperties(
6004 Allocator* alloc, VkStructureType rootType,
6005 const VkPhysicalDeviceSubgroupSizeControlProperties* from,
6006 VkPhysicalDeviceSubgroupSizeControlProperties* to) {
6007 (void)alloc;
6008 (void)rootType;
6009 *to = *from;
6010 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6011 rootType = from->sType;
6012 }
6013 const void* from_pNext = from;
6014 size_t pNext_size = 0u;
6015 while (!pNext_size && from_pNext) {
6016 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6017 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6018 }
6019 to->pNext = nullptr;
6020 if (pNext_size) {
6021 to->pNext = (void*)alloc->alloc(pNext_size);
6022 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6023 }
6024 }
6025
deepcopy_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo * from,VkPipelineShaderStageRequiredSubgroupSizeCreateInfo * to)6026 void deepcopy_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(
6027 Allocator* alloc, VkStructureType rootType,
6028 const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo* from,
6029 VkPipelineShaderStageRequiredSubgroupSizeCreateInfo* to) {
6030 (void)alloc;
6031 (void)rootType;
6032 *to = *from;
6033 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6034 rootType = from->sType;
6035 }
6036 const void* from_pNext = from;
6037 size_t pNext_size = 0u;
6038 while (!pNext_size && from_pNext) {
6039 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6040 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6041 }
6042 to->pNext = nullptr;
6043 if (pNext_size) {
6044 to->pNext = (void*)alloc->alloc(pNext_size);
6045 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6046 }
6047 }
6048
deepcopy_VkPhysicalDeviceInlineUniformBlockFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceInlineUniformBlockFeatures * from,VkPhysicalDeviceInlineUniformBlockFeatures * to)6049 void deepcopy_VkPhysicalDeviceInlineUniformBlockFeatures(
6050 Allocator* alloc, VkStructureType rootType,
6051 const VkPhysicalDeviceInlineUniformBlockFeatures* from,
6052 VkPhysicalDeviceInlineUniformBlockFeatures* to) {
6053 (void)alloc;
6054 (void)rootType;
6055 *to = *from;
6056 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6057 rootType = from->sType;
6058 }
6059 const void* from_pNext = from;
6060 size_t pNext_size = 0u;
6061 while (!pNext_size && from_pNext) {
6062 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6063 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6064 }
6065 to->pNext = nullptr;
6066 if (pNext_size) {
6067 to->pNext = (void*)alloc->alloc(pNext_size);
6068 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6069 }
6070 }
6071
deepcopy_VkPhysicalDeviceInlineUniformBlockProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceInlineUniformBlockProperties * from,VkPhysicalDeviceInlineUniformBlockProperties * to)6072 void deepcopy_VkPhysicalDeviceInlineUniformBlockProperties(
6073 Allocator* alloc, VkStructureType rootType,
6074 const VkPhysicalDeviceInlineUniformBlockProperties* from,
6075 VkPhysicalDeviceInlineUniformBlockProperties* to) {
6076 (void)alloc;
6077 (void)rootType;
6078 *to = *from;
6079 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6080 rootType = from->sType;
6081 }
6082 const void* from_pNext = from;
6083 size_t pNext_size = 0u;
6084 while (!pNext_size && from_pNext) {
6085 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6086 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6087 }
6088 to->pNext = nullptr;
6089 if (pNext_size) {
6090 to->pNext = (void*)alloc->alloc(pNext_size);
6091 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6092 }
6093 }
6094
deepcopy_VkWriteDescriptorSetInlineUniformBlock(Allocator * alloc,VkStructureType rootType,const VkWriteDescriptorSetInlineUniformBlock * from,VkWriteDescriptorSetInlineUniformBlock * to)6095 void deepcopy_VkWriteDescriptorSetInlineUniformBlock(
6096 Allocator* alloc, VkStructureType rootType, const VkWriteDescriptorSetInlineUniformBlock* from,
6097 VkWriteDescriptorSetInlineUniformBlock* to) {
6098 (void)alloc;
6099 (void)rootType;
6100 *to = *from;
6101 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6102 rootType = from->sType;
6103 }
6104 const void* from_pNext = from;
6105 size_t pNext_size = 0u;
6106 while (!pNext_size && from_pNext) {
6107 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6108 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6109 }
6110 to->pNext = nullptr;
6111 if (pNext_size) {
6112 to->pNext = (void*)alloc->alloc(pNext_size);
6113 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6114 }
6115 to->pData = nullptr;
6116 if (from->pData) {
6117 to->pData = (void*)alloc->dupArray(from->pData, from->dataSize * sizeof(const uint8_t));
6118 }
6119 }
6120
deepcopy_VkDescriptorPoolInlineUniformBlockCreateInfo(Allocator * alloc,VkStructureType rootType,const VkDescriptorPoolInlineUniformBlockCreateInfo * from,VkDescriptorPoolInlineUniformBlockCreateInfo * to)6121 void deepcopy_VkDescriptorPoolInlineUniformBlockCreateInfo(
6122 Allocator* alloc, VkStructureType rootType,
6123 const VkDescriptorPoolInlineUniformBlockCreateInfo* from,
6124 VkDescriptorPoolInlineUniformBlockCreateInfo* to) {
6125 (void)alloc;
6126 (void)rootType;
6127 *to = *from;
6128 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6129 rootType = from->sType;
6130 }
6131 const void* from_pNext = from;
6132 size_t pNext_size = 0u;
6133 while (!pNext_size && from_pNext) {
6134 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6135 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6136 }
6137 to->pNext = nullptr;
6138 if (pNext_size) {
6139 to->pNext = (void*)alloc->alloc(pNext_size);
6140 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6141 }
6142 }
6143
deepcopy_VkPhysicalDeviceTextureCompressionASTCHDRFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTextureCompressionASTCHDRFeatures * from,VkPhysicalDeviceTextureCompressionASTCHDRFeatures * to)6144 void deepcopy_VkPhysicalDeviceTextureCompressionASTCHDRFeatures(
6145 Allocator* alloc, VkStructureType rootType,
6146 const VkPhysicalDeviceTextureCompressionASTCHDRFeatures* from,
6147 VkPhysicalDeviceTextureCompressionASTCHDRFeatures* to) {
6148 (void)alloc;
6149 (void)rootType;
6150 *to = *from;
6151 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6152 rootType = from->sType;
6153 }
6154 const void* from_pNext = from;
6155 size_t pNext_size = 0u;
6156 while (!pNext_size && from_pNext) {
6157 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6158 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6159 }
6160 to->pNext = nullptr;
6161 if (pNext_size) {
6162 to->pNext = (void*)alloc->alloc(pNext_size);
6163 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6164 }
6165 }
6166
deepcopy_VkRenderingAttachmentInfo(Allocator * alloc,VkStructureType rootType,const VkRenderingAttachmentInfo * from,VkRenderingAttachmentInfo * to)6167 void deepcopy_VkRenderingAttachmentInfo(Allocator* alloc, VkStructureType rootType,
6168 const VkRenderingAttachmentInfo* from,
6169 VkRenderingAttachmentInfo* to) {
6170 (void)alloc;
6171 (void)rootType;
6172 *to = *from;
6173 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6174 rootType = from->sType;
6175 }
6176 const void* from_pNext = from;
6177 size_t pNext_size = 0u;
6178 while (!pNext_size && from_pNext) {
6179 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6180 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6181 }
6182 to->pNext = nullptr;
6183 if (pNext_size) {
6184 to->pNext = (void*)alloc->alloc(pNext_size);
6185 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6186 }
6187 deepcopy_VkClearValue(alloc, rootType, &from->clearValue, (VkClearValue*)(&to->clearValue));
6188 }
6189
deepcopy_VkRenderingInfo(Allocator * alloc,VkStructureType rootType,const VkRenderingInfo * from,VkRenderingInfo * to)6190 void deepcopy_VkRenderingInfo(Allocator* alloc, VkStructureType rootType,
6191 const VkRenderingInfo* from, VkRenderingInfo* to) {
6192 (void)alloc;
6193 (void)rootType;
6194 *to = *from;
6195 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6196 rootType = from->sType;
6197 }
6198 const void* from_pNext = from;
6199 size_t pNext_size = 0u;
6200 while (!pNext_size && from_pNext) {
6201 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6202 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6203 }
6204 to->pNext = nullptr;
6205 if (pNext_size) {
6206 to->pNext = (void*)alloc->alloc(pNext_size);
6207 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6208 }
6209 deepcopy_VkRect2D(alloc, rootType, &from->renderArea, (VkRect2D*)(&to->renderArea));
6210 if (from) {
6211 to->pColorAttachments = nullptr;
6212 if (from->pColorAttachments) {
6213 to->pColorAttachments = (VkRenderingAttachmentInfo*)alloc->alloc(
6214 from->colorAttachmentCount * sizeof(const VkRenderingAttachmentInfo));
6215 to->colorAttachmentCount = from->colorAttachmentCount;
6216 for (uint32_t i = 0; i < (uint32_t)from->colorAttachmentCount; ++i) {
6217 deepcopy_VkRenderingAttachmentInfo(
6218 alloc, rootType, from->pColorAttachments + i,
6219 (VkRenderingAttachmentInfo*)(to->pColorAttachments + i));
6220 }
6221 }
6222 }
6223 to->pDepthAttachment = nullptr;
6224 if (from->pDepthAttachment) {
6225 to->pDepthAttachment =
6226 (VkRenderingAttachmentInfo*)alloc->alloc(sizeof(const VkRenderingAttachmentInfo));
6227 deepcopy_VkRenderingAttachmentInfo(alloc, rootType, from->pDepthAttachment,
6228 (VkRenderingAttachmentInfo*)(to->pDepthAttachment));
6229 }
6230 to->pStencilAttachment = nullptr;
6231 if (from->pStencilAttachment) {
6232 to->pStencilAttachment =
6233 (VkRenderingAttachmentInfo*)alloc->alloc(sizeof(const VkRenderingAttachmentInfo));
6234 deepcopy_VkRenderingAttachmentInfo(alloc, rootType, from->pStencilAttachment,
6235 (VkRenderingAttachmentInfo*)(to->pStencilAttachment));
6236 }
6237 }
6238
deepcopy_VkPipelineRenderingCreateInfo(Allocator * alloc,VkStructureType rootType,const VkPipelineRenderingCreateInfo * from,VkPipelineRenderingCreateInfo * to)6239 void deepcopy_VkPipelineRenderingCreateInfo(Allocator* alloc, VkStructureType rootType,
6240 const VkPipelineRenderingCreateInfo* from,
6241 VkPipelineRenderingCreateInfo* to) {
6242 (void)alloc;
6243 (void)rootType;
6244 *to = *from;
6245 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6246 rootType = from->sType;
6247 }
6248 const void* from_pNext = from;
6249 size_t pNext_size = 0u;
6250 while (!pNext_size && from_pNext) {
6251 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6252 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6253 }
6254 to->pNext = nullptr;
6255 if (pNext_size) {
6256 to->pNext = (void*)alloc->alloc(pNext_size);
6257 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6258 }
6259 to->pColorAttachmentFormats = nullptr;
6260 if (from->pColorAttachmentFormats) {
6261 to->pColorAttachmentFormats = (VkFormat*)alloc->dupArray(
6262 from->pColorAttachmentFormats, from->colorAttachmentCount * sizeof(const VkFormat));
6263 }
6264 }
6265
deepcopy_VkPhysicalDeviceDynamicRenderingFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDynamicRenderingFeatures * from,VkPhysicalDeviceDynamicRenderingFeatures * to)6266 void deepcopy_VkPhysicalDeviceDynamicRenderingFeatures(
6267 Allocator* alloc, VkStructureType rootType,
6268 const VkPhysicalDeviceDynamicRenderingFeatures* from,
6269 VkPhysicalDeviceDynamicRenderingFeatures* to) {
6270 (void)alloc;
6271 (void)rootType;
6272 *to = *from;
6273 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6274 rootType = from->sType;
6275 }
6276 const void* from_pNext = from;
6277 size_t pNext_size = 0u;
6278 while (!pNext_size && from_pNext) {
6279 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6280 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6281 }
6282 to->pNext = nullptr;
6283 if (pNext_size) {
6284 to->pNext = (void*)alloc->alloc(pNext_size);
6285 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6286 }
6287 }
6288
deepcopy_VkCommandBufferInheritanceRenderingInfo(Allocator * alloc,VkStructureType rootType,const VkCommandBufferInheritanceRenderingInfo * from,VkCommandBufferInheritanceRenderingInfo * to)6289 void deepcopy_VkCommandBufferInheritanceRenderingInfo(
6290 Allocator* alloc, VkStructureType rootType, const VkCommandBufferInheritanceRenderingInfo* from,
6291 VkCommandBufferInheritanceRenderingInfo* to) {
6292 (void)alloc;
6293 (void)rootType;
6294 *to = *from;
6295 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6296 rootType = from->sType;
6297 }
6298 const void* from_pNext = from;
6299 size_t pNext_size = 0u;
6300 while (!pNext_size && from_pNext) {
6301 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6302 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6303 }
6304 to->pNext = nullptr;
6305 if (pNext_size) {
6306 to->pNext = (void*)alloc->alloc(pNext_size);
6307 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6308 }
6309 to->pColorAttachmentFormats = nullptr;
6310 if (from->pColorAttachmentFormats) {
6311 to->pColorAttachmentFormats = (VkFormat*)alloc->dupArray(
6312 from->pColorAttachmentFormats, from->colorAttachmentCount * sizeof(const VkFormat));
6313 }
6314 }
6315
deepcopy_VkPhysicalDeviceShaderIntegerDotProductFeatures(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderIntegerDotProductFeatures * from,VkPhysicalDeviceShaderIntegerDotProductFeatures * to)6316 void deepcopy_VkPhysicalDeviceShaderIntegerDotProductFeatures(
6317 Allocator* alloc, VkStructureType rootType,
6318 const VkPhysicalDeviceShaderIntegerDotProductFeatures* from,
6319 VkPhysicalDeviceShaderIntegerDotProductFeatures* to) {
6320 (void)alloc;
6321 (void)rootType;
6322 *to = *from;
6323 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6324 rootType = from->sType;
6325 }
6326 const void* from_pNext = from;
6327 size_t pNext_size = 0u;
6328 while (!pNext_size && from_pNext) {
6329 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6330 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6331 }
6332 to->pNext = nullptr;
6333 if (pNext_size) {
6334 to->pNext = (void*)alloc->alloc(pNext_size);
6335 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6336 }
6337 }
6338
deepcopy_VkPhysicalDeviceShaderIntegerDotProductProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceShaderIntegerDotProductProperties * from,VkPhysicalDeviceShaderIntegerDotProductProperties * to)6339 void deepcopy_VkPhysicalDeviceShaderIntegerDotProductProperties(
6340 Allocator* alloc, VkStructureType rootType,
6341 const VkPhysicalDeviceShaderIntegerDotProductProperties* from,
6342 VkPhysicalDeviceShaderIntegerDotProductProperties* to) {
6343 (void)alloc;
6344 (void)rootType;
6345 *to = *from;
6346 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6347 rootType = from->sType;
6348 }
6349 const void* from_pNext = from;
6350 size_t pNext_size = 0u;
6351 while (!pNext_size && from_pNext) {
6352 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6353 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6354 }
6355 to->pNext = nullptr;
6356 if (pNext_size) {
6357 to->pNext = (void*)alloc->alloc(pNext_size);
6358 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6359 }
6360 }
6361
deepcopy_VkPhysicalDeviceTexelBufferAlignmentProperties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTexelBufferAlignmentProperties * from,VkPhysicalDeviceTexelBufferAlignmentProperties * to)6362 void deepcopy_VkPhysicalDeviceTexelBufferAlignmentProperties(
6363 Allocator* alloc, VkStructureType rootType,
6364 const VkPhysicalDeviceTexelBufferAlignmentProperties* from,
6365 VkPhysicalDeviceTexelBufferAlignmentProperties* to) {
6366 (void)alloc;
6367 (void)rootType;
6368 *to = *from;
6369 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6370 rootType = from->sType;
6371 }
6372 const void* from_pNext = from;
6373 size_t pNext_size = 0u;
6374 while (!pNext_size && from_pNext) {
6375 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6376 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6377 }
6378 to->pNext = nullptr;
6379 if (pNext_size) {
6380 to->pNext = (void*)alloc->alloc(pNext_size);
6381 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6382 }
6383 }
6384
deepcopy_VkFormatProperties3(Allocator * alloc,VkStructureType rootType,const VkFormatProperties3 * from,VkFormatProperties3 * to)6385 void deepcopy_VkFormatProperties3(Allocator* alloc, VkStructureType rootType,
6386 const VkFormatProperties3* from, VkFormatProperties3* to) {
6387 (void)alloc;
6388 (void)rootType;
6389 *to = *from;
6390 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6391 rootType = from->sType;
6392 }
6393 const void* from_pNext = from;
6394 size_t pNext_size = 0u;
6395 while (!pNext_size && from_pNext) {
6396 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6397 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6398 }
6399 to->pNext = nullptr;
6400 if (pNext_size) {
6401 to->pNext = (void*)alloc->alloc(pNext_size);
6402 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6403 }
6404 }
6405
deepcopy_VkPhysicalDeviceMaintenance4Features(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMaintenance4Features * from,VkPhysicalDeviceMaintenance4Features * to)6406 void deepcopy_VkPhysicalDeviceMaintenance4Features(Allocator* alloc, VkStructureType rootType,
6407 const VkPhysicalDeviceMaintenance4Features* from,
6408 VkPhysicalDeviceMaintenance4Features* to) {
6409 (void)alloc;
6410 (void)rootType;
6411 *to = *from;
6412 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6413 rootType = from->sType;
6414 }
6415 const void* from_pNext = from;
6416 size_t pNext_size = 0u;
6417 while (!pNext_size && from_pNext) {
6418 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6419 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6420 }
6421 to->pNext = nullptr;
6422 if (pNext_size) {
6423 to->pNext = (void*)alloc->alloc(pNext_size);
6424 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6425 }
6426 }
6427
deepcopy_VkPhysicalDeviceMaintenance4Properties(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMaintenance4Properties * from,VkPhysicalDeviceMaintenance4Properties * to)6428 void deepcopy_VkPhysicalDeviceMaintenance4Properties(
6429 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceMaintenance4Properties* from,
6430 VkPhysicalDeviceMaintenance4Properties* to) {
6431 (void)alloc;
6432 (void)rootType;
6433 *to = *from;
6434 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6435 rootType = from->sType;
6436 }
6437 const void* from_pNext = from;
6438 size_t pNext_size = 0u;
6439 while (!pNext_size && from_pNext) {
6440 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6441 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6442 }
6443 to->pNext = nullptr;
6444 if (pNext_size) {
6445 to->pNext = (void*)alloc->alloc(pNext_size);
6446 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6447 }
6448 }
6449
deepcopy_VkDeviceBufferMemoryRequirements(Allocator * alloc,VkStructureType rootType,const VkDeviceBufferMemoryRequirements * from,VkDeviceBufferMemoryRequirements * to)6450 void deepcopy_VkDeviceBufferMemoryRequirements(Allocator* alloc, VkStructureType rootType,
6451 const VkDeviceBufferMemoryRequirements* from,
6452 VkDeviceBufferMemoryRequirements* to) {
6453 (void)alloc;
6454 (void)rootType;
6455 *to = *from;
6456 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6457 rootType = from->sType;
6458 }
6459 const void* from_pNext = from;
6460 size_t pNext_size = 0u;
6461 while (!pNext_size && from_pNext) {
6462 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6463 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6464 }
6465 to->pNext = nullptr;
6466 if (pNext_size) {
6467 to->pNext = (void*)alloc->alloc(pNext_size);
6468 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6469 }
6470 to->pCreateInfo = nullptr;
6471 if (from->pCreateInfo) {
6472 to->pCreateInfo = (VkBufferCreateInfo*)alloc->alloc(sizeof(const VkBufferCreateInfo));
6473 deepcopy_VkBufferCreateInfo(alloc, rootType, from->pCreateInfo,
6474 (VkBufferCreateInfo*)(to->pCreateInfo));
6475 }
6476 }
6477
deepcopy_VkDeviceImageMemoryRequirements(Allocator * alloc,VkStructureType rootType,const VkDeviceImageMemoryRequirements * from,VkDeviceImageMemoryRequirements * to)6478 void deepcopy_VkDeviceImageMemoryRequirements(Allocator* alloc, VkStructureType rootType,
6479 const VkDeviceImageMemoryRequirements* from,
6480 VkDeviceImageMemoryRequirements* to) {
6481 (void)alloc;
6482 (void)rootType;
6483 *to = *from;
6484 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6485 rootType = from->sType;
6486 }
6487 const void* from_pNext = from;
6488 size_t pNext_size = 0u;
6489 while (!pNext_size && from_pNext) {
6490 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6491 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6492 }
6493 to->pNext = nullptr;
6494 if (pNext_size) {
6495 to->pNext = (void*)alloc->alloc(pNext_size);
6496 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6497 }
6498 to->pCreateInfo = nullptr;
6499 if (from->pCreateInfo) {
6500 to->pCreateInfo = (VkImageCreateInfo*)alloc->alloc(sizeof(const VkImageCreateInfo));
6501 deepcopy_VkImageCreateInfo(alloc, rootType, from->pCreateInfo,
6502 (VkImageCreateInfo*)(to->pCreateInfo));
6503 }
6504 }
6505
6506 #endif
6507 #ifdef VK_KHR_swapchain
deepcopy_VkSwapchainCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkSwapchainCreateInfoKHR * from,VkSwapchainCreateInfoKHR * to)6508 void deepcopy_VkSwapchainCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
6509 const VkSwapchainCreateInfoKHR* from,
6510 VkSwapchainCreateInfoKHR* to) {
6511 (void)alloc;
6512 (void)rootType;
6513 *to = *from;
6514 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6515 rootType = from->sType;
6516 }
6517 const void* from_pNext = from;
6518 size_t pNext_size = 0u;
6519 while (!pNext_size && from_pNext) {
6520 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6521 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6522 }
6523 to->pNext = nullptr;
6524 if (pNext_size) {
6525 to->pNext = (void*)alloc->alloc(pNext_size);
6526 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6527 }
6528 deepcopy_VkExtent2D(alloc, rootType, &from->imageExtent, (VkExtent2D*)(&to->imageExtent));
6529 to->pQueueFamilyIndices = nullptr;
6530 if (from->pQueueFamilyIndices) {
6531 to->pQueueFamilyIndices = (uint32_t*)alloc->dupArray(
6532 from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
6533 }
6534 }
6535
deepcopy_VkPresentInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPresentInfoKHR * from,VkPresentInfoKHR * to)6536 void deepcopy_VkPresentInfoKHR(Allocator* alloc, VkStructureType rootType,
6537 const VkPresentInfoKHR* from, VkPresentInfoKHR* to) {
6538 (void)alloc;
6539 (void)rootType;
6540 *to = *from;
6541 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6542 rootType = from->sType;
6543 }
6544 const void* from_pNext = from;
6545 size_t pNext_size = 0u;
6546 while (!pNext_size && from_pNext) {
6547 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6548 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6549 }
6550 to->pNext = nullptr;
6551 if (pNext_size) {
6552 to->pNext = (void*)alloc->alloc(pNext_size);
6553 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6554 }
6555 to->pWaitSemaphores = nullptr;
6556 if (from->pWaitSemaphores) {
6557 to->pWaitSemaphores = (VkSemaphore*)alloc->dupArray(
6558 from->pWaitSemaphores, from->waitSemaphoreCount * sizeof(const VkSemaphore));
6559 }
6560 to->pSwapchains = nullptr;
6561 if (from->pSwapchains) {
6562 to->pSwapchains = (VkSwapchainKHR*)alloc->dupArray(
6563 from->pSwapchains, from->swapchainCount * sizeof(const VkSwapchainKHR));
6564 }
6565 to->pImageIndices = nullptr;
6566 if (from->pImageIndices) {
6567 to->pImageIndices = (uint32_t*)alloc->dupArray(
6568 from->pImageIndices, from->swapchainCount * sizeof(const uint32_t));
6569 }
6570 to->pResults = nullptr;
6571 if (from->pResults) {
6572 to->pResults =
6573 (VkResult*)alloc->dupArray(from->pResults, from->swapchainCount * sizeof(VkResult));
6574 }
6575 }
6576
deepcopy_VkImageSwapchainCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkImageSwapchainCreateInfoKHR * from,VkImageSwapchainCreateInfoKHR * to)6577 void deepcopy_VkImageSwapchainCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
6578 const VkImageSwapchainCreateInfoKHR* from,
6579 VkImageSwapchainCreateInfoKHR* to) {
6580 (void)alloc;
6581 (void)rootType;
6582 *to = *from;
6583 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6584 rootType = from->sType;
6585 }
6586 const void* from_pNext = from;
6587 size_t pNext_size = 0u;
6588 while (!pNext_size && from_pNext) {
6589 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6590 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6591 }
6592 to->pNext = nullptr;
6593 if (pNext_size) {
6594 to->pNext = (void*)alloc->alloc(pNext_size);
6595 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6596 }
6597 }
6598
deepcopy_VkBindImageMemorySwapchainInfoKHR(Allocator * alloc,VkStructureType rootType,const VkBindImageMemorySwapchainInfoKHR * from,VkBindImageMemorySwapchainInfoKHR * to)6599 void deepcopy_VkBindImageMemorySwapchainInfoKHR(Allocator* alloc, VkStructureType rootType,
6600 const VkBindImageMemorySwapchainInfoKHR* from,
6601 VkBindImageMemorySwapchainInfoKHR* to) {
6602 (void)alloc;
6603 (void)rootType;
6604 *to = *from;
6605 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6606 rootType = from->sType;
6607 }
6608 const void* from_pNext = from;
6609 size_t pNext_size = 0u;
6610 while (!pNext_size && from_pNext) {
6611 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6612 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6613 }
6614 to->pNext = nullptr;
6615 if (pNext_size) {
6616 to->pNext = (void*)alloc->alloc(pNext_size);
6617 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6618 }
6619 }
6620
deepcopy_VkAcquireNextImageInfoKHR(Allocator * alloc,VkStructureType rootType,const VkAcquireNextImageInfoKHR * from,VkAcquireNextImageInfoKHR * to)6621 void deepcopy_VkAcquireNextImageInfoKHR(Allocator* alloc, VkStructureType rootType,
6622 const VkAcquireNextImageInfoKHR* from,
6623 VkAcquireNextImageInfoKHR* to) {
6624 (void)alloc;
6625 (void)rootType;
6626 *to = *from;
6627 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6628 rootType = from->sType;
6629 }
6630 const void* from_pNext = from;
6631 size_t pNext_size = 0u;
6632 while (!pNext_size && from_pNext) {
6633 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6634 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6635 }
6636 to->pNext = nullptr;
6637 if (pNext_size) {
6638 to->pNext = (void*)alloc->alloc(pNext_size);
6639 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6640 }
6641 }
6642
deepcopy_VkDeviceGroupPresentCapabilitiesKHR(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupPresentCapabilitiesKHR * from,VkDeviceGroupPresentCapabilitiesKHR * to)6643 void deepcopy_VkDeviceGroupPresentCapabilitiesKHR(Allocator* alloc, VkStructureType rootType,
6644 const VkDeviceGroupPresentCapabilitiesKHR* from,
6645 VkDeviceGroupPresentCapabilitiesKHR* to) {
6646 (void)alloc;
6647 (void)rootType;
6648 *to = *from;
6649 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6650 rootType = from->sType;
6651 }
6652 const void* from_pNext = from;
6653 size_t pNext_size = 0u;
6654 while (!pNext_size && from_pNext) {
6655 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6656 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6657 }
6658 to->pNext = nullptr;
6659 if (pNext_size) {
6660 to->pNext = (void*)alloc->alloc(pNext_size);
6661 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6662 }
6663 memcpy(to->presentMask, from->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
6664 }
6665
deepcopy_VkDeviceGroupPresentInfoKHR(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupPresentInfoKHR * from,VkDeviceGroupPresentInfoKHR * to)6666 void deepcopy_VkDeviceGroupPresentInfoKHR(Allocator* alloc, VkStructureType rootType,
6667 const VkDeviceGroupPresentInfoKHR* from,
6668 VkDeviceGroupPresentInfoKHR* to) {
6669 (void)alloc;
6670 (void)rootType;
6671 *to = *from;
6672 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6673 rootType = from->sType;
6674 }
6675 const void* from_pNext = from;
6676 size_t pNext_size = 0u;
6677 while (!pNext_size && from_pNext) {
6678 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6679 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6680 }
6681 to->pNext = nullptr;
6682 if (pNext_size) {
6683 to->pNext = (void*)alloc->alloc(pNext_size);
6684 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6685 }
6686 to->pDeviceMasks = nullptr;
6687 if (from->pDeviceMasks) {
6688 to->pDeviceMasks = (uint32_t*)alloc->dupArray(
6689 from->pDeviceMasks, from->swapchainCount * sizeof(const uint32_t));
6690 }
6691 }
6692
deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkDeviceGroupSwapchainCreateInfoKHR * from,VkDeviceGroupSwapchainCreateInfoKHR * to)6693 void deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
6694 const VkDeviceGroupSwapchainCreateInfoKHR* from,
6695 VkDeviceGroupSwapchainCreateInfoKHR* to) {
6696 (void)alloc;
6697 (void)rootType;
6698 *to = *from;
6699 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6700 rootType = from->sType;
6701 }
6702 const void* from_pNext = from;
6703 size_t pNext_size = 0u;
6704 while (!pNext_size && from_pNext) {
6705 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6706 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6707 }
6708 to->pNext = nullptr;
6709 if (pNext_size) {
6710 to->pNext = (void*)alloc->alloc(pNext_size);
6711 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6712 }
6713 }
6714
6715 #endif
6716 #ifdef VK_KHR_dynamic_rendering
deepcopy_VkRenderingFragmentShadingRateAttachmentInfoKHR(Allocator * alloc,VkStructureType rootType,const VkRenderingFragmentShadingRateAttachmentInfoKHR * from,VkRenderingFragmentShadingRateAttachmentInfoKHR * to)6717 void deepcopy_VkRenderingFragmentShadingRateAttachmentInfoKHR(
6718 Allocator* alloc, VkStructureType rootType,
6719 const VkRenderingFragmentShadingRateAttachmentInfoKHR* from,
6720 VkRenderingFragmentShadingRateAttachmentInfoKHR* to) {
6721 (void)alloc;
6722 (void)rootType;
6723 *to = *from;
6724 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6725 rootType = from->sType;
6726 }
6727 const void* from_pNext = from;
6728 size_t pNext_size = 0u;
6729 while (!pNext_size && from_pNext) {
6730 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6731 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6732 }
6733 to->pNext = nullptr;
6734 if (pNext_size) {
6735 to->pNext = (void*)alloc->alloc(pNext_size);
6736 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6737 }
6738 deepcopy_VkExtent2D(alloc, rootType, &from->shadingRateAttachmentTexelSize,
6739 (VkExtent2D*)(&to->shadingRateAttachmentTexelSize));
6740 }
6741
deepcopy_VkRenderingFragmentDensityMapAttachmentInfoEXT(Allocator * alloc,VkStructureType rootType,const VkRenderingFragmentDensityMapAttachmentInfoEXT * from,VkRenderingFragmentDensityMapAttachmentInfoEXT * to)6742 void deepcopy_VkRenderingFragmentDensityMapAttachmentInfoEXT(
6743 Allocator* alloc, VkStructureType rootType,
6744 const VkRenderingFragmentDensityMapAttachmentInfoEXT* from,
6745 VkRenderingFragmentDensityMapAttachmentInfoEXT* to) {
6746 (void)alloc;
6747 (void)rootType;
6748 *to = *from;
6749 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6750 rootType = from->sType;
6751 }
6752 const void* from_pNext = from;
6753 size_t pNext_size = 0u;
6754 while (!pNext_size && from_pNext) {
6755 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6756 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6757 }
6758 to->pNext = nullptr;
6759 if (pNext_size) {
6760 to->pNext = (void*)alloc->alloc(pNext_size);
6761 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6762 }
6763 }
6764
deepcopy_VkAttachmentSampleCountInfoAMD(Allocator * alloc,VkStructureType rootType,const VkAttachmentSampleCountInfoAMD * from,VkAttachmentSampleCountInfoAMD * to)6765 void deepcopy_VkAttachmentSampleCountInfoAMD(Allocator* alloc, VkStructureType rootType,
6766 const VkAttachmentSampleCountInfoAMD* from,
6767 VkAttachmentSampleCountInfoAMD* to) {
6768 (void)alloc;
6769 (void)rootType;
6770 *to = *from;
6771 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6772 rootType = from->sType;
6773 }
6774 const void* from_pNext = from;
6775 size_t pNext_size = 0u;
6776 while (!pNext_size && from_pNext) {
6777 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6778 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6779 }
6780 to->pNext = nullptr;
6781 if (pNext_size) {
6782 to->pNext = (void*)alloc->alloc(pNext_size);
6783 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6784 }
6785 to->pColorAttachmentSamples = nullptr;
6786 if (from->pColorAttachmentSamples) {
6787 to->pColorAttachmentSamples = (VkSampleCountFlagBits*)alloc->dupArray(
6788 from->pColorAttachmentSamples,
6789 from->colorAttachmentCount * sizeof(const VkSampleCountFlagBits));
6790 }
6791 }
6792
deepcopy_VkMultiviewPerViewAttributesInfoNVX(Allocator * alloc,VkStructureType rootType,const VkMultiviewPerViewAttributesInfoNVX * from,VkMultiviewPerViewAttributesInfoNVX * to)6793 void deepcopy_VkMultiviewPerViewAttributesInfoNVX(Allocator* alloc, VkStructureType rootType,
6794 const VkMultiviewPerViewAttributesInfoNVX* from,
6795 VkMultiviewPerViewAttributesInfoNVX* to) {
6796 (void)alloc;
6797 (void)rootType;
6798 *to = *from;
6799 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6800 rootType = from->sType;
6801 }
6802 const void* from_pNext = from;
6803 size_t pNext_size = 0u;
6804 while (!pNext_size && from_pNext) {
6805 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6806 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6807 }
6808 to->pNext = nullptr;
6809 if (pNext_size) {
6810 to->pNext = (void*)alloc->alloc(pNext_size);
6811 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6812 }
6813 }
6814
6815 #endif
6816 #ifdef VK_KHR_external_semaphore_fd
deepcopy_VkImportSemaphoreFdInfoKHR(Allocator * alloc,VkStructureType rootType,const VkImportSemaphoreFdInfoKHR * from,VkImportSemaphoreFdInfoKHR * to)6817 void deepcopy_VkImportSemaphoreFdInfoKHR(Allocator* alloc, VkStructureType rootType,
6818 const VkImportSemaphoreFdInfoKHR* from,
6819 VkImportSemaphoreFdInfoKHR* to) {
6820 (void)alloc;
6821 (void)rootType;
6822 *to = *from;
6823 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6824 rootType = from->sType;
6825 }
6826 const void* from_pNext = from;
6827 size_t pNext_size = 0u;
6828 while (!pNext_size && from_pNext) {
6829 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6830 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6831 }
6832 to->pNext = nullptr;
6833 if (pNext_size) {
6834 to->pNext = (void*)alloc->alloc(pNext_size);
6835 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6836 }
6837 }
6838
deepcopy_VkSemaphoreGetFdInfoKHR(Allocator * alloc,VkStructureType rootType,const VkSemaphoreGetFdInfoKHR * from,VkSemaphoreGetFdInfoKHR * to)6839 void deepcopy_VkSemaphoreGetFdInfoKHR(Allocator* alloc, VkStructureType rootType,
6840 const VkSemaphoreGetFdInfoKHR* from,
6841 VkSemaphoreGetFdInfoKHR* to) {
6842 (void)alloc;
6843 (void)rootType;
6844 *to = *from;
6845 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6846 rootType = from->sType;
6847 }
6848 const void* from_pNext = from;
6849 size_t pNext_size = 0u;
6850 while (!pNext_size && from_pNext) {
6851 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6852 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6853 }
6854 to->pNext = nullptr;
6855 if (pNext_size) {
6856 to->pNext = (void*)alloc->alloc(pNext_size);
6857 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6858 }
6859 }
6860
6861 #endif
6862 #ifdef VK_KHR_incremental_present
deepcopy_VkRectLayerKHR(Allocator * alloc,VkStructureType rootType,const VkRectLayerKHR * from,VkRectLayerKHR * to)6863 void deepcopy_VkRectLayerKHR(Allocator* alloc, VkStructureType rootType, const VkRectLayerKHR* from,
6864 VkRectLayerKHR* to) {
6865 (void)alloc;
6866 (void)rootType;
6867 *to = *from;
6868 deepcopy_VkOffset2D(alloc, rootType, &from->offset, (VkOffset2D*)(&to->offset));
6869 deepcopy_VkExtent2D(alloc, rootType, &from->extent, (VkExtent2D*)(&to->extent));
6870 }
6871
deepcopy_VkPresentRegionKHR(Allocator * alloc,VkStructureType rootType,const VkPresentRegionKHR * from,VkPresentRegionKHR * to)6872 void deepcopy_VkPresentRegionKHR(Allocator* alloc, VkStructureType rootType,
6873 const VkPresentRegionKHR* from, VkPresentRegionKHR* to) {
6874 (void)alloc;
6875 (void)rootType;
6876 *to = *from;
6877 if (from) {
6878 to->pRectangles = nullptr;
6879 if (from->pRectangles) {
6880 to->pRectangles =
6881 (VkRectLayerKHR*)alloc->alloc(from->rectangleCount * sizeof(const VkRectLayerKHR));
6882 to->rectangleCount = from->rectangleCount;
6883 for (uint32_t i = 0; i < (uint32_t)from->rectangleCount; ++i) {
6884 deepcopy_VkRectLayerKHR(alloc, rootType, from->pRectangles + i,
6885 (VkRectLayerKHR*)(to->pRectangles + i));
6886 }
6887 }
6888 }
6889 }
6890
deepcopy_VkPresentRegionsKHR(Allocator * alloc,VkStructureType rootType,const VkPresentRegionsKHR * from,VkPresentRegionsKHR * to)6891 void deepcopy_VkPresentRegionsKHR(Allocator* alloc, VkStructureType rootType,
6892 const VkPresentRegionsKHR* from, VkPresentRegionsKHR* to) {
6893 (void)alloc;
6894 (void)rootType;
6895 *to = *from;
6896 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6897 rootType = from->sType;
6898 }
6899 const void* from_pNext = from;
6900 size_t pNext_size = 0u;
6901 while (!pNext_size && from_pNext) {
6902 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6903 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6904 }
6905 to->pNext = nullptr;
6906 if (pNext_size) {
6907 to->pNext = (void*)alloc->alloc(pNext_size);
6908 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6909 }
6910 if (from) {
6911 to->pRegions = nullptr;
6912 if (from->pRegions) {
6913 to->pRegions = (VkPresentRegionKHR*)alloc->alloc(from->swapchainCount *
6914 sizeof(const VkPresentRegionKHR));
6915 to->swapchainCount = from->swapchainCount;
6916 for (uint32_t i = 0; i < (uint32_t)from->swapchainCount; ++i) {
6917 deepcopy_VkPresentRegionKHR(alloc, rootType, from->pRegions + i,
6918 (VkPresentRegionKHR*)(to->pRegions + i));
6919 }
6920 }
6921 }
6922 }
6923
6924 #endif
6925 #ifdef VK_KHR_external_fence_fd
deepcopy_VkImportFenceFdInfoKHR(Allocator * alloc,VkStructureType rootType,const VkImportFenceFdInfoKHR * from,VkImportFenceFdInfoKHR * to)6926 void deepcopy_VkImportFenceFdInfoKHR(Allocator* alloc, VkStructureType rootType,
6927 const VkImportFenceFdInfoKHR* from,
6928 VkImportFenceFdInfoKHR* to) {
6929 (void)alloc;
6930 (void)rootType;
6931 *to = *from;
6932 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6933 rootType = from->sType;
6934 }
6935 const void* from_pNext = from;
6936 size_t pNext_size = 0u;
6937 while (!pNext_size && from_pNext) {
6938 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6939 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6940 }
6941 to->pNext = nullptr;
6942 if (pNext_size) {
6943 to->pNext = (void*)alloc->alloc(pNext_size);
6944 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6945 }
6946 }
6947
deepcopy_VkFenceGetFdInfoKHR(Allocator * alloc,VkStructureType rootType,const VkFenceGetFdInfoKHR * from,VkFenceGetFdInfoKHR * to)6948 void deepcopy_VkFenceGetFdInfoKHR(Allocator* alloc, VkStructureType rootType,
6949 const VkFenceGetFdInfoKHR* from, VkFenceGetFdInfoKHR* to) {
6950 (void)alloc;
6951 (void)rootType;
6952 *to = *from;
6953 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6954 rootType = from->sType;
6955 }
6956 const void* from_pNext = from;
6957 size_t pNext_size = 0u;
6958 while (!pNext_size && from_pNext) {
6959 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6960 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6961 }
6962 to->pNext = nullptr;
6963 if (pNext_size) {
6964 to->pNext = (void*)alloc->alloc(pNext_size);
6965 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6966 }
6967 }
6968
6969 #endif
6970 #ifdef VK_KHR_pipeline_executable_properties
deepcopy_VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR * from,VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR * to)6971 void deepcopy_VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(
6972 Allocator* alloc, VkStructureType rootType,
6973 const VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* from,
6974 VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR* to) {
6975 (void)alloc;
6976 (void)rootType;
6977 *to = *from;
6978 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
6979 rootType = from->sType;
6980 }
6981 const void* from_pNext = from;
6982 size_t pNext_size = 0u;
6983 while (!pNext_size && from_pNext) {
6984 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
6985 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
6986 }
6987 to->pNext = nullptr;
6988 if (pNext_size) {
6989 to->pNext = (void*)alloc->alloc(pNext_size);
6990 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
6991 }
6992 }
6993
deepcopy_VkPipelineInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineInfoKHR * from,VkPipelineInfoKHR * to)6994 void deepcopy_VkPipelineInfoKHR(Allocator* alloc, VkStructureType rootType,
6995 const VkPipelineInfoKHR* from, VkPipelineInfoKHR* to) {
6996 (void)alloc;
6997 (void)rootType;
6998 *to = *from;
6999 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7000 rootType = from->sType;
7001 }
7002 const void* from_pNext = from;
7003 size_t pNext_size = 0u;
7004 while (!pNext_size && from_pNext) {
7005 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7006 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7007 }
7008 to->pNext = nullptr;
7009 if (pNext_size) {
7010 to->pNext = (void*)alloc->alloc(pNext_size);
7011 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7012 }
7013 }
7014
deepcopy_VkPipelineExecutablePropertiesKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineExecutablePropertiesKHR * from,VkPipelineExecutablePropertiesKHR * to)7015 void deepcopy_VkPipelineExecutablePropertiesKHR(Allocator* alloc, VkStructureType rootType,
7016 const VkPipelineExecutablePropertiesKHR* from,
7017 VkPipelineExecutablePropertiesKHR* to) {
7018 (void)alloc;
7019 (void)rootType;
7020 *to = *from;
7021 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7022 rootType = from->sType;
7023 }
7024 const void* from_pNext = from;
7025 size_t pNext_size = 0u;
7026 while (!pNext_size && from_pNext) {
7027 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7028 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7029 }
7030 to->pNext = nullptr;
7031 if (pNext_size) {
7032 to->pNext = (void*)alloc->alloc(pNext_size);
7033 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7034 }
7035 memcpy(to->name, from->name, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7036 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7037 }
7038
deepcopy_VkPipelineExecutableInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineExecutableInfoKHR * from,VkPipelineExecutableInfoKHR * to)7039 void deepcopy_VkPipelineExecutableInfoKHR(Allocator* alloc, VkStructureType rootType,
7040 const VkPipelineExecutableInfoKHR* from,
7041 VkPipelineExecutableInfoKHR* to) {
7042 (void)alloc;
7043 (void)rootType;
7044 *to = *from;
7045 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7046 rootType = from->sType;
7047 }
7048 const void* from_pNext = from;
7049 size_t pNext_size = 0u;
7050 while (!pNext_size && from_pNext) {
7051 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7052 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7053 }
7054 to->pNext = nullptr;
7055 if (pNext_size) {
7056 to->pNext = (void*)alloc->alloc(pNext_size);
7057 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7058 }
7059 }
7060
deepcopy_VkPipelineExecutableStatisticValueKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineExecutableStatisticValueKHR * from,VkPipelineExecutableStatisticValueKHR * to)7061 void deepcopy_VkPipelineExecutableStatisticValueKHR(
7062 Allocator* alloc, VkStructureType rootType, const VkPipelineExecutableStatisticValueKHR* from,
7063 VkPipelineExecutableStatisticValueKHR* to) {
7064 (void)alloc;
7065 (void)rootType;
7066 *to = *from;
7067 }
7068
deepcopy_VkPipelineExecutableStatisticKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineExecutableStatisticKHR * from,VkPipelineExecutableStatisticKHR * to)7069 void deepcopy_VkPipelineExecutableStatisticKHR(Allocator* alloc, VkStructureType rootType,
7070 const VkPipelineExecutableStatisticKHR* from,
7071 VkPipelineExecutableStatisticKHR* to) {
7072 (void)alloc;
7073 (void)rootType;
7074 *to = *from;
7075 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7076 rootType = from->sType;
7077 }
7078 const void* from_pNext = from;
7079 size_t pNext_size = 0u;
7080 while (!pNext_size && from_pNext) {
7081 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7082 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7083 }
7084 to->pNext = nullptr;
7085 if (pNext_size) {
7086 to->pNext = (void*)alloc->alloc(pNext_size);
7087 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7088 }
7089 memcpy(to->name, from->name, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7090 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7091 deepcopy_VkPipelineExecutableStatisticValueKHR(
7092 alloc, rootType, &from->value, (VkPipelineExecutableStatisticValueKHR*)(&to->value));
7093 }
7094
deepcopy_VkPipelineExecutableInternalRepresentationKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineExecutableInternalRepresentationKHR * from,VkPipelineExecutableInternalRepresentationKHR * to)7095 void deepcopy_VkPipelineExecutableInternalRepresentationKHR(
7096 Allocator* alloc, VkStructureType rootType,
7097 const VkPipelineExecutableInternalRepresentationKHR* from,
7098 VkPipelineExecutableInternalRepresentationKHR* to) {
7099 (void)alloc;
7100 (void)rootType;
7101 *to = *from;
7102 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7103 rootType = from->sType;
7104 }
7105 const void* from_pNext = from;
7106 size_t pNext_size = 0u;
7107 while (!pNext_size && from_pNext) {
7108 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7109 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7110 }
7111 to->pNext = nullptr;
7112 if (pNext_size) {
7113 to->pNext = (void*)alloc->alloc(pNext_size);
7114 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7115 }
7116 memcpy(to->name, from->name, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7117 memcpy(to->description, from->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
7118 to->pData = nullptr;
7119 if (from->pData) {
7120 to->pData = (void*)alloc->dupArray(from->pData, from->dataSize * sizeof(uint8_t));
7121 }
7122 }
7123
7124 #endif
7125 #ifdef VK_KHR_pipeline_library
deepcopy_VkPipelineLibraryCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineLibraryCreateInfoKHR * from,VkPipelineLibraryCreateInfoKHR * to)7126 void deepcopy_VkPipelineLibraryCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
7127 const VkPipelineLibraryCreateInfoKHR* from,
7128 VkPipelineLibraryCreateInfoKHR* to) {
7129 (void)alloc;
7130 (void)rootType;
7131 *to = *from;
7132 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7133 rootType = from->sType;
7134 }
7135 const void* from_pNext = from;
7136 size_t pNext_size = 0u;
7137 while (!pNext_size && from_pNext) {
7138 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7139 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7140 }
7141 to->pNext = nullptr;
7142 if (pNext_size) {
7143 to->pNext = (void*)alloc->alloc(pNext_size);
7144 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7145 }
7146 to->pLibraries = nullptr;
7147 if (from->pLibraries) {
7148 to->pLibraries = (VkPipeline*)alloc->dupArray(
7149 from->pLibraries, from->libraryCount * sizeof(const VkPipeline));
7150 }
7151 }
7152
7153 #endif
7154 #ifdef VK_KHR_synchronization2
deepcopy_VkQueueFamilyCheckpointProperties2NV(Allocator * alloc,VkStructureType rootType,const VkQueueFamilyCheckpointProperties2NV * from,VkQueueFamilyCheckpointProperties2NV * to)7155 void deepcopy_VkQueueFamilyCheckpointProperties2NV(Allocator* alloc, VkStructureType rootType,
7156 const VkQueueFamilyCheckpointProperties2NV* from,
7157 VkQueueFamilyCheckpointProperties2NV* to) {
7158 (void)alloc;
7159 (void)rootType;
7160 *to = *from;
7161 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7162 rootType = from->sType;
7163 }
7164 const void* from_pNext = from;
7165 size_t pNext_size = 0u;
7166 while (!pNext_size && from_pNext) {
7167 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7168 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7169 }
7170 to->pNext = nullptr;
7171 if (pNext_size) {
7172 to->pNext = (void*)alloc->alloc(pNext_size);
7173 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7174 }
7175 }
7176
deepcopy_VkCheckpointData2NV(Allocator * alloc,VkStructureType rootType,const VkCheckpointData2NV * from,VkCheckpointData2NV * to)7177 void deepcopy_VkCheckpointData2NV(Allocator* alloc, VkStructureType rootType,
7178 const VkCheckpointData2NV* from, VkCheckpointData2NV* to) {
7179 (void)alloc;
7180 (void)rootType;
7181 *to = *from;
7182 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7183 rootType = from->sType;
7184 }
7185 const void* from_pNext = from;
7186 size_t pNext_size = 0u;
7187 while (!pNext_size && from_pNext) {
7188 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7189 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7190 }
7191 to->pNext = nullptr;
7192 if (pNext_size) {
7193 to->pNext = (void*)alloc->alloc(pNext_size);
7194 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7195 }
7196 to->pCheckpointMarker = nullptr;
7197 if (from->pCheckpointMarker) {
7198 to->pCheckpointMarker = (void*)alloc->dupArray(from->pCheckpointMarker, sizeof(uint8_t));
7199 }
7200 }
7201
7202 #endif
7203 #ifdef VK_KHR_maintenance5
deepcopy_VkPhysicalDeviceMaintenance5FeaturesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMaintenance5FeaturesKHR * from,VkPhysicalDeviceMaintenance5FeaturesKHR * to)7204 void deepcopy_VkPhysicalDeviceMaintenance5FeaturesKHR(
7205 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceMaintenance5FeaturesKHR* from,
7206 VkPhysicalDeviceMaintenance5FeaturesKHR* to) {
7207 (void)alloc;
7208 (void)rootType;
7209 *to = *from;
7210 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7211 rootType = from->sType;
7212 }
7213 const void* from_pNext = from;
7214 size_t pNext_size = 0u;
7215 while (!pNext_size && from_pNext) {
7216 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7217 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7218 }
7219 to->pNext = nullptr;
7220 if (pNext_size) {
7221 to->pNext = (void*)alloc->alloc(pNext_size);
7222 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7223 }
7224 }
7225
deepcopy_VkPhysicalDeviceMaintenance5PropertiesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceMaintenance5PropertiesKHR * from,VkPhysicalDeviceMaintenance5PropertiesKHR * to)7226 void deepcopy_VkPhysicalDeviceMaintenance5PropertiesKHR(
7227 Allocator* alloc, VkStructureType rootType,
7228 const VkPhysicalDeviceMaintenance5PropertiesKHR* from,
7229 VkPhysicalDeviceMaintenance5PropertiesKHR* to) {
7230 (void)alloc;
7231 (void)rootType;
7232 *to = *from;
7233 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7234 rootType = from->sType;
7235 }
7236 const void* from_pNext = from;
7237 size_t pNext_size = 0u;
7238 while (!pNext_size && from_pNext) {
7239 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7240 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7241 }
7242 to->pNext = nullptr;
7243 if (pNext_size) {
7244 to->pNext = (void*)alloc->alloc(pNext_size);
7245 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7246 }
7247 }
7248
deepcopy_VkRenderingAreaInfoKHR(Allocator * alloc,VkStructureType rootType,const VkRenderingAreaInfoKHR * from,VkRenderingAreaInfoKHR * to)7249 void deepcopy_VkRenderingAreaInfoKHR(Allocator* alloc, VkStructureType rootType,
7250 const VkRenderingAreaInfoKHR* from,
7251 VkRenderingAreaInfoKHR* to) {
7252 (void)alloc;
7253 (void)rootType;
7254 *to = *from;
7255 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7256 rootType = from->sType;
7257 }
7258 const void* from_pNext = from;
7259 size_t pNext_size = 0u;
7260 while (!pNext_size && from_pNext) {
7261 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7262 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7263 }
7264 to->pNext = nullptr;
7265 if (pNext_size) {
7266 to->pNext = (void*)alloc->alloc(pNext_size);
7267 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7268 }
7269 to->pColorAttachmentFormats = nullptr;
7270 if (from->pColorAttachmentFormats) {
7271 to->pColorAttachmentFormats = (VkFormat*)alloc->dupArray(
7272 from->pColorAttachmentFormats, from->colorAttachmentCount * sizeof(const VkFormat));
7273 }
7274 }
7275
deepcopy_VkImageSubresource2KHR(Allocator * alloc,VkStructureType rootType,const VkImageSubresource2KHR * from,VkImageSubresource2KHR * to)7276 void deepcopy_VkImageSubresource2KHR(Allocator* alloc, VkStructureType rootType,
7277 const VkImageSubresource2KHR* from,
7278 VkImageSubresource2KHR* to) {
7279 (void)alloc;
7280 (void)rootType;
7281 *to = *from;
7282 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7283 rootType = from->sType;
7284 }
7285 const void* from_pNext = from;
7286 size_t pNext_size = 0u;
7287 while (!pNext_size && from_pNext) {
7288 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7289 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7290 }
7291 to->pNext = nullptr;
7292 if (pNext_size) {
7293 to->pNext = (void*)alloc->alloc(pNext_size);
7294 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7295 }
7296 deepcopy_VkImageSubresource(alloc, rootType, &from->imageSubresource,
7297 (VkImageSubresource*)(&to->imageSubresource));
7298 }
7299
deepcopy_VkDeviceImageSubresourceInfoKHR(Allocator * alloc,VkStructureType rootType,const VkDeviceImageSubresourceInfoKHR * from,VkDeviceImageSubresourceInfoKHR * to)7300 void deepcopy_VkDeviceImageSubresourceInfoKHR(Allocator* alloc, VkStructureType rootType,
7301 const VkDeviceImageSubresourceInfoKHR* from,
7302 VkDeviceImageSubresourceInfoKHR* to) {
7303 (void)alloc;
7304 (void)rootType;
7305 *to = *from;
7306 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7307 rootType = from->sType;
7308 }
7309 const void* from_pNext = from;
7310 size_t pNext_size = 0u;
7311 while (!pNext_size && from_pNext) {
7312 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7313 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7314 }
7315 to->pNext = nullptr;
7316 if (pNext_size) {
7317 to->pNext = (void*)alloc->alloc(pNext_size);
7318 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7319 }
7320 to->pCreateInfo = nullptr;
7321 if (from->pCreateInfo) {
7322 to->pCreateInfo = (VkImageCreateInfo*)alloc->alloc(sizeof(const VkImageCreateInfo));
7323 deepcopy_VkImageCreateInfo(alloc, rootType, from->pCreateInfo,
7324 (VkImageCreateInfo*)(to->pCreateInfo));
7325 }
7326 to->pSubresource = nullptr;
7327 if (from->pSubresource) {
7328 to->pSubresource =
7329 (VkImageSubresource2KHR*)alloc->alloc(sizeof(const VkImageSubresource2KHR));
7330 deepcopy_VkImageSubresource2KHR(alloc, rootType, from->pSubresource,
7331 (VkImageSubresource2KHR*)(to->pSubresource));
7332 }
7333 }
7334
deepcopy_VkSubresourceLayout2KHR(Allocator * alloc,VkStructureType rootType,const VkSubresourceLayout2KHR * from,VkSubresourceLayout2KHR * to)7335 void deepcopy_VkSubresourceLayout2KHR(Allocator* alloc, VkStructureType rootType,
7336 const VkSubresourceLayout2KHR* from,
7337 VkSubresourceLayout2KHR* to) {
7338 (void)alloc;
7339 (void)rootType;
7340 *to = *from;
7341 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7342 rootType = from->sType;
7343 }
7344 const void* from_pNext = from;
7345 size_t pNext_size = 0u;
7346 while (!pNext_size && from_pNext) {
7347 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7348 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7349 }
7350 to->pNext = nullptr;
7351 if (pNext_size) {
7352 to->pNext = (void*)alloc->alloc(pNext_size);
7353 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7354 }
7355 deepcopy_VkSubresourceLayout(alloc, rootType, &from->subresourceLayout,
7356 (VkSubresourceLayout*)(&to->subresourceLayout));
7357 }
7358
deepcopy_VkPipelineCreateFlags2CreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineCreateFlags2CreateInfoKHR * from,VkPipelineCreateFlags2CreateInfoKHR * to)7359 void deepcopy_VkPipelineCreateFlags2CreateInfoKHR(Allocator* alloc, VkStructureType rootType,
7360 const VkPipelineCreateFlags2CreateInfoKHR* from,
7361 VkPipelineCreateFlags2CreateInfoKHR* to) {
7362 (void)alloc;
7363 (void)rootType;
7364 *to = *from;
7365 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7366 rootType = from->sType;
7367 }
7368 const void* from_pNext = from;
7369 size_t pNext_size = 0u;
7370 while (!pNext_size && from_pNext) {
7371 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7372 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7373 }
7374 to->pNext = nullptr;
7375 if (pNext_size) {
7376 to->pNext = (void*)alloc->alloc(pNext_size);
7377 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7378 }
7379 }
7380
deepcopy_VkBufferUsageFlags2CreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkBufferUsageFlags2CreateInfoKHR * from,VkBufferUsageFlags2CreateInfoKHR * to)7381 void deepcopy_VkBufferUsageFlags2CreateInfoKHR(Allocator* alloc, VkStructureType rootType,
7382 const VkBufferUsageFlags2CreateInfoKHR* from,
7383 VkBufferUsageFlags2CreateInfoKHR* to) {
7384 (void)alloc;
7385 (void)rootType;
7386 *to = *from;
7387 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7388 rootType = from->sType;
7389 }
7390 const void* from_pNext = from;
7391 size_t pNext_size = 0u;
7392 while (!pNext_size && from_pNext) {
7393 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7394 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7395 }
7396 to->pNext = nullptr;
7397 if (pNext_size) {
7398 to->pNext = (void*)alloc->alloc(pNext_size);
7399 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7400 }
7401 }
7402
7403 #endif
7404 #ifdef VK_KHR_line_rasterization
deepcopy_VkPhysicalDeviceLineRasterizationFeaturesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceLineRasterizationFeaturesKHR * from,VkPhysicalDeviceLineRasterizationFeaturesKHR * to)7405 void deepcopy_VkPhysicalDeviceLineRasterizationFeaturesKHR(
7406 Allocator* alloc, VkStructureType rootType,
7407 const VkPhysicalDeviceLineRasterizationFeaturesKHR* from,
7408 VkPhysicalDeviceLineRasterizationFeaturesKHR* to) {
7409 (void)alloc;
7410 (void)rootType;
7411 *to = *from;
7412 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7413 rootType = from->sType;
7414 }
7415 const void* from_pNext = from;
7416 size_t pNext_size = 0u;
7417 while (!pNext_size && from_pNext) {
7418 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7419 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7420 }
7421 to->pNext = nullptr;
7422 if (pNext_size) {
7423 to->pNext = (void*)alloc->alloc(pNext_size);
7424 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7425 }
7426 }
7427
deepcopy_VkPhysicalDeviceLineRasterizationPropertiesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceLineRasterizationPropertiesKHR * from,VkPhysicalDeviceLineRasterizationPropertiesKHR * to)7428 void deepcopy_VkPhysicalDeviceLineRasterizationPropertiesKHR(
7429 Allocator* alloc, VkStructureType rootType,
7430 const VkPhysicalDeviceLineRasterizationPropertiesKHR* from,
7431 VkPhysicalDeviceLineRasterizationPropertiesKHR* to) {
7432 (void)alloc;
7433 (void)rootType;
7434 *to = *from;
7435 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7436 rootType = from->sType;
7437 }
7438 const void* from_pNext = from;
7439 size_t pNext_size = 0u;
7440 while (!pNext_size && from_pNext) {
7441 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7442 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7443 }
7444 to->pNext = nullptr;
7445 if (pNext_size) {
7446 to->pNext = (void*)alloc->alloc(pNext_size);
7447 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7448 }
7449 }
7450
deepcopy_VkPipelineRasterizationLineStateCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkPipelineRasterizationLineStateCreateInfoKHR * from,VkPipelineRasterizationLineStateCreateInfoKHR * to)7451 void deepcopy_VkPipelineRasterizationLineStateCreateInfoKHR(
7452 Allocator* alloc, VkStructureType rootType,
7453 const VkPipelineRasterizationLineStateCreateInfoKHR* from,
7454 VkPipelineRasterizationLineStateCreateInfoKHR* to) {
7455 (void)alloc;
7456 (void)rootType;
7457 *to = *from;
7458 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7459 rootType = from->sType;
7460 }
7461 const void* from_pNext = from;
7462 size_t pNext_size = 0u;
7463 while (!pNext_size && from_pNext) {
7464 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7465 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7466 }
7467 to->pNext = nullptr;
7468 if (pNext_size) {
7469 to->pNext = (void*)alloc->alloc(pNext_size);
7470 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7471 }
7472 }
7473
7474 #endif
7475 #ifdef VK_ANDROID_native_buffer
deepcopy_VkNativeBufferUsage2ANDROID(Allocator * alloc,VkStructureType rootType,const VkNativeBufferUsage2ANDROID * from,VkNativeBufferUsage2ANDROID * to)7476 void deepcopy_VkNativeBufferUsage2ANDROID(Allocator* alloc, VkStructureType rootType,
7477 const VkNativeBufferUsage2ANDROID* from,
7478 VkNativeBufferUsage2ANDROID* to) {
7479 (void)alloc;
7480 (void)rootType;
7481 *to = *from;
7482 }
7483
deepcopy_VkNativeBufferANDROID(Allocator * alloc,VkStructureType rootType,const VkNativeBufferANDROID * from,VkNativeBufferANDROID * to)7484 void deepcopy_VkNativeBufferANDROID(Allocator* alloc, VkStructureType rootType,
7485 const VkNativeBufferANDROID* from, VkNativeBufferANDROID* to) {
7486 (void)alloc;
7487 (void)rootType;
7488 *to = *from;
7489 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7490 rootType = from->sType;
7491 }
7492 const void* from_pNext = from;
7493 size_t pNext_size = 0u;
7494 while (!pNext_size && from_pNext) {
7495 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7496 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7497 }
7498 to->pNext = nullptr;
7499 if (pNext_size) {
7500 to->pNext = (void*)alloc->alloc(pNext_size);
7501 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7502 }
7503 to->handle = nullptr;
7504 if (from->handle) {
7505 to->handle = (uint32_t*)alloc->dupArray(from->handle, sizeof(const uint32_t));
7506 }
7507 deepcopy_VkNativeBufferUsage2ANDROID(alloc, rootType, &from->usage2,
7508 (VkNativeBufferUsage2ANDROID*)(&to->usage2));
7509 }
7510
deepcopy_VkSwapchainImageCreateInfoANDROID(Allocator * alloc,VkStructureType rootType,const VkSwapchainImageCreateInfoANDROID * from,VkSwapchainImageCreateInfoANDROID * to)7511 void deepcopy_VkSwapchainImageCreateInfoANDROID(Allocator* alloc, VkStructureType rootType,
7512 const VkSwapchainImageCreateInfoANDROID* from,
7513 VkSwapchainImageCreateInfoANDROID* to) {
7514 (void)alloc;
7515 (void)rootType;
7516 *to = *from;
7517 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7518 rootType = from->sType;
7519 }
7520 const void* from_pNext = from;
7521 size_t pNext_size = 0u;
7522 while (!pNext_size && from_pNext) {
7523 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7524 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7525 }
7526 to->pNext = nullptr;
7527 if (pNext_size) {
7528 to->pNext = (void*)alloc->alloc(pNext_size);
7529 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7530 }
7531 }
7532
deepcopy_VkPhysicalDevicePresentationPropertiesANDROID(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePresentationPropertiesANDROID * from,VkPhysicalDevicePresentationPropertiesANDROID * to)7533 void deepcopy_VkPhysicalDevicePresentationPropertiesANDROID(
7534 Allocator* alloc, VkStructureType rootType,
7535 const VkPhysicalDevicePresentationPropertiesANDROID* from,
7536 VkPhysicalDevicePresentationPropertiesANDROID* to) {
7537 (void)alloc;
7538 (void)rootType;
7539 *to = *from;
7540 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7541 rootType = from->sType;
7542 }
7543 const void* from_pNext = from;
7544 size_t pNext_size = 0u;
7545 while (!pNext_size && from_pNext) {
7546 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7547 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7548 }
7549 to->pNext = nullptr;
7550 if (pNext_size) {
7551 to->pNext = (void*)alloc->alloc(pNext_size);
7552 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7553 }
7554 }
7555
7556 #endif
7557 #ifdef VK_EXT_debug_report
deepcopy_VkDebugReportCallbackCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkDebugReportCallbackCreateInfoEXT * from,VkDebugReportCallbackCreateInfoEXT * to)7558 void deepcopy_VkDebugReportCallbackCreateInfoEXT(Allocator* alloc, VkStructureType rootType,
7559 const VkDebugReportCallbackCreateInfoEXT* from,
7560 VkDebugReportCallbackCreateInfoEXT* to) {
7561 (void)alloc;
7562 (void)rootType;
7563 *to = *from;
7564 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7565 rootType = from->sType;
7566 }
7567 const void* from_pNext = from;
7568 size_t pNext_size = 0u;
7569 while (!pNext_size && from_pNext) {
7570 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7571 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7572 }
7573 to->pNext = nullptr;
7574 if (pNext_size) {
7575 to->pNext = (void*)alloc->alloc(pNext_size);
7576 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7577 }
7578 to->pUserData = nullptr;
7579 if (from->pUserData) {
7580 to->pUserData = (void*)alloc->dupArray(from->pUserData, sizeof(uint8_t));
7581 }
7582 }
7583
7584 #endif
7585 #ifdef VK_EXT_transform_feedback
deepcopy_VkPhysicalDeviceTransformFeedbackFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTransformFeedbackFeaturesEXT * from,VkPhysicalDeviceTransformFeedbackFeaturesEXT * to)7586 void deepcopy_VkPhysicalDeviceTransformFeedbackFeaturesEXT(
7587 Allocator* alloc, VkStructureType rootType,
7588 const VkPhysicalDeviceTransformFeedbackFeaturesEXT* from,
7589 VkPhysicalDeviceTransformFeedbackFeaturesEXT* to) {
7590 (void)alloc;
7591 (void)rootType;
7592 *to = *from;
7593 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7594 rootType = from->sType;
7595 }
7596 const void* from_pNext = from;
7597 size_t pNext_size = 0u;
7598 while (!pNext_size && from_pNext) {
7599 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7600 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7601 }
7602 to->pNext = nullptr;
7603 if (pNext_size) {
7604 to->pNext = (void*)alloc->alloc(pNext_size);
7605 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7606 }
7607 }
7608
deepcopy_VkPhysicalDeviceTransformFeedbackPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTransformFeedbackPropertiesEXT * from,VkPhysicalDeviceTransformFeedbackPropertiesEXT * to)7609 void deepcopy_VkPhysicalDeviceTransformFeedbackPropertiesEXT(
7610 Allocator* alloc, VkStructureType rootType,
7611 const VkPhysicalDeviceTransformFeedbackPropertiesEXT* from,
7612 VkPhysicalDeviceTransformFeedbackPropertiesEXT* to) {
7613 (void)alloc;
7614 (void)rootType;
7615 *to = *from;
7616 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7617 rootType = from->sType;
7618 }
7619 const void* from_pNext = from;
7620 size_t pNext_size = 0u;
7621 while (!pNext_size && from_pNext) {
7622 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7623 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7624 }
7625 to->pNext = nullptr;
7626 if (pNext_size) {
7627 to->pNext = (void*)alloc->alloc(pNext_size);
7628 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7629 }
7630 }
7631
deepcopy_VkPipelineRasterizationStateStreamCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPipelineRasterizationStateStreamCreateInfoEXT * from,VkPipelineRasterizationStateStreamCreateInfoEXT * to)7632 void deepcopy_VkPipelineRasterizationStateStreamCreateInfoEXT(
7633 Allocator* alloc, VkStructureType rootType,
7634 const VkPipelineRasterizationStateStreamCreateInfoEXT* from,
7635 VkPipelineRasterizationStateStreamCreateInfoEXT* to) {
7636 (void)alloc;
7637 (void)rootType;
7638 *to = *from;
7639 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7640 rootType = from->sType;
7641 }
7642 const void* from_pNext = from;
7643 size_t pNext_size = 0u;
7644 while (!pNext_size && from_pNext) {
7645 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7646 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7647 }
7648 to->pNext = nullptr;
7649 if (pNext_size) {
7650 to->pNext = (void*)alloc->alloc(pNext_size);
7651 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7652 }
7653 }
7654
7655 #endif
7656 #ifdef VK_EXT_depth_clip_enable
deepcopy_VkPhysicalDeviceDepthClipEnableFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDepthClipEnableFeaturesEXT * from,VkPhysicalDeviceDepthClipEnableFeaturesEXT * to)7657 void deepcopy_VkPhysicalDeviceDepthClipEnableFeaturesEXT(
7658 Allocator* alloc, VkStructureType rootType,
7659 const VkPhysicalDeviceDepthClipEnableFeaturesEXT* from,
7660 VkPhysicalDeviceDepthClipEnableFeaturesEXT* to) {
7661 (void)alloc;
7662 (void)rootType;
7663 *to = *from;
7664 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7665 rootType = from->sType;
7666 }
7667 const void* from_pNext = from;
7668 size_t pNext_size = 0u;
7669 while (!pNext_size && from_pNext) {
7670 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7671 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7672 }
7673 to->pNext = nullptr;
7674 if (pNext_size) {
7675 to->pNext = (void*)alloc->alloc(pNext_size);
7676 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7677 }
7678 }
7679
deepcopy_VkPipelineRasterizationDepthClipStateCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPipelineRasterizationDepthClipStateCreateInfoEXT * from,VkPipelineRasterizationDepthClipStateCreateInfoEXT * to)7680 void deepcopy_VkPipelineRasterizationDepthClipStateCreateInfoEXT(
7681 Allocator* alloc, VkStructureType rootType,
7682 const VkPipelineRasterizationDepthClipStateCreateInfoEXT* from,
7683 VkPipelineRasterizationDepthClipStateCreateInfoEXT* to) {
7684 (void)alloc;
7685 (void)rootType;
7686 *to = *from;
7687 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7688 rootType = from->sType;
7689 }
7690 const void* from_pNext = from;
7691 size_t pNext_size = 0u;
7692 while (!pNext_size && from_pNext) {
7693 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7694 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7695 }
7696 to->pNext = nullptr;
7697 if (pNext_size) {
7698 to->pNext = (void*)alloc->alloc(pNext_size);
7699 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7700 }
7701 }
7702
7703 #endif
7704 #ifdef VK_EXT_debug_utils
deepcopy_VkDebugUtilsLabelEXT(Allocator * alloc,VkStructureType rootType,const VkDebugUtilsLabelEXT * from,VkDebugUtilsLabelEXT * to)7705 void deepcopy_VkDebugUtilsLabelEXT(Allocator* alloc, VkStructureType rootType,
7706 const VkDebugUtilsLabelEXT* from, VkDebugUtilsLabelEXT* to) {
7707 (void)alloc;
7708 (void)rootType;
7709 *to = *from;
7710 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7711 rootType = from->sType;
7712 }
7713 const void* from_pNext = from;
7714 size_t pNext_size = 0u;
7715 while (!pNext_size && from_pNext) {
7716 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7717 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7718 }
7719 to->pNext = nullptr;
7720 if (pNext_size) {
7721 to->pNext = (void*)alloc->alloc(pNext_size);
7722 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7723 }
7724 to->pLabelName = nullptr;
7725 if (from->pLabelName) {
7726 to->pLabelName = alloc->strDup(from->pLabelName);
7727 }
7728 memcpy(to->color, from->color, 4 * sizeof(float));
7729 }
7730
deepcopy_VkDebugUtilsObjectNameInfoEXT(Allocator * alloc,VkStructureType rootType,const VkDebugUtilsObjectNameInfoEXT * from,VkDebugUtilsObjectNameInfoEXT * to)7731 void deepcopy_VkDebugUtilsObjectNameInfoEXT(Allocator* alloc, VkStructureType rootType,
7732 const VkDebugUtilsObjectNameInfoEXT* from,
7733 VkDebugUtilsObjectNameInfoEXT* to) {
7734 (void)alloc;
7735 (void)rootType;
7736 *to = *from;
7737 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7738 rootType = from->sType;
7739 }
7740 const void* from_pNext = from;
7741 size_t pNext_size = 0u;
7742 while (!pNext_size && from_pNext) {
7743 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7744 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7745 }
7746 to->pNext = nullptr;
7747 if (pNext_size) {
7748 to->pNext = (void*)alloc->alloc(pNext_size);
7749 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7750 }
7751 to->pObjectName = nullptr;
7752 if (from->pObjectName) {
7753 to->pObjectName = alloc->strDup(from->pObjectName);
7754 }
7755 }
7756
deepcopy_VkDebugUtilsMessengerCallbackDataEXT(Allocator * alloc,VkStructureType rootType,const VkDebugUtilsMessengerCallbackDataEXT * from,VkDebugUtilsMessengerCallbackDataEXT * to)7757 void deepcopy_VkDebugUtilsMessengerCallbackDataEXT(Allocator* alloc, VkStructureType rootType,
7758 const VkDebugUtilsMessengerCallbackDataEXT* from,
7759 VkDebugUtilsMessengerCallbackDataEXT* to) {
7760 (void)alloc;
7761 (void)rootType;
7762 *to = *from;
7763 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7764 rootType = from->sType;
7765 }
7766 const void* from_pNext = from;
7767 size_t pNext_size = 0u;
7768 while (!pNext_size && from_pNext) {
7769 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7770 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7771 }
7772 to->pNext = nullptr;
7773 if (pNext_size) {
7774 to->pNext = (void*)alloc->alloc(pNext_size);
7775 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7776 }
7777 to->pMessageIdName = nullptr;
7778 if (from->pMessageIdName) {
7779 to->pMessageIdName = alloc->strDup(from->pMessageIdName);
7780 }
7781 to->pMessage = nullptr;
7782 if (from->pMessage) {
7783 to->pMessage = alloc->strDup(from->pMessage);
7784 }
7785 if (from) {
7786 to->pQueueLabels = nullptr;
7787 if (from->pQueueLabels) {
7788 to->pQueueLabels = (VkDebugUtilsLabelEXT*)alloc->alloc(
7789 from->queueLabelCount * sizeof(const VkDebugUtilsLabelEXT));
7790 to->queueLabelCount = from->queueLabelCount;
7791 for (uint32_t i = 0; i < (uint32_t)from->queueLabelCount; ++i) {
7792 deepcopy_VkDebugUtilsLabelEXT(alloc, rootType, from->pQueueLabels + i,
7793 (VkDebugUtilsLabelEXT*)(to->pQueueLabels + i));
7794 }
7795 }
7796 }
7797 if (from) {
7798 to->pCmdBufLabels = nullptr;
7799 if (from->pCmdBufLabels) {
7800 to->pCmdBufLabels = (VkDebugUtilsLabelEXT*)alloc->alloc(
7801 from->cmdBufLabelCount * sizeof(const VkDebugUtilsLabelEXT));
7802 to->cmdBufLabelCount = from->cmdBufLabelCount;
7803 for (uint32_t i = 0; i < (uint32_t)from->cmdBufLabelCount; ++i) {
7804 deepcopy_VkDebugUtilsLabelEXT(alloc, rootType, from->pCmdBufLabels + i,
7805 (VkDebugUtilsLabelEXT*)(to->pCmdBufLabels + i));
7806 }
7807 }
7808 }
7809 if (from) {
7810 to->pObjects = nullptr;
7811 if (from->pObjects) {
7812 to->pObjects = (VkDebugUtilsObjectNameInfoEXT*)alloc->alloc(
7813 from->objectCount * sizeof(const VkDebugUtilsObjectNameInfoEXT));
7814 to->objectCount = from->objectCount;
7815 for (uint32_t i = 0; i < (uint32_t)from->objectCount; ++i) {
7816 deepcopy_VkDebugUtilsObjectNameInfoEXT(
7817 alloc, rootType, from->pObjects + i,
7818 (VkDebugUtilsObjectNameInfoEXT*)(to->pObjects + i));
7819 }
7820 }
7821 }
7822 }
7823
deepcopy_VkDebugUtilsMessengerCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkDebugUtilsMessengerCreateInfoEXT * from,VkDebugUtilsMessengerCreateInfoEXT * to)7824 void deepcopy_VkDebugUtilsMessengerCreateInfoEXT(Allocator* alloc, VkStructureType rootType,
7825 const VkDebugUtilsMessengerCreateInfoEXT* from,
7826 VkDebugUtilsMessengerCreateInfoEXT* to) {
7827 (void)alloc;
7828 (void)rootType;
7829 *to = *from;
7830 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7831 rootType = from->sType;
7832 }
7833 const void* from_pNext = from;
7834 size_t pNext_size = 0u;
7835 while (!pNext_size && from_pNext) {
7836 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7837 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7838 }
7839 to->pNext = nullptr;
7840 if (pNext_size) {
7841 to->pNext = (void*)alloc->alloc(pNext_size);
7842 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7843 }
7844 to->pUserData = nullptr;
7845 if (from->pUserData) {
7846 to->pUserData = (void*)alloc->dupArray(from->pUserData, sizeof(uint8_t));
7847 }
7848 }
7849
deepcopy_VkDebugUtilsObjectTagInfoEXT(Allocator * alloc,VkStructureType rootType,const VkDebugUtilsObjectTagInfoEXT * from,VkDebugUtilsObjectTagInfoEXT * to)7850 void deepcopy_VkDebugUtilsObjectTagInfoEXT(Allocator* alloc, VkStructureType rootType,
7851 const VkDebugUtilsObjectTagInfoEXT* from,
7852 VkDebugUtilsObjectTagInfoEXT* to) {
7853 (void)alloc;
7854 (void)rootType;
7855 *to = *from;
7856 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7857 rootType = from->sType;
7858 }
7859 const void* from_pNext = from;
7860 size_t pNext_size = 0u;
7861 while (!pNext_size && from_pNext) {
7862 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7863 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7864 }
7865 to->pNext = nullptr;
7866 if (pNext_size) {
7867 to->pNext = (void*)alloc->alloc(pNext_size);
7868 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7869 }
7870 to->pTag = nullptr;
7871 if (from->pTag) {
7872 to->pTag = (void*)alloc->dupArray(from->pTag, from->tagSize * sizeof(const uint8_t));
7873 }
7874 }
7875
7876 #endif
7877 #ifdef VK_EXT_image_drm_format_modifier
deepcopy_VkDrmFormatModifierPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkDrmFormatModifierPropertiesEXT * from,VkDrmFormatModifierPropertiesEXT * to)7878 void deepcopy_VkDrmFormatModifierPropertiesEXT(Allocator* alloc, VkStructureType rootType,
7879 const VkDrmFormatModifierPropertiesEXT* from,
7880 VkDrmFormatModifierPropertiesEXT* to) {
7881 (void)alloc;
7882 (void)rootType;
7883 *to = *from;
7884 }
7885
deepcopy_VkDrmFormatModifierPropertiesListEXT(Allocator * alloc,VkStructureType rootType,const VkDrmFormatModifierPropertiesListEXT * from,VkDrmFormatModifierPropertiesListEXT * to)7886 void deepcopy_VkDrmFormatModifierPropertiesListEXT(Allocator* alloc, VkStructureType rootType,
7887 const VkDrmFormatModifierPropertiesListEXT* from,
7888 VkDrmFormatModifierPropertiesListEXT* to) {
7889 (void)alloc;
7890 (void)rootType;
7891 *to = *from;
7892 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7893 rootType = from->sType;
7894 }
7895 const void* from_pNext = from;
7896 size_t pNext_size = 0u;
7897 while (!pNext_size && from_pNext) {
7898 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7899 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7900 }
7901 to->pNext = nullptr;
7902 if (pNext_size) {
7903 to->pNext = (void*)alloc->alloc(pNext_size);
7904 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7905 }
7906 if (from) {
7907 to->pDrmFormatModifierProperties = nullptr;
7908 if (from->pDrmFormatModifierProperties) {
7909 to->pDrmFormatModifierProperties = (VkDrmFormatModifierPropertiesEXT*)alloc->alloc(
7910 from->drmFormatModifierCount * sizeof(VkDrmFormatModifierPropertiesEXT));
7911 to->drmFormatModifierCount = from->drmFormatModifierCount;
7912 for (uint32_t i = 0; i < (uint32_t)from->drmFormatModifierCount; ++i) {
7913 deepcopy_VkDrmFormatModifierPropertiesEXT(
7914 alloc, rootType, from->pDrmFormatModifierProperties + i,
7915 (VkDrmFormatModifierPropertiesEXT*)(to->pDrmFormatModifierProperties + i));
7916 }
7917 }
7918 }
7919 }
7920
deepcopy_VkPhysicalDeviceImageDrmFormatModifierInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImageDrmFormatModifierInfoEXT * from,VkPhysicalDeviceImageDrmFormatModifierInfoEXT * to)7921 void deepcopy_VkPhysicalDeviceImageDrmFormatModifierInfoEXT(
7922 Allocator* alloc, VkStructureType rootType,
7923 const VkPhysicalDeviceImageDrmFormatModifierInfoEXT* from,
7924 VkPhysicalDeviceImageDrmFormatModifierInfoEXT* to) {
7925 (void)alloc;
7926 (void)rootType;
7927 *to = *from;
7928 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7929 rootType = from->sType;
7930 }
7931 const void* from_pNext = from;
7932 size_t pNext_size = 0u;
7933 while (!pNext_size && from_pNext) {
7934 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7935 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7936 }
7937 to->pNext = nullptr;
7938 if (pNext_size) {
7939 to->pNext = (void*)alloc->alloc(pNext_size);
7940 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7941 }
7942 to->pQueueFamilyIndices = nullptr;
7943 if (from->pQueueFamilyIndices) {
7944 to->pQueueFamilyIndices = (uint32_t*)alloc->dupArray(
7945 from->pQueueFamilyIndices, from->queueFamilyIndexCount * sizeof(const uint32_t));
7946 }
7947 }
7948
deepcopy_VkImageDrmFormatModifierListCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkImageDrmFormatModifierListCreateInfoEXT * from,VkImageDrmFormatModifierListCreateInfoEXT * to)7949 void deepcopy_VkImageDrmFormatModifierListCreateInfoEXT(
7950 Allocator* alloc, VkStructureType rootType,
7951 const VkImageDrmFormatModifierListCreateInfoEXT* from,
7952 VkImageDrmFormatModifierListCreateInfoEXT* to) {
7953 (void)alloc;
7954 (void)rootType;
7955 *to = *from;
7956 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7957 rootType = from->sType;
7958 }
7959 const void* from_pNext = from;
7960 size_t pNext_size = 0u;
7961 while (!pNext_size && from_pNext) {
7962 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7963 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7964 }
7965 to->pNext = nullptr;
7966 if (pNext_size) {
7967 to->pNext = (void*)alloc->alloc(pNext_size);
7968 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7969 }
7970 to->pDrmFormatModifiers = nullptr;
7971 if (from->pDrmFormatModifiers) {
7972 to->pDrmFormatModifiers = (uint64_t*)alloc->dupArray(
7973 from->pDrmFormatModifiers, from->drmFormatModifierCount * sizeof(const uint64_t));
7974 }
7975 }
7976
deepcopy_VkImageDrmFormatModifierExplicitCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkImageDrmFormatModifierExplicitCreateInfoEXT * from,VkImageDrmFormatModifierExplicitCreateInfoEXT * to)7977 void deepcopy_VkImageDrmFormatModifierExplicitCreateInfoEXT(
7978 Allocator* alloc, VkStructureType rootType,
7979 const VkImageDrmFormatModifierExplicitCreateInfoEXT* from,
7980 VkImageDrmFormatModifierExplicitCreateInfoEXT* to) {
7981 (void)alloc;
7982 (void)rootType;
7983 *to = *from;
7984 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
7985 rootType = from->sType;
7986 }
7987 const void* from_pNext = from;
7988 size_t pNext_size = 0u;
7989 while (!pNext_size && from_pNext) {
7990 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
7991 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
7992 }
7993 to->pNext = nullptr;
7994 if (pNext_size) {
7995 to->pNext = (void*)alloc->alloc(pNext_size);
7996 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
7997 }
7998 if (from) {
7999 to->pPlaneLayouts = nullptr;
8000 if (from->pPlaneLayouts) {
8001 to->pPlaneLayouts = (VkSubresourceLayout*)alloc->alloc(
8002 from->drmFormatModifierPlaneCount * sizeof(const VkSubresourceLayout));
8003 to->drmFormatModifierPlaneCount = from->drmFormatModifierPlaneCount;
8004 for (uint32_t i = 0; i < (uint32_t)from->drmFormatModifierPlaneCount; ++i) {
8005 deepcopy_VkSubresourceLayout(alloc, rootType, from->pPlaneLayouts + i,
8006 (VkSubresourceLayout*)(to->pPlaneLayouts + i));
8007 }
8008 }
8009 }
8010 }
8011
deepcopy_VkImageDrmFormatModifierPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkImageDrmFormatModifierPropertiesEXT * from,VkImageDrmFormatModifierPropertiesEXT * to)8012 void deepcopy_VkImageDrmFormatModifierPropertiesEXT(
8013 Allocator* alloc, VkStructureType rootType, const VkImageDrmFormatModifierPropertiesEXT* from,
8014 VkImageDrmFormatModifierPropertiesEXT* to) {
8015 (void)alloc;
8016 (void)rootType;
8017 *to = *from;
8018 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8019 rootType = from->sType;
8020 }
8021 const void* from_pNext = from;
8022 size_t pNext_size = 0u;
8023 while (!pNext_size && from_pNext) {
8024 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8025 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8026 }
8027 to->pNext = nullptr;
8028 if (pNext_size) {
8029 to->pNext = (void*)alloc->alloc(pNext_size);
8030 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8031 }
8032 }
8033
deepcopy_VkDrmFormatModifierProperties2EXT(Allocator * alloc,VkStructureType rootType,const VkDrmFormatModifierProperties2EXT * from,VkDrmFormatModifierProperties2EXT * to)8034 void deepcopy_VkDrmFormatModifierProperties2EXT(Allocator* alloc, VkStructureType rootType,
8035 const VkDrmFormatModifierProperties2EXT* from,
8036 VkDrmFormatModifierProperties2EXT* to) {
8037 (void)alloc;
8038 (void)rootType;
8039 *to = *from;
8040 }
8041
deepcopy_VkDrmFormatModifierPropertiesList2EXT(Allocator * alloc,VkStructureType rootType,const VkDrmFormatModifierPropertiesList2EXT * from,VkDrmFormatModifierPropertiesList2EXT * to)8042 void deepcopy_VkDrmFormatModifierPropertiesList2EXT(
8043 Allocator* alloc, VkStructureType rootType, const VkDrmFormatModifierPropertiesList2EXT* from,
8044 VkDrmFormatModifierPropertiesList2EXT* to) {
8045 (void)alloc;
8046 (void)rootType;
8047 *to = *from;
8048 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8049 rootType = from->sType;
8050 }
8051 const void* from_pNext = from;
8052 size_t pNext_size = 0u;
8053 while (!pNext_size && from_pNext) {
8054 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8055 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8056 }
8057 to->pNext = nullptr;
8058 if (pNext_size) {
8059 to->pNext = (void*)alloc->alloc(pNext_size);
8060 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8061 }
8062 if (from) {
8063 to->pDrmFormatModifierProperties = nullptr;
8064 if (from->pDrmFormatModifierProperties) {
8065 to->pDrmFormatModifierProperties = (VkDrmFormatModifierProperties2EXT*)alloc->alloc(
8066 from->drmFormatModifierCount * sizeof(VkDrmFormatModifierProperties2EXT));
8067 to->drmFormatModifierCount = from->drmFormatModifierCount;
8068 for (uint32_t i = 0; i < (uint32_t)from->drmFormatModifierCount; ++i) {
8069 deepcopy_VkDrmFormatModifierProperties2EXT(
8070 alloc, rootType, from->pDrmFormatModifierProperties + i,
8071 (VkDrmFormatModifierProperties2EXT*)(to->pDrmFormatModifierProperties + i));
8072 }
8073 }
8074 }
8075 }
8076
8077 #endif
8078 #ifdef VK_EXT_external_memory_host
deepcopy_VkImportMemoryHostPointerInfoEXT(Allocator * alloc,VkStructureType rootType,const VkImportMemoryHostPointerInfoEXT * from,VkImportMemoryHostPointerInfoEXT * to)8079 void deepcopy_VkImportMemoryHostPointerInfoEXT(Allocator* alloc, VkStructureType rootType,
8080 const VkImportMemoryHostPointerInfoEXT* from,
8081 VkImportMemoryHostPointerInfoEXT* to) {
8082 (void)alloc;
8083 (void)rootType;
8084 *to = *from;
8085 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8086 rootType = from->sType;
8087 }
8088 const void* from_pNext = from;
8089 size_t pNext_size = 0u;
8090 while (!pNext_size && from_pNext) {
8091 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8092 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8093 }
8094 to->pNext = nullptr;
8095 if (pNext_size) {
8096 to->pNext = (void*)alloc->alloc(pNext_size);
8097 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8098 }
8099 to->pHostPointer = nullptr;
8100 if (from->pHostPointer) {
8101 to->pHostPointer = (void*)alloc->dupArray(from->pHostPointer, sizeof(uint8_t));
8102 }
8103 }
8104
deepcopy_VkMemoryHostPointerPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkMemoryHostPointerPropertiesEXT * from,VkMemoryHostPointerPropertiesEXT * to)8105 void deepcopy_VkMemoryHostPointerPropertiesEXT(Allocator* alloc, VkStructureType rootType,
8106 const VkMemoryHostPointerPropertiesEXT* from,
8107 VkMemoryHostPointerPropertiesEXT* to) {
8108 (void)alloc;
8109 (void)rootType;
8110 *to = *from;
8111 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8112 rootType = from->sType;
8113 }
8114 const void* from_pNext = from;
8115 size_t pNext_size = 0u;
8116 while (!pNext_size && from_pNext) {
8117 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8118 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8119 }
8120 to->pNext = nullptr;
8121 if (pNext_size) {
8122 to->pNext = (void*)alloc->alloc(pNext_size);
8123 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8124 }
8125 }
8126
deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExternalMemoryHostPropertiesEXT * from,VkPhysicalDeviceExternalMemoryHostPropertiesEXT * to)8127 void deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
8128 Allocator* alloc, VkStructureType rootType,
8129 const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* from,
8130 VkPhysicalDeviceExternalMemoryHostPropertiesEXT* to) {
8131 (void)alloc;
8132 (void)rootType;
8133 *to = *from;
8134 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8135 rootType = from->sType;
8136 }
8137 const void* from_pNext = from;
8138 size_t pNext_size = 0u;
8139 while (!pNext_size && from_pNext) {
8140 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8141 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8142 }
8143 to->pNext = nullptr;
8144 if (pNext_size) {
8145 to->pNext = (void*)alloc->alloc(pNext_size);
8146 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8147 }
8148 }
8149
8150 #endif
8151 #ifdef VK_EXT_vertex_attribute_divisor
deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * from,VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * to)8152 void deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
8153 Allocator* alloc, VkStructureType rootType,
8154 const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* from,
8155 VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* to) {
8156 (void)alloc;
8157 (void)rootType;
8158 *to = *from;
8159 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8160 rootType = from->sType;
8161 }
8162 const void* from_pNext = from;
8163 size_t pNext_size = 0u;
8164 while (!pNext_size && from_pNext) {
8165 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8166 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8167 }
8168 to->pNext = nullptr;
8169 if (pNext_size) {
8170 to->pNext = (void*)alloc->alloc(pNext_size);
8171 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8172 }
8173 }
8174
deepcopy_VkVertexInputBindingDivisorDescriptionEXT(Allocator * alloc,VkStructureType rootType,const VkVertexInputBindingDivisorDescriptionEXT * from,VkVertexInputBindingDivisorDescriptionEXT * to)8175 void deepcopy_VkVertexInputBindingDivisorDescriptionEXT(
8176 Allocator* alloc, VkStructureType rootType,
8177 const VkVertexInputBindingDivisorDescriptionEXT* from,
8178 VkVertexInputBindingDivisorDescriptionEXT* to) {
8179 (void)alloc;
8180 (void)rootType;
8181 *to = *from;
8182 }
8183
deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPipelineVertexInputDivisorStateCreateInfoEXT * from,VkPipelineVertexInputDivisorStateCreateInfoEXT * to)8184 void deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(
8185 Allocator* alloc, VkStructureType rootType,
8186 const VkPipelineVertexInputDivisorStateCreateInfoEXT* from,
8187 VkPipelineVertexInputDivisorStateCreateInfoEXT* to) {
8188 (void)alloc;
8189 (void)rootType;
8190 *to = *from;
8191 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8192 rootType = from->sType;
8193 }
8194 const void* from_pNext = from;
8195 size_t pNext_size = 0u;
8196 while (!pNext_size && from_pNext) {
8197 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8198 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8199 }
8200 to->pNext = nullptr;
8201 if (pNext_size) {
8202 to->pNext = (void*)alloc->alloc(pNext_size);
8203 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8204 }
8205 if (from) {
8206 to->pVertexBindingDivisors = nullptr;
8207 if (from->pVertexBindingDivisors) {
8208 to->pVertexBindingDivisors = (VkVertexInputBindingDivisorDescriptionEXT*)alloc->alloc(
8209 from->vertexBindingDivisorCount *
8210 sizeof(const VkVertexInputBindingDivisorDescriptionEXT));
8211 to->vertexBindingDivisorCount = from->vertexBindingDivisorCount;
8212 for (uint32_t i = 0; i < (uint32_t)from->vertexBindingDivisorCount; ++i) {
8213 deepcopy_VkVertexInputBindingDivisorDescriptionEXT(
8214 alloc, rootType, from->pVertexBindingDivisors + i,
8215 (VkVertexInputBindingDivisorDescriptionEXT*)(to->pVertexBindingDivisors + i));
8216 }
8217 }
8218 }
8219 }
8220
deepcopy_VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT * from,VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT * to)8221 void deepcopy_VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT(
8222 Allocator* alloc, VkStructureType rootType,
8223 const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT* from,
8224 VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT* to) {
8225 (void)alloc;
8226 (void)rootType;
8227 *to = *from;
8228 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8229 rootType = from->sType;
8230 }
8231 const void* from_pNext = from;
8232 size_t pNext_size = 0u;
8233 while (!pNext_size && from_pNext) {
8234 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8235 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8236 }
8237 to->pNext = nullptr;
8238 if (pNext_size) {
8239 to->pNext = (void*)alloc->alloc(pNext_size);
8240 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8241 }
8242 }
8243
8244 #endif
8245 #ifdef VK_EXT_fragment_density_map
deepcopy_VkPhysicalDeviceFragmentDensityMapFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceFragmentDensityMapFeaturesEXT * from,VkPhysicalDeviceFragmentDensityMapFeaturesEXT * to)8246 void deepcopy_VkPhysicalDeviceFragmentDensityMapFeaturesEXT(
8247 Allocator* alloc, VkStructureType rootType,
8248 const VkPhysicalDeviceFragmentDensityMapFeaturesEXT* from,
8249 VkPhysicalDeviceFragmentDensityMapFeaturesEXT* to) {
8250 (void)alloc;
8251 (void)rootType;
8252 *to = *from;
8253 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8254 rootType = from->sType;
8255 }
8256 const void* from_pNext = from;
8257 size_t pNext_size = 0u;
8258 while (!pNext_size && from_pNext) {
8259 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8260 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8261 }
8262 to->pNext = nullptr;
8263 if (pNext_size) {
8264 to->pNext = (void*)alloc->alloc(pNext_size);
8265 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8266 }
8267 }
8268
deepcopy_VkPhysicalDeviceFragmentDensityMapPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceFragmentDensityMapPropertiesEXT * from,VkPhysicalDeviceFragmentDensityMapPropertiesEXT * to)8269 void deepcopy_VkPhysicalDeviceFragmentDensityMapPropertiesEXT(
8270 Allocator* alloc, VkStructureType rootType,
8271 const VkPhysicalDeviceFragmentDensityMapPropertiesEXT* from,
8272 VkPhysicalDeviceFragmentDensityMapPropertiesEXT* to) {
8273 (void)alloc;
8274 (void)rootType;
8275 *to = *from;
8276 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8277 rootType = from->sType;
8278 }
8279 const void* from_pNext = from;
8280 size_t pNext_size = 0u;
8281 while (!pNext_size && from_pNext) {
8282 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8283 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8284 }
8285 to->pNext = nullptr;
8286 if (pNext_size) {
8287 to->pNext = (void*)alloc->alloc(pNext_size);
8288 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8289 }
8290 deepcopy_VkExtent2D(alloc, rootType, &from->minFragmentDensityTexelSize,
8291 (VkExtent2D*)(&to->minFragmentDensityTexelSize));
8292 deepcopy_VkExtent2D(alloc, rootType, &from->maxFragmentDensityTexelSize,
8293 (VkExtent2D*)(&to->maxFragmentDensityTexelSize));
8294 }
8295
deepcopy_VkRenderPassFragmentDensityMapCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkRenderPassFragmentDensityMapCreateInfoEXT * from,VkRenderPassFragmentDensityMapCreateInfoEXT * to)8296 void deepcopy_VkRenderPassFragmentDensityMapCreateInfoEXT(
8297 Allocator* alloc, VkStructureType rootType,
8298 const VkRenderPassFragmentDensityMapCreateInfoEXT* from,
8299 VkRenderPassFragmentDensityMapCreateInfoEXT* to) {
8300 (void)alloc;
8301 (void)rootType;
8302 *to = *from;
8303 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8304 rootType = from->sType;
8305 }
8306 const void* from_pNext = from;
8307 size_t pNext_size = 0u;
8308 while (!pNext_size && from_pNext) {
8309 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8310 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8311 }
8312 to->pNext = nullptr;
8313 if (pNext_size) {
8314 to->pNext = (void*)alloc->alloc(pNext_size);
8315 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8316 }
8317 deepcopy_VkAttachmentReference(alloc, rootType, &from->fragmentDensityMapAttachment,
8318 (VkAttachmentReference*)(&to->fragmentDensityMapAttachment));
8319 }
8320
8321 #endif
8322 #ifdef VK_EXT_validation_features
deepcopy_VkValidationFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkValidationFeaturesEXT * from,VkValidationFeaturesEXT * to)8323 void deepcopy_VkValidationFeaturesEXT(Allocator* alloc, VkStructureType rootType,
8324 const VkValidationFeaturesEXT* from,
8325 VkValidationFeaturesEXT* to) {
8326 (void)alloc;
8327 (void)rootType;
8328 *to = *from;
8329 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8330 rootType = from->sType;
8331 }
8332 const void* from_pNext = from;
8333 size_t pNext_size = 0u;
8334 while (!pNext_size && from_pNext) {
8335 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8336 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8337 }
8338 to->pNext = nullptr;
8339 if (pNext_size) {
8340 to->pNext = (void*)alloc->alloc(pNext_size);
8341 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8342 }
8343 to->pEnabledValidationFeatures = nullptr;
8344 if (from->pEnabledValidationFeatures) {
8345 to->pEnabledValidationFeatures = (VkValidationFeatureEnableEXT*)alloc->dupArray(
8346 from->pEnabledValidationFeatures,
8347 from->enabledValidationFeatureCount * sizeof(const VkValidationFeatureEnableEXT));
8348 }
8349 to->pDisabledValidationFeatures = nullptr;
8350 if (from->pDisabledValidationFeatures) {
8351 to->pDisabledValidationFeatures = (VkValidationFeatureDisableEXT*)alloc->dupArray(
8352 from->pDisabledValidationFeatures,
8353 from->disabledValidationFeatureCount * sizeof(const VkValidationFeatureDisableEXT));
8354 }
8355 }
8356
8357 #endif
8358 #ifdef VK_EXT_provoking_vertex
deepcopy_VkPhysicalDeviceProvokingVertexFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProvokingVertexFeaturesEXT * from,VkPhysicalDeviceProvokingVertexFeaturesEXT * to)8359 void deepcopy_VkPhysicalDeviceProvokingVertexFeaturesEXT(
8360 Allocator* alloc, VkStructureType rootType,
8361 const VkPhysicalDeviceProvokingVertexFeaturesEXT* from,
8362 VkPhysicalDeviceProvokingVertexFeaturesEXT* to) {
8363 (void)alloc;
8364 (void)rootType;
8365 *to = *from;
8366 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8367 rootType = from->sType;
8368 }
8369 const void* from_pNext = from;
8370 size_t pNext_size = 0u;
8371 while (!pNext_size && from_pNext) {
8372 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8373 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8374 }
8375 to->pNext = nullptr;
8376 if (pNext_size) {
8377 to->pNext = (void*)alloc->alloc(pNext_size);
8378 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8379 }
8380 }
8381
deepcopy_VkPhysicalDeviceProvokingVertexPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceProvokingVertexPropertiesEXT * from,VkPhysicalDeviceProvokingVertexPropertiesEXT * to)8382 void deepcopy_VkPhysicalDeviceProvokingVertexPropertiesEXT(
8383 Allocator* alloc, VkStructureType rootType,
8384 const VkPhysicalDeviceProvokingVertexPropertiesEXT* from,
8385 VkPhysicalDeviceProvokingVertexPropertiesEXT* to) {
8386 (void)alloc;
8387 (void)rootType;
8388 *to = *from;
8389 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8390 rootType = from->sType;
8391 }
8392 const void* from_pNext = from;
8393 size_t pNext_size = 0u;
8394 while (!pNext_size && from_pNext) {
8395 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8396 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8397 }
8398 to->pNext = nullptr;
8399 if (pNext_size) {
8400 to->pNext = (void*)alloc->alloc(pNext_size);
8401 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8402 }
8403 }
8404
deepcopy_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPipelineRasterizationProvokingVertexStateCreateInfoEXT * from,VkPipelineRasterizationProvokingVertexStateCreateInfoEXT * to)8405 void deepcopy_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(
8406 Allocator* alloc, VkStructureType rootType,
8407 const VkPipelineRasterizationProvokingVertexStateCreateInfoEXT* from,
8408 VkPipelineRasterizationProvokingVertexStateCreateInfoEXT* to) {
8409 (void)alloc;
8410 (void)rootType;
8411 *to = *from;
8412 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8413 rootType = from->sType;
8414 }
8415 const void* from_pNext = from;
8416 size_t pNext_size = 0u;
8417 while (!pNext_size && from_pNext) {
8418 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8419 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8420 }
8421 to->pNext = nullptr;
8422 if (pNext_size) {
8423 to->pNext = (void*)alloc->alloc(pNext_size);
8424 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8425 }
8426 }
8427
8428 #endif
8429 #ifdef VK_EXT_index_type_uint8
deepcopy_VkPhysicalDeviceIndexTypeUint8FeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceIndexTypeUint8FeaturesEXT * from,VkPhysicalDeviceIndexTypeUint8FeaturesEXT * to)8430 void deepcopy_VkPhysicalDeviceIndexTypeUint8FeaturesEXT(
8431 Allocator* alloc, VkStructureType rootType,
8432 const VkPhysicalDeviceIndexTypeUint8FeaturesEXT* from,
8433 VkPhysicalDeviceIndexTypeUint8FeaturesEXT* to) {
8434 (void)alloc;
8435 (void)rootType;
8436 *to = *from;
8437 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8438 rootType = from->sType;
8439 }
8440 const void* from_pNext = from;
8441 size_t pNext_size = 0u;
8442 while (!pNext_size && from_pNext) {
8443 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8444 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8445 }
8446 to->pNext = nullptr;
8447 if (pNext_size) {
8448 to->pNext = (void*)alloc->alloc(pNext_size);
8449 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8450 }
8451 }
8452
8453 #endif
8454 #ifdef VK_EXT_extended_dynamic_state
deepcopy_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT * from,VkPhysicalDeviceExtendedDynamicStateFeaturesEXT * to)8455 void deepcopy_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(
8456 Allocator* alloc, VkStructureType rootType,
8457 const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT* from,
8458 VkPhysicalDeviceExtendedDynamicStateFeaturesEXT* to) {
8459 (void)alloc;
8460 (void)rootType;
8461 *to = *from;
8462 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8463 rootType = from->sType;
8464 }
8465 const void* from_pNext = from;
8466 size_t pNext_size = 0u;
8467 while (!pNext_size && from_pNext) {
8468 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8469 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8470 }
8471 to->pNext = nullptr;
8472 if (pNext_size) {
8473 to->pNext = (void*)alloc->alloc(pNext_size);
8474 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8475 }
8476 }
8477
8478 #endif
8479 #ifdef VK_EXT_host_image_copy
deepcopy_VkPhysicalDeviceHostImageCopyFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceHostImageCopyFeaturesEXT * from,VkPhysicalDeviceHostImageCopyFeaturesEXT * to)8480 void deepcopy_VkPhysicalDeviceHostImageCopyFeaturesEXT(
8481 Allocator* alloc, VkStructureType rootType,
8482 const VkPhysicalDeviceHostImageCopyFeaturesEXT* from,
8483 VkPhysicalDeviceHostImageCopyFeaturesEXT* to) {
8484 (void)alloc;
8485 (void)rootType;
8486 *to = *from;
8487 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8488 rootType = from->sType;
8489 }
8490 const void* from_pNext = from;
8491 size_t pNext_size = 0u;
8492 while (!pNext_size && from_pNext) {
8493 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8494 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8495 }
8496 to->pNext = nullptr;
8497 if (pNext_size) {
8498 to->pNext = (void*)alloc->alloc(pNext_size);
8499 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8500 }
8501 }
8502
deepcopy_VkPhysicalDeviceHostImageCopyPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceHostImageCopyPropertiesEXT * from,VkPhysicalDeviceHostImageCopyPropertiesEXT * to)8503 void deepcopy_VkPhysicalDeviceHostImageCopyPropertiesEXT(
8504 Allocator* alloc, VkStructureType rootType,
8505 const VkPhysicalDeviceHostImageCopyPropertiesEXT* from,
8506 VkPhysicalDeviceHostImageCopyPropertiesEXT* to) {
8507 (void)alloc;
8508 (void)rootType;
8509 *to = *from;
8510 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8511 rootType = from->sType;
8512 }
8513 const void* from_pNext = from;
8514 size_t pNext_size = 0u;
8515 while (!pNext_size && from_pNext) {
8516 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8517 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8518 }
8519 to->pNext = nullptr;
8520 if (pNext_size) {
8521 to->pNext = (void*)alloc->alloc(pNext_size);
8522 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8523 }
8524 to->pCopySrcLayouts = nullptr;
8525 if (from->pCopySrcLayouts) {
8526 to->pCopySrcLayouts = (VkImageLayout*)alloc->dupArray(
8527 from->pCopySrcLayouts, from->copySrcLayoutCount * sizeof(VkImageLayout));
8528 }
8529 to->pCopyDstLayouts = nullptr;
8530 if (from->pCopyDstLayouts) {
8531 to->pCopyDstLayouts = (VkImageLayout*)alloc->dupArray(
8532 from->pCopyDstLayouts, from->copyDstLayoutCount * sizeof(VkImageLayout));
8533 }
8534 memcpy(to->optimalTilingLayoutUUID, from->optimalTilingLayoutUUID,
8535 VK_UUID_SIZE * sizeof(uint8_t));
8536 }
8537
deepcopy_VkMemoryToImageCopyEXT(Allocator * alloc,VkStructureType rootType,const VkMemoryToImageCopyEXT * from,VkMemoryToImageCopyEXT * to)8538 void deepcopy_VkMemoryToImageCopyEXT(Allocator* alloc, VkStructureType rootType,
8539 const VkMemoryToImageCopyEXT* from,
8540 VkMemoryToImageCopyEXT* to) {
8541 (void)alloc;
8542 (void)rootType;
8543 *to = *from;
8544 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8545 rootType = from->sType;
8546 }
8547 const void* from_pNext = from;
8548 size_t pNext_size = 0u;
8549 while (!pNext_size && from_pNext) {
8550 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8551 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8552 }
8553 to->pNext = nullptr;
8554 if (pNext_size) {
8555 to->pNext = (void*)alloc->alloc(pNext_size);
8556 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8557 }
8558 to->pHostPointer = nullptr;
8559 if (from->pHostPointer) {
8560 to->pHostPointer = (void*)alloc->dupArray(from->pHostPointer, sizeof(const uint8_t));
8561 }
8562 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->imageSubresource,
8563 (VkImageSubresourceLayers*)(&to->imageSubresource));
8564 deepcopy_VkOffset3D(alloc, rootType, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
8565 deepcopy_VkExtent3D(alloc, rootType, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
8566 }
8567
deepcopy_VkImageToMemoryCopyEXT(Allocator * alloc,VkStructureType rootType,const VkImageToMemoryCopyEXT * from,VkImageToMemoryCopyEXT * to)8568 void deepcopy_VkImageToMemoryCopyEXT(Allocator* alloc, VkStructureType rootType,
8569 const VkImageToMemoryCopyEXT* from,
8570 VkImageToMemoryCopyEXT* to) {
8571 (void)alloc;
8572 (void)rootType;
8573 *to = *from;
8574 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8575 rootType = from->sType;
8576 }
8577 const void* from_pNext = from;
8578 size_t pNext_size = 0u;
8579 while (!pNext_size && from_pNext) {
8580 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8581 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8582 }
8583 to->pNext = nullptr;
8584 if (pNext_size) {
8585 to->pNext = (void*)alloc->alloc(pNext_size);
8586 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8587 }
8588 to->pHostPointer = nullptr;
8589 if (from->pHostPointer) {
8590 to->pHostPointer = (void*)alloc->dupArray(from->pHostPointer, sizeof(uint8_t));
8591 }
8592 deepcopy_VkImageSubresourceLayers(alloc, rootType, &from->imageSubresource,
8593 (VkImageSubresourceLayers*)(&to->imageSubresource));
8594 deepcopy_VkOffset3D(alloc, rootType, &from->imageOffset, (VkOffset3D*)(&to->imageOffset));
8595 deepcopy_VkExtent3D(alloc, rootType, &from->imageExtent, (VkExtent3D*)(&to->imageExtent));
8596 }
8597
deepcopy_VkCopyMemoryToImageInfoEXT(Allocator * alloc,VkStructureType rootType,const VkCopyMemoryToImageInfoEXT * from,VkCopyMemoryToImageInfoEXT * to)8598 void deepcopy_VkCopyMemoryToImageInfoEXT(Allocator* alloc, VkStructureType rootType,
8599 const VkCopyMemoryToImageInfoEXT* from,
8600 VkCopyMemoryToImageInfoEXT* to) {
8601 (void)alloc;
8602 (void)rootType;
8603 *to = *from;
8604 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8605 rootType = from->sType;
8606 }
8607 const void* from_pNext = from;
8608 size_t pNext_size = 0u;
8609 while (!pNext_size && from_pNext) {
8610 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8611 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8612 }
8613 to->pNext = nullptr;
8614 if (pNext_size) {
8615 to->pNext = (void*)alloc->alloc(pNext_size);
8616 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8617 }
8618 if (from) {
8619 to->pRegions = nullptr;
8620 if (from->pRegions) {
8621 to->pRegions = (VkMemoryToImageCopyEXT*)alloc->alloc(
8622 from->regionCount * sizeof(const VkMemoryToImageCopyEXT));
8623 to->regionCount = from->regionCount;
8624 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
8625 deepcopy_VkMemoryToImageCopyEXT(alloc, rootType, from->pRegions + i,
8626 (VkMemoryToImageCopyEXT*)(to->pRegions + i));
8627 }
8628 }
8629 }
8630 }
8631
deepcopy_VkCopyImageToMemoryInfoEXT(Allocator * alloc,VkStructureType rootType,const VkCopyImageToMemoryInfoEXT * from,VkCopyImageToMemoryInfoEXT * to)8632 void deepcopy_VkCopyImageToMemoryInfoEXT(Allocator* alloc, VkStructureType rootType,
8633 const VkCopyImageToMemoryInfoEXT* from,
8634 VkCopyImageToMemoryInfoEXT* to) {
8635 (void)alloc;
8636 (void)rootType;
8637 *to = *from;
8638 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8639 rootType = from->sType;
8640 }
8641 const void* from_pNext = from;
8642 size_t pNext_size = 0u;
8643 while (!pNext_size && from_pNext) {
8644 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8645 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8646 }
8647 to->pNext = nullptr;
8648 if (pNext_size) {
8649 to->pNext = (void*)alloc->alloc(pNext_size);
8650 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8651 }
8652 if (from) {
8653 to->pRegions = nullptr;
8654 if (from->pRegions) {
8655 to->pRegions = (VkImageToMemoryCopyEXT*)alloc->alloc(
8656 from->regionCount * sizeof(const VkImageToMemoryCopyEXT));
8657 to->regionCount = from->regionCount;
8658 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
8659 deepcopy_VkImageToMemoryCopyEXT(alloc, rootType, from->pRegions + i,
8660 (VkImageToMemoryCopyEXT*)(to->pRegions + i));
8661 }
8662 }
8663 }
8664 }
8665
deepcopy_VkCopyImageToImageInfoEXT(Allocator * alloc,VkStructureType rootType,const VkCopyImageToImageInfoEXT * from,VkCopyImageToImageInfoEXT * to)8666 void deepcopy_VkCopyImageToImageInfoEXT(Allocator* alloc, VkStructureType rootType,
8667 const VkCopyImageToImageInfoEXT* from,
8668 VkCopyImageToImageInfoEXT* to) {
8669 (void)alloc;
8670 (void)rootType;
8671 *to = *from;
8672 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8673 rootType = from->sType;
8674 }
8675 const void* from_pNext = from;
8676 size_t pNext_size = 0u;
8677 while (!pNext_size && from_pNext) {
8678 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8679 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8680 }
8681 to->pNext = nullptr;
8682 if (pNext_size) {
8683 to->pNext = (void*)alloc->alloc(pNext_size);
8684 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8685 }
8686 if (from) {
8687 to->pRegions = nullptr;
8688 if (from->pRegions) {
8689 to->pRegions =
8690 (VkImageCopy2*)alloc->alloc(from->regionCount * sizeof(const VkImageCopy2));
8691 to->regionCount = from->regionCount;
8692 for (uint32_t i = 0; i < (uint32_t)from->regionCount; ++i) {
8693 deepcopy_VkImageCopy2(alloc, rootType, from->pRegions + i,
8694 (VkImageCopy2*)(to->pRegions + i));
8695 }
8696 }
8697 }
8698 }
8699
deepcopy_VkHostImageLayoutTransitionInfoEXT(Allocator * alloc,VkStructureType rootType,const VkHostImageLayoutTransitionInfoEXT * from,VkHostImageLayoutTransitionInfoEXT * to)8700 void deepcopy_VkHostImageLayoutTransitionInfoEXT(Allocator* alloc, VkStructureType rootType,
8701 const VkHostImageLayoutTransitionInfoEXT* from,
8702 VkHostImageLayoutTransitionInfoEXT* to) {
8703 (void)alloc;
8704 (void)rootType;
8705 *to = *from;
8706 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8707 rootType = from->sType;
8708 }
8709 const void* from_pNext = from;
8710 size_t pNext_size = 0u;
8711 while (!pNext_size && from_pNext) {
8712 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8713 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8714 }
8715 to->pNext = nullptr;
8716 if (pNext_size) {
8717 to->pNext = (void*)alloc->alloc(pNext_size);
8718 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8719 }
8720 deepcopy_VkImageSubresourceRange(alloc, rootType, &from->subresourceRange,
8721 (VkImageSubresourceRange*)(&to->subresourceRange));
8722 }
8723
deepcopy_VkSubresourceHostMemcpySizeEXT(Allocator * alloc,VkStructureType rootType,const VkSubresourceHostMemcpySizeEXT * from,VkSubresourceHostMemcpySizeEXT * to)8724 void deepcopy_VkSubresourceHostMemcpySizeEXT(Allocator* alloc, VkStructureType rootType,
8725 const VkSubresourceHostMemcpySizeEXT* from,
8726 VkSubresourceHostMemcpySizeEXT* to) {
8727 (void)alloc;
8728 (void)rootType;
8729 *to = *from;
8730 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8731 rootType = from->sType;
8732 }
8733 const void* from_pNext = from;
8734 size_t pNext_size = 0u;
8735 while (!pNext_size && from_pNext) {
8736 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8737 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8738 }
8739 to->pNext = nullptr;
8740 if (pNext_size) {
8741 to->pNext = (void*)alloc->alloc(pNext_size);
8742 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8743 }
8744 }
8745
deepcopy_VkHostImageCopyDevicePerformanceQueryEXT(Allocator * alloc,VkStructureType rootType,const VkHostImageCopyDevicePerformanceQueryEXT * from,VkHostImageCopyDevicePerformanceQueryEXT * to)8746 void deepcopy_VkHostImageCopyDevicePerformanceQueryEXT(
8747 Allocator* alloc, VkStructureType rootType,
8748 const VkHostImageCopyDevicePerformanceQueryEXT* from,
8749 VkHostImageCopyDevicePerformanceQueryEXT* to) {
8750 (void)alloc;
8751 (void)rootType;
8752 *to = *from;
8753 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8754 rootType = from->sType;
8755 }
8756 const void* from_pNext = from;
8757 size_t pNext_size = 0u;
8758 while (!pNext_size && from_pNext) {
8759 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8760 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8761 }
8762 to->pNext = nullptr;
8763 if (pNext_size) {
8764 to->pNext = (void*)alloc->alloc(pNext_size);
8765 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8766 }
8767 }
8768
8769 #endif
8770 #ifdef VK_EXT_swapchain_maintenance1
deepcopy_VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT * from,VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT * to)8771 void deepcopy_VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(
8772 Allocator* alloc, VkStructureType rootType,
8773 const VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT* from,
8774 VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT* to) {
8775 (void)alloc;
8776 (void)rootType;
8777 *to = *from;
8778 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8779 rootType = from->sType;
8780 }
8781 const void* from_pNext = from;
8782 size_t pNext_size = 0u;
8783 while (!pNext_size && from_pNext) {
8784 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8785 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8786 }
8787 to->pNext = nullptr;
8788 if (pNext_size) {
8789 to->pNext = (void*)alloc->alloc(pNext_size);
8790 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8791 }
8792 }
8793
deepcopy_VkSwapchainPresentFenceInfoEXT(Allocator * alloc,VkStructureType rootType,const VkSwapchainPresentFenceInfoEXT * from,VkSwapchainPresentFenceInfoEXT * to)8794 void deepcopy_VkSwapchainPresentFenceInfoEXT(Allocator* alloc, VkStructureType rootType,
8795 const VkSwapchainPresentFenceInfoEXT* from,
8796 VkSwapchainPresentFenceInfoEXT* to) {
8797 (void)alloc;
8798 (void)rootType;
8799 *to = *from;
8800 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8801 rootType = from->sType;
8802 }
8803 const void* from_pNext = from;
8804 size_t pNext_size = 0u;
8805 while (!pNext_size && from_pNext) {
8806 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8807 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8808 }
8809 to->pNext = nullptr;
8810 if (pNext_size) {
8811 to->pNext = (void*)alloc->alloc(pNext_size);
8812 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8813 }
8814 to->pFences = nullptr;
8815 if (from->pFences) {
8816 to->pFences =
8817 (VkFence*)alloc->dupArray(from->pFences, from->swapchainCount * sizeof(const VkFence));
8818 }
8819 }
8820
deepcopy_VkSwapchainPresentModesCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkSwapchainPresentModesCreateInfoEXT * from,VkSwapchainPresentModesCreateInfoEXT * to)8821 void deepcopy_VkSwapchainPresentModesCreateInfoEXT(Allocator* alloc, VkStructureType rootType,
8822 const VkSwapchainPresentModesCreateInfoEXT* from,
8823 VkSwapchainPresentModesCreateInfoEXT* to) {
8824 (void)alloc;
8825 (void)rootType;
8826 *to = *from;
8827 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8828 rootType = from->sType;
8829 }
8830 const void* from_pNext = from;
8831 size_t pNext_size = 0u;
8832 while (!pNext_size && from_pNext) {
8833 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8834 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8835 }
8836 to->pNext = nullptr;
8837 if (pNext_size) {
8838 to->pNext = (void*)alloc->alloc(pNext_size);
8839 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8840 }
8841 to->pPresentModes = nullptr;
8842 if (from->pPresentModes) {
8843 to->pPresentModes = (VkPresentModeKHR*)alloc->dupArray(
8844 from->pPresentModes, from->presentModeCount * sizeof(const VkPresentModeKHR));
8845 }
8846 }
8847
deepcopy_VkSwapchainPresentModeInfoEXT(Allocator * alloc,VkStructureType rootType,const VkSwapchainPresentModeInfoEXT * from,VkSwapchainPresentModeInfoEXT * to)8848 void deepcopy_VkSwapchainPresentModeInfoEXT(Allocator* alloc, VkStructureType rootType,
8849 const VkSwapchainPresentModeInfoEXT* from,
8850 VkSwapchainPresentModeInfoEXT* to) {
8851 (void)alloc;
8852 (void)rootType;
8853 *to = *from;
8854 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8855 rootType = from->sType;
8856 }
8857 const void* from_pNext = from;
8858 size_t pNext_size = 0u;
8859 while (!pNext_size && from_pNext) {
8860 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8861 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8862 }
8863 to->pNext = nullptr;
8864 if (pNext_size) {
8865 to->pNext = (void*)alloc->alloc(pNext_size);
8866 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8867 }
8868 to->pPresentModes = nullptr;
8869 if (from->pPresentModes) {
8870 to->pPresentModes = (VkPresentModeKHR*)alloc->dupArray(
8871 from->pPresentModes, from->swapchainCount * sizeof(const VkPresentModeKHR));
8872 }
8873 }
8874
deepcopy_VkSwapchainPresentScalingCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkSwapchainPresentScalingCreateInfoEXT * from,VkSwapchainPresentScalingCreateInfoEXT * to)8875 void deepcopy_VkSwapchainPresentScalingCreateInfoEXT(
8876 Allocator* alloc, VkStructureType rootType, const VkSwapchainPresentScalingCreateInfoEXT* from,
8877 VkSwapchainPresentScalingCreateInfoEXT* to) {
8878 (void)alloc;
8879 (void)rootType;
8880 *to = *from;
8881 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8882 rootType = from->sType;
8883 }
8884 const void* from_pNext = from;
8885 size_t pNext_size = 0u;
8886 while (!pNext_size && from_pNext) {
8887 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8888 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8889 }
8890 to->pNext = nullptr;
8891 if (pNext_size) {
8892 to->pNext = (void*)alloc->alloc(pNext_size);
8893 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8894 }
8895 }
8896
deepcopy_VkReleaseSwapchainImagesInfoEXT(Allocator * alloc,VkStructureType rootType,const VkReleaseSwapchainImagesInfoEXT * from,VkReleaseSwapchainImagesInfoEXT * to)8897 void deepcopy_VkReleaseSwapchainImagesInfoEXT(Allocator* alloc, VkStructureType rootType,
8898 const VkReleaseSwapchainImagesInfoEXT* from,
8899 VkReleaseSwapchainImagesInfoEXT* to) {
8900 (void)alloc;
8901 (void)rootType;
8902 *to = *from;
8903 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8904 rootType = from->sType;
8905 }
8906 const void* from_pNext = from;
8907 size_t pNext_size = 0u;
8908 while (!pNext_size && from_pNext) {
8909 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8910 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8911 }
8912 to->pNext = nullptr;
8913 if (pNext_size) {
8914 to->pNext = (void*)alloc->alloc(pNext_size);
8915 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8916 }
8917 to->pImageIndices = nullptr;
8918 if (from->pImageIndices) {
8919 to->pImageIndices = (uint32_t*)alloc->dupArray(
8920 from->pImageIndices, from->imageIndexCount * sizeof(const uint32_t));
8921 }
8922 }
8923
8924 #endif
8925 #ifdef VK_EXT_texel_buffer_alignment
deepcopy_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT * from,VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT * to)8926 void deepcopy_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(
8927 Allocator* alloc, VkStructureType rootType,
8928 const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT* from,
8929 VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT* to) {
8930 (void)alloc;
8931 (void)rootType;
8932 *to = *from;
8933 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8934 rootType = from->sType;
8935 }
8936 const void* from_pNext = from;
8937 size_t pNext_size = 0u;
8938 while (!pNext_size && from_pNext) {
8939 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8940 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8941 }
8942 to->pNext = nullptr;
8943 if (pNext_size) {
8944 to->pNext = (void*)alloc->alloc(pNext_size);
8945 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8946 }
8947 }
8948
8949 #endif
8950 #ifdef VK_EXT_device_memory_report
deepcopy_VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceDeviceMemoryReportFeaturesEXT * from,VkPhysicalDeviceDeviceMemoryReportFeaturesEXT * to)8951 void deepcopy_VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(
8952 Allocator* alloc, VkStructureType rootType,
8953 const VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* from,
8954 VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* to) {
8955 (void)alloc;
8956 (void)rootType;
8957 *to = *from;
8958 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8959 rootType = from->sType;
8960 }
8961 const void* from_pNext = from;
8962 size_t pNext_size = 0u;
8963 while (!pNext_size && from_pNext) {
8964 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8965 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8966 }
8967 to->pNext = nullptr;
8968 if (pNext_size) {
8969 to->pNext = (void*)alloc->alloc(pNext_size);
8970 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8971 }
8972 }
8973
deepcopy_VkDeviceMemoryReportCallbackDataEXT(Allocator * alloc,VkStructureType rootType,const VkDeviceMemoryReportCallbackDataEXT * from,VkDeviceMemoryReportCallbackDataEXT * to)8974 void deepcopy_VkDeviceMemoryReportCallbackDataEXT(Allocator* alloc, VkStructureType rootType,
8975 const VkDeviceMemoryReportCallbackDataEXT* from,
8976 VkDeviceMemoryReportCallbackDataEXT* to) {
8977 (void)alloc;
8978 (void)rootType;
8979 *to = *from;
8980 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
8981 rootType = from->sType;
8982 }
8983 const void* from_pNext = from;
8984 size_t pNext_size = 0u;
8985 while (!pNext_size && from_pNext) {
8986 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
8987 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
8988 }
8989 to->pNext = nullptr;
8990 if (pNext_size) {
8991 to->pNext = (void*)alloc->alloc(pNext_size);
8992 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
8993 }
8994 }
8995
deepcopy_VkDeviceDeviceMemoryReportCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkDeviceDeviceMemoryReportCreateInfoEXT * from,VkDeviceDeviceMemoryReportCreateInfoEXT * to)8996 void deepcopy_VkDeviceDeviceMemoryReportCreateInfoEXT(
8997 Allocator* alloc, VkStructureType rootType, const VkDeviceDeviceMemoryReportCreateInfoEXT* from,
8998 VkDeviceDeviceMemoryReportCreateInfoEXT* to) {
8999 (void)alloc;
9000 (void)rootType;
9001 *to = *from;
9002 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9003 rootType = from->sType;
9004 }
9005 const void* from_pNext = from;
9006 size_t pNext_size = 0u;
9007 while (!pNext_size && from_pNext) {
9008 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9009 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9010 }
9011 to->pNext = nullptr;
9012 if (pNext_size) {
9013 to->pNext = (void*)alloc->alloc(pNext_size);
9014 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9015 }
9016 to->pUserData = nullptr;
9017 if (from->pUserData) {
9018 to->pUserData = (void*)alloc->dupArray(from->pUserData, sizeof(uint8_t));
9019 }
9020 }
9021
9022 #endif
9023 #ifdef VK_EXT_robustness2
deepcopy_VkPhysicalDeviceRobustness2FeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceRobustness2FeaturesEXT * from,VkPhysicalDeviceRobustness2FeaturesEXT * to)9024 void deepcopy_VkPhysicalDeviceRobustness2FeaturesEXT(
9025 Allocator* alloc, VkStructureType rootType, const VkPhysicalDeviceRobustness2FeaturesEXT* from,
9026 VkPhysicalDeviceRobustness2FeaturesEXT* to) {
9027 (void)alloc;
9028 (void)rootType;
9029 *to = *from;
9030 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9031 rootType = from->sType;
9032 }
9033 const void* from_pNext = from;
9034 size_t pNext_size = 0u;
9035 while (!pNext_size && from_pNext) {
9036 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9037 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9038 }
9039 to->pNext = nullptr;
9040 if (pNext_size) {
9041 to->pNext = (void*)alloc->alloc(pNext_size);
9042 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9043 }
9044 }
9045
deepcopy_VkPhysicalDeviceRobustness2PropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceRobustness2PropertiesEXT * from,VkPhysicalDeviceRobustness2PropertiesEXT * to)9046 void deepcopy_VkPhysicalDeviceRobustness2PropertiesEXT(
9047 Allocator* alloc, VkStructureType rootType,
9048 const VkPhysicalDeviceRobustness2PropertiesEXT* from,
9049 VkPhysicalDeviceRobustness2PropertiesEXT* to) {
9050 (void)alloc;
9051 (void)rootType;
9052 *to = *from;
9053 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9054 rootType = from->sType;
9055 }
9056 const void* from_pNext = from;
9057 size_t pNext_size = 0u;
9058 while (!pNext_size && from_pNext) {
9059 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9060 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9061 }
9062 to->pNext = nullptr;
9063 if (pNext_size) {
9064 to->pNext = (void*)alloc->alloc(pNext_size);
9065 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9066 }
9067 }
9068
9069 #endif
9070 #ifdef VK_EXT_custom_border_color
deepcopy_VkSamplerCustomBorderColorCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkSamplerCustomBorderColorCreateInfoEXT * from,VkSamplerCustomBorderColorCreateInfoEXT * to)9071 void deepcopy_VkSamplerCustomBorderColorCreateInfoEXT(
9072 Allocator* alloc, VkStructureType rootType, const VkSamplerCustomBorderColorCreateInfoEXT* from,
9073 VkSamplerCustomBorderColorCreateInfoEXT* to) {
9074 (void)alloc;
9075 (void)rootType;
9076 *to = *from;
9077 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9078 rootType = from->sType;
9079 }
9080 const void* from_pNext = from;
9081 size_t pNext_size = 0u;
9082 while (!pNext_size && from_pNext) {
9083 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9084 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9085 }
9086 to->pNext = nullptr;
9087 if (pNext_size) {
9088 to->pNext = (void*)alloc->alloc(pNext_size);
9089 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9090 }
9091 deepcopy_VkClearColorValue(alloc, rootType, &from->customBorderColor,
9092 (VkClearColorValue*)(&to->customBorderColor));
9093 }
9094
deepcopy_VkPhysicalDeviceCustomBorderColorPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceCustomBorderColorPropertiesEXT * from,VkPhysicalDeviceCustomBorderColorPropertiesEXT * to)9095 void deepcopy_VkPhysicalDeviceCustomBorderColorPropertiesEXT(
9096 Allocator* alloc, VkStructureType rootType,
9097 const VkPhysicalDeviceCustomBorderColorPropertiesEXT* from,
9098 VkPhysicalDeviceCustomBorderColorPropertiesEXT* to) {
9099 (void)alloc;
9100 (void)rootType;
9101 *to = *from;
9102 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9103 rootType = from->sType;
9104 }
9105 const void* from_pNext = from;
9106 size_t pNext_size = 0u;
9107 while (!pNext_size && from_pNext) {
9108 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9109 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9110 }
9111 to->pNext = nullptr;
9112 if (pNext_size) {
9113 to->pNext = (void*)alloc->alloc(pNext_size);
9114 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9115 }
9116 }
9117
deepcopy_VkPhysicalDeviceCustomBorderColorFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceCustomBorderColorFeaturesEXT * from,VkPhysicalDeviceCustomBorderColorFeaturesEXT * to)9118 void deepcopy_VkPhysicalDeviceCustomBorderColorFeaturesEXT(
9119 Allocator* alloc, VkStructureType rootType,
9120 const VkPhysicalDeviceCustomBorderColorFeaturesEXT* from,
9121 VkPhysicalDeviceCustomBorderColorFeaturesEXT* to) {
9122 (void)alloc;
9123 (void)rootType;
9124 *to = *from;
9125 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9126 rootType = from->sType;
9127 }
9128 const void* from_pNext = from;
9129 size_t pNext_size = 0u;
9130 while (!pNext_size && from_pNext) {
9131 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9132 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9133 }
9134 to->pNext = nullptr;
9135 if (pNext_size) {
9136 to->pNext = (void*)alloc->alloc(pNext_size);
9137 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9138 }
9139 }
9140
9141 #endif
9142 #ifdef VK_EXT_graphics_pipeline_library
deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT * from,VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT * to)9143 void deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(
9144 Allocator* alloc, VkStructureType rootType,
9145 const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT* from,
9146 VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT* to) {
9147 (void)alloc;
9148 (void)rootType;
9149 *to = *from;
9150 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9151 rootType = from->sType;
9152 }
9153 const void* from_pNext = from;
9154 size_t pNext_size = 0u;
9155 while (!pNext_size && from_pNext) {
9156 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9157 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9158 }
9159 to->pNext = nullptr;
9160 if (pNext_size) {
9161 to->pNext = (void*)alloc->alloc(pNext_size);
9162 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9163 }
9164 }
9165
deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT * from,VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT * to)9166 void deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(
9167 Allocator* alloc, VkStructureType rootType,
9168 const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT* from,
9169 VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT* to) {
9170 (void)alloc;
9171 (void)rootType;
9172 *to = *from;
9173 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9174 rootType = from->sType;
9175 }
9176 const void* from_pNext = from;
9177 size_t pNext_size = 0u;
9178 while (!pNext_size && from_pNext) {
9179 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9180 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9181 }
9182 to->pNext = nullptr;
9183 if (pNext_size) {
9184 to->pNext = (void*)alloc->alloc(pNext_size);
9185 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9186 }
9187 }
9188
deepcopy_VkGraphicsPipelineLibraryCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkGraphicsPipelineLibraryCreateInfoEXT * from,VkGraphicsPipelineLibraryCreateInfoEXT * to)9189 void deepcopy_VkGraphicsPipelineLibraryCreateInfoEXT(
9190 Allocator* alloc, VkStructureType rootType, const VkGraphicsPipelineLibraryCreateInfoEXT* from,
9191 VkGraphicsPipelineLibraryCreateInfoEXT* to) {
9192 (void)alloc;
9193 (void)rootType;
9194 *to = *from;
9195 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9196 rootType = from->sType;
9197 }
9198 const void* from_pNext = from;
9199 size_t pNext_size = 0u;
9200 while (!pNext_size && from_pNext) {
9201 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9202 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9203 }
9204 to->pNext = nullptr;
9205 if (pNext_size) {
9206 to->pNext = (void*)alloc->alloc(pNext_size);
9207 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9208 }
9209 }
9210
9211 #endif
9212 #ifdef VK_EXT_ycbcr_2plane_444_formats
deepcopy_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT * from,VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT * to)9213 void deepcopy_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(
9214 Allocator* alloc, VkStructureType rootType,
9215 const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT* from,
9216 VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT* to) {
9217 (void)alloc;
9218 (void)rootType;
9219 *to = *from;
9220 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9221 rootType = from->sType;
9222 }
9223 const void* from_pNext = from;
9224 size_t pNext_size = 0u;
9225 while (!pNext_size && from_pNext) {
9226 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9227 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9228 }
9229 to->pNext = nullptr;
9230 if (pNext_size) {
9231 to->pNext = (void*)alloc->alloc(pNext_size);
9232 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9233 }
9234 }
9235
9236 #endif
9237 #ifdef VK_EXT_image_compression_control
deepcopy_VkPhysicalDeviceImageCompressionControlFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImageCompressionControlFeaturesEXT * from,VkPhysicalDeviceImageCompressionControlFeaturesEXT * to)9238 void deepcopy_VkPhysicalDeviceImageCompressionControlFeaturesEXT(
9239 Allocator* alloc, VkStructureType rootType,
9240 const VkPhysicalDeviceImageCompressionControlFeaturesEXT* from,
9241 VkPhysicalDeviceImageCompressionControlFeaturesEXT* to) {
9242 (void)alloc;
9243 (void)rootType;
9244 *to = *from;
9245 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9246 rootType = from->sType;
9247 }
9248 const void* from_pNext = from;
9249 size_t pNext_size = 0u;
9250 while (!pNext_size && from_pNext) {
9251 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9252 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9253 }
9254 to->pNext = nullptr;
9255 if (pNext_size) {
9256 to->pNext = (void*)alloc->alloc(pNext_size);
9257 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9258 }
9259 }
9260
deepcopy_VkImageCompressionControlEXT(Allocator * alloc,VkStructureType rootType,const VkImageCompressionControlEXT * from,VkImageCompressionControlEXT * to)9261 void deepcopy_VkImageCompressionControlEXT(Allocator* alloc, VkStructureType rootType,
9262 const VkImageCompressionControlEXT* from,
9263 VkImageCompressionControlEXT* to) {
9264 (void)alloc;
9265 (void)rootType;
9266 *to = *from;
9267 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9268 rootType = from->sType;
9269 }
9270 const void* from_pNext = from;
9271 size_t pNext_size = 0u;
9272 while (!pNext_size && from_pNext) {
9273 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9274 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9275 }
9276 to->pNext = nullptr;
9277 if (pNext_size) {
9278 to->pNext = (void*)alloc->alloc(pNext_size);
9279 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9280 }
9281 to->pFixedRateFlags = nullptr;
9282 if (from->pFixedRateFlags) {
9283 to->pFixedRateFlags = (VkImageCompressionFixedRateFlagsEXT*)alloc->dupArray(
9284 from->pFixedRateFlags,
9285 from->compressionControlPlaneCount * sizeof(VkImageCompressionFixedRateFlagsEXT));
9286 }
9287 }
9288
deepcopy_VkImageCompressionPropertiesEXT(Allocator * alloc,VkStructureType rootType,const VkImageCompressionPropertiesEXT * from,VkImageCompressionPropertiesEXT * to)9289 void deepcopy_VkImageCompressionPropertiesEXT(Allocator* alloc, VkStructureType rootType,
9290 const VkImageCompressionPropertiesEXT* from,
9291 VkImageCompressionPropertiesEXT* to) {
9292 (void)alloc;
9293 (void)rootType;
9294 *to = *from;
9295 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9296 rootType = from->sType;
9297 }
9298 const void* from_pNext = from;
9299 size_t pNext_size = 0u;
9300 while (!pNext_size && from_pNext) {
9301 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9302 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9303 }
9304 to->pNext = nullptr;
9305 if (pNext_size) {
9306 to->pNext = (void*)alloc->alloc(pNext_size);
9307 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9308 }
9309 }
9310
9311 #endif
9312 #ifdef VK_EXT_4444_formats
deepcopy_VkPhysicalDevice4444FormatsFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevice4444FormatsFeaturesEXT * from,VkPhysicalDevice4444FormatsFeaturesEXT * to)9313 void deepcopy_VkPhysicalDevice4444FormatsFeaturesEXT(
9314 Allocator* alloc, VkStructureType rootType, const VkPhysicalDevice4444FormatsFeaturesEXT* from,
9315 VkPhysicalDevice4444FormatsFeaturesEXT* to) {
9316 (void)alloc;
9317 (void)rootType;
9318 *to = *from;
9319 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9320 rootType = from->sType;
9321 }
9322 const void* from_pNext = from;
9323 size_t pNext_size = 0u;
9324 while (!pNext_size && from_pNext) {
9325 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9326 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9327 }
9328 to->pNext = nullptr;
9329 if (pNext_size) {
9330 to->pNext = (void*)alloc->alloc(pNext_size);
9331 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9332 }
9333 }
9334
9335 #endif
9336 #ifdef VK_EXT_primitive_topology_list_restart
deepcopy_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT * from,VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT * to)9337 void deepcopy_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
9338 Allocator* alloc, VkStructureType rootType,
9339 const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT* from,
9340 VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT* to) {
9341 (void)alloc;
9342 (void)rootType;
9343 *to = *from;
9344 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9345 rootType = from->sType;
9346 }
9347 const void* from_pNext = from;
9348 size_t pNext_size = 0u;
9349 while (!pNext_size && from_pNext) {
9350 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9351 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9352 }
9353 to->pNext = nullptr;
9354 if (pNext_size) {
9355 to->pNext = (void*)alloc->alloc(pNext_size);
9356 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9357 }
9358 }
9359
9360 #endif
9361 #ifdef VK_EXT_extended_dynamic_state2
deepcopy_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT * from,VkPhysicalDeviceExtendedDynamicState2FeaturesEXT * to)9362 void deepcopy_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(
9363 Allocator* alloc, VkStructureType rootType,
9364 const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT* from,
9365 VkPhysicalDeviceExtendedDynamicState2FeaturesEXT* to) {
9366 (void)alloc;
9367 (void)rootType;
9368 *to = *from;
9369 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9370 rootType = from->sType;
9371 }
9372 const void* from_pNext = from;
9373 size_t pNext_size = 0u;
9374 while (!pNext_size && from_pNext) {
9375 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9376 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9377 }
9378 to->pNext = nullptr;
9379 if (pNext_size) {
9380 to->pNext = (void*)alloc->alloc(pNext_size);
9381 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9382 }
9383 }
9384
9385 #endif
9386 #ifdef VK_EXT_color_write_enable
deepcopy_VkPhysicalDeviceColorWriteEnableFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceColorWriteEnableFeaturesEXT * from,VkPhysicalDeviceColorWriteEnableFeaturesEXT * to)9387 void deepcopy_VkPhysicalDeviceColorWriteEnableFeaturesEXT(
9388 Allocator* alloc, VkStructureType rootType,
9389 const VkPhysicalDeviceColorWriteEnableFeaturesEXT* from,
9390 VkPhysicalDeviceColorWriteEnableFeaturesEXT* to) {
9391 (void)alloc;
9392 (void)rootType;
9393 *to = *from;
9394 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9395 rootType = from->sType;
9396 }
9397 const void* from_pNext = from;
9398 size_t pNext_size = 0u;
9399 while (!pNext_size && from_pNext) {
9400 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9401 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9402 }
9403 to->pNext = nullptr;
9404 if (pNext_size) {
9405 to->pNext = (void*)alloc->alloc(pNext_size);
9406 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9407 }
9408 }
9409
deepcopy_VkPipelineColorWriteCreateInfoEXT(Allocator * alloc,VkStructureType rootType,const VkPipelineColorWriteCreateInfoEXT * from,VkPipelineColorWriteCreateInfoEXT * to)9410 void deepcopy_VkPipelineColorWriteCreateInfoEXT(Allocator* alloc, VkStructureType rootType,
9411 const VkPipelineColorWriteCreateInfoEXT* from,
9412 VkPipelineColorWriteCreateInfoEXT* to) {
9413 (void)alloc;
9414 (void)rootType;
9415 *to = *from;
9416 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9417 rootType = from->sType;
9418 }
9419 const void* from_pNext = from;
9420 size_t pNext_size = 0u;
9421 while (!pNext_size && from_pNext) {
9422 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9423 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9424 }
9425 to->pNext = nullptr;
9426 if (pNext_size) {
9427 to->pNext = (void*)alloc->alloc(pNext_size);
9428 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9429 }
9430 to->pColorWriteEnables = nullptr;
9431 if (from->pColorWriteEnables) {
9432 to->pColorWriteEnables = (VkBool32*)alloc->dupArray(
9433 from->pColorWriteEnables, from->attachmentCount * sizeof(const VkBool32));
9434 }
9435 }
9436
9437 #endif
9438 #ifdef VK_GOOGLE_gfxstream
deepcopy_VkImportColorBufferGOOGLE(Allocator * alloc,VkStructureType rootType,const VkImportColorBufferGOOGLE * from,VkImportColorBufferGOOGLE * to)9439 void deepcopy_VkImportColorBufferGOOGLE(Allocator* alloc, VkStructureType rootType,
9440 const VkImportColorBufferGOOGLE* from,
9441 VkImportColorBufferGOOGLE* to) {
9442 (void)alloc;
9443 (void)rootType;
9444 *to = *from;
9445 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9446 rootType = from->sType;
9447 }
9448 const void* from_pNext = from;
9449 size_t pNext_size = 0u;
9450 while (!pNext_size && from_pNext) {
9451 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9452 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9453 }
9454 to->pNext = nullptr;
9455 if (pNext_size) {
9456 to->pNext = (void*)alloc->alloc(pNext_size);
9457 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9458 }
9459 }
9460
deepcopy_VkImportBufferGOOGLE(Allocator * alloc,VkStructureType rootType,const VkImportBufferGOOGLE * from,VkImportBufferGOOGLE * to)9461 void deepcopy_VkImportBufferGOOGLE(Allocator* alloc, VkStructureType rootType,
9462 const VkImportBufferGOOGLE* from, VkImportBufferGOOGLE* to) {
9463 (void)alloc;
9464 (void)rootType;
9465 *to = *from;
9466 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9467 rootType = from->sType;
9468 }
9469 const void* from_pNext = from;
9470 size_t pNext_size = 0u;
9471 while (!pNext_size && from_pNext) {
9472 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9473 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9474 }
9475 to->pNext = nullptr;
9476 if (pNext_size) {
9477 to->pNext = (void*)alloc->alloc(pNext_size);
9478 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9479 }
9480 }
9481
deepcopy_VkCreateBlobGOOGLE(Allocator * alloc,VkStructureType rootType,const VkCreateBlobGOOGLE * from,VkCreateBlobGOOGLE * to)9482 void deepcopy_VkCreateBlobGOOGLE(Allocator* alloc, VkStructureType rootType,
9483 const VkCreateBlobGOOGLE* from, VkCreateBlobGOOGLE* to) {
9484 (void)alloc;
9485 (void)rootType;
9486 *to = *from;
9487 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9488 rootType = from->sType;
9489 }
9490 const void* from_pNext = from;
9491 size_t pNext_size = 0u;
9492 while (!pNext_size && from_pNext) {
9493 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9494 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9495 }
9496 to->pNext = nullptr;
9497 if (pNext_size) {
9498 to->pNext = (void*)alloc->alloc(pNext_size);
9499 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9500 }
9501 }
9502
9503 #endif
9504 #ifdef VK_EXT_image_compression_control_swapchain
deepcopy_VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT * from,VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT * to)9505 void deepcopy_VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(
9506 Allocator* alloc, VkStructureType rootType,
9507 const VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT* from,
9508 VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT* to) {
9509 (void)alloc;
9510 (void)rootType;
9511 *to = *from;
9512 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9513 rootType = from->sType;
9514 }
9515 const void* from_pNext = from;
9516 size_t pNext_size = 0u;
9517 while (!pNext_size && from_pNext) {
9518 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9519 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9520 }
9521 to->pNext = nullptr;
9522 if (pNext_size) {
9523 to->pNext = (void*)alloc->alloc(pNext_size);
9524 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9525 }
9526 }
9527
9528 #endif
9529 #ifdef VK_KHR_ray_tracing_pipeline
deepcopy_VkRayTracingShaderGroupCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkRayTracingShaderGroupCreateInfoKHR * from,VkRayTracingShaderGroupCreateInfoKHR * to)9530 void deepcopy_VkRayTracingShaderGroupCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
9531 const VkRayTracingShaderGroupCreateInfoKHR* from,
9532 VkRayTracingShaderGroupCreateInfoKHR* to) {
9533 (void)alloc;
9534 (void)rootType;
9535 *to = *from;
9536 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9537 rootType = from->sType;
9538 }
9539 const void* from_pNext = from;
9540 size_t pNext_size = 0u;
9541 while (!pNext_size && from_pNext) {
9542 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9543 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9544 }
9545 to->pNext = nullptr;
9546 if (pNext_size) {
9547 to->pNext = (void*)alloc->alloc(pNext_size);
9548 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9549 }
9550 to->pShaderGroupCaptureReplayHandle = nullptr;
9551 if (from->pShaderGroupCaptureReplayHandle) {
9552 to->pShaderGroupCaptureReplayHandle =
9553 (void*)alloc->dupArray(from->pShaderGroupCaptureReplayHandle, sizeof(const uint8_t));
9554 }
9555 }
9556
deepcopy_VkRayTracingPipelineInterfaceCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkRayTracingPipelineInterfaceCreateInfoKHR * from,VkRayTracingPipelineInterfaceCreateInfoKHR * to)9557 void deepcopy_VkRayTracingPipelineInterfaceCreateInfoKHR(
9558 Allocator* alloc, VkStructureType rootType,
9559 const VkRayTracingPipelineInterfaceCreateInfoKHR* from,
9560 VkRayTracingPipelineInterfaceCreateInfoKHR* to) {
9561 (void)alloc;
9562 (void)rootType;
9563 *to = *from;
9564 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9565 rootType = from->sType;
9566 }
9567 const void* from_pNext = from;
9568 size_t pNext_size = 0u;
9569 while (!pNext_size && from_pNext) {
9570 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9571 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9572 }
9573 to->pNext = nullptr;
9574 if (pNext_size) {
9575 to->pNext = (void*)alloc->alloc(pNext_size);
9576 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9577 }
9578 }
9579
deepcopy_VkRayTracingPipelineCreateInfoKHR(Allocator * alloc,VkStructureType rootType,const VkRayTracingPipelineCreateInfoKHR * from,VkRayTracingPipelineCreateInfoKHR * to)9580 void deepcopy_VkRayTracingPipelineCreateInfoKHR(Allocator* alloc, VkStructureType rootType,
9581 const VkRayTracingPipelineCreateInfoKHR* from,
9582 VkRayTracingPipelineCreateInfoKHR* to) {
9583 (void)alloc;
9584 (void)rootType;
9585 *to = *from;
9586 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9587 rootType = from->sType;
9588 }
9589 const void* from_pNext = from;
9590 size_t pNext_size = 0u;
9591 while (!pNext_size && from_pNext) {
9592 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9593 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9594 }
9595 to->pNext = nullptr;
9596 if (pNext_size) {
9597 to->pNext = (void*)alloc->alloc(pNext_size);
9598 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9599 }
9600 if (from) {
9601 to->pStages = nullptr;
9602 if (from->pStages) {
9603 to->pStages = (VkPipelineShaderStageCreateInfo*)alloc->alloc(
9604 from->stageCount * sizeof(const VkPipelineShaderStageCreateInfo));
9605 to->stageCount = from->stageCount;
9606 for (uint32_t i = 0; i < (uint32_t)from->stageCount; ++i) {
9607 deepcopy_VkPipelineShaderStageCreateInfo(
9608 alloc, rootType, from->pStages + i,
9609 (VkPipelineShaderStageCreateInfo*)(to->pStages + i));
9610 }
9611 }
9612 }
9613 if (from) {
9614 to->pGroups = nullptr;
9615 if (from->pGroups) {
9616 to->pGroups = (VkRayTracingShaderGroupCreateInfoKHR*)alloc->alloc(
9617 from->groupCount * sizeof(const VkRayTracingShaderGroupCreateInfoKHR));
9618 to->groupCount = from->groupCount;
9619 for (uint32_t i = 0; i < (uint32_t)from->groupCount; ++i) {
9620 deepcopy_VkRayTracingShaderGroupCreateInfoKHR(
9621 alloc, rootType, from->pGroups + i,
9622 (VkRayTracingShaderGroupCreateInfoKHR*)(to->pGroups + i));
9623 }
9624 }
9625 }
9626 to->pLibraryInfo = nullptr;
9627 if (from->pLibraryInfo) {
9628 to->pLibraryInfo = (VkPipelineLibraryCreateInfoKHR*)alloc->alloc(
9629 sizeof(const VkPipelineLibraryCreateInfoKHR));
9630 deepcopy_VkPipelineLibraryCreateInfoKHR(
9631 alloc, rootType, from->pLibraryInfo,
9632 (VkPipelineLibraryCreateInfoKHR*)(to->pLibraryInfo));
9633 }
9634 to->pLibraryInterface = nullptr;
9635 if (from->pLibraryInterface) {
9636 to->pLibraryInterface = (VkRayTracingPipelineInterfaceCreateInfoKHR*)alloc->alloc(
9637 sizeof(const VkRayTracingPipelineInterfaceCreateInfoKHR));
9638 deepcopy_VkRayTracingPipelineInterfaceCreateInfoKHR(
9639 alloc, rootType, from->pLibraryInterface,
9640 (VkRayTracingPipelineInterfaceCreateInfoKHR*)(to->pLibraryInterface));
9641 }
9642 to->pDynamicState = nullptr;
9643 if (from->pDynamicState) {
9644 to->pDynamicState = (VkPipelineDynamicStateCreateInfo*)alloc->alloc(
9645 sizeof(const VkPipelineDynamicStateCreateInfo));
9646 deepcopy_VkPipelineDynamicStateCreateInfo(
9647 alloc, rootType, from->pDynamicState,
9648 (VkPipelineDynamicStateCreateInfo*)(to->pDynamicState));
9649 }
9650 }
9651
deepcopy_VkPhysicalDeviceRayTracingPipelineFeaturesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceRayTracingPipelineFeaturesKHR * from,VkPhysicalDeviceRayTracingPipelineFeaturesKHR * to)9652 void deepcopy_VkPhysicalDeviceRayTracingPipelineFeaturesKHR(
9653 Allocator* alloc, VkStructureType rootType,
9654 const VkPhysicalDeviceRayTracingPipelineFeaturesKHR* from,
9655 VkPhysicalDeviceRayTracingPipelineFeaturesKHR* to) {
9656 (void)alloc;
9657 (void)rootType;
9658 *to = *from;
9659 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9660 rootType = from->sType;
9661 }
9662 const void* from_pNext = from;
9663 size_t pNext_size = 0u;
9664 while (!pNext_size && from_pNext) {
9665 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9666 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9667 }
9668 to->pNext = nullptr;
9669 if (pNext_size) {
9670 to->pNext = (void*)alloc->alloc(pNext_size);
9671 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9672 }
9673 }
9674
deepcopy_VkPhysicalDeviceRayTracingPipelinePropertiesKHR(Allocator * alloc,VkStructureType rootType,const VkPhysicalDeviceRayTracingPipelinePropertiesKHR * from,VkPhysicalDeviceRayTracingPipelinePropertiesKHR * to)9675 void deepcopy_VkPhysicalDeviceRayTracingPipelinePropertiesKHR(
9676 Allocator* alloc, VkStructureType rootType,
9677 const VkPhysicalDeviceRayTracingPipelinePropertiesKHR* from,
9678 VkPhysicalDeviceRayTracingPipelinePropertiesKHR* to) {
9679 (void)alloc;
9680 (void)rootType;
9681 *to = *from;
9682 if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
9683 rootType = from->sType;
9684 }
9685 const void* from_pNext = from;
9686 size_t pNext_size = 0u;
9687 while (!pNext_size && from_pNext) {
9688 from_pNext = static_cast<const vk_struct_common*>(from_pNext)->pNext;
9689 pNext_size = goldfish_vk_extension_struct_size(rootType, from_pNext);
9690 }
9691 to->pNext = nullptr;
9692 if (pNext_size) {
9693 to->pNext = (void*)alloc->alloc(pNext_size);
9694 deepcopy_extension_struct(alloc, rootType, from_pNext, (void*)(to->pNext));
9695 }
9696 }
9697
deepcopy_VkStridedDeviceAddressRegionKHR(Allocator * alloc,VkStructureType rootType,const VkStridedDeviceAddressRegionKHR * from,VkStridedDeviceAddressRegionKHR * to)9698 void deepcopy_VkStridedDeviceAddressRegionKHR(Allocator* alloc, VkStructureType rootType,
9699 const VkStridedDeviceAddressRegionKHR* from,
9700 VkStridedDeviceAddressRegionKHR* to) {
9701 (void)alloc;
9702 (void)rootType;
9703 *to = *from;
9704 }
9705
deepcopy_VkTraceRaysIndirectCommandKHR(Allocator * alloc,VkStructureType rootType,const VkTraceRaysIndirectCommandKHR * from,VkTraceRaysIndirectCommandKHR * to)9706 void deepcopy_VkTraceRaysIndirectCommandKHR(Allocator* alloc, VkStructureType rootType,
9707 const VkTraceRaysIndirectCommandKHR* from,
9708 VkTraceRaysIndirectCommandKHR* to) {
9709 (void)alloc;
9710 (void)rootType;
9711 *to = *from;
9712 }
9713
9714 #endif
deepcopy_extension_struct(Allocator * alloc,VkStructureType rootType,const void * structExtension,void * structExtension_out)9715 void deepcopy_extension_struct(Allocator* alloc, VkStructureType rootType,
9716 const void* structExtension, void* structExtension_out) {
9717 if (!structExtension) {
9718 return;
9719 }
9720 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension);
9721 switch (structType) {
9722 #ifdef VK_VERSION_1_0
9723 case VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO: {
9724 deepcopy_VkShaderModuleCreateInfo(
9725 alloc, rootType, reinterpret_cast<const VkShaderModuleCreateInfo*>(structExtension),
9726 reinterpret_cast<VkShaderModuleCreateInfo*>(structExtension_out));
9727 break;
9728 }
9729 #endif
9730 #ifdef VK_VERSION_1_1
9731 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: {
9732 deepcopy_VkPhysicalDeviceSubgroupProperties(
9733 alloc, rootType,
9734 reinterpret_cast<const VkPhysicalDeviceSubgroupProperties*>(structExtension),
9735 reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(structExtension_out));
9736 break;
9737 }
9738 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: {
9739 deepcopy_VkPhysicalDevice16BitStorageFeatures(
9740 alloc, rootType,
9741 reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(structExtension),
9742 reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(structExtension_out));
9743 break;
9744 }
9745 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
9746 deepcopy_VkMemoryDedicatedRequirements(
9747 alloc, rootType,
9748 reinterpret_cast<const VkMemoryDedicatedRequirements*>(structExtension),
9749 reinterpret_cast<VkMemoryDedicatedRequirements*>(structExtension_out));
9750 break;
9751 }
9752 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: {
9753 deepcopy_VkMemoryDedicatedAllocateInfo(
9754 alloc, rootType,
9755 reinterpret_cast<const VkMemoryDedicatedAllocateInfo*>(structExtension),
9756 reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(structExtension_out));
9757 break;
9758 }
9759 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: {
9760 deepcopy_VkMemoryAllocateFlagsInfo(
9761 alloc, rootType,
9762 reinterpret_cast<const VkMemoryAllocateFlagsInfo*>(structExtension),
9763 reinterpret_cast<VkMemoryAllocateFlagsInfo*>(structExtension_out));
9764 break;
9765 }
9766 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: {
9767 deepcopy_VkDeviceGroupRenderPassBeginInfo(
9768 alloc, rootType,
9769 reinterpret_cast<const VkDeviceGroupRenderPassBeginInfo*>(structExtension),
9770 reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(structExtension_out));
9771 break;
9772 }
9773 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: {
9774 deepcopy_VkDeviceGroupCommandBufferBeginInfo(
9775 alloc, rootType,
9776 reinterpret_cast<const VkDeviceGroupCommandBufferBeginInfo*>(structExtension),
9777 reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(structExtension_out));
9778 break;
9779 }
9780 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: {
9781 deepcopy_VkDeviceGroupSubmitInfo(
9782 alloc, rootType, reinterpret_cast<const VkDeviceGroupSubmitInfo*>(structExtension),
9783 reinterpret_cast<VkDeviceGroupSubmitInfo*>(structExtension_out));
9784 break;
9785 }
9786 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: {
9787 deepcopy_VkDeviceGroupBindSparseInfo(
9788 alloc, rootType,
9789 reinterpret_cast<const VkDeviceGroupBindSparseInfo*>(structExtension),
9790 reinterpret_cast<VkDeviceGroupBindSparseInfo*>(structExtension_out));
9791 break;
9792 }
9793 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: {
9794 deepcopy_VkBindBufferMemoryDeviceGroupInfo(
9795 alloc, rootType,
9796 reinterpret_cast<const VkBindBufferMemoryDeviceGroupInfo*>(structExtension),
9797 reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(structExtension_out));
9798 break;
9799 }
9800 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: {
9801 deepcopy_VkBindImageMemoryDeviceGroupInfo(
9802 alloc, rootType,
9803 reinterpret_cast<const VkBindImageMemoryDeviceGroupInfo*>(structExtension),
9804 reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(structExtension_out));
9805 break;
9806 }
9807 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: {
9808 deepcopy_VkDeviceGroupDeviceCreateInfo(
9809 alloc, rootType,
9810 reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(structExtension),
9811 reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(structExtension_out));
9812 break;
9813 }
9814 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
9815 deepcopy_VkPhysicalDeviceFeatures2(
9816 alloc, rootType,
9817 reinterpret_cast<const VkPhysicalDeviceFeatures2*>(structExtension),
9818 reinterpret_cast<VkPhysicalDeviceFeatures2*>(structExtension_out));
9819 break;
9820 }
9821 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: {
9822 deepcopy_VkPhysicalDevicePointClippingProperties(
9823 alloc, rootType,
9824 reinterpret_cast<const VkPhysicalDevicePointClippingProperties*>(structExtension),
9825 reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(structExtension_out));
9826 break;
9827 }
9828 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: {
9829 deepcopy_VkRenderPassInputAttachmentAspectCreateInfo(
9830 alloc, rootType,
9831 reinterpret_cast<const VkRenderPassInputAttachmentAspectCreateInfo*>(
9832 structExtension),
9833 reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(
9834 structExtension_out));
9835 break;
9836 }
9837 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: {
9838 deepcopy_VkImageViewUsageCreateInfo(
9839 alloc, rootType,
9840 reinterpret_cast<const VkImageViewUsageCreateInfo*>(structExtension),
9841 reinterpret_cast<VkImageViewUsageCreateInfo*>(structExtension_out));
9842 break;
9843 }
9844 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: {
9845 deepcopy_VkPipelineTessellationDomainOriginStateCreateInfo(
9846 alloc, rootType,
9847 reinterpret_cast<const VkPipelineTessellationDomainOriginStateCreateInfo*>(
9848 structExtension),
9849 reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(
9850 structExtension_out));
9851 break;
9852 }
9853 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: {
9854 deepcopy_VkRenderPassMultiviewCreateInfo(
9855 alloc, rootType,
9856 reinterpret_cast<const VkRenderPassMultiviewCreateInfo*>(structExtension),
9857 reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(structExtension_out));
9858 break;
9859 }
9860 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: {
9861 deepcopy_VkPhysicalDeviceMultiviewFeatures(
9862 alloc, rootType,
9863 reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(structExtension),
9864 reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(structExtension_out));
9865 break;
9866 }
9867 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: {
9868 deepcopy_VkPhysicalDeviceMultiviewProperties(
9869 alloc, rootType,
9870 reinterpret_cast<const VkPhysicalDeviceMultiviewProperties*>(structExtension),
9871 reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(structExtension_out));
9872 break;
9873 }
9874 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: {
9875 deepcopy_VkPhysicalDeviceVariablePointersFeatures(
9876 alloc, rootType,
9877 reinterpret_cast<const VkPhysicalDeviceVariablePointersFeatures*>(structExtension),
9878 reinterpret_cast<VkPhysicalDeviceVariablePointersFeatures*>(structExtension_out));
9879 break;
9880 }
9881 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: {
9882 deepcopy_VkPhysicalDeviceProtectedMemoryFeatures(
9883 alloc, rootType,
9884 reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension),
9885 reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension_out));
9886 break;
9887 }
9888 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: {
9889 deepcopy_VkPhysicalDeviceProtectedMemoryProperties(
9890 alloc, rootType,
9891 reinterpret_cast<const VkPhysicalDeviceProtectedMemoryProperties*>(structExtension),
9892 reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(structExtension_out));
9893 break;
9894 }
9895 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: {
9896 deepcopy_VkProtectedSubmitInfo(
9897 alloc, rootType, reinterpret_cast<const VkProtectedSubmitInfo*>(structExtension),
9898 reinterpret_cast<VkProtectedSubmitInfo*>(structExtension_out));
9899 break;
9900 }
9901 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: {
9902 deepcopy_VkSamplerYcbcrConversionInfo(
9903 alloc, rootType,
9904 reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(structExtension),
9905 reinterpret_cast<VkSamplerYcbcrConversionInfo*>(structExtension_out));
9906 break;
9907 }
9908 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: {
9909 deepcopy_VkBindImagePlaneMemoryInfo(
9910 alloc, rootType,
9911 reinterpret_cast<const VkBindImagePlaneMemoryInfo*>(structExtension),
9912 reinterpret_cast<VkBindImagePlaneMemoryInfo*>(structExtension_out));
9913 break;
9914 }
9915 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: {
9916 deepcopy_VkImagePlaneMemoryRequirementsInfo(
9917 alloc, rootType,
9918 reinterpret_cast<const VkImagePlaneMemoryRequirementsInfo*>(structExtension),
9919 reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(structExtension_out));
9920 break;
9921 }
9922 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
9923 deepcopy_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
9924 alloc, rootType,
9925 reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(
9926 structExtension),
9927 reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(
9928 structExtension_out));
9929 break;
9930 }
9931 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: {
9932 deepcopy_VkSamplerYcbcrConversionImageFormatProperties(
9933 alloc, rootType,
9934 reinterpret_cast<const VkSamplerYcbcrConversionImageFormatProperties*>(
9935 structExtension),
9936 reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(
9937 structExtension_out));
9938 break;
9939 }
9940 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: {
9941 deepcopy_VkPhysicalDeviceExternalImageFormatInfo(
9942 alloc, rootType,
9943 reinterpret_cast<const VkPhysicalDeviceExternalImageFormatInfo*>(structExtension),
9944 reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(structExtension_out));
9945 break;
9946 }
9947 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: {
9948 deepcopy_VkExternalImageFormatProperties(
9949 alloc, rootType,
9950 reinterpret_cast<const VkExternalImageFormatProperties*>(structExtension),
9951 reinterpret_cast<VkExternalImageFormatProperties*>(structExtension_out));
9952 break;
9953 }
9954 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: {
9955 deepcopy_VkPhysicalDeviceIDProperties(
9956 alloc, rootType,
9957 reinterpret_cast<const VkPhysicalDeviceIDProperties*>(structExtension),
9958 reinterpret_cast<VkPhysicalDeviceIDProperties*>(structExtension_out));
9959 break;
9960 }
9961 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: {
9962 deepcopy_VkExternalMemoryImageCreateInfo(
9963 alloc, rootType,
9964 reinterpret_cast<const VkExternalMemoryImageCreateInfo*>(structExtension),
9965 reinterpret_cast<VkExternalMemoryImageCreateInfo*>(structExtension_out));
9966 break;
9967 }
9968 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: {
9969 deepcopy_VkExternalMemoryBufferCreateInfo(
9970 alloc, rootType,
9971 reinterpret_cast<const VkExternalMemoryBufferCreateInfo*>(structExtension),
9972 reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(structExtension_out));
9973 break;
9974 }
9975 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: {
9976 deepcopy_VkExportMemoryAllocateInfo(
9977 alloc, rootType,
9978 reinterpret_cast<const VkExportMemoryAllocateInfo*>(structExtension),
9979 reinterpret_cast<VkExportMemoryAllocateInfo*>(structExtension_out));
9980 break;
9981 }
9982 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: {
9983 deepcopy_VkExportFenceCreateInfo(
9984 alloc, rootType, reinterpret_cast<const VkExportFenceCreateInfo*>(structExtension),
9985 reinterpret_cast<VkExportFenceCreateInfo*>(structExtension_out));
9986 break;
9987 }
9988 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: {
9989 deepcopy_VkExportSemaphoreCreateInfo(
9990 alloc, rootType,
9991 reinterpret_cast<const VkExportSemaphoreCreateInfo*>(structExtension),
9992 reinterpret_cast<VkExportSemaphoreCreateInfo*>(structExtension_out));
9993 break;
9994 }
9995 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: {
9996 deepcopy_VkPhysicalDeviceMaintenance3Properties(
9997 alloc, rootType,
9998 reinterpret_cast<const VkPhysicalDeviceMaintenance3Properties*>(structExtension),
9999 reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(structExtension_out));
10000 break;
10001 }
10002 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES: {
10003 deepcopy_VkPhysicalDeviceShaderDrawParametersFeatures(
10004 alloc, rootType,
10005 reinterpret_cast<const VkPhysicalDeviceShaderDrawParametersFeatures*>(
10006 structExtension),
10007 reinterpret_cast<VkPhysicalDeviceShaderDrawParametersFeatures*>(
10008 structExtension_out));
10009 break;
10010 }
10011 #endif
10012 #ifdef VK_VERSION_1_2
10013 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES: {
10014 deepcopy_VkPhysicalDeviceVulkan11Features(
10015 alloc, rootType,
10016 reinterpret_cast<const VkPhysicalDeviceVulkan11Features*>(structExtension),
10017 reinterpret_cast<VkPhysicalDeviceVulkan11Features*>(structExtension_out));
10018 break;
10019 }
10020 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES: {
10021 deepcopy_VkPhysicalDeviceVulkan11Properties(
10022 alloc, rootType,
10023 reinterpret_cast<const VkPhysicalDeviceVulkan11Properties*>(structExtension),
10024 reinterpret_cast<VkPhysicalDeviceVulkan11Properties*>(structExtension_out));
10025 break;
10026 }
10027 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: {
10028 deepcopy_VkPhysicalDeviceVulkan12Features(
10029 alloc, rootType,
10030 reinterpret_cast<const VkPhysicalDeviceVulkan12Features*>(structExtension),
10031 reinterpret_cast<VkPhysicalDeviceVulkan12Features*>(structExtension_out));
10032 break;
10033 }
10034 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES: {
10035 deepcopy_VkPhysicalDeviceVulkan12Properties(
10036 alloc, rootType,
10037 reinterpret_cast<const VkPhysicalDeviceVulkan12Properties*>(structExtension),
10038 reinterpret_cast<VkPhysicalDeviceVulkan12Properties*>(structExtension_out));
10039 break;
10040 }
10041 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO: {
10042 deepcopy_VkImageFormatListCreateInfo(
10043 alloc, rootType,
10044 reinterpret_cast<const VkImageFormatListCreateInfo*>(structExtension),
10045 reinterpret_cast<VkImageFormatListCreateInfo*>(structExtension_out));
10046 break;
10047 }
10048 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES: {
10049 deepcopy_VkPhysicalDevice8BitStorageFeatures(
10050 alloc, rootType,
10051 reinterpret_cast<const VkPhysicalDevice8BitStorageFeatures*>(structExtension),
10052 reinterpret_cast<VkPhysicalDevice8BitStorageFeatures*>(structExtension_out));
10053 break;
10054 }
10055 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES: {
10056 deepcopy_VkPhysicalDeviceDriverProperties(
10057 alloc, rootType,
10058 reinterpret_cast<const VkPhysicalDeviceDriverProperties*>(structExtension),
10059 reinterpret_cast<VkPhysicalDeviceDriverProperties*>(structExtension_out));
10060 break;
10061 }
10062 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES: {
10063 deepcopy_VkPhysicalDeviceShaderAtomicInt64Features(
10064 alloc, rootType,
10065 reinterpret_cast<const VkPhysicalDeviceShaderAtomicInt64Features*>(structExtension),
10066 reinterpret_cast<VkPhysicalDeviceShaderAtomicInt64Features*>(structExtension_out));
10067 break;
10068 }
10069 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES: {
10070 deepcopy_VkPhysicalDeviceShaderFloat16Int8Features(
10071 alloc, rootType,
10072 reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension),
10073 reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension_out));
10074 break;
10075 }
10076 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES: {
10077 deepcopy_VkPhysicalDeviceFloatControlsProperties(
10078 alloc, rootType,
10079 reinterpret_cast<const VkPhysicalDeviceFloatControlsProperties*>(structExtension),
10080 reinterpret_cast<VkPhysicalDeviceFloatControlsProperties*>(structExtension_out));
10081 break;
10082 }
10083 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO: {
10084 deepcopy_VkDescriptorSetLayoutBindingFlagsCreateInfo(
10085 alloc, rootType,
10086 reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfo*>(
10087 structExtension),
10088 reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfo*>(
10089 structExtension_out));
10090 break;
10091 }
10092 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES: {
10093 deepcopy_VkPhysicalDeviceDescriptorIndexingFeatures(
10094 alloc, rootType,
10095 reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeatures*>(
10096 structExtension),
10097 reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeatures*>(structExtension_out));
10098 break;
10099 }
10100 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES: {
10101 deepcopy_VkPhysicalDeviceDescriptorIndexingProperties(
10102 alloc, rootType,
10103 reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingProperties*>(
10104 structExtension),
10105 reinterpret_cast<VkPhysicalDeviceDescriptorIndexingProperties*>(
10106 structExtension_out));
10107 break;
10108 }
10109 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO: {
10110 deepcopy_VkDescriptorSetVariableDescriptorCountAllocateInfo(
10111 alloc, rootType,
10112 reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfo*>(
10113 structExtension),
10114 reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfo*>(
10115 structExtension_out));
10116 break;
10117 }
10118 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT: {
10119 deepcopy_VkDescriptorSetVariableDescriptorCountLayoutSupport(
10120 alloc, rootType,
10121 reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupport*>(
10122 structExtension),
10123 reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupport*>(
10124 structExtension_out));
10125 break;
10126 }
10127 case VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE: {
10128 deepcopy_VkSubpassDescriptionDepthStencilResolve(
10129 alloc, rootType,
10130 reinterpret_cast<const VkSubpassDescriptionDepthStencilResolve*>(structExtension),
10131 reinterpret_cast<VkSubpassDescriptionDepthStencilResolve*>(structExtension_out));
10132 break;
10133 }
10134 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES: {
10135 deepcopy_VkPhysicalDeviceDepthStencilResolveProperties(
10136 alloc, rootType,
10137 reinterpret_cast<const VkPhysicalDeviceDepthStencilResolveProperties*>(
10138 structExtension),
10139 reinterpret_cast<VkPhysicalDeviceDepthStencilResolveProperties*>(
10140 structExtension_out));
10141 break;
10142 }
10143 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES: {
10144 deepcopy_VkPhysicalDeviceScalarBlockLayoutFeatures(
10145 alloc, rootType,
10146 reinterpret_cast<const VkPhysicalDeviceScalarBlockLayoutFeatures*>(structExtension),
10147 reinterpret_cast<VkPhysicalDeviceScalarBlockLayoutFeatures*>(structExtension_out));
10148 break;
10149 }
10150 case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO: {
10151 deepcopy_VkImageStencilUsageCreateInfo(
10152 alloc, rootType,
10153 reinterpret_cast<const VkImageStencilUsageCreateInfo*>(structExtension),
10154 reinterpret_cast<VkImageStencilUsageCreateInfo*>(structExtension_out));
10155 break;
10156 }
10157 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO: {
10158 deepcopy_VkSamplerReductionModeCreateInfo(
10159 alloc, rootType,
10160 reinterpret_cast<const VkSamplerReductionModeCreateInfo*>(structExtension),
10161 reinterpret_cast<VkSamplerReductionModeCreateInfo*>(structExtension_out));
10162 break;
10163 }
10164 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: {
10165 deepcopy_VkPhysicalDeviceSamplerFilterMinmaxProperties(
10166 alloc, rootType,
10167 reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxProperties*>(
10168 structExtension),
10169 reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxProperties*>(
10170 structExtension_out));
10171 break;
10172 }
10173 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES: {
10174 deepcopy_VkPhysicalDeviceVulkanMemoryModelFeatures(
10175 alloc, rootType,
10176 reinterpret_cast<const VkPhysicalDeviceVulkanMemoryModelFeatures*>(structExtension),
10177 reinterpret_cast<VkPhysicalDeviceVulkanMemoryModelFeatures*>(structExtension_out));
10178 break;
10179 }
10180 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGELESS_FRAMEBUFFER_FEATURES: {
10181 deepcopy_VkPhysicalDeviceImagelessFramebufferFeatures(
10182 alloc, rootType,
10183 reinterpret_cast<const VkPhysicalDeviceImagelessFramebufferFeatures*>(
10184 structExtension),
10185 reinterpret_cast<VkPhysicalDeviceImagelessFramebufferFeatures*>(
10186 structExtension_out));
10187 break;
10188 }
10189 case VK_STRUCTURE_TYPE_FRAMEBUFFER_ATTACHMENTS_CREATE_INFO: {
10190 deepcopy_VkFramebufferAttachmentsCreateInfo(
10191 alloc, rootType,
10192 reinterpret_cast<const VkFramebufferAttachmentsCreateInfo*>(structExtension),
10193 reinterpret_cast<VkFramebufferAttachmentsCreateInfo*>(structExtension_out));
10194 break;
10195 }
10196 case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: {
10197 deepcopy_VkRenderPassAttachmentBeginInfo(
10198 alloc, rootType,
10199 reinterpret_cast<const VkRenderPassAttachmentBeginInfo*>(structExtension),
10200 reinterpret_cast<VkRenderPassAttachmentBeginInfo*>(structExtension_out));
10201 break;
10202 }
10203 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES: {
10204 deepcopy_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(
10205 alloc, rootType,
10206 reinterpret_cast<const VkPhysicalDeviceUniformBufferStandardLayoutFeatures*>(
10207 structExtension),
10208 reinterpret_cast<VkPhysicalDeviceUniformBufferStandardLayoutFeatures*>(
10209 structExtension_out));
10210 break;
10211 }
10212 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES: {
10213 deepcopy_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(
10214 alloc, rootType,
10215 reinterpret_cast<const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>(
10216 structExtension),
10217 reinterpret_cast<VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures*>(
10218 structExtension_out));
10219 break;
10220 }
10221 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES: {
10222 deepcopy_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(
10223 alloc, rootType,
10224 reinterpret_cast<const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*>(
10225 structExtension),
10226 reinterpret_cast<VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures*>(
10227 structExtension_out));
10228 break;
10229 }
10230 case VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT: {
10231 deepcopy_VkAttachmentReferenceStencilLayout(
10232 alloc, rootType,
10233 reinterpret_cast<const VkAttachmentReferenceStencilLayout*>(structExtension),
10234 reinterpret_cast<VkAttachmentReferenceStencilLayout*>(structExtension_out));
10235 break;
10236 }
10237 case VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT: {
10238 deepcopy_VkAttachmentDescriptionStencilLayout(
10239 alloc, rootType,
10240 reinterpret_cast<const VkAttachmentDescriptionStencilLayout*>(structExtension),
10241 reinterpret_cast<VkAttachmentDescriptionStencilLayout*>(structExtension_out));
10242 break;
10243 }
10244 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES: {
10245 deepcopy_VkPhysicalDeviceHostQueryResetFeatures(
10246 alloc, rootType,
10247 reinterpret_cast<const VkPhysicalDeviceHostQueryResetFeatures*>(structExtension),
10248 reinterpret_cast<VkPhysicalDeviceHostQueryResetFeatures*>(structExtension_out));
10249 break;
10250 }
10251 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: {
10252 deepcopy_VkPhysicalDeviceTimelineSemaphoreFeatures(
10253 alloc, rootType,
10254 reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreFeatures*>(structExtension),
10255 reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreFeatures*>(structExtension_out));
10256 break;
10257 }
10258 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: {
10259 deepcopy_VkPhysicalDeviceTimelineSemaphoreProperties(
10260 alloc, rootType,
10261 reinterpret_cast<const VkPhysicalDeviceTimelineSemaphoreProperties*>(
10262 structExtension),
10263 reinterpret_cast<VkPhysicalDeviceTimelineSemaphoreProperties*>(
10264 structExtension_out));
10265 break;
10266 }
10267 case VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO: {
10268 deepcopy_VkSemaphoreTypeCreateInfo(
10269 alloc, rootType,
10270 reinterpret_cast<const VkSemaphoreTypeCreateInfo*>(structExtension),
10271 reinterpret_cast<VkSemaphoreTypeCreateInfo*>(structExtension_out));
10272 break;
10273 }
10274 case VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO: {
10275 deepcopy_VkTimelineSemaphoreSubmitInfo(
10276 alloc, rootType,
10277 reinterpret_cast<const VkTimelineSemaphoreSubmitInfo*>(structExtension),
10278 reinterpret_cast<VkTimelineSemaphoreSubmitInfo*>(structExtension_out));
10279 break;
10280 }
10281 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES: {
10282 deepcopy_VkPhysicalDeviceBufferDeviceAddressFeatures(
10283 alloc, rootType,
10284 reinterpret_cast<const VkPhysicalDeviceBufferDeviceAddressFeatures*>(
10285 structExtension),
10286 reinterpret_cast<VkPhysicalDeviceBufferDeviceAddressFeatures*>(
10287 structExtension_out));
10288 break;
10289 }
10290 case VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO: {
10291 deepcopy_VkBufferOpaqueCaptureAddressCreateInfo(
10292 alloc, rootType,
10293 reinterpret_cast<const VkBufferOpaqueCaptureAddressCreateInfo*>(structExtension),
10294 reinterpret_cast<VkBufferOpaqueCaptureAddressCreateInfo*>(structExtension_out));
10295 break;
10296 }
10297 case VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO: {
10298 deepcopy_VkMemoryOpaqueCaptureAddressAllocateInfo(
10299 alloc, rootType,
10300 reinterpret_cast<const VkMemoryOpaqueCaptureAddressAllocateInfo*>(structExtension),
10301 reinterpret_cast<VkMemoryOpaqueCaptureAddressAllocateInfo*>(structExtension_out));
10302 break;
10303 }
10304 #endif
10305 #ifdef VK_VERSION_1_3
10306 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES: {
10307 deepcopy_VkPhysicalDeviceVulkan13Features(
10308 alloc, rootType,
10309 reinterpret_cast<const VkPhysicalDeviceVulkan13Features*>(structExtension),
10310 reinterpret_cast<VkPhysicalDeviceVulkan13Features*>(structExtension_out));
10311 break;
10312 }
10313 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_PROPERTIES: {
10314 deepcopy_VkPhysicalDeviceVulkan13Properties(
10315 alloc, rootType,
10316 reinterpret_cast<const VkPhysicalDeviceVulkan13Properties*>(structExtension),
10317 reinterpret_cast<VkPhysicalDeviceVulkan13Properties*>(structExtension_out));
10318 break;
10319 }
10320 case VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO: {
10321 deepcopy_VkPipelineCreationFeedbackCreateInfo(
10322 alloc, rootType,
10323 reinterpret_cast<const VkPipelineCreationFeedbackCreateInfo*>(structExtension),
10324 reinterpret_cast<VkPipelineCreationFeedbackCreateInfo*>(structExtension_out));
10325 break;
10326 }
10327 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES: {
10328 deepcopy_VkPhysicalDeviceShaderTerminateInvocationFeatures(
10329 alloc, rootType,
10330 reinterpret_cast<const VkPhysicalDeviceShaderTerminateInvocationFeatures*>(
10331 structExtension),
10332 reinterpret_cast<VkPhysicalDeviceShaderTerminateInvocationFeatures*>(
10333 structExtension_out));
10334 break;
10335 }
10336 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES: {
10337 deepcopy_VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures(
10338 alloc, rootType,
10339 reinterpret_cast<const VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures*>(
10340 structExtension),
10341 reinterpret_cast<VkPhysicalDeviceShaderDemoteToHelperInvocationFeatures*>(
10342 structExtension_out));
10343 break;
10344 }
10345 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES: {
10346 deepcopy_VkPhysicalDevicePrivateDataFeatures(
10347 alloc, rootType,
10348 reinterpret_cast<const VkPhysicalDevicePrivateDataFeatures*>(structExtension),
10349 reinterpret_cast<VkPhysicalDevicePrivateDataFeatures*>(structExtension_out));
10350 break;
10351 }
10352 case VK_STRUCTURE_TYPE_DEVICE_PRIVATE_DATA_CREATE_INFO: {
10353 deepcopy_VkDevicePrivateDataCreateInfo(
10354 alloc, rootType,
10355 reinterpret_cast<const VkDevicePrivateDataCreateInfo*>(structExtension),
10356 reinterpret_cast<VkDevicePrivateDataCreateInfo*>(structExtension_out));
10357 break;
10358 }
10359 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_CREATION_CACHE_CONTROL_FEATURES: {
10360 deepcopy_VkPhysicalDevicePipelineCreationCacheControlFeatures(
10361 alloc, rootType,
10362 reinterpret_cast<const VkPhysicalDevicePipelineCreationCacheControlFeatures*>(
10363 structExtension),
10364 reinterpret_cast<VkPhysicalDevicePipelineCreationCacheControlFeatures*>(
10365 structExtension_out));
10366 break;
10367 }
10368 case VK_STRUCTURE_TYPE_MEMORY_BARRIER_2: {
10369 deepcopy_VkMemoryBarrier2(alloc, rootType,
10370 reinterpret_cast<const VkMemoryBarrier2*>(structExtension),
10371 reinterpret_cast<VkMemoryBarrier2*>(structExtension_out));
10372 break;
10373 }
10374 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES: {
10375 deepcopy_VkPhysicalDeviceSynchronization2Features(
10376 alloc, rootType,
10377 reinterpret_cast<const VkPhysicalDeviceSynchronization2Features*>(structExtension),
10378 reinterpret_cast<VkPhysicalDeviceSynchronization2Features*>(structExtension_out));
10379 break;
10380 }
10381 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ZERO_INITIALIZE_WORKGROUP_MEMORY_FEATURES: {
10382 deepcopy_VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures(
10383 alloc, rootType,
10384 reinterpret_cast<const VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures*>(
10385 structExtension),
10386 reinterpret_cast<VkPhysicalDeviceZeroInitializeWorkgroupMemoryFeatures*>(
10387 structExtension_out));
10388 break;
10389 }
10390 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_ROBUSTNESS_FEATURES: {
10391 deepcopy_VkPhysicalDeviceImageRobustnessFeatures(
10392 alloc, rootType,
10393 reinterpret_cast<const VkPhysicalDeviceImageRobustnessFeatures*>(structExtension),
10394 reinterpret_cast<VkPhysicalDeviceImageRobustnessFeatures*>(structExtension_out));
10395 break;
10396 }
10397 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: {
10398 deepcopy_VkPhysicalDeviceSubgroupSizeControlFeatures(
10399 alloc, rootType,
10400 reinterpret_cast<const VkPhysicalDeviceSubgroupSizeControlFeatures*>(
10401 structExtension),
10402 reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlFeatures*>(
10403 structExtension_out));
10404 break;
10405 }
10406 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: {
10407 deepcopy_VkPhysicalDeviceSubgroupSizeControlProperties(
10408 alloc, rootType,
10409 reinterpret_cast<const VkPhysicalDeviceSubgroupSizeControlProperties*>(
10410 structExtension),
10411 reinterpret_cast<VkPhysicalDeviceSubgroupSizeControlProperties*>(
10412 structExtension_out));
10413 break;
10414 }
10415 case VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO: {
10416 deepcopy_VkPipelineShaderStageRequiredSubgroupSizeCreateInfo(
10417 alloc, rootType,
10418 reinterpret_cast<const VkPipelineShaderStageRequiredSubgroupSizeCreateInfo*>(
10419 structExtension),
10420 reinterpret_cast<VkPipelineShaderStageRequiredSubgroupSizeCreateInfo*>(
10421 structExtension_out));
10422 break;
10423 }
10424 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES: {
10425 deepcopy_VkPhysicalDeviceInlineUniformBlockFeatures(
10426 alloc, rootType,
10427 reinterpret_cast<const VkPhysicalDeviceInlineUniformBlockFeatures*>(
10428 structExtension),
10429 reinterpret_cast<VkPhysicalDeviceInlineUniformBlockFeatures*>(structExtension_out));
10430 break;
10431 }
10432 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES: {
10433 deepcopy_VkPhysicalDeviceInlineUniformBlockProperties(
10434 alloc, rootType,
10435 reinterpret_cast<const VkPhysicalDeviceInlineUniformBlockProperties*>(
10436 structExtension),
10437 reinterpret_cast<VkPhysicalDeviceInlineUniformBlockProperties*>(
10438 structExtension_out));
10439 break;
10440 }
10441 case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK: {
10442 deepcopy_VkWriteDescriptorSetInlineUniformBlock(
10443 alloc, rootType,
10444 reinterpret_cast<const VkWriteDescriptorSetInlineUniformBlock*>(structExtension),
10445 reinterpret_cast<VkWriteDescriptorSetInlineUniformBlock*>(structExtension_out));
10446 break;
10447 }
10448 case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO: {
10449 deepcopy_VkDescriptorPoolInlineUniformBlockCreateInfo(
10450 alloc, rootType,
10451 reinterpret_cast<const VkDescriptorPoolInlineUniformBlockCreateInfo*>(
10452 structExtension),
10453 reinterpret_cast<VkDescriptorPoolInlineUniformBlockCreateInfo*>(
10454 structExtension_out));
10455 break;
10456 }
10457 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES: {
10458 deepcopy_VkPhysicalDeviceTextureCompressionASTCHDRFeatures(
10459 alloc, rootType,
10460 reinterpret_cast<const VkPhysicalDeviceTextureCompressionASTCHDRFeatures*>(
10461 structExtension),
10462 reinterpret_cast<VkPhysicalDeviceTextureCompressionASTCHDRFeatures*>(
10463 structExtension_out));
10464 break;
10465 }
10466 case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: {
10467 deepcopy_VkPipelineRenderingCreateInfo(
10468 alloc, rootType,
10469 reinterpret_cast<const VkPipelineRenderingCreateInfo*>(structExtension),
10470 reinterpret_cast<VkPipelineRenderingCreateInfo*>(structExtension_out));
10471 break;
10472 }
10473 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_FEATURES: {
10474 deepcopy_VkPhysicalDeviceDynamicRenderingFeatures(
10475 alloc, rootType,
10476 reinterpret_cast<const VkPhysicalDeviceDynamicRenderingFeatures*>(structExtension),
10477 reinterpret_cast<VkPhysicalDeviceDynamicRenderingFeatures*>(structExtension_out));
10478 break;
10479 }
10480 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_RENDERING_INFO: {
10481 deepcopy_VkCommandBufferInheritanceRenderingInfo(
10482 alloc, rootType,
10483 reinterpret_cast<const VkCommandBufferInheritanceRenderingInfo*>(structExtension),
10484 reinterpret_cast<VkCommandBufferInheritanceRenderingInfo*>(structExtension_out));
10485 break;
10486 }
10487 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES: {
10488 deepcopy_VkPhysicalDeviceShaderIntegerDotProductFeatures(
10489 alloc, rootType,
10490 reinterpret_cast<const VkPhysicalDeviceShaderIntegerDotProductFeatures*>(
10491 structExtension),
10492 reinterpret_cast<VkPhysicalDeviceShaderIntegerDotProductFeatures*>(
10493 structExtension_out));
10494 break;
10495 }
10496 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES: {
10497 deepcopy_VkPhysicalDeviceShaderIntegerDotProductProperties(
10498 alloc, rootType,
10499 reinterpret_cast<const VkPhysicalDeviceShaderIntegerDotProductProperties*>(
10500 structExtension),
10501 reinterpret_cast<VkPhysicalDeviceShaderIntegerDotProductProperties*>(
10502 structExtension_out));
10503 break;
10504 }
10505 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES: {
10506 deepcopy_VkPhysicalDeviceTexelBufferAlignmentProperties(
10507 alloc, rootType,
10508 reinterpret_cast<const VkPhysicalDeviceTexelBufferAlignmentProperties*>(
10509 structExtension),
10510 reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentProperties*>(
10511 structExtension_out));
10512 break;
10513 }
10514 case VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3: {
10515 deepcopy_VkFormatProperties3(
10516 alloc, rootType, reinterpret_cast<const VkFormatProperties3*>(structExtension),
10517 reinterpret_cast<VkFormatProperties3*>(structExtension_out));
10518 break;
10519 }
10520 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES: {
10521 deepcopy_VkPhysicalDeviceMaintenance4Features(
10522 alloc, rootType,
10523 reinterpret_cast<const VkPhysicalDeviceMaintenance4Features*>(structExtension),
10524 reinterpret_cast<VkPhysicalDeviceMaintenance4Features*>(structExtension_out));
10525 break;
10526 }
10527 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES: {
10528 deepcopy_VkPhysicalDeviceMaintenance4Properties(
10529 alloc, rootType,
10530 reinterpret_cast<const VkPhysicalDeviceMaintenance4Properties*>(structExtension),
10531 reinterpret_cast<VkPhysicalDeviceMaintenance4Properties*>(structExtension_out));
10532 break;
10533 }
10534 #endif
10535 #ifdef VK_KHR_swapchain
10536 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: {
10537 deepcopy_VkImageSwapchainCreateInfoKHR(
10538 alloc, rootType,
10539 reinterpret_cast<const VkImageSwapchainCreateInfoKHR*>(structExtension),
10540 reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(structExtension_out));
10541 break;
10542 }
10543 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: {
10544 deepcopy_VkBindImageMemorySwapchainInfoKHR(
10545 alloc, rootType,
10546 reinterpret_cast<const VkBindImageMemorySwapchainInfoKHR*>(structExtension),
10547 reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(structExtension_out));
10548 break;
10549 }
10550 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: {
10551 deepcopy_VkDeviceGroupPresentInfoKHR(
10552 alloc, rootType,
10553 reinterpret_cast<const VkDeviceGroupPresentInfoKHR*>(structExtension),
10554 reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(structExtension_out));
10555 break;
10556 }
10557 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: {
10558 deepcopy_VkDeviceGroupSwapchainCreateInfoKHR(
10559 alloc, rootType,
10560 reinterpret_cast<const VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension),
10561 reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension_out));
10562 break;
10563 }
10564 #endif
10565 #ifdef VK_KHR_dynamic_rendering
10566 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: {
10567 deepcopy_VkRenderingFragmentShadingRateAttachmentInfoKHR(
10568 alloc, rootType,
10569 reinterpret_cast<const VkRenderingFragmentShadingRateAttachmentInfoKHR*>(
10570 structExtension),
10571 reinterpret_cast<VkRenderingFragmentShadingRateAttachmentInfoKHR*>(
10572 structExtension_out));
10573 break;
10574 }
10575 case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: {
10576 deepcopy_VkRenderingFragmentDensityMapAttachmentInfoEXT(
10577 alloc, rootType,
10578 reinterpret_cast<const VkRenderingFragmentDensityMapAttachmentInfoEXT*>(
10579 structExtension),
10580 reinterpret_cast<VkRenderingFragmentDensityMapAttachmentInfoEXT*>(
10581 structExtension_out));
10582 break;
10583 }
10584 case VK_STRUCTURE_TYPE_ATTACHMENT_SAMPLE_COUNT_INFO_AMD: {
10585 deepcopy_VkAttachmentSampleCountInfoAMD(
10586 alloc, rootType,
10587 reinterpret_cast<const VkAttachmentSampleCountInfoAMD*>(structExtension),
10588 reinterpret_cast<VkAttachmentSampleCountInfoAMD*>(structExtension_out));
10589 break;
10590 }
10591 case VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_ATTRIBUTES_INFO_NVX: {
10592 deepcopy_VkMultiviewPerViewAttributesInfoNVX(
10593 alloc, rootType,
10594 reinterpret_cast<const VkMultiviewPerViewAttributesInfoNVX*>(structExtension),
10595 reinterpret_cast<VkMultiviewPerViewAttributesInfoNVX*>(structExtension_out));
10596 break;
10597 }
10598 #endif
10599 #ifdef VK_KHR_incremental_present
10600 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: {
10601 deepcopy_VkPresentRegionsKHR(
10602 alloc, rootType, reinterpret_cast<const VkPresentRegionsKHR*>(structExtension),
10603 reinterpret_cast<VkPresentRegionsKHR*>(structExtension_out));
10604 break;
10605 }
10606 #endif
10607 #ifdef VK_KHR_pipeline_executable_properties
10608 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR: {
10609 deepcopy_VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR(
10610 alloc, rootType,
10611 reinterpret_cast<const VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*>(
10612 structExtension),
10613 reinterpret_cast<VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR*>(
10614 structExtension_out));
10615 break;
10616 }
10617 #endif
10618 #ifdef VK_KHR_pipeline_library
10619 case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: {
10620 deepcopy_VkPipelineLibraryCreateInfoKHR(
10621 alloc, rootType,
10622 reinterpret_cast<const VkPipelineLibraryCreateInfoKHR*>(structExtension),
10623 reinterpret_cast<VkPipelineLibraryCreateInfoKHR*>(structExtension_out));
10624 break;
10625 }
10626 #endif
10627 #ifdef VK_KHR_synchronization2
10628 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_2_NV: {
10629 deepcopy_VkQueueFamilyCheckpointProperties2NV(
10630 alloc, rootType,
10631 reinterpret_cast<const VkQueueFamilyCheckpointProperties2NV*>(structExtension),
10632 reinterpret_cast<VkQueueFamilyCheckpointProperties2NV*>(structExtension_out));
10633 break;
10634 }
10635 #endif
10636 #ifdef VK_KHR_maintenance5
10637 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR: {
10638 deepcopy_VkPhysicalDeviceMaintenance5FeaturesKHR(
10639 alloc, rootType,
10640 reinterpret_cast<const VkPhysicalDeviceMaintenance5FeaturesKHR*>(structExtension),
10641 reinterpret_cast<VkPhysicalDeviceMaintenance5FeaturesKHR*>(structExtension_out));
10642 break;
10643 }
10644 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR: {
10645 deepcopy_VkPhysicalDeviceMaintenance5PropertiesKHR(
10646 alloc, rootType,
10647 reinterpret_cast<const VkPhysicalDeviceMaintenance5PropertiesKHR*>(structExtension),
10648 reinterpret_cast<VkPhysicalDeviceMaintenance5PropertiesKHR*>(structExtension_out));
10649 break;
10650 }
10651 case VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR: {
10652 deepcopy_VkPipelineCreateFlags2CreateInfoKHR(
10653 alloc, rootType,
10654 reinterpret_cast<const VkPipelineCreateFlags2CreateInfoKHR*>(structExtension),
10655 reinterpret_cast<VkPipelineCreateFlags2CreateInfoKHR*>(structExtension_out));
10656 break;
10657 }
10658 case VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR: {
10659 deepcopy_VkBufferUsageFlags2CreateInfoKHR(
10660 alloc, rootType,
10661 reinterpret_cast<const VkBufferUsageFlags2CreateInfoKHR*>(structExtension),
10662 reinterpret_cast<VkBufferUsageFlags2CreateInfoKHR*>(structExtension_out));
10663 break;
10664 }
10665 #endif
10666 #ifdef VK_KHR_line_rasterization
10667 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR: {
10668 deepcopy_VkPhysicalDeviceLineRasterizationFeaturesKHR(
10669 alloc, rootType,
10670 reinterpret_cast<const VkPhysicalDeviceLineRasterizationFeaturesKHR*>(
10671 structExtension),
10672 reinterpret_cast<VkPhysicalDeviceLineRasterizationFeaturesKHR*>(
10673 structExtension_out));
10674 break;
10675 }
10676 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR: {
10677 deepcopy_VkPhysicalDeviceLineRasterizationPropertiesKHR(
10678 alloc, rootType,
10679 reinterpret_cast<const VkPhysicalDeviceLineRasterizationPropertiesKHR*>(
10680 structExtension),
10681 reinterpret_cast<VkPhysicalDeviceLineRasterizationPropertiesKHR*>(
10682 structExtension_out));
10683 break;
10684 }
10685 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR: {
10686 deepcopy_VkPipelineRasterizationLineStateCreateInfoKHR(
10687 alloc, rootType,
10688 reinterpret_cast<const VkPipelineRasterizationLineStateCreateInfoKHR*>(
10689 structExtension),
10690 reinterpret_cast<VkPipelineRasterizationLineStateCreateInfoKHR*>(
10691 structExtension_out));
10692 break;
10693 }
10694 #endif
10695 #ifdef VK_ANDROID_native_buffer
10696 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: {
10697 deepcopy_VkNativeBufferANDROID(
10698 alloc, rootType, reinterpret_cast<const VkNativeBufferANDROID*>(structExtension),
10699 reinterpret_cast<VkNativeBufferANDROID*>(structExtension_out));
10700 break;
10701 }
10702 #endif
10703 #ifdef VK_EXT_debug_report
10704 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: {
10705 deepcopy_VkDebugReportCallbackCreateInfoEXT(
10706 alloc, rootType,
10707 reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(structExtension),
10708 reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(structExtension_out));
10709 break;
10710 }
10711 #endif
10712 #ifdef VK_EXT_transform_feedback
10713 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT: {
10714 deepcopy_VkPhysicalDeviceTransformFeedbackFeaturesEXT(
10715 alloc, rootType,
10716 reinterpret_cast<const VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(
10717 structExtension),
10718 reinterpret_cast<VkPhysicalDeviceTransformFeedbackFeaturesEXT*>(
10719 structExtension_out));
10720 break;
10721 }
10722 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT: {
10723 deepcopy_VkPhysicalDeviceTransformFeedbackPropertiesEXT(
10724 alloc, rootType,
10725 reinterpret_cast<const VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(
10726 structExtension),
10727 reinterpret_cast<VkPhysicalDeviceTransformFeedbackPropertiesEXT*>(
10728 structExtension_out));
10729 break;
10730 }
10731 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT: {
10732 deepcopy_VkPipelineRasterizationStateStreamCreateInfoEXT(
10733 alloc, rootType,
10734 reinterpret_cast<const VkPipelineRasterizationStateStreamCreateInfoEXT*>(
10735 structExtension),
10736 reinterpret_cast<VkPipelineRasterizationStateStreamCreateInfoEXT*>(
10737 structExtension_out));
10738 break;
10739 }
10740 #endif
10741 #ifdef VK_EXT_depth_clip_enable
10742 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT: {
10743 deepcopy_VkPhysicalDeviceDepthClipEnableFeaturesEXT(
10744 alloc, rootType,
10745 reinterpret_cast<const VkPhysicalDeviceDepthClipEnableFeaturesEXT*>(
10746 structExtension),
10747 reinterpret_cast<VkPhysicalDeviceDepthClipEnableFeaturesEXT*>(structExtension_out));
10748 break;
10749 }
10750 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_DEPTH_CLIP_STATE_CREATE_INFO_EXT: {
10751 deepcopy_VkPipelineRasterizationDepthClipStateCreateInfoEXT(
10752 alloc, rootType,
10753 reinterpret_cast<const VkPipelineRasterizationDepthClipStateCreateInfoEXT*>(
10754 structExtension),
10755 reinterpret_cast<VkPipelineRasterizationDepthClipStateCreateInfoEXT*>(
10756 structExtension_out));
10757 break;
10758 }
10759 #endif
10760 #ifdef VK_EXT_debug_utils
10761 case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: {
10762 deepcopy_VkDebugUtilsObjectNameInfoEXT(
10763 alloc, rootType,
10764 reinterpret_cast<const VkDebugUtilsObjectNameInfoEXT*>(structExtension),
10765 reinterpret_cast<VkDebugUtilsObjectNameInfoEXT*>(structExtension_out));
10766 break;
10767 }
10768 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: {
10769 deepcopy_VkDebugUtilsMessengerCreateInfoEXT(
10770 alloc, rootType,
10771 reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(structExtension),
10772 reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(structExtension_out));
10773 break;
10774 }
10775 #endif
10776 #ifdef VK_EXT_image_drm_format_modifier
10777 case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: {
10778 deepcopy_VkDrmFormatModifierPropertiesListEXT(
10779 alloc, rootType,
10780 reinterpret_cast<const VkDrmFormatModifierPropertiesListEXT*>(structExtension),
10781 reinterpret_cast<VkDrmFormatModifierPropertiesListEXT*>(structExtension_out));
10782 break;
10783 }
10784 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: {
10785 deepcopy_VkPhysicalDeviceImageDrmFormatModifierInfoEXT(
10786 alloc, rootType,
10787 reinterpret_cast<const VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(
10788 structExtension),
10789 reinterpret_cast<VkPhysicalDeviceImageDrmFormatModifierInfoEXT*>(
10790 structExtension_out));
10791 break;
10792 }
10793 case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: {
10794 deepcopy_VkImageDrmFormatModifierListCreateInfoEXT(
10795 alloc, rootType,
10796 reinterpret_cast<const VkImageDrmFormatModifierListCreateInfoEXT*>(structExtension),
10797 reinterpret_cast<VkImageDrmFormatModifierListCreateInfoEXT*>(structExtension_out));
10798 break;
10799 }
10800 case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: {
10801 deepcopy_VkImageDrmFormatModifierExplicitCreateInfoEXT(
10802 alloc, rootType,
10803 reinterpret_cast<const VkImageDrmFormatModifierExplicitCreateInfoEXT*>(
10804 structExtension),
10805 reinterpret_cast<VkImageDrmFormatModifierExplicitCreateInfoEXT*>(
10806 structExtension_out));
10807 break;
10808 }
10809 case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT: {
10810 deepcopy_VkDrmFormatModifierPropertiesList2EXT(
10811 alloc, rootType,
10812 reinterpret_cast<const VkDrmFormatModifierPropertiesList2EXT*>(structExtension),
10813 reinterpret_cast<VkDrmFormatModifierPropertiesList2EXT*>(structExtension_out));
10814 break;
10815 }
10816 #endif
10817 #ifdef VK_EXT_external_memory_host
10818 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: {
10819 deepcopy_VkImportMemoryHostPointerInfoEXT(
10820 alloc, rootType,
10821 reinterpret_cast<const VkImportMemoryHostPointerInfoEXT*>(structExtension),
10822 reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(structExtension_out));
10823 break;
10824 }
10825 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: {
10826 deepcopy_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
10827 alloc, rootType,
10828 reinterpret_cast<const VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(
10829 structExtension),
10830 reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(
10831 structExtension_out));
10832 break;
10833 }
10834 #endif
10835 #ifdef VK_EXT_vertex_attribute_divisor
10836 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: {
10837 deepcopy_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
10838 alloc, rootType,
10839 reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(
10840 structExtension),
10841 reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(
10842 structExtension_out));
10843 break;
10844 }
10845 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: {
10846 deepcopy_VkPipelineVertexInputDivisorStateCreateInfoEXT(
10847 alloc, rootType,
10848 reinterpret_cast<const VkPipelineVertexInputDivisorStateCreateInfoEXT*>(
10849 structExtension),
10850 reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(
10851 structExtension_out));
10852 break;
10853 }
10854 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
10855 deepcopy_VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT(
10856 alloc, rootType,
10857 reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(
10858 structExtension),
10859 reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*>(
10860 structExtension_out));
10861 break;
10862 }
10863 #endif
10864 #ifdef VK_EXT_fragment_density_map
10865 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: {
10866 switch (rootType) {
10867 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: {
10868 deepcopy_VkPhysicalDeviceFragmentDensityMapFeaturesEXT(
10869 alloc, rootType,
10870 reinterpret_cast<const VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10871 structExtension),
10872 reinterpret_cast<VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10873 structExtension_out));
10874 break;
10875 }
10876 case VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO: {
10877 deepcopy_VkPhysicalDeviceFragmentDensityMapFeaturesEXT(
10878 alloc, rootType,
10879 reinterpret_cast<const VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10880 structExtension),
10881 reinterpret_cast<VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10882 structExtension_out));
10883 break;
10884 }
10885 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
10886 deepcopy_VkImportColorBufferGOOGLE(
10887 alloc, rootType,
10888 reinterpret_cast<const VkImportColorBufferGOOGLE*>(structExtension),
10889 reinterpret_cast<VkImportColorBufferGOOGLE*>(structExtension_out));
10890 break;
10891 }
10892 default: {
10893 deepcopy_VkPhysicalDeviceFragmentDensityMapFeaturesEXT(
10894 alloc, rootType,
10895 reinterpret_cast<const VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10896 structExtension),
10897 reinterpret_cast<VkPhysicalDeviceFragmentDensityMapFeaturesEXT*>(
10898 structExtension_out));
10899 break;
10900 }
10901 }
10902 break;
10903 }
10904 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_PROPERTIES_EXT: {
10905 switch (rootType) {
10906 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2: {
10907 deepcopy_VkPhysicalDeviceFragmentDensityMapPropertiesEXT(
10908 alloc, rootType,
10909 reinterpret_cast<const VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(
10910 structExtension),
10911 reinterpret_cast<VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(
10912 structExtension_out));
10913 break;
10914 }
10915 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
10916 deepcopy_VkCreateBlobGOOGLE(
10917 alloc, rootType,
10918 reinterpret_cast<const VkCreateBlobGOOGLE*>(structExtension),
10919 reinterpret_cast<VkCreateBlobGOOGLE*>(structExtension_out));
10920 break;
10921 }
10922 default: {
10923 deepcopy_VkPhysicalDeviceFragmentDensityMapPropertiesEXT(
10924 alloc, rootType,
10925 reinterpret_cast<const VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(
10926 structExtension),
10927 reinterpret_cast<VkPhysicalDeviceFragmentDensityMapPropertiesEXT*>(
10928 structExtension_out));
10929 break;
10930 }
10931 }
10932 break;
10933 }
10934 case VK_STRUCTURE_TYPE_RENDER_PASS_FRAGMENT_DENSITY_MAP_CREATE_INFO_EXT: {
10935 switch (rootType) {
10936 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO: {
10937 deepcopy_VkRenderPassFragmentDensityMapCreateInfoEXT(
10938 alloc, rootType,
10939 reinterpret_cast<const VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10940 structExtension),
10941 reinterpret_cast<VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10942 structExtension_out));
10943 break;
10944 }
10945 case VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2: {
10946 deepcopy_VkRenderPassFragmentDensityMapCreateInfoEXT(
10947 alloc, rootType,
10948 reinterpret_cast<const VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10949 structExtension),
10950 reinterpret_cast<VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10951 structExtension_out));
10952 break;
10953 }
10954 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO: {
10955 deepcopy_VkImportBufferGOOGLE(
10956 alloc, rootType,
10957 reinterpret_cast<const VkImportBufferGOOGLE*>(structExtension),
10958 reinterpret_cast<VkImportBufferGOOGLE*>(structExtension_out));
10959 break;
10960 }
10961 default: {
10962 deepcopy_VkRenderPassFragmentDensityMapCreateInfoEXT(
10963 alloc, rootType,
10964 reinterpret_cast<const VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10965 structExtension),
10966 reinterpret_cast<VkRenderPassFragmentDensityMapCreateInfoEXT*>(
10967 structExtension_out));
10968 break;
10969 }
10970 }
10971 break;
10972 }
10973 #endif
10974 #ifdef VK_EXT_validation_features
10975 case VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT: {
10976 deepcopy_VkValidationFeaturesEXT(
10977 alloc, rootType, reinterpret_cast<const VkValidationFeaturesEXT*>(structExtension),
10978 reinterpret_cast<VkValidationFeaturesEXT*>(structExtension_out));
10979 break;
10980 }
10981 #endif
10982 #ifdef VK_EXT_provoking_vertex
10983 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_FEATURES_EXT: {
10984 deepcopy_VkPhysicalDeviceProvokingVertexFeaturesEXT(
10985 alloc, rootType,
10986 reinterpret_cast<const VkPhysicalDeviceProvokingVertexFeaturesEXT*>(
10987 structExtension),
10988 reinterpret_cast<VkPhysicalDeviceProvokingVertexFeaturesEXT*>(structExtension_out));
10989 break;
10990 }
10991 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: {
10992 deepcopy_VkPhysicalDeviceProvokingVertexPropertiesEXT(
10993 alloc, rootType,
10994 reinterpret_cast<const VkPhysicalDeviceProvokingVertexPropertiesEXT*>(
10995 structExtension),
10996 reinterpret_cast<VkPhysicalDeviceProvokingVertexPropertiesEXT*>(
10997 structExtension_out));
10998 break;
10999 }
11000 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT: {
11001 deepcopy_VkPipelineRasterizationProvokingVertexStateCreateInfoEXT(
11002 alloc, rootType,
11003 reinterpret_cast<const VkPipelineRasterizationProvokingVertexStateCreateInfoEXT*>(
11004 structExtension),
11005 reinterpret_cast<VkPipelineRasterizationProvokingVertexStateCreateInfoEXT*>(
11006 structExtension_out));
11007 break;
11008 }
11009 #endif
11010 #ifdef VK_EXT_index_type_uint8
11011 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
11012 deepcopy_VkPhysicalDeviceIndexTypeUint8FeaturesEXT(
11013 alloc, rootType,
11014 reinterpret_cast<const VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(structExtension),
11015 reinterpret_cast<VkPhysicalDeviceIndexTypeUint8FeaturesEXT*>(structExtension_out));
11016 break;
11017 }
11018 #endif
11019 #ifdef VK_EXT_extended_dynamic_state
11020 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT: {
11021 deepcopy_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(
11022 alloc, rootType,
11023 reinterpret_cast<const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT*>(
11024 structExtension),
11025 reinterpret_cast<VkPhysicalDeviceExtendedDynamicStateFeaturesEXT*>(
11026 structExtension_out));
11027 break;
11028 }
11029 #endif
11030 #ifdef VK_EXT_host_image_copy
11031 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT: {
11032 deepcopy_VkPhysicalDeviceHostImageCopyFeaturesEXT(
11033 alloc, rootType,
11034 reinterpret_cast<const VkPhysicalDeviceHostImageCopyFeaturesEXT*>(structExtension),
11035 reinterpret_cast<VkPhysicalDeviceHostImageCopyFeaturesEXT*>(structExtension_out));
11036 break;
11037 }
11038 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT: {
11039 deepcopy_VkPhysicalDeviceHostImageCopyPropertiesEXT(
11040 alloc, rootType,
11041 reinterpret_cast<const VkPhysicalDeviceHostImageCopyPropertiesEXT*>(
11042 structExtension),
11043 reinterpret_cast<VkPhysicalDeviceHostImageCopyPropertiesEXT*>(structExtension_out));
11044 break;
11045 }
11046 case VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT: {
11047 deepcopy_VkSubresourceHostMemcpySizeEXT(
11048 alloc, rootType,
11049 reinterpret_cast<const VkSubresourceHostMemcpySizeEXT*>(structExtension),
11050 reinterpret_cast<VkSubresourceHostMemcpySizeEXT*>(structExtension_out));
11051 break;
11052 }
11053 case VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT: {
11054 deepcopy_VkHostImageCopyDevicePerformanceQueryEXT(
11055 alloc, rootType,
11056 reinterpret_cast<const VkHostImageCopyDevicePerformanceQueryEXT*>(structExtension),
11057 reinterpret_cast<VkHostImageCopyDevicePerformanceQueryEXT*>(structExtension_out));
11058 break;
11059 }
11060 #endif
11061 #ifdef VK_EXT_swapchain_maintenance1
11062 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SWAPCHAIN_MAINTENANCE_1_FEATURES_EXT: {
11063 deepcopy_VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT(
11064 alloc, rootType,
11065 reinterpret_cast<const VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT*>(
11066 structExtension),
11067 reinterpret_cast<VkPhysicalDeviceSwapchainMaintenance1FeaturesEXT*>(
11068 structExtension_out));
11069 break;
11070 }
11071 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: {
11072 deepcopy_VkSwapchainPresentFenceInfoEXT(
11073 alloc, rootType,
11074 reinterpret_cast<const VkSwapchainPresentFenceInfoEXT*>(structExtension),
11075 reinterpret_cast<VkSwapchainPresentFenceInfoEXT*>(structExtension_out));
11076 break;
11077 }
11078 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODES_CREATE_INFO_EXT: {
11079 deepcopy_VkSwapchainPresentModesCreateInfoEXT(
11080 alloc, rootType,
11081 reinterpret_cast<const VkSwapchainPresentModesCreateInfoEXT*>(structExtension),
11082 reinterpret_cast<VkSwapchainPresentModesCreateInfoEXT*>(structExtension_out));
11083 break;
11084 }
11085 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_MODE_INFO_EXT: {
11086 deepcopy_VkSwapchainPresentModeInfoEXT(
11087 alloc, rootType,
11088 reinterpret_cast<const VkSwapchainPresentModeInfoEXT*>(structExtension),
11089 reinterpret_cast<VkSwapchainPresentModeInfoEXT*>(structExtension_out));
11090 break;
11091 }
11092 case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_SCALING_CREATE_INFO_EXT: {
11093 deepcopy_VkSwapchainPresentScalingCreateInfoEXT(
11094 alloc, rootType,
11095 reinterpret_cast<const VkSwapchainPresentScalingCreateInfoEXT*>(structExtension),
11096 reinterpret_cast<VkSwapchainPresentScalingCreateInfoEXT*>(structExtension_out));
11097 break;
11098 }
11099 #endif
11100 #ifdef VK_EXT_texel_buffer_alignment
11101 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: {
11102 deepcopy_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(
11103 alloc, rootType,
11104 reinterpret_cast<const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*>(
11105 structExtension),
11106 reinterpret_cast<VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT*>(
11107 structExtension_out));
11108 break;
11109 }
11110 #endif
11111 #ifdef VK_EXT_device_memory_report
11112 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEVICE_MEMORY_REPORT_FEATURES_EXT: {
11113 deepcopy_VkPhysicalDeviceDeviceMemoryReportFeaturesEXT(
11114 alloc, rootType,
11115 reinterpret_cast<const VkPhysicalDeviceDeviceMemoryReportFeaturesEXT*>(
11116 structExtension),
11117 reinterpret_cast<VkPhysicalDeviceDeviceMemoryReportFeaturesEXT*>(
11118 structExtension_out));
11119 break;
11120 }
11121 case VK_STRUCTURE_TYPE_DEVICE_DEVICE_MEMORY_REPORT_CREATE_INFO_EXT: {
11122 deepcopy_VkDeviceDeviceMemoryReportCreateInfoEXT(
11123 alloc, rootType,
11124 reinterpret_cast<const VkDeviceDeviceMemoryReportCreateInfoEXT*>(structExtension),
11125 reinterpret_cast<VkDeviceDeviceMemoryReportCreateInfoEXT*>(structExtension_out));
11126 break;
11127 }
11128 #endif
11129 #ifdef VK_EXT_robustness2
11130 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_FEATURES_EXT: {
11131 deepcopy_VkPhysicalDeviceRobustness2FeaturesEXT(
11132 alloc, rootType,
11133 reinterpret_cast<const VkPhysicalDeviceRobustness2FeaturesEXT*>(structExtension),
11134 reinterpret_cast<VkPhysicalDeviceRobustness2FeaturesEXT*>(structExtension_out));
11135 break;
11136 }
11137 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ROBUSTNESS_2_PROPERTIES_EXT: {
11138 deepcopy_VkPhysicalDeviceRobustness2PropertiesEXT(
11139 alloc, rootType,
11140 reinterpret_cast<const VkPhysicalDeviceRobustness2PropertiesEXT*>(structExtension),
11141 reinterpret_cast<VkPhysicalDeviceRobustness2PropertiesEXT*>(structExtension_out));
11142 break;
11143 }
11144 #endif
11145 #ifdef VK_EXT_custom_border_color
11146 case VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT: {
11147 deepcopy_VkSamplerCustomBorderColorCreateInfoEXT(
11148 alloc, rootType,
11149 reinterpret_cast<const VkSamplerCustomBorderColorCreateInfoEXT*>(structExtension),
11150 reinterpret_cast<VkSamplerCustomBorderColorCreateInfoEXT*>(structExtension_out));
11151 break;
11152 }
11153 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT: {
11154 deepcopy_VkPhysicalDeviceCustomBorderColorPropertiesEXT(
11155 alloc, rootType,
11156 reinterpret_cast<const VkPhysicalDeviceCustomBorderColorPropertiesEXT*>(
11157 structExtension),
11158 reinterpret_cast<VkPhysicalDeviceCustomBorderColorPropertiesEXT*>(
11159 structExtension_out));
11160 break;
11161 }
11162 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_FEATURES_EXT: {
11163 deepcopy_VkPhysicalDeviceCustomBorderColorFeaturesEXT(
11164 alloc, rootType,
11165 reinterpret_cast<const VkPhysicalDeviceCustomBorderColorFeaturesEXT*>(
11166 structExtension),
11167 reinterpret_cast<VkPhysicalDeviceCustomBorderColorFeaturesEXT*>(
11168 structExtension_out));
11169 break;
11170 }
11171 #endif
11172 #ifdef VK_EXT_graphics_pipeline_library
11173 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_FEATURES_EXT: {
11174 deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT(
11175 alloc, rootType,
11176 reinterpret_cast<const VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT*>(
11177 structExtension),
11178 reinterpret_cast<VkPhysicalDeviceGraphicsPipelineLibraryFeaturesEXT*>(
11179 structExtension_out));
11180 break;
11181 }
11182 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GRAPHICS_PIPELINE_LIBRARY_PROPERTIES_EXT: {
11183 deepcopy_VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT(
11184 alloc, rootType,
11185 reinterpret_cast<const VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT*>(
11186 structExtension),
11187 reinterpret_cast<VkPhysicalDeviceGraphicsPipelineLibraryPropertiesEXT*>(
11188 structExtension_out));
11189 break;
11190 }
11191 case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_LIBRARY_CREATE_INFO_EXT: {
11192 deepcopy_VkGraphicsPipelineLibraryCreateInfoEXT(
11193 alloc, rootType,
11194 reinterpret_cast<const VkGraphicsPipelineLibraryCreateInfoEXT*>(structExtension),
11195 reinterpret_cast<VkGraphicsPipelineLibraryCreateInfoEXT*>(structExtension_out));
11196 break;
11197 }
11198 #endif
11199 #ifdef VK_EXT_ycbcr_2plane_444_formats
11200 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_YCBCR_2_PLANE_444_FORMATS_FEATURES_EXT: {
11201 deepcopy_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(
11202 alloc, rootType,
11203 reinterpret_cast<const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT*>(
11204 structExtension),
11205 reinterpret_cast<VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT*>(
11206 structExtension_out));
11207 break;
11208 }
11209 #endif
11210 #ifdef VK_EXT_image_compression_control
11211 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_FEATURES_EXT: {
11212 deepcopy_VkPhysicalDeviceImageCompressionControlFeaturesEXT(
11213 alloc, rootType,
11214 reinterpret_cast<const VkPhysicalDeviceImageCompressionControlFeaturesEXT*>(
11215 structExtension),
11216 reinterpret_cast<VkPhysicalDeviceImageCompressionControlFeaturesEXT*>(
11217 structExtension_out));
11218 break;
11219 }
11220 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT: {
11221 deepcopy_VkImageCompressionControlEXT(
11222 alloc, rootType,
11223 reinterpret_cast<const VkImageCompressionControlEXT*>(structExtension),
11224 reinterpret_cast<VkImageCompressionControlEXT*>(structExtension_out));
11225 break;
11226 }
11227 case VK_STRUCTURE_TYPE_IMAGE_COMPRESSION_PROPERTIES_EXT: {
11228 deepcopy_VkImageCompressionPropertiesEXT(
11229 alloc, rootType,
11230 reinterpret_cast<const VkImageCompressionPropertiesEXT*>(structExtension),
11231 reinterpret_cast<VkImageCompressionPropertiesEXT*>(structExtension_out));
11232 break;
11233 }
11234 #endif
11235 #ifdef VK_EXT_4444_formats
11236 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT: {
11237 deepcopy_VkPhysicalDevice4444FormatsFeaturesEXT(
11238 alloc, rootType,
11239 reinterpret_cast<const VkPhysicalDevice4444FormatsFeaturesEXT*>(structExtension),
11240 reinterpret_cast<VkPhysicalDevice4444FormatsFeaturesEXT*>(structExtension_out));
11241 break;
11242 }
11243 #endif
11244 #ifdef VK_EXT_primitive_topology_list_restart
11245 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: {
11246 deepcopy_VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT(
11247 alloc, rootType,
11248 reinterpret_cast<const VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT*>(
11249 structExtension),
11250 reinterpret_cast<VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT*>(
11251 structExtension_out));
11252 break;
11253 }
11254 #endif
11255 #ifdef VK_EXT_extended_dynamic_state2
11256 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_2_FEATURES_EXT: {
11257 deepcopy_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(
11258 alloc, rootType,
11259 reinterpret_cast<const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT*>(
11260 structExtension),
11261 reinterpret_cast<VkPhysicalDeviceExtendedDynamicState2FeaturesEXT*>(
11262 structExtension_out));
11263 break;
11264 }
11265 #endif
11266 #ifdef VK_EXT_color_write_enable
11267 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COLOR_WRITE_ENABLE_FEATURES_EXT: {
11268 deepcopy_VkPhysicalDeviceColorWriteEnableFeaturesEXT(
11269 alloc, rootType,
11270 reinterpret_cast<const VkPhysicalDeviceColorWriteEnableFeaturesEXT*>(
11271 structExtension),
11272 reinterpret_cast<VkPhysicalDeviceColorWriteEnableFeaturesEXT*>(
11273 structExtension_out));
11274 break;
11275 }
11276 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_WRITE_CREATE_INFO_EXT: {
11277 deepcopy_VkPipelineColorWriteCreateInfoEXT(
11278 alloc, rootType,
11279 reinterpret_cast<const VkPipelineColorWriteCreateInfoEXT*>(structExtension),
11280 reinterpret_cast<VkPipelineColorWriteCreateInfoEXT*>(structExtension_out));
11281 break;
11282 }
11283 #endif
11284 #ifdef VK_GOOGLE_gfxstream
11285 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: {
11286 deepcopy_VkImportColorBufferGOOGLE(
11287 alloc, rootType,
11288 reinterpret_cast<const VkImportColorBufferGOOGLE*>(structExtension),
11289 reinterpret_cast<VkImportColorBufferGOOGLE*>(structExtension_out));
11290 break;
11291 }
11292 case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE: {
11293 deepcopy_VkImportBufferGOOGLE(
11294 alloc, rootType, reinterpret_cast<const VkImportBufferGOOGLE*>(structExtension),
11295 reinterpret_cast<VkImportBufferGOOGLE*>(structExtension_out));
11296 break;
11297 }
11298 case VK_STRUCTURE_TYPE_CREATE_BLOB_GOOGLE: {
11299 deepcopy_VkCreateBlobGOOGLE(
11300 alloc, rootType, reinterpret_cast<const VkCreateBlobGOOGLE*>(structExtension),
11301 reinterpret_cast<VkCreateBlobGOOGLE*>(structExtension_out));
11302 break;
11303 }
11304 #endif
11305 #ifdef VK_EXT_image_compression_control_swapchain
11306 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT: {
11307 deepcopy_VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT(
11308 alloc, rootType,
11309 reinterpret_cast<
11310 const VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT*>(
11311 structExtension),
11312 reinterpret_cast<VkPhysicalDeviceImageCompressionControlSwapchainFeaturesEXT*>(
11313 structExtension_out));
11314 break;
11315 }
11316 #endif
11317 #ifdef VK_KHR_ray_tracing_pipeline
11318 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR: {
11319 deepcopy_VkPhysicalDeviceRayTracingPipelineFeaturesKHR(
11320 alloc, rootType,
11321 reinterpret_cast<const VkPhysicalDeviceRayTracingPipelineFeaturesKHR*>(
11322 structExtension),
11323 reinterpret_cast<VkPhysicalDeviceRayTracingPipelineFeaturesKHR*>(
11324 structExtension_out));
11325 break;
11326 }
11327 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR: {
11328 deepcopy_VkPhysicalDeviceRayTracingPipelinePropertiesKHR(
11329 alloc, rootType,
11330 reinterpret_cast<const VkPhysicalDeviceRayTracingPipelinePropertiesKHR*>(
11331 structExtension),
11332 reinterpret_cast<VkPhysicalDeviceRayTracingPipelinePropertiesKHR*>(
11333 structExtension_out));
11334 break;
11335 }
11336 #endif
11337 default: {
11338 return;
11339 }
11340 }
11341 }
11342
11343 } // namespace vk
11344 } // namespace gfxstream
11345