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