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_marshaling_guest
17 // (impl) generated by android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/genvk.py -registry android/android-emugl/host/libs/libOpenglRender/vulkan-registry/xml/vk.xml cereal -o android/android-emugl/host/libs/libOpenglRender/vulkan/cereal
18 // Please do not modify directly;
19 // re-run android/scripts/generate-vulkan-sources.sh,
20 // or directly from Python by defining:
21 // VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml
22 // CEREAL_OUTPUT_DIR: Where to put the generated sources.
23 // python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR
24 
25 #include "goldfish_vk_marshaling_guest.h"
26 
27 
28 #include "goldfish_vk_extension_structs_guest.h"
29 #include "goldfish_vk_private_defs.h"
30 
31 
32 namespace goldfish_vk {
33 
34 void marshal_extension_struct(
35     VulkanStreamGuest* vkStream,
36     const void* structExtension);
37 
38 void unmarshal_extension_struct(
39     VulkanStreamGuest* vkStream,
40     void* structExtension_out);
41 
42 #ifdef VK_VERSION_1_0
marshal_VkApplicationInfo(VulkanStreamGuest * vkStream,const VkApplicationInfo * forMarshaling)43 void marshal_VkApplicationInfo(
44     VulkanStreamGuest* vkStream,
45     const VkApplicationInfo* forMarshaling)
46 {
47     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
48     marshal_extension_struct(vkStream, forMarshaling->pNext);
49     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
50     {
51         // WARNING PTR CHECK
52         uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationName;
53         vkStream->putBe64(cgen_var_0);
54         if (forMarshaling->pApplicationName)
55         {
56             vkStream->putString(forMarshaling->pApplicationName);
57         }
58     }
59     else
60     {
61         vkStream->putString(forMarshaling->pApplicationName);
62     }
63     vkStream->write((uint32_t*)&forMarshaling->applicationVersion, sizeof(uint32_t));
64     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
65     {
66         // WARNING PTR CHECK
67         uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pEngineName;
68         vkStream->putBe64(cgen_var_1);
69         if (forMarshaling->pEngineName)
70         {
71             vkStream->putString(forMarshaling->pEngineName);
72         }
73     }
74     else
75     {
76         vkStream->putString(forMarshaling->pEngineName);
77     }
78     vkStream->write((uint32_t*)&forMarshaling->engineVersion, sizeof(uint32_t));
79     vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t));
80 }
81 
unmarshal_VkApplicationInfo(VulkanStreamGuest * vkStream,VkApplicationInfo * forUnmarshaling)82 void unmarshal_VkApplicationInfo(
83     VulkanStreamGuest* vkStream,
84     VkApplicationInfo* forUnmarshaling)
85 {
86     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
87     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
88     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
89     {
90         // WARNING PTR CHECK
91         const char* check_pApplicationName;
92         check_pApplicationName = (const char*)(uintptr_t)vkStream->getBe64();
93         if (forUnmarshaling->pApplicationName)
94         {
95             if (!(check_pApplicationName))
96             {
97                 fprintf(stderr, "fatal: forUnmarshaling->pApplicationName inconsistent between guest and host\n");
98             }
99             vkStream->loadStringInPlace((char**)&forUnmarshaling->pApplicationName);
100         }
101     }
102     else
103     {
104         vkStream->loadStringInPlace((char**)&forUnmarshaling->pApplicationName);
105     }
106     vkStream->read((uint32_t*)&forUnmarshaling->applicationVersion, sizeof(uint32_t));
107     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
108     {
109         // WARNING PTR CHECK
110         const char* check_pEngineName;
111         check_pEngineName = (const char*)(uintptr_t)vkStream->getBe64();
112         if (forUnmarshaling->pEngineName)
113         {
114             if (!(check_pEngineName))
115             {
116                 fprintf(stderr, "fatal: forUnmarshaling->pEngineName inconsistent between guest and host\n");
117             }
118             vkStream->loadStringInPlace((char**)&forUnmarshaling->pEngineName);
119         }
120     }
121     else
122     {
123         vkStream->loadStringInPlace((char**)&forUnmarshaling->pEngineName);
124     }
125     vkStream->read((uint32_t*)&forUnmarshaling->engineVersion, sizeof(uint32_t));
126     vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t));
127 }
128 
marshal_VkInstanceCreateInfo(VulkanStreamGuest * vkStream,const VkInstanceCreateInfo * forMarshaling)129 void marshal_VkInstanceCreateInfo(
130     VulkanStreamGuest* vkStream,
131     const VkInstanceCreateInfo* forMarshaling)
132 {
133     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
134     marshal_extension_struct(vkStream, forMarshaling->pNext);
135     vkStream->write((VkInstanceCreateFlags*)&forMarshaling->flags, sizeof(VkInstanceCreateFlags));
136     // WARNING PTR CHECK
137     uint64_t cgen_var_4 = (uint64_t)(uintptr_t)forMarshaling->pApplicationInfo;
138     vkStream->putBe64(cgen_var_4);
139     if (forMarshaling->pApplicationInfo)
140     {
141         marshal_VkApplicationInfo(vkStream, (const VkApplicationInfo*)(forMarshaling->pApplicationInfo));
142     }
143     vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t));
144     saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount);
145     vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t));
146     saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount);
147 }
148 
unmarshal_VkInstanceCreateInfo(VulkanStreamGuest * vkStream,VkInstanceCreateInfo * forUnmarshaling)149 void unmarshal_VkInstanceCreateInfo(
150     VulkanStreamGuest* vkStream,
151     VkInstanceCreateInfo* forUnmarshaling)
152 {
153     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
154     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
155     vkStream->read((VkInstanceCreateFlags*)&forUnmarshaling->flags, sizeof(VkInstanceCreateFlags));
156     // WARNING PTR CHECK
157     const VkApplicationInfo* check_pApplicationInfo;
158     check_pApplicationInfo = (const VkApplicationInfo*)(uintptr_t)vkStream->getBe64();
159     if (forUnmarshaling->pApplicationInfo)
160     {
161         if (!(check_pApplicationInfo))
162         {
163             fprintf(stderr, "fatal: forUnmarshaling->pApplicationInfo inconsistent between guest and host\n");
164         }
165         unmarshal_VkApplicationInfo(vkStream, (VkApplicationInfo*)(forUnmarshaling->pApplicationInfo));
166     }
167     vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t));
168     vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames);
169     vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t));
170     vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames);
171 }
172 
marshal_VkAllocationCallbacks(VulkanStreamGuest * vkStream,const VkAllocationCallbacks * forMarshaling)173 void marshal_VkAllocationCallbacks(
174     VulkanStreamGuest* vkStream,
175     const VkAllocationCallbacks* forMarshaling)
176 {
177     // WARNING PTR CHECK
178     uint64_t cgen_var_6 = (uint64_t)(uintptr_t)forMarshaling->pUserData;
179     vkStream->putBe64(cgen_var_6);
180     if (forMarshaling->pUserData)
181     {
182         vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t));
183     }
184     uint64_t cgen_var_7 = (uint64_t)forMarshaling->pfnAllocation;
185     vkStream->putBe64(cgen_var_7);
186     uint64_t cgen_var_8 = (uint64_t)forMarshaling->pfnReallocation;
187     vkStream->putBe64(cgen_var_8);
188     uint64_t cgen_var_9 = (uint64_t)forMarshaling->pfnFree;
189     vkStream->putBe64(cgen_var_9);
190     uint64_t cgen_var_10 = (uint64_t)forMarshaling->pfnInternalAllocation;
191     vkStream->putBe64(cgen_var_10);
192     uint64_t cgen_var_11 = (uint64_t)forMarshaling->pfnInternalFree;
193     vkStream->putBe64(cgen_var_11);
194 }
195 
unmarshal_VkAllocationCallbacks(VulkanStreamGuest * vkStream,VkAllocationCallbacks * forUnmarshaling)196 void unmarshal_VkAllocationCallbacks(
197     VulkanStreamGuest* vkStream,
198     VkAllocationCallbacks* forUnmarshaling)
199 {
200     // WARNING PTR CHECK
201     void* check_pUserData;
202     check_pUserData = (void*)(uintptr_t)vkStream->getBe64();
203     if (forUnmarshaling->pUserData)
204     {
205         if (!(check_pUserData))
206         {
207             fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n");
208         }
209         vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t));
210     }
211     forUnmarshaling->pfnAllocation = (PFN_vkAllocationFunction)vkStream->getBe64();
212     forUnmarshaling->pfnReallocation = (PFN_vkReallocationFunction)vkStream->getBe64();
213     forUnmarshaling->pfnFree = (PFN_vkFreeFunction)vkStream->getBe64();
214     forUnmarshaling->pfnInternalAllocation = (PFN_vkInternalAllocationNotification)vkStream->getBe64();
215     forUnmarshaling->pfnInternalFree = (PFN_vkInternalFreeNotification)vkStream->getBe64();
216 }
217 
marshal_VkPhysicalDeviceFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceFeatures * forMarshaling)218 void marshal_VkPhysicalDeviceFeatures(
219     VulkanStreamGuest* vkStream,
220     const VkPhysicalDeviceFeatures* forMarshaling)
221 {
222     vkStream->write((VkBool32*)&forMarshaling->robustBufferAccess, sizeof(VkBool32));
223     vkStream->write((VkBool32*)&forMarshaling->fullDrawIndexUint32, sizeof(VkBool32));
224     vkStream->write((VkBool32*)&forMarshaling->imageCubeArray, sizeof(VkBool32));
225     vkStream->write((VkBool32*)&forMarshaling->independentBlend, sizeof(VkBool32));
226     vkStream->write((VkBool32*)&forMarshaling->geometryShader, sizeof(VkBool32));
227     vkStream->write((VkBool32*)&forMarshaling->tessellationShader, sizeof(VkBool32));
228     vkStream->write((VkBool32*)&forMarshaling->sampleRateShading, sizeof(VkBool32));
229     vkStream->write((VkBool32*)&forMarshaling->dualSrcBlend, sizeof(VkBool32));
230     vkStream->write((VkBool32*)&forMarshaling->logicOp, sizeof(VkBool32));
231     vkStream->write((VkBool32*)&forMarshaling->multiDrawIndirect, sizeof(VkBool32));
232     vkStream->write((VkBool32*)&forMarshaling->drawIndirectFirstInstance, sizeof(VkBool32));
233     vkStream->write((VkBool32*)&forMarshaling->depthClamp, sizeof(VkBool32));
234     vkStream->write((VkBool32*)&forMarshaling->depthBiasClamp, sizeof(VkBool32));
235     vkStream->write((VkBool32*)&forMarshaling->fillModeNonSolid, sizeof(VkBool32));
236     vkStream->write((VkBool32*)&forMarshaling->depthBounds, sizeof(VkBool32));
237     vkStream->write((VkBool32*)&forMarshaling->wideLines, sizeof(VkBool32));
238     vkStream->write((VkBool32*)&forMarshaling->largePoints, sizeof(VkBool32));
239     vkStream->write((VkBool32*)&forMarshaling->alphaToOne, sizeof(VkBool32));
240     vkStream->write((VkBool32*)&forMarshaling->multiViewport, sizeof(VkBool32));
241     vkStream->write((VkBool32*)&forMarshaling->samplerAnisotropy, sizeof(VkBool32));
242     vkStream->write((VkBool32*)&forMarshaling->textureCompressionETC2, sizeof(VkBool32));
243     vkStream->write((VkBool32*)&forMarshaling->textureCompressionASTC_LDR, sizeof(VkBool32));
244     vkStream->write((VkBool32*)&forMarshaling->textureCompressionBC, sizeof(VkBool32));
245     vkStream->write((VkBool32*)&forMarshaling->occlusionQueryPrecise, sizeof(VkBool32));
246     vkStream->write((VkBool32*)&forMarshaling->pipelineStatisticsQuery, sizeof(VkBool32));
247     vkStream->write((VkBool32*)&forMarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32));
248     vkStream->write((VkBool32*)&forMarshaling->fragmentStoresAndAtomics, sizeof(VkBool32));
249     vkStream->write((VkBool32*)&forMarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32));
250     vkStream->write((VkBool32*)&forMarshaling->shaderImageGatherExtended, sizeof(VkBool32));
251     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32));
252     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageMultisample, sizeof(VkBool32));
253     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32));
254     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32));
255     vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32));
256     vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32));
257     vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32));
258     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32));
259     vkStream->write((VkBool32*)&forMarshaling->shaderClipDistance, sizeof(VkBool32));
260     vkStream->write((VkBool32*)&forMarshaling->shaderCullDistance, sizeof(VkBool32));
261     vkStream->write((VkBool32*)&forMarshaling->shaderFloat64, sizeof(VkBool32));
262     vkStream->write((VkBool32*)&forMarshaling->shaderInt64, sizeof(VkBool32));
263     vkStream->write((VkBool32*)&forMarshaling->shaderInt16, sizeof(VkBool32));
264     vkStream->write((VkBool32*)&forMarshaling->shaderResourceResidency, sizeof(VkBool32));
265     vkStream->write((VkBool32*)&forMarshaling->shaderResourceMinLod, sizeof(VkBool32));
266     vkStream->write((VkBool32*)&forMarshaling->sparseBinding, sizeof(VkBool32));
267     vkStream->write((VkBool32*)&forMarshaling->sparseResidencyBuffer, sizeof(VkBool32));
268     vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage2D, sizeof(VkBool32));
269     vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage3D, sizeof(VkBool32));
270     vkStream->write((VkBool32*)&forMarshaling->sparseResidency2Samples, sizeof(VkBool32));
271     vkStream->write((VkBool32*)&forMarshaling->sparseResidency4Samples, sizeof(VkBool32));
272     vkStream->write((VkBool32*)&forMarshaling->sparseResidency8Samples, sizeof(VkBool32));
273     vkStream->write((VkBool32*)&forMarshaling->sparseResidency16Samples, sizeof(VkBool32));
274     vkStream->write((VkBool32*)&forMarshaling->sparseResidencyAliased, sizeof(VkBool32));
275     vkStream->write((VkBool32*)&forMarshaling->variableMultisampleRate, sizeof(VkBool32));
276     vkStream->write((VkBool32*)&forMarshaling->inheritedQueries, sizeof(VkBool32));
277 }
278 
unmarshal_VkPhysicalDeviceFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceFeatures * forUnmarshaling)279 void unmarshal_VkPhysicalDeviceFeatures(
280     VulkanStreamGuest* vkStream,
281     VkPhysicalDeviceFeatures* forUnmarshaling)
282 {
283     vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccess, sizeof(VkBool32));
284     vkStream->read((VkBool32*)&forUnmarshaling->fullDrawIndexUint32, sizeof(VkBool32));
285     vkStream->read((VkBool32*)&forUnmarshaling->imageCubeArray, sizeof(VkBool32));
286     vkStream->read((VkBool32*)&forUnmarshaling->independentBlend, sizeof(VkBool32));
287     vkStream->read((VkBool32*)&forUnmarshaling->geometryShader, sizeof(VkBool32));
288     vkStream->read((VkBool32*)&forUnmarshaling->tessellationShader, sizeof(VkBool32));
289     vkStream->read((VkBool32*)&forUnmarshaling->sampleRateShading, sizeof(VkBool32));
290     vkStream->read((VkBool32*)&forUnmarshaling->dualSrcBlend, sizeof(VkBool32));
291     vkStream->read((VkBool32*)&forUnmarshaling->logicOp, sizeof(VkBool32));
292     vkStream->read((VkBool32*)&forUnmarshaling->multiDrawIndirect, sizeof(VkBool32));
293     vkStream->read((VkBool32*)&forUnmarshaling->drawIndirectFirstInstance, sizeof(VkBool32));
294     vkStream->read((VkBool32*)&forUnmarshaling->depthClamp, sizeof(VkBool32));
295     vkStream->read((VkBool32*)&forUnmarshaling->depthBiasClamp, sizeof(VkBool32));
296     vkStream->read((VkBool32*)&forUnmarshaling->fillModeNonSolid, sizeof(VkBool32));
297     vkStream->read((VkBool32*)&forUnmarshaling->depthBounds, sizeof(VkBool32));
298     vkStream->read((VkBool32*)&forUnmarshaling->wideLines, sizeof(VkBool32));
299     vkStream->read((VkBool32*)&forUnmarshaling->largePoints, sizeof(VkBool32));
300     vkStream->read((VkBool32*)&forUnmarshaling->alphaToOne, sizeof(VkBool32));
301     vkStream->read((VkBool32*)&forUnmarshaling->multiViewport, sizeof(VkBool32));
302     vkStream->read((VkBool32*)&forUnmarshaling->samplerAnisotropy, sizeof(VkBool32));
303     vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionETC2, sizeof(VkBool32));
304     vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionASTC_LDR, sizeof(VkBool32));
305     vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionBC, sizeof(VkBool32));
306     vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryPrecise, sizeof(VkBool32));
307     vkStream->read((VkBool32*)&forUnmarshaling->pipelineStatisticsQuery, sizeof(VkBool32));
308     vkStream->read((VkBool32*)&forUnmarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32));
309     vkStream->read((VkBool32*)&forUnmarshaling->fragmentStoresAndAtomics, sizeof(VkBool32));
310     vkStream->read((VkBool32*)&forUnmarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32));
311     vkStream->read((VkBool32*)&forUnmarshaling->shaderImageGatherExtended, sizeof(VkBool32));
312     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32));
313     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageMultisample, sizeof(VkBool32));
314     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32));
315     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32));
316     vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32));
317     vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32));
318     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32));
319     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32));
320     vkStream->read((VkBool32*)&forUnmarshaling->shaderClipDistance, sizeof(VkBool32));
321     vkStream->read((VkBool32*)&forUnmarshaling->shaderCullDistance, sizeof(VkBool32));
322     vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat64, sizeof(VkBool32));
323     vkStream->read((VkBool32*)&forUnmarshaling->shaderInt64, sizeof(VkBool32));
324     vkStream->read((VkBool32*)&forUnmarshaling->shaderInt16, sizeof(VkBool32));
325     vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceResidency, sizeof(VkBool32));
326     vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceMinLod, sizeof(VkBool32));
327     vkStream->read((VkBool32*)&forUnmarshaling->sparseBinding, sizeof(VkBool32));
328     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyBuffer, sizeof(VkBool32));
329     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage2D, sizeof(VkBool32));
330     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage3D, sizeof(VkBool32));
331     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency2Samples, sizeof(VkBool32));
332     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency4Samples, sizeof(VkBool32));
333     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency8Samples, sizeof(VkBool32));
334     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency16Samples, sizeof(VkBool32));
335     vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyAliased, sizeof(VkBool32));
336     vkStream->read((VkBool32*)&forUnmarshaling->variableMultisampleRate, sizeof(VkBool32));
337     vkStream->read((VkBool32*)&forUnmarshaling->inheritedQueries, sizeof(VkBool32));
338 }
339 
marshal_VkFormatProperties(VulkanStreamGuest * vkStream,const VkFormatProperties * forMarshaling)340 void marshal_VkFormatProperties(
341     VulkanStreamGuest* vkStream,
342     const VkFormatProperties* forMarshaling)
343 {
344     vkStream->write((VkFormatFeatureFlags*)&forMarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags));
345     vkStream->write((VkFormatFeatureFlags*)&forMarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags));
346     vkStream->write((VkFormatFeatureFlags*)&forMarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags));
347 }
348 
unmarshal_VkFormatProperties(VulkanStreamGuest * vkStream,VkFormatProperties * forUnmarshaling)349 void unmarshal_VkFormatProperties(
350     VulkanStreamGuest* vkStream,
351     VkFormatProperties* forUnmarshaling)
352 {
353     vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags));
354     vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags));
355     vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags));
356 }
357 
marshal_VkExtent3D(VulkanStreamGuest * vkStream,const VkExtent3D * forMarshaling)358 void marshal_VkExtent3D(
359     VulkanStreamGuest* vkStream,
360     const VkExtent3D* forMarshaling)
361 {
362     vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
363     vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
364     vkStream->write((uint32_t*)&forMarshaling->depth, sizeof(uint32_t));
365 }
366 
unmarshal_VkExtent3D(VulkanStreamGuest * vkStream,VkExtent3D * forUnmarshaling)367 void unmarshal_VkExtent3D(
368     VulkanStreamGuest* vkStream,
369     VkExtent3D* forUnmarshaling)
370 {
371     vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
372     vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
373     vkStream->read((uint32_t*)&forUnmarshaling->depth, sizeof(uint32_t));
374 }
375 
marshal_VkImageFormatProperties(VulkanStreamGuest * vkStream,const VkImageFormatProperties * forMarshaling)376 void marshal_VkImageFormatProperties(
377     VulkanStreamGuest* vkStream,
378     const VkImageFormatProperties* forMarshaling)
379 {
380     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->maxExtent));
381     vkStream->write((uint32_t*)&forMarshaling->maxMipLevels, sizeof(uint32_t));
382     vkStream->write((uint32_t*)&forMarshaling->maxArrayLayers, sizeof(uint32_t));
383     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampleCounts, sizeof(VkSampleCountFlags));
384     vkStream->write((VkDeviceSize*)&forMarshaling->maxResourceSize, sizeof(VkDeviceSize));
385 }
386 
unmarshal_VkImageFormatProperties(VulkanStreamGuest * vkStream,VkImageFormatProperties * forUnmarshaling)387 void unmarshal_VkImageFormatProperties(
388     VulkanStreamGuest* vkStream,
389     VkImageFormatProperties* forUnmarshaling)
390 {
391     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->maxExtent));
392     vkStream->read((uint32_t*)&forUnmarshaling->maxMipLevels, sizeof(uint32_t));
393     vkStream->read((uint32_t*)&forUnmarshaling->maxArrayLayers, sizeof(uint32_t));
394     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampleCounts, sizeof(VkSampleCountFlags));
395     vkStream->read((VkDeviceSize*)&forUnmarshaling->maxResourceSize, sizeof(VkDeviceSize));
396 }
397 
marshal_VkPhysicalDeviceLimits(VulkanStreamGuest * vkStream,const VkPhysicalDeviceLimits * forMarshaling)398 void marshal_VkPhysicalDeviceLimits(
399     VulkanStreamGuest* vkStream,
400     const VkPhysicalDeviceLimits* forMarshaling)
401 {
402     vkStream->write((uint32_t*)&forMarshaling->maxImageDimension1D, sizeof(uint32_t));
403     vkStream->write((uint32_t*)&forMarshaling->maxImageDimension2D, sizeof(uint32_t));
404     vkStream->write((uint32_t*)&forMarshaling->maxImageDimension3D, sizeof(uint32_t));
405     vkStream->write((uint32_t*)&forMarshaling->maxImageDimensionCube, sizeof(uint32_t));
406     vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t));
407     vkStream->write((uint32_t*)&forMarshaling->maxTexelBufferElements, sizeof(uint32_t));
408     vkStream->write((uint32_t*)&forMarshaling->maxUniformBufferRange, sizeof(uint32_t));
409     vkStream->write((uint32_t*)&forMarshaling->maxStorageBufferRange, sizeof(uint32_t));
410     vkStream->write((uint32_t*)&forMarshaling->maxPushConstantsSize, sizeof(uint32_t));
411     vkStream->write((uint32_t*)&forMarshaling->maxMemoryAllocationCount, sizeof(uint32_t));
412     vkStream->write((uint32_t*)&forMarshaling->maxSamplerAllocationCount, sizeof(uint32_t));
413     vkStream->write((VkDeviceSize*)&forMarshaling->bufferImageGranularity, sizeof(VkDeviceSize));
414     vkStream->write((VkDeviceSize*)&forMarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize));
415     vkStream->write((uint32_t*)&forMarshaling->maxBoundDescriptorSets, sizeof(uint32_t));
416     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t));
417     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t));
418     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t));
419     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t));
420     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t));
421     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t));
422     vkStream->write((uint32_t*)&forMarshaling->maxPerStageResources, sizeof(uint32_t));
423     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSamplers, sizeof(uint32_t));
424     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t));
425     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t));
426     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t));
427     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t));
428     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t));
429     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t));
430     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t));
431     vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributes, sizeof(uint32_t));
432     vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindings, sizeof(uint32_t));
433     vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t));
434     vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindingStride, sizeof(uint32_t));
435     vkStream->write((uint32_t*)&forMarshaling->maxVertexOutputComponents, sizeof(uint32_t));
436     vkStream->write((uint32_t*)&forMarshaling->maxTessellationGenerationLevel, sizeof(uint32_t));
437     vkStream->write((uint32_t*)&forMarshaling->maxTessellationPatchSize, sizeof(uint32_t));
438     vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t));
439     vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t));
440     vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t));
441     vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t));
442     vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t));
443     vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t));
444     vkStream->write((uint32_t*)&forMarshaling->maxGeometryShaderInvocations, sizeof(uint32_t));
445     vkStream->write((uint32_t*)&forMarshaling->maxGeometryInputComponents, sizeof(uint32_t));
446     vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputComponents, sizeof(uint32_t));
447     vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputVertices, sizeof(uint32_t));
448     vkStream->write((uint32_t*)&forMarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t));
449     vkStream->write((uint32_t*)&forMarshaling->maxFragmentInputComponents, sizeof(uint32_t));
450     vkStream->write((uint32_t*)&forMarshaling->maxFragmentOutputAttachments, sizeof(uint32_t));
451     vkStream->write((uint32_t*)&forMarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t));
452     vkStream->write((uint32_t*)&forMarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t));
453     vkStream->write((uint32_t*)&forMarshaling->maxComputeSharedMemorySize, sizeof(uint32_t));
454     vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
455     vkStream->write((uint32_t*)&forMarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t));
456     vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
457     vkStream->write((uint32_t*)&forMarshaling->subPixelPrecisionBits, sizeof(uint32_t));
458     vkStream->write((uint32_t*)&forMarshaling->subTexelPrecisionBits, sizeof(uint32_t));
459     vkStream->write((uint32_t*)&forMarshaling->mipmapPrecisionBits, sizeof(uint32_t));
460     vkStream->write((uint32_t*)&forMarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t));
461     vkStream->write((uint32_t*)&forMarshaling->maxDrawIndirectCount, sizeof(uint32_t));
462     vkStream->write((float*)&forMarshaling->maxSamplerLodBias, sizeof(float));
463     vkStream->write((float*)&forMarshaling->maxSamplerAnisotropy, sizeof(float));
464     vkStream->write((uint32_t*)&forMarshaling->maxViewports, sizeof(uint32_t));
465     vkStream->write((uint32_t*)forMarshaling->maxViewportDimensions, 2 * sizeof(uint32_t));
466     vkStream->write((float*)forMarshaling->viewportBoundsRange, 2 * sizeof(float));
467     vkStream->write((uint32_t*)&forMarshaling->viewportSubPixelBits, sizeof(uint32_t));
468     uint64_t cgen_var_18 = (uint64_t)forMarshaling->minMemoryMapAlignment;
469     vkStream->putBe64(cgen_var_18);
470     vkStream->write((VkDeviceSize*)&forMarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize));
471     vkStream->write((VkDeviceSize*)&forMarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize));
472     vkStream->write((VkDeviceSize*)&forMarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize));
473     vkStream->write((int32_t*)&forMarshaling->minTexelOffset, sizeof(int32_t));
474     vkStream->write((uint32_t*)&forMarshaling->maxTexelOffset, sizeof(uint32_t));
475     vkStream->write((int32_t*)&forMarshaling->minTexelGatherOffset, sizeof(int32_t));
476     vkStream->write((uint32_t*)&forMarshaling->maxTexelGatherOffset, sizeof(uint32_t));
477     vkStream->write((float*)&forMarshaling->minInterpolationOffset, sizeof(float));
478     vkStream->write((float*)&forMarshaling->maxInterpolationOffset, sizeof(float));
479     vkStream->write((uint32_t*)&forMarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t));
480     vkStream->write((uint32_t*)&forMarshaling->maxFramebufferWidth, sizeof(uint32_t));
481     vkStream->write((uint32_t*)&forMarshaling->maxFramebufferHeight, sizeof(uint32_t));
482     vkStream->write((uint32_t*)&forMarshaling->maxFramebufferLayers, sizeof(uint32_t));
483     vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags));
484     vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags));
485     vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags));
486     vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags));
487     vkStream->write((uint32_t*)&forMarshaling->maxColorAttachments, sizeof(uint32_t));
488     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags));
489     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags));
490     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags));
491     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags));
492     vkStream->write((VkSampleCountFlags*)&forMarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags));
493     vkStream->write((uint32_t*)&forMarshaling->maxSampleMaskWords, sizeof(uint32_t));
494     vkStream->write((VkBool32*)&forMarshaling->timestampComputeAndGraphics, sizeof(VkBool32));
495     vkStream->write((float*)&forMarshaling->timestampPeriod, sizeof(float));
496     vkStream->write((uint32_t*)&forMarshaling->maxClipDistances, sizeof(uint32_t));
497     vkStream->write((uint32_t*)&forMarshaling->maxCullDistances, sizeof(uint32_t));
498     vkStream->write((uint32_t*)&forMarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t));
499     vkStream->write((uint32_t*)&forMarshaling->discreteQueuePriorities, sizeof(uint32_t));
500     vkStream->write((float*)forMarshaling->pointSizeRange, 2 * sizeof(float));
501     vkStream->write((float*)forMarshaling->lineWidthRange, 2 * sizeof(float));
502     vkStream->write((float*)&forMarshaling->pointSizeGranularity, sizeof(float));
503     vkStream->write((float*)&forMarshaling->lineWidthGranularity, sizeof(float));
504     vkStream->write((VkBool32*)&forMarshaling->strictLines, sizeof(VkBool32));
505     vkStream->write((VkBool32*)&forMarshaling->standardSampleLocations, sizeof(VkBool32));
506     vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize));
507     vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize));
508     vkStream->write((VkDeviceSize*)&forMarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize));
509 }
510 
unmarshal_VkPhysicalDeviceLimits(VulkanStreamGuest * vkStream,VkPhysicalDeviceLimits * forUnmarshaling)511 void unmarshal_VkPhysicalDeviceLimits(
512     VulkanStreamGuest* vkStream,
513     VkPhysicalDeviceLimits* forUnmarshaling)
514 {
515     vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension1D, sizeof(uint32_t));
516     vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension2D, sizeof(uint32_t));
517     vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension3D, sizeof(uint32_t));
518     vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimensionCube, sizeof(uint32_t));
519     vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t));
520     vkStream->read((uint32_t*)&forUnmarshaling->maxTexelBufferElements, sizeof(uint32_t));
521     vkStream->read((uint32_t*)&forUnmarshaling->maxUniformBufferRange, sizeof(uint32_t));
522     vkStream->read((uint32_t*)&forUnmarshaling->maxStorageBufferRange, sizeof(uint32_t));
523     vkStream->read((uint32_t*)&forUnmarshaling->maxPushConstantsSize, sizeof(uint32_t));
524     vkStream->read((uint32_t*)&forUnmarshaling->maxMemoryAllocationCount, sizeof(uint32_t));
525     vkStream->read((uint32_t*)&forUnmarshaling->maxSamplerAllocationCount, sizeof(uint32_t));
526     vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferImageGranularity, sizeof(VkDeviceSize));
527     vkStream->read((VkDeviceSize*)&forUnmarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize));
528     vkStream->read((uint32_t*)&forUnmarshaling->maxBoundDescriptorSets, sizeof(uint32_t));
529     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t));
530     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t));
531     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t));
532     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t));
533     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t));
534     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t));
535     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageResources, sizeof(uint32_t));
536     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSamplers, sizeof(uint32_t));
537     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t));
538     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t));
539     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t));
540     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t));
541     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t));
542     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t));
543     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t));
544     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributes, sizeof(uint32_t));
545     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindings, sizeof(uint32_t));
546     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t));
547     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindingStride, sizeof(uint32_t));
548     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexOutputComponents, sizeof(uint32_t));
549     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationGenerationLevel, sizeof(uint32_t));
550     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationPatchSize, sizeof(uint32_t));
551     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t));
552     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t));
553     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t));
554     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t));
555     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t));
556     vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t));
557     vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryShaderInvocations, sizeof(uint32_t));
558     vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryInputComponents, sizeof(uint32_t));
559     vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputComponents, sizeof(uint32_t));
560     vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputVertices, sizeof(uint32_t));
561     vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t));
562     vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentInputComponents, sizeof(uint32_t));
563     vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentOutputAttachments, sizeof(uint32_t));
564     vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t));
565     vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t));
566     vkStream->read((uint32_t*)&forUnmarshaling->maxComputeSharedMemorySize, sizeof(uint32_t));
567     vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
568     vkStream->read((uint32_t*)&forUnmarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t));
569     vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
570     vkStream->read((uint32_t*)&forUnmarshaling->subPixelPrecisionBits, sizeof(uint32_t));
571     vkStream->read((uint32_t*)&forUnmarshaling->subTexelPrecisionBits, sizeof(uint32_t));
572     vkStream->read((uint32_t*)&forUnmarshaling->mipmapPrecisionBits, sizeof(uint32_t));
573     vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t));
574     vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndirectCount, sizeof(uint32_t));
575     vkStream->read((float*)&forUnmarshaling->maxSamplerLodBias, sizeof(float));
576     vkStream->read((float*)&forUnmarshaling->maxSamplerAnisotropy, sizeof(float));
577     vkStream->read((uint32_t*)&forUnmarshaling->maxViewports, sizeof(uint32_t));
578     vkStream->read((uint32_t*)forUnmarshaling->maxViewportDimensions, 2 * sizeof(uint32_t));
579     vkStream->read((float*)forUnmarshaling->viewportBoundsRange, 2 * sizeof(float));
580     vkStream->read((uint32_t*)&forUnmarshaling->viewportSubPixelBits, sizeof(uint32_t));
581     forUnmarshaling->minMemoryMapAlignment = (size_t)vkStream->getBe64();
582     vkStream->read((VkDeviceSize*)&forUnmarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize));
583     vkStream->read((VkDeviceSize*)&forUnmarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize));
584     vkStream->read((VkDeviceSize*)&forUnmarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize));
585     vkStream->read((int32_t*)&forUnmarshaling->minTexelOffset, sizeof(int32_t));
586     vkStream->read((uint32_t*)&forUnmarshaling->maxTexelOffset, sizeof(uint32_t));
587     vkStream->read((int32_t*)&forUnmarshaling->minTexelGatherOffset, sizeof(int32_t));
588     vkStream->read((uint32_t*)&forUnmarshaling->maxTexelGatherOffset, sizeof(uint32_t));
589     vkStream->read((float*)&forUnmarshaling->minInterpolationOffset, sizeof(float));
590     vkStream->read((float*)&forUnmarshaling->maxInterpolationOffset, sizeof(float));
591     vkStream->read((uint32_t*)&forUnmarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t));
592     vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferWidth, sizeof(uint32_t));
593     vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferHeight, sizeof(uint32_t));
594     vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferLayers, sizeof(uint32_t));
595     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags));
596     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags));
597     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags));
598     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags));
599     vkStream->read((uint32_t*)&forUnmarshaling->maxColorAttachments, sizeof(uint32_t));
600     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags));
601     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags));
602     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags));
603     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags));
604     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags));
605     vkStream->read((uint32_t*)&forUnmarshaling->maxSampleMaskWords, sizeof(uint32_t));
606     vkStream->read((VkBool32*)&forUnmarshaling->timestampComputeAndGraphics, sizeof(VkBool32));
607     vkStream->read((float*)&forUnmarshaling->timestampPeriod, sizeof(float));
608     vkStream->read((uint32_t*)&forUnmarshaling->maxClipDistances, sizeof(uint32_t));
609     vkStream->read((uint32_t*)&forUnmarshaling->maxCullDistances, sizeof(uint32_t));
610     vkStream->read((uint32_t*)&forUnmarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t));
611     vkStream->read((uint32_t*)&forUnmarshaling->discreteQueuePriorities, sizeof(uint32_t));
612     vkStream->read((float*)forUnmarshaling->pointSizeRange, 2 * sizeof(float));
613     vkStream->read((float*)forUnmarshaling->lineWidthRange, 2 * sizeof(float));
614     vkStream->read((float*)&forUnmarshaling->pointSizeGranularity, sizeof(float));
615     vkStream->read((float*)&forUnmarshaling->lineWidthGranularity, sizeof(float));
616     vkStream->read((VkBool32*)&forUnmarshaling->strictLines, sizeof(VkBool32));
617     vkStream->read((VkBool32*)&forUnmarshaling->standardSampleLocations, sizeof(VkBool32));
618     vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize));
619     vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize));
620     vkStream->read((VkDeviceSize*)&forUnmarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize));
621 }
622 
marshal_VkPhysicalDeviceSparseProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSparseProperties * forMarshaling)623 void marshal_VkPhysicalDeviceSparseProperties(
624     VulkanStreamGuest* vkStream,
625     const VkPhysicalDeviceSparseProperties* forMarshaling)
626 {
627     vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DBlockShape, sizeof(VkBool32));
628     vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32));
629     vkStream->write((VkBool32*)&forMarshaling->residencyStandard3DBlockShape, sizeof(VkBool32));
630     vkStream->write((VkBool32*)&forMarshaling->residencyAlignedMipSize, sizeof(VkBool32));
631     vkStream->write((VkBool32*)&forMarshaling->residencyNonResidentStrict, sizeof(VkBool32));
632 }
633 
unmarshal_VkPhysicalDeviceSparseProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceSparseProperties * forUnmarshaling)634 void unmarshal_VkPhysicalDeviceSparseProperties(
635     VulkanStreamGuest* vkStream,
636     VkPhysicalDeviceSparseProperties* forUnmarshaling)
637 {
638     vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DBlockShape, sizeof(VkBool32));
639     vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32));
640     vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard3DBlockShape, sizeof(VkBool32));
641     vkStream->read((VkBool32*)&forUnmarshaling->residencyAlignedMipSize, sizeof(VkBool32));
642     vkStream->read((VkBool32*)&forUnmarshaling->residencyNonResidentStrict, sizeof(VkBool32));
643 }
644 
marshal_VkPhysicalDeviceProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceProperties * forMarshaling)645 void marshal_VkPhysicalDeviceProperties(
646     VulkanStreamGuest* vkStream,
647     const VkPhysicalDeviceProperties* forMarshaling)
648 {
649     vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t));
650     vkStream->write((uint32_t*)&forMarshaling->driverVersion, sizeof(uint32_t));
651     vkStream->write((uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t));
652     vkStream->write((uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t));
653     vkStream->write((VkPhysicalDeviceType*)&forMarshaling->deviceType, sizeof(VkPhysicalDeviceType));
654     vkStream->write((char*)forMarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
655     vkStream->write((uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
656     marshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forMarshaling->limits));
657     marshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forMarshaling->sparseProperties));
658 }
659 
unmarshal_VkPhysicalDeviceProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceProperties * forUnmarshaling)660 void unmarshal_VkPhysicalDeviceProperties(
661     VulkanStreamGuest* vkStream,
662     VkPhysicalDeviceProperties* forUnmarshaling)
663 {
664     vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t));
665     vkStream->read((uint32_t*)&forUnmarshaling->driverVersion, sizeof(uint32_t));
666     vkStream->read((uint32_t*)&forUnmarshaling->vendorID, sizeof(uint32_t));
667     vkStream->read((uint32_t*)&forUnmarshaling->deviceID, sizeof(uint32_t));
668     vkStream->read((VkPhysicalDeviceType*)&forUnmarshaling->deviceType, sizeof(VkPhysicalDeviceType));
669     vkStream->read((char*)forUnmarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
670     vkStream->read((uint8_t*)forUnmarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
671     unmarshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forUnmarshaling->limits));
672     unmarshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forUnmarshaling->sparseProperties));
673 }
674 
marshal_VkQueueFamilyProperties(VulkanStreamGuest * vkStream,const VkQueueFamilyProperties * forMarshaling)675 void marshal_VkQueueFamilyProperties(
676     VulkanStreamGuest* vkStream,
677     const VkQueueFamilyProperties* forMarshaling)
678 {
679     vkStream->write((VkQueueFlags*)&forMarshaling->queueFlags, sizeof(VkQueueFlags));
680     vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t));
681     vkStream->write((uint32_t*)&forMarshaling->timestampValidBits, sizeof(uint32_t));
682     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->minImageTransferGranularity));
683 }
684 
unmarshal_VkQueueFamilyProperties(VulkanStreamGuest * vkStream,VkQueueFamilyProperties * forUnmarshaling)685 void unmarshal_VkQueueFamilyProperties(
686     VulkanStreamGuest* vkStream,
687     VkQueueFamilyProperties* forUnmarshaling)
688 {
689     vkStream->read((VkQueueFlags*)&forUnmarshaling->queueFlags, sizeof(VkQueueFlags));
690     vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t));
691     vkStream->read((uint32_t*)&forUnmarshaling->timestampValidBits, sizeof(uint32_t));
692     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->minImageTransferGranularity));
693 }
694 
marshal_VkMemoryType(VulkanStreamGuest * vkStream,const VkMemoryType * forMarshaling)695 void marshal_VkMemoryType(
696     VulkanStreamGuest* vkStream,
697     const VkMemoryType* forMarshaling)
698 {
699     vkStream->write((VkMemoryPropertyFlags*)&forMarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags));
700     vkStream->write((uint32_t*)&forMarshaling->heapIndex, sizeof(uint32_t));
701 }
702 
unmarshal_VkMemoryType(VulkanStreamGuest * vkStream,VkMemoryType * forUnmarshaling)703 void unmarshal_VkMemoryType(
704     VulkanStreamGuest* vkStream,
705     VkMemoryType* forUnmarshaling)
706 {
707     vkStream->read((VkMemoryPropertyFlags*)&forUnmarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags));
708     vkStream->read((uint32_t*)&forUnmarshaling->heapIndex, sizeof(uint32_t));
709 }
710 
marshal_VkMemoryHeap(VulkanStreamGuest * vkStream,const VkMemoryHeap * forMarshaling)711 void marshal_VkMemoryHeap(
712     VulkanStreamGuest* vkStream,
713     const VkMemoryHeap* forMarshaling)
714 {
715     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
716     vkStream->write((VkMemoryHeapFlags*)&forMarshaling->flags, sizeof(VkMemoryHeapFlags));
717 }
718 
unmarshal_VkMemoryHeap(VulkanStreamGuest * vkStream,VkMemoryHeap * forUnmarshaling)719 void unmarshal_VkMemoryHeap(
720     VulkanStreamGuest* vkStream,
721     VkMemoryHeap* forUnmarshaling)
722 {
723     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
724     vkStream->read((VkMemoryHeapFlags*)&forUnmarshaling->flags, sizeof(VkMemoryHeapFlags));
725 }
726 
marshal_VkPhysicalDeviceMemoryProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMemoryProperties * forMarshaling)727 void marshal_VkPhysicalDeviceMemoryProperties(
728     VulkanStreamGuest* vkStream,
729     const VkPhysicalDeviceMemoryProperties* forMarshaling)
730 {
731     vkStream->write((uint32_t*)&forMarshaling->memoryTypeCount, sizeof(uint32_t));
732     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
733     {
734         marshal_VkMemoryType(vkStream, (VkMemoryType*)(forMarshaling->memoryTypes + i));
735     }
736     vkStream->write((uint32_t*)&forMarshaling->memoryHeapCount, sizeof(uint32_t));
737     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
738     {
739         marshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forMarshaling->memoryHeaps + i));
740     }
741 }
742 
unmarshal_VkPhysicalDeviceMemoryProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceMemoryProperties * forUnmarshaling)743 void unmarshal_VkPhysicalDeviceMemoryProperties(
744     VulkanStreamGuest* vkStream,
745     VkPhysicalDeviceMemoryProperties* forUnmarshaling)
746 {
747     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeCount, sizeof(uint32_t));
748     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
749     {
750         unmarshal_VkMemoryType(vkStream, (VkMemoryType*)(forUnmarshaling->memoryTypes + i));
751     }
752     vkStream->read((uint32_t*)&forUnmarshaling->memoryHeapCount, sizeof(uint32_t));
753     for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
754     {
755         unmarshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forUnmarshaling->memoryHeaps + i));
756     }
757 }
758 
marshal_VkDeviceQueueCreateInfo(VulkanStreamGuest * vkStream,const VkDeviceQueueCreateInfo * forMarshaling)759 void marshal_VkDeviceQueueCreateInfo(
760     VulkanStreamGuest* vkStream,
761     const VkDeviceQueueCreateInfo* forMarshaling)
762 {
763     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
764     marshal_extension_struct(vkStream, forMarshaling->pNext);
765     vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
766     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
767     vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t));
768     vkStream->write((const float*)forMarshaling->pQueuePriorities, forMarshaling->queueCount * sizeof(const float));
769 }
770 
unmarshal_VkDeviceQueueCreateInfo(VulkanStreamGuest * vkStream,VkDeviceQueueCreateInfo * forUnmarshaling)771 void unmarshal_VkDeviceQueueCreateInfo(
772     VulkanStreamGuest* vkStream,
773     VkDeviceQueueCreateInfo* forUnmarshaling)
774 {
775     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
776     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
777     vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
778     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
779     vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t));
780     vkStream->read((float*)forUnmarshaling->pQueuePriorities, forUnmarshaling->queueCount * sizeof(const float));
781 }
782 
marshal_VkDeviceCreateInfo(VulkanStreamGuest * vkStream,const VkDeviceCreateInfo * forMarshaling)783 void marshal_VkDeviceCreateInfo(
784     VulkanStreamGuest* vkStream,
785     const VkDeviceCreateInfo* forMarshaling)
786 {
787     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
788     marshal_extension_struct(vkStream, forMarshaling->pNext);
789     vkStream->write((VkDeviceCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceCreateFlags));
790     vkStream->write((uint32_t*)&forMarshaling->queueCreateInfoCount, sizeof(uint32_t));
791     for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueCreateInfoCount; ++i)
792     {
793         marshal_VkDeviceQueueCreateInfo(vkStream, (const VkDeviceQueueCreateInfo*)(forMarshaling->pQueueCreateInfos + i));
794     }
795     vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t));
796     saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount);
797     vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t));
798     saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount);
799     // WARNING PTR CHECK
800     uint64_t cgen_var_20 = (uint64_t)(uintptr_t)forMarshaling->pEnabledFeatures;
801     vkStream->putBe64(cgen_var_20);
802     if (forMarshaling->pEnabledFeatures)
803     {
804         marshal_VkPhysicalDeviceFeatures(vkStream, (const VkPhysicalDeviceFeatures*)(forMarshaling->pEnabledFeatures));
805     }
806 }
807 
unmarshal_VkDeviceCreateInfo(VulkanStreamGuest * vkStream,VkDeviceCreateInfo * forUnmarshaling)808 void unmarshal_VkDeviceCreateInfo(
809     VulkanStreamGuest* vkStream,
810     VkDeviceCreateInfo* forUnmarshaling)
811 {
812     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
813     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
814     vkStream->read((VkDeviceCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceCreateFlags));
815     vkStream->read((uint32_t*)&forUnmarshaling->queueCreateInfoCount, sizeof(uint32_t));
816     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueCreateInfoCount; ++i)
817     {
818         unmarshal_VkDeviceQueueCreateInfo(vkStream, (VkDeviceQueueCreateInfo*)(forUnmarshaling->pQueueCreateInfos + i));
819     }
820     vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t));
821     vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames);
822     vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t));
823     vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames);
824     // WARNING PTR CHECK
825     const VkPhysicalDeviceFeatures* check_pEnabledFeatures;
826     check_pEnabledFeatures = (const VkPhysicalDeviceFeatures*)(uintptr_t)vkStream->getBe64();
827     if (forUnmarshaling->pEnabledFeatures)
828     {
829         if (!(check_pEnabledFeatures))
830         {
831             fprintf(stderr, "fatal: forUnmarshaling->pEnabledFeatures inconsistent between guest and host\n");
832         }
833         unmarshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(forUnmarshaling->pEnabledFeatures));
834     }
835 }
836 
marshal_VkExtensionProperties(VulkanStreamGuest * vkStream,const VkExtensionProperties * forMarshaling)837 void marshal_VkExtensionProperties(
838     VulkanStreamGuest* vkStream,
839     const VkExtensionProperties* forMarshaling)
840 {
841     vkStream->write((char*)forMarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
842     vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t));
843 }
844 
unmarshal_VkExtensionProperties(VulkanStreamGuest * vkStream,VkExtensionProperties * forUnmarshaling)845 void unmarshal_VkExtensionProperties(
846     VulkanStreamGuest* vkStream,
847     VkExtensionProperties* forUnmarshaling)
848 {
849     vkStream->read((char*)forUnmarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
850     vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t));
851 }
852 
marshal_VkLayerProperties(VulkanStreamGuest * vkStream,const VkLayerProperties * forMarshaling)853 void marshal_VkLayerProperties(
854     VulkanStreamGuest* vkStream,
855     const VkLayerProperties* forMarshaling)
856 {
857     vkStream->write((char*)forMarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
858     vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t));
859     vkStream->write((uint32_t*)&forMarshaling->implementationVersion, sizeof(uint32_t));
860     vkStream->write((char*)forMarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
861 }
862 
unmarshal_VkLayerProperties(VulkanStreamGuest * vkStream,VkLayerProperties * forUnmarshaling)863 void unmarshal_VkLayerProperties(
864     VulkanStreamGuest* vkStream,
865     VkLayerProperties* forUnmarshaling)
866 {
867     vkStream->read((char*)forUnmarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
868     vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t));
869     vkStream->read((uint32_t*)&forUnmarshaling->implementationVersion, sizeof(uint32_t));
870     vkStream->read((char*)forUnmarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
871 }
872 
marshal_VkSubmitInfo(VulkanStreamGuest * vkStream,const VkSubmitInfo * forMarshaling)873 void marshal_VkSubmitInfo(
874     VulkanStreamGuest* vkStream,
875     const VkSubmitInfo* forMarshaling)
876 {
877     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
878     marshal_extension_struct(vkStream, forMarshaling->pNext);
879     vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
880     if (forMarshaling->waitSemaphoreCount)
881     {
882         uint64_t* cgen_var_22;
883         vkStream->alloc((void**)&cgen_var_22, forMarshaling->waitSemaphoreCount * 8);
884         vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_22, forMarshaling->waitSemaphoreCount);
885         vkStream->write((uint64_t*)cgen_var_22, forMarshaling->waitSemaphoreCount * 8);
886     }
887     vkStream->write((const VkPipelineStageFlags*)forMarshaling->pWaitDstStageMask, forMarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
888     vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
889     if (forMarshaling->commandBufferCount)
890     {
891         uint64_t* cgen_var_23;
892         vkStream->alloc((void**)&cgen_var_23, forMarshaling->commandBufferCount * 8);
893         vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(forMarshaling->pCommandBuffers, cgen_var_23, forMarshaling->commandBufferCount);
894         vkStream->write((uint64_t*)cgen_var_23, forMarshaling->commandBufferCount * 8);
895     }
896     vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
897     if (forMarshaling->signalSemaphoreCount)
898     {
899         uint64_t* cgen_var_24;
900         vkStream->alloc((void**)&cgen_var_24, forMarshaling->signalSemaphoreCount * 8);
901         vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_24, forMarshaling->signalSemaphoreCount);
902         vkStream->write((uint64_t*)cgen_var_24, forMarshaling->signalSemaphoreCount * 8);
903     }
904 }
905 
unmarshal_VkSubmitInfo(VulkanStreamGuest * vkStream,VkSubmitInfo * forUnmarshaling)906 void unmarshal_VkSubmitInfo(
907     VulkanStreamGuest* vkStream,
908     VkSubmitInfo* forUnmarshaling)
909 {
910     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
911     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
912     vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
913     if (forUnmarshaling->waitSemaphoreCount)
914     {
915         uint64_t* cgen_var_25;
916         vkStream->alloc((void**)&cgen_var_25, forUnmarshaling->waitSemaphoreCount * 8);
917         vkStream->read((uint64_t*)cgen_var_25, forUnmarshaling->waitSemaphoreCount * 8);
918         vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_25, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount);
919     }
920     vkStream->read((VkPipelineStageFlags*)forUnmarshaling->pWaitDstStageMask, forUnmarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
921     vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
922     if (forUnmarshaling->commandBufferCount)
923     {
924         uint64_t* cgen_var_26;
925         vkStream->alloc((void**)&cgen_var_26, forUnmarshaling->commandBufferCount * 8);
926         vkStream->read((uint64_t*)cgen_var_26, forUnmarshaling->commandBufferCount * 8);
927         vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(cgen_var_26, (VkCommandBuffer*)forUnmarshaling->pCommandBuffers, forUnmarshaling->commandBufferCount);
928     }
929     vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
930     if (forUnmarshaling->signalSemaphoreCount)
931     {
932         uint64_t* cgen_var_27;
933         vkStream->alloc((void**)&cgen_var_27, forUnmarshaling->signalSemaphoreCount * 8);
934         vkStream->read((uint64_t*)cgen_var_27, forUnmarshaling->signalSemaphoreCount * 8);
935         vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_27, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount);
936     }
937 }
938 
marshal_VkMemoryAllocateInfo(VulkanStreamGuest * vkStream,const VkMemoryAllocateInfo * forMarshaling)939 void marshal_VkMemoryAllocateInfo(
940     VulkanStreamGuest* vkStream,
941     const VkMemoryAllocateInfo* forMarshaling)
942 {
943     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
944     marshal_extension_struct(vkStream, forMarshaling->pNext);
945     vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize));
946     vkStream->write((uint32_t*)&forMarshaling->memoryTypeIndex, sizeof(uint32_t));
947 }
948 
unmarshal_VkMemoryAllocateInfo(VulkanStreamGuest * vkStream,VkMemoryAllocateInfo * forUnmarshaling)949 void unmarshal_VkMemoryAllocateInfo(
950     VulkanStreamGuest* vkStream,
951     VkMemoryAllocateInfo* forUnmarshaling)
952 {
953     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
954     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
955     vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize));
956     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeIndex, sizeof(uint32_t));
957 }
958 
marshal_VkMappedMemoryRange(VulkanStreamGuest * vkStream,const VkMappedMemoryRange * forMarshaling)959 void marshal_VkMappedMemoryRange(
960     VulkanStreamGuest* vkStream,
961     const VkMappedMemoryRange* forMarshaling)
962 {
963     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
964     marshal_extension_struct(vkStream, forMarshaling->pNext);
965     uint64_t cgen_var_28;
966     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_28, 1);
967     vkStream->write((uint64_t*)&cgen_var_28, 1 * 8);
968     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
969     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
970 }
971 
unmarshal_VkMappedMemoryRange(VulkanStreamGuest * vkStream,VkMappedMemoryRange * forUnmarshaling)972 void unmarshal_VkMappedMemoryRange(
973     VulkanStreamGuest* vkStream,
974     VkMappedMemoryRange* forUnmarshaling)
975 {
976     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
977     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
978     uint64_t cgen_var_29;
979     vkStream->read((uint64_t*)&cgen_var_29, 1 * 8);
980     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_29, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
981     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
982     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
983 }
984 
marshal_VkMemoryRequirements(VulkanStreamGuest * vkStream,const VkMemoryRequirements * forMarshaling)985 void marshal_VkMemoryRequirements(
986     VulkanStreamGuest* vkStream,
987     const VkMemoryRequirements* forMarshaling)
988 {
989     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
990     vkStream->write((VkDeviceSize*)&forMarshaling->alignment, sizeof(VkDeviceSize));
991     vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
992 }
993 
unmarshal_VkMemoryRequirements(VulkanStreamGuest * vkStream,VkMemoryRequirements * forUnmarshaling)994 void unmarshal_VkMemoryRequirements(
995     VulkanStreamGuest* vkStream,
996     VkMemoryRequirements* forUnmarshaling)
997 {
998     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
999     vkStream->read((VkDeviceSize*)&forUnmarshaling->alignment, sizeof(VkDeviceSize));
1000     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
1001 }
1002 
marshal_VkSparseImageFormatProperties(VulkanStreamGuest * vkStream,const VkSparseImageFormatProperties * forMarshaling)1003 void marshal_VkSparseImageFormatProperties(
1004     VulkanStreamGuest* vkStream,
1005     const VkSparseImageFormatProperties* forMarshaling)
1006 {
1007     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
1008     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->imageGranularity));
1009     vkStream->write((VkSparseImageFormatFlags*)&forMarshaling->flags, sizeof(VkSparseImageFormatFlags));
1010 }
1011 
unmarshal_VkSparseImageFormatProperties(VulkanStreamGuest * vkStream,VkSparseImageFormatProperties * forUnmarshaling)1012 void unmarshal_VkSparseImageFormatProperties(
1013     VulkanStreamGuest* vkStream,
1014     VkSparseImageFormatProperties* forUnmarshaling)
1015 {
1016     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
1017     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->imageGranularity));
1018     vkStream->read((VkSparseImageFormatFlags*)&forUnmarshaling->flags, sizeof(VkSparseImageFormatFlags));
1019 }
1020 
marshal_VkSparseImageMemoryRequirements(VulkanStreamGuest * vkStream,const VkSparseImageMemoryRequirements * forMarshaling)1021 void marshal_VkSparseImageMemoryRequirements(
1022     VulkanStreamGuest* vkStream,
1023     const VkSparseImageMemoryRequirements* forMarshaling)
1024 {
1025     marshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forMarshaling->formatProperties));
1026     vkStream->write((uint32_t*)&forMarshaling->imageMipTailFirstLod, sizeof(uint32_t));
1027     vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailSize, sizeof(VkDeviceSize));
1028     vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailOffset, sizeof(VkDeviceSize));
1029     vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailStride, sizeof(VkDeviceSize));
1030 }
1031 
unmarshal_VkSparseImageMemoryRequirements(VulkanStreamGuest * vkStream,VkSparseImageMemoryRequirements * forUnmarshaling)1032 void unmarshal_VkSparseImageMemoryRequirements(
1033     VulkanStreamGuest* vkStream,
1034     VkSparseImageMemoryRequirements* forUnmarshaling)
1035 {
1036     unmarshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forUnmarshaling->formatProperties));
1037     vkStream->read((uint32_t*)&forUnmarshaling->imageMipTailFirstLod, sizeof(uint32_t));
1038     vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailSize, sizeof(VkDeviceSize));
1039     vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailOffset, sizeof(VkDeviceSize));
1040     vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailStride, sizeof(VkDeviceSize));
1041 }
1042 
marshal_VkSparseMemoryBind(VulkanStreamGuest * vkStream,const VkSparseMemoryBind * forMarshaling)1043 void marshal_VkSparseMemoryBind(
1044     VulkanStreamGuest* vkStream,
1045     const VkSparseMemoryBind* forMarshaling)
1046 {
1047     vkStream->write((VkDeviceSize*)&forMarshaling->resourceOffset, sizeof(VkDeviceSize));
1048     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
1049     uint64_t cgen_var_30;
1050     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_30, 1);
1051     vkStream->write((uint64_t*)&cgen_var_30, 1 * 8);
1052     vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
1053     vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags));
1054 }
1055 
unmarshal_VkSparseMemoryBind(VulkanStreamGuest * vkStream,VkSparseMemoryBind * forUnmarshaling)1056 void unmarshal_VkSparseMemoryBind(
1057     VulkanStreamGuest* vkStream,
1058     VkSparseMemoryBind* forUnmarshaling)
1059 {
1060     vkStream->read((VkDeviceSize*)&forUnmarshaling->resourceOffset, sizeof(VkDeviceSize));
1061     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
1062     uint64_t cgen_var_31;
1063     vkStream->read((uint64_t*)&cgen_var_31, 1 * 8);
1064     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_31, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
1065     vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
1066     vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags));
1067 }
1068 
marshal_VkSparseBufferMemoryBindInfo(VulkanStreamGuest * vkStream,const VkSparseBufferMemoryBindInfo * forMarshaling)1069 void marshal_VkSparseBufferMemoryBindInfo(
1070     VulkanStreamGuest* vkStream,
1071     const VkSparseBufferMemoryBindInfo* forMarshaling)
1072 {
1073     uint64_t cgen_var_32;
1074     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_32, 1);
1075     vkStream->write((uint64_t*)&cgen_var_32, 1 * 8);
1076     vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
1077     for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
1078     {
1079         marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
1080     }
1081 }
1082 
unmarshal_VkSparseBufferMemoryBindInfo(VulkanStreamGuest * vkStream,VkSparseBufferMemoryBindInfo * forUnmarshaling)1083 void unmarshal_VkSparseBufferMemoryBindInfo(
1084     VulkanStreamGuest* vkStream,
1085     VkSparseBufferMemoryBindInfo* forUnmarshaling)
1086 {
1087     uint64_t cgen_var_33;
1088     vkStream->read((uint64_t*)&cgen_var_33, 1 * 8);
1089     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_33, (VkBuffer*)&forUnmarshaling->buffer, 1);
1090     vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
1091     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
1092     {
1093         unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
1094     }
1095 }
1096 
marshal_VkSparseImageOpaqueMemoryBindInfo(VulkanStreamGuest * vkStream,const VkSparseImageOpaqueMemoryBindInfo * forMarshaling)1097 void marshal_VkSparseImageOpaqueMemoryBindInfo(
1098     VulkanStreamGuest* vkStream,
1099     const VkSparseImageOpaqueMemoryBindInfo* forMarshaling)
1100 {
1101     uint64_t cgen_var_34;
1102     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_34, 1);
1103     vkStream->write((uint64_t*)&cgen_var_34, 1 * 8);
1104     vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
1105     for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
1106     {
1107         marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
1108     }
1109 }
1110 
unmarshal_VkSparseImageOpaqueMemoryBindInfo(VulkanStreamGuest * vkStream,VkSparseImageOpaqueMemoryBindInfo * forUnmarshaling)1111 void unmarshal_VkSparseImageOpaqueMemoryBindInfo(
1112     VulkanStreamGuest* vkStream,
1113     VkSparseImageOpaqueMemoryBindInfo* forUnmarshaling)
1114 {
1115     uint64_t cgen_var_35;
1116     vkStream->read((uint64_t*)&cgen_var_35, 1 * 8);
1117     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_35, (VkImage*)&forUnmarshaling->image, 1);
1118     vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
1119     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
1120     {
1121         unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
1122     }
1123 }
1124 
marshal_VkImageSubresource(VulkanStreamGuest * vkStream,const VkImageSubresource * forMarshaling)1125 void marshal_VkImageSubresource(
1126     VulkanStreamGuest* vkStream,
1127     const VkImageSubresource* forMarshaling)
1128 {
1129     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
1130     vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t));
1131     vkStream->write((uint32_t*)&forMarshaling->arrayLayer, sizeof(uint32_t));
1132 }
1133 
unmarshal_VkImageSubresource(VulkanStreamGuest * vkStream,VkImageSubresource * forUnmarshaling)1134 void unmarshal_VkImageSubresource(
1135     VulkanStreamGuest* vkStream,
1136     VkImageSubresource* forUnmarshaling)
1137 {
1138     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
1139     vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t));
1140     vkStream->read((uint32_t*)&forUnmarshaling->arrayLayer, sizeof(uint32_t));
1141 }
1142 
marshal_VkOffset3D(VulkanStreamGuest * vkStream,const VkOffset3D * forMarshaling)1143 void marshal_VkOffset3D(
1144     VulkanStreamGuest* vkStream,
1145     const VkOffset3D* forMarshaling)
1146 {
1147     vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t));
1148     vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t));
1149     vkStream->write((int32_t*)&forMarshaling->z, sizeof(int32_t));
1150 }
1151 
unmarshal_VkOffset3D(VulkanStreamGuest * vkStream,VkOffset3D * forUnmarshaling)1152 void unmarshal_VkOffset3D(
1153     VulkanStreamGuest* vkStream,
1154     VkOffset3D* forUnmarshaling)
1155 {
1156     vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t));
1157     vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t));
1158     vkStream->read((int32_t*)&forUnmarshaling->z, sizeof(int32_t));
1159 }
1160 
marshal_VkSparseImageMemoryBind(VulkanStreamGuest * vkStream,const VkSparseImageMemoryBind * forMarshaling)1161 void marshal_VkSparseImageMemoryBind(
1162     VulkanStreamGuest* vkStream,
1163     const VkSparseImageMemoryBind* forMarshaling)
1164 {
1165     marshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forMarshaling->subresource));
1166     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->offset));
1167     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
1168     uint64_t cgen_var_36;
1169     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_36, 1);
1170     vkStream->write((uint64_t*)&cgen_var_36, 1 * 8);
1171     vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
1172     vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags));
1173 }
1174 
unmarshal_VkSparseImageMemoryBind(VulkanStreamGuest * vkStream,VkSparseImageMemoryBind * forUnmarshaling)1175 void unmarshal_VkSparseImageMemoryBind(
1176     VulkanStreamGuest* vkStream,
1177     VkSparseImageMemoryBind* forUnmarshaling)
1178 {
1179     unmarshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forUnmarshaling->subresource));
1180     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->offset));
1181     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
1182     uint64_t cgen_var_37;
1183     vkStream->read((uint64_t*)&cgen_var_37, 1 * 8);
1184     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_37, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
1185     vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
1186     vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags));
1187 }
1188 
marshal_VkSparseImageMemoryBindInfo(VulkanStreamGuest * vkStream,const VkSparseImageMemoryBindInfo * forMarshaling)1189 void marshal_VkSparseImageMemoryBindInfo(
1190     VulkanStreamGuest* vkStream,
1191     const VkSparseImageMemoryBindInfo* forMarshaling)
1192 {
1193     uint64_t cgen_var_38;
1194     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_38, 1);
1195     vkStream->write((uint64_t*)&cgen_var_38, 1 * 8);
1196     vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
1197     for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
1198     {
1199         marshal_VkSparseImageMemoryBind(vkStream, (const VkSparseImageMemoryBind*)(forMarshaling->pBinds + i));
1200     }
1201 }
1202 
unmarshal_VkSparseImageMemoryBindInfo(VulkanStreamGuest * vkStream,VkSparseImageMemoryBindInfo * forUnmarshaling)1203 void unmarshal_VkSparseImageMemoryBindInfo(
1204     VulkanStreamGuest* vkStream,
1205     VkSparseImageMemoryBindInfo* forUnmarshaling)
1206 {
1207     uint64_t cgen_var_39;
1208     vkStream->read((uint64_t*)&cgen_var_39, 1 * 8);
1209     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_39, (VkImage*)&forUnmarshaling->image, 1);
1210     vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
1211     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
1212     {
1213         unmarshal_VkSparseImageMemoryBind(vkStream, (VkSparseImageMemoryBind*)(forUnmarshaling->pBinds + i));
1214     }
1215 }
1216 
marshal_VkBindSparseInfo(VulkanStreamGuest * vkStream,const VkBindSparseInfo * forMarshaling)1217 void marshal_VkBindSparseInfo(
1218     VulkanStreamGuest* vkStream,
1219     const VkBindSparseInfo* forMarshaling)
1220 {
1221     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1222     marshal_extension_struct(vkStream, forMarshaling->pNext);
1223     vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
1224     if (forMarshaling->waitSemaphoreCount)
1225     {
1226         uint64_t* cgen_var_40;
1227         vkStream->alloc((void**)&cgen_var_40, forMarshaling->waitSemaphoreCount * 8);
1228         vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_40, forMarshaling->waitSemaphoreCount);
1229         vkStream->write((uint64_t*)cgen_var_40, forMarshaling->waitSemaphoreCount * 8);
1230     }
1231     vkStream->write((uint32_t*)&forMarshaling->bufferBindCount, sizeof(uint32_t));
1232     for (uint32_t i = 0; i < (uint32_t)forMarshaling->bufferBindCount; ++i)
1233     {
1234         marshal_VkSparseBufferMemoryBindInfo(vkStream, (const VkSparseBufferMemoryBindInfo*)(forMarshaling->pBufferBinds + i));
1235     }
1236     vkStream->write((uint32_t*)&forMarshaling->imageOpaqueBindCount, sizeof(uint32_t));
1237     for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageOpaqueBindCount; ++i)
1238     {
1239         marshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (const VkSparseImageOpaqueMemoryBindInfo*)(forMarshaling->pImageOpaqueBinds + i));
1240     }
1241     vkStream->write((uint32_t*)&forMarshaling->imageBindCount, sizeof(uint32_t));
1242     for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageBindCount; ++i)
1243     {
1244         marshal_VkSparseImageMemoryBindInfo(vkStream, (const VkSparseImageMemoryBindInfo*)(forMarshaling->pImageBinds + i));
1245     }
1246     vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
1247     if (forMarshaling->signalSemaphoreCount)
1248     {
1249         uint64_t* cgen_var_41;
1250         vkStream->alloc((void**)&cgen_var_41, forMarshaling->signalSemaphoreCount * 8);
1251         vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_41, forMarshaling->signalSemaphoreCount);
1252         vkStream->write((uint64_t*)cgen_var_41, forMarshaling->signalSemaphoreCount * 8);
1253     }
1254 }
1255 
unmarshal_VkBindSparseInfo(VulkanStreamGuest * vkStream,VkBindSparseInfo * forUnmarshaling)1256 void unmarshal_VkBindSparseInfo(
1257     VulkanStreamGuest* vkStream,
1258     VkBindSparseInfo* forUnmarshaling)
1259 {
1260     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1261     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1262     vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
1263     if (forUnmarshaling->waitSemaphoreCount)
1264     {
1265         uint64_t* cgen_var_42;
1266         vkStream->alloc((void**)&cgen_var_42, forUnmarshaling->waitSemaphoreCount * 8);
1267         vkStream->read((uint64_t*)cgen_var_42, forUnmarshaling->waitSemaphoreCount * 8);
1268         vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_42, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount);
1269     }
1270     vkStream->read((uint32_t*)&forUnmarshaling->bufferBindCount, sizeof(uint32_t));
1271     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bufferBindCount; ++i)
1272     {
1273         unmarshal_VkSparseBufferMemoryBindInfo(vkStream, (VkSparseBufferMemoryBindInfo*)(forUnmarshaling->pBufferBinds + i));
1274     }
1275     vkStream->read((uint32_t*)&forUnmarshaling->imageOpaqueBindCount, sizeof(uint32_t));
1276     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageOpaqueBindCount; ++i)
1277     {
1278         unmarshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (VkSparseImageOpaqueMemoryBindInfo*)(forUnmarshaling->pImageOpaqueBinds + i));
1279     }
1280     vkStream->read((uint32_t*)&forUnmarshaling->imageBindCount, sizeof(uint32_t));
1281     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageBindCount; ++i)
1282     {
1283         unmarshal_VkSparseImageMemoryBindInfo(vkStream, (VkSparseImageMemoryBindInfo*)(forUnmarshaling->pImageBinds + i));
1284     }
1285     vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
1286     if (forUnmarshaling->signalSemaphoreCount)
1287     {
1288         uint64_t* cgen_var_43;
1289         vkStream->alloc((void**)&cgen_var_43, forUnmarshaling->signalSemaphoreCount * 8);
1290         vkStream->read((uint64_t*)cgen_var_43, forUnmarshaling->signalSemaphoreCount * 8);
1291         vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_43, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount);
1292     }
1293 }
1294 
marshal_VkFenceCreateInfo(VulkanStreamGuest * vkStream,const VkFenceCreateInfo * forMarshaling)1295 void marshal_VkFenceCreateInfo(
1296     VulkanStreamGuest* vkStream,
1297     const VkFenceCreateInfo* forMarshaling)
1298 {
1299     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1300     marshal_extension_struct(vkStream, forMarshaling->pNext);
1301     vkStream->write((VkFenceCreateFlags*)&forMarshaling->flags, sizeof(VkFenceCreateFlags));
1302 }
1303 
unmarshal_VkFenceCreateInfo(VulkanStreamGuest * vkStream,VkFenceCreateInfo * forUnmarshaling)1304 void unmarshal_VkFenceCreateInfo(
1305     VulkanStreamGuest* vkStream,
1306     VkFenceCreateInfo* forUnmarshaling)
1307 {
1308     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1309     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1310     vkStream->read((VkFenceCreateFlags*)&forUnmarshaling->flags, sizeof(VkFenceCreateFlags));
1311 }
1312 
marshal_VkSemaphoreCreateInfo(VulkanStreamGuest * vkStream,const VkSemaphoreCreateInfo * forMarshaling)1313 void marshal_VkSemaphoreCreateInfo(
1314     VulkanStreamGuest* vkStream,
1315     const VkSemaphoreCreateInfo* forMarshaling)
1316 {
1317     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1318     marshal_extension_struct(vkStream, forMarshaling->pNext);
1319     vkStream->write((VkSemaphoreCreateFlags*)&forMarshaling->flags, sizeof(VkSemaphoreCreateFlags));
1320 }
1321 
unmarshal_VkSemaphoreCreateInfo(VulkanStreamGuest * vkStream,VkSemaphoreCreateInfo * forUnmarshaling)1322 void unmarshal_VkSemaphoreCreateInfo(
1323     VulkanStreamGuest* vkStream,
1324     VkSemaphoreCreateInfo* forUnmarshaling)
1325 {
1326     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1327     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1328     vkStream->read((VkSemaphoreCreateFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreCreateFlags));
1329 }
1330 
marshal_VkEventCreateInfo(VulkanStreamGuest * vkStream,const VkEventCreateInfo * forMarshaling)1331 void marshal_VkEventCreateInfo(
1332     VulkanStreamGuest* vkStream,
1333     const VkEventCreateInfo* forMarshaling)
1334 {
1335     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1336     marshal_extension_struct(vkStream, forMarshaling->pNext);
1337     vkStream->write((VkEventCreateFlags*)&forMarshaling->flags, sizeof(VkEventCreateFlags));
1338 }
1339 
unmarshal_VkEventCreateInfo(VulkanStreamGuest * vkStream,VkEventCreateInfo * forUnmarshaling)1340 void unmarshal_VkEventCreateInfo(
1341     VulkanStreamGuest* vkStream,
1342     VkEventCreateInfo* forUnmarshaling)
1343 {
1344     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1345     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1346     vkStream->read((VkEventCreateFlags*)&forUnmarshaling->flags, sizeof(VkEventCreateFlags));
1347 }
1348 
marshal_VkQueryPoolCreateInfo(VulkanStreamGuest * vkStream,const VkQueryPoolCreateInfo * forMarshaling)1349 void marshal_VkQueryPoolCreateInfo(
1350     VulkanStreamGuest* vkStream,
1351     const VkQueryPoolCreateInfo* forMarshaling)
1352 {
1353     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1354     marshal_extension_struct(vkStream, forMarshaling->pNext);
1355     vkStream->write((VkQueryPoolCreateFlags*)&forMarshaling->flags, sizeof(VkQueryPoolCreateFlags));
1356     vkStream->write((VkQueryType*)&forMarshaling->queryType, sizeof(VkQueryType));
1357     vkStream->write((uint32_t*)&forMarshaling->queryCount, sizeof(uint32_t));
1358     vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
1359 }
1360 
unmarshal_VkQueryPoolCreateInfo(VulkanStreamGuest * vkStream,VkQueryPoolCreateInfo * forUnmarshaling)1361 void unmarshal_VkQueryPoolCreateInfo(
1362     VulkanStreamGuest* vkStream,
1363     VkQueryPoolCreateInfo* forUnmarshaling)
1364 {
1365     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1366     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1367     vkStream->read((VkQueryPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkQueryPoolCreateFlags));
1368     vkStream->read((VkQueryType*)&forUnmarshaling->queryType, sizeof(VkQueryType));
1369     vkStream->read((uint32_t*)&forUnmarshaling->queryCount, sizeof(uint32_t));
1370     vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
1371 }
1372 
marshal_VkBufferCreateInfo(VulkanStreamGuest * vkStream,const VkBufferCreateInfo * forMarshaling)1373 void marshal_VkBufferCreateInfo(
1374     VulkanStreamGuest* vkStream,
1375     const VkBufferCreateInfo* forMarshaling)
1376 {
1377     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1378     marshal_extension_struct(vkStream, forMarshaling->pNext);
1379     vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags));
1380     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
1381     vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags));
1382     vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode));
1383     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
1384     // WARNING PTR CHECK
1385     uint64_t cgen_var_44 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
1386     vkStream->putBe64(cgen_var_44);
1387     if (forMarshaling->pQueueFamilyIndices)
1388     {
1389         vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
1390     }
1391 }
1392 
unmarshal_VkBufferCreateInfo(VulkanStreamGuest * vkStream,VkBufferCreateInfo * forUnmarshaling)1393 void unmarshal_VkBufferCreateInfo(
1394     VulkanStreamGuest* vkStream,
1395     VkBufferCreateInfo* forUnmarshaling)
1396 {
1397     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1398     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1399     vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags));
1400     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
1401     vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags));
1402     vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode));
1403     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t));
1404     // WARNING PTR CHECK
1405     const uint32_t* check_pQueueFamilyIndices;
1406     check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64();
1407     if (forUnmarshaling->pQueueFamilyIndices)
1408     {
1409         if (!(check_pQueueFamilyIndices))
1410         {
1411             fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n");
1412         }
1413         vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
1414     }
1415 }
1416 
marshal_VkBufferViewCreateInfo(VulkanStreamGuest * vkStream,const VkBufferViewCreateInfo * forMarshaling)1417 void marshal_VkBufferViewCreateInfo(
1418     VulkanStreamGuest* vkStream,
1419     const VkBufferViewCreateInfo* forMarshaling)
1420 {
1421     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1422     marshal_extension_struct(vkStream, forMarshaling->pNext);
1423     vkStream->write((VkBufferViewCreateFlags*)&forMarshaling->flags, sizeof(VkBufferViewCreateFlags));
1424     uint64_t cgen_var_46;
1425     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_46, 1);
1426     vkStream->write((uint64_t*)&cgen_var_46, 1 * 8);
1427     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
1428     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
1429     vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize));
1430 }
1431 
unmarshal_VkBufferViewCreateInfo(VulkanStreamGuest * vkStream,VkBufferViewCreateInfo * forUnmarshaling)1432 void unmarshal_VkBufferViewCreateInfo(
1433     VulkanStreamGuest* vkStream,
1434     VkBufferViewCreateInfo* forUnmarshaling)
1435 {
1436     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1437     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1438     vkStream->read((VkBufferViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferViewCreateFlags));
1439     uint64_t cgen_var_47;
1440     vkStream->read((uint64_t*)&cgen_var_47, 1 * 8);
1441     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_47, (VkBuffer*)&forUnmarshaling->buffer, 1);
1442     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
1443     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
1444     vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize));
1445 }
1446 
marshal_VkImageCreateInfo(VulkanStreamGuest * vkStream,const VkImageCreateInfo * forMarshaling)1447 void marshal_VkImageCreateInfo(
1448     VulkanStreamGuest* vkStream,
1449     const VkImageCreateInfo* forMarshaling)
1450 {
1451     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1452     marshal_extension_struct(vkStream, forMarshaling->pNext);
1453     vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags));
1454     vkStream->write((VkImageType*)&forMarshaling->imageType, sizeof(VkImageType));
1455     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
1456     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
1457     vkStream->write((uint32_t*)&forMarshaling->mipLevels, sizeof(uint32_t));
1458     vkStream->write((uint32_t*)&forMarshaling->arrayLayers, sizeof(uint32_t));
1459     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
1460     vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
1461     vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
1462     vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode));
1463     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
1464     // WARNING PTR CHECK
1465     uint64_t cgen_var_48 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
1466     vkStream->putBe64(cgen_var_48);
1467     if (forMarshaling->pQueueFamilyIndices)
1468     {
1469         vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
1470     }
1471     vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
1472 }
1473 
unmarshal_VkImageCreateInfo(VulkanStreamGuest * vkStream,VkImageCreateInfo * forUnmarshaling)1474 void unmarshal_VkImageCreateInfo(
1475     VulkanStreamGuest* vkStream,
1476     VkImageCreateInfo* forUnmarshaling)
1477 {
1478     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1479     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1480     vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags));
1481     vkStream->read((VkImageType*)&forUnmarshaling->imageType, sizeof(VkImageType));
1482     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
1483     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
1484     vkStream->read((uint32_t*)&forUnmarshaling->mipLevels, sizeof(uint32_t));
1485     vkStream->read((uint32_t*)&forUnmarshaling->arrayLayers, sizeof(uint32_t));
1486     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits));
1487     vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
1488     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
1489     vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode));
1490     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t));
1491     // WARNING PTR CHECK
1492     const uint32_t* check_pQueueFamilyIndices;
1493     check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64();
1494     if (forUnmarshaling->pQueueFamilyIndices)
1495     {
1496         if (!(check_pQueueFamilyIndices))
1497         {
1498             fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n");
1499         }
1500         vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
1501     }
1502     vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
1503 }
1504 
marshal_VkSubresourceLayout(VulkanStreamGuest * vkStream,const VkSubresourceLayout * forMarshaling)1505 void marshal_VkSubresourceLayout(
1506     VulkanStreamGuest* vkStream,
1507     const VkSubresourceLayout* forMarshaling)
1508 {
1509     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
1510     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
1511     vkStream->write((VkDeviceSize*)&forMarshaling->rowPitch, sizeof(VkDeviceSize));
1512     vkStream->write((VkDeviceSize*)&forMarshaling->arrayPitch, sizeof(VkDeviceSize));
1513     vkStream->write((VkDeviceSize*)&forMarshaling->depthPitch, sizeof(VkDeviceSize));
1514 }
1515 
unmarshal_VkSubresourceLayout(VulkanStreamGuest * vkStream,VkSubresourceLayout * forUnmarshaling)1516 void unmarshal_VkSubresourceLayout(
1517     VulkanStreamGuest* vkStream,
1518     VkSubresourceLayout* forUnmarshaling)
1519 {
1520     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
1521     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
1522     vkStream->read((VkDeviceSize*)&forUnmarshaling->rowPitch, sizeof(VkDeviceSize));
1523     vkStream->read((VkDeviceSize*)&forUnmarshaling->arrayPitch, sizeof(VkDeviceSize));
1524     vkStream->read((VkDeviceSize*)&forUnmarshaling->depthPitch, sizeof(VkDeviceSize));
1525 }
1526 
marshal_VkComponentMapping(VulkanStreamGuest * vkStream,const VkComponentMapping * forMarshaling)1527 void marshal_VkComponentMapping(
1528     VulkanStreamGuest* vkStream,
1529     const VkComponentMapping* forMarshaling)
1530 {
1531     vkStream->write((VkComponentSwizzle*)&forMarshaling->r, sizeof(VkComponentSwizzle));
1532     vkStream->write((VkComponentSwizzle*)&forMarshaling->g, sizeof(VkComponentSwizzle));
1533     vkStream->write((VkComponentSwizzle*)&forMarshaling->b, sizeof(VkComponentSwizzle));
1534     vkStream->write((VkComponentSwizzle*)&forMarshaling->a, sizeof(VkComponentSwizzle));
1535 }
1536 
unmarshal_VkComponentMapping(VulkanStreamGuest * vkStream,VkComponentMapping * forUnmarshaling)1537 void unmarshal_VkComponentMapping(
1538     VulkanStreamGuest* vkStream,
1539     VkComponentMapping* forUnmarshaling)
1540 {
1541     vkStream->read((VkComponentSwizzle*)&forUnmarshaling->r, sizeof(VkComponentSwizzle));
1542     vkStream->read((VkComponentSwizzle*)&forUnmarshaling->g, sizeof(VkComponentSwizzle));
1543     vkStream->read((VkComponentSwizzle*)&forUnmarshaling->b, sizeof(VkComponentSwizzle));
1544     vkStream->read((VkComponentSwizzle*)&forUnmarshaling->a, sizeof(VkComponentSwizzle));
1545 }
1546 
marshal_VkImageSubresourceRange(VulkanStreamGuest * vkStream,const VkImageSubresourceRange * forMarshaling)1547 void marshal_VkImageSubresourceRange(
1548     VulkanStreamGuest* vkStream,
1549     const VkImageSubresourceRange* forMarshaling)
1550 {
1551     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
1552     vkStream->write((uint32_t*)&forMarshaling->baseMipLevel, sizeof(uint32_t));
1553     vkStream->write((uint32_t*)&forMarshaling->levelCount, sizeof(uint32_t));
1554     vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
1555     vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
1556 }
1557 
unmarshal_VkImageSubresourceRange(VulkanStreamGuest * vkStream,VkImageSubresourceRange * forUnmarshaling)1558 void unmarshal_VkImageSubresourceRange(
1559     VulkanStreamGuest* vkStream,
1560     VkImageSubresourceRange* forUnmarshaling)
1561 {
1562     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
1563     vkStream->read((uint32_t*)&forUnmarshaling->baseMipLevel, sizeof(uint32_t));
1564     vkStream->read((uint32_t*)&forUnmarshaling->levelCount, sizeof(uint32_t));
1565     vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
1566     vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
1567 }
1568 
marshal_VkImageViewCreateInfo(VulkanStreamGuest * vkStream,const VkImageViewCreateInfo * forMarshaling)1569 void marshal_VkImageViewCreateInfo(
1570     VulkanStreamGuest* vkStream,
1571     const VkImageViewCreateInfo* forMarshaling)
1572 {
1573     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1574     marshal_extension_struct(vkStream, forMarshaling->pNext);
1575     vkStream->write((VkImageViewCreateFlags*)&forMarshaling->flags, sizeof(VkImageViewCreateFlags));
1576     uint64_t cgen_var_50;
1577     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_50, 1);
1578     vkStream->write((uint64_t*)&cgen_var_50, 1 * 8);
1579     vkStream->write((VkImageViewType*)&forMarshaling->viewType, sizeof(VkImageViewType));
1580     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
1581     marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->components));
1582     marshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange));
1583 }
1584 
unmarshal_VkImageViewCreateInfo(VulkanStreamGuest * vkStream,VkImageViewCreateInfo * forUnmarshaling)1585 void unmarshal_VkImageViewCreateInfo(
1586     VulkanStreamGuest* vkStream,
1587     VkImageViewCreateInfo* forUnmarshaling)
1588 {
1589     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1590     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1591     vkStream->read((VkImageViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageViewCreateFlags));
1592     uint64_t cgen_var_51;
1593     vkStream->read((uint64_t*)&cgen_var_51, 1 * 8);
1594     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_51, (VkImage*)&forUnmarshaling->image, 1);
1595     vkStream->read((VkImageViewType*)&forUnmarshaling->viewType, sizeof(VkImageViewType));
1596     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
1597     unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->components));
1598     unmarshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange));
1599 }
1600 
marshal_VkShaderModuleCreateInfo(VulkanStreamGuest * vkStream,const VkShaderModuleCreateInfo * forMarshaling)1601 void marshal_VkShaderModuleCreateInfo(
1602     VulkanStreamGuest* vkStream,
1603     const VkShaderModuleCreateInfo* forMarshaling)
1604 {
1605     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1606     marshal_extension_struct(vkStream, forMarshaling->pNext);
1607     vkStream->write((VkShaderModuleCreateFlags*)&forMarshaling->flags, sizeof(VkShaderModuleCreateFlags));
1608     uint64_t cgen_var_52 = (uint64_t)forMarshaling->codeSize;
1609     vkStream->putBe64(cgen_var_52);
1610     vkStream->write((const uint32_t*)forMarshaling->pCode, (forMarshaling->codeSize / 4) * sizeof(const uint32_t));
1611 }
1612 
unmarshal_VkShaderModuleCreateInfo(VulkanStreamGuest * vkStream,VkShaderModuleCreateInfo * forUnmarshaling)1613 void unmarshal_VkShaderModuleCreateInfo(
1614     VulkanStreamGuest* vkStream,
1615     VkShaderModuleCreateInfo* forUnmarshaling)
1616 {
1617     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1618     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1619     vkStream->read((VkShaderModuleCreateFlags*)&forUnmarshaling->flags, sizeof(VkShaderModuleCreateFlags));
1620     forUnmarshaling->codeSize = (size_t)vkStream->getBe64();
1621     vkStream->read((uint32_t*)forUnmarshaling->pCode, (forUnmarshaling->codeSize / 4) * sizeof(const uint32_t));
1622 }
1623 
marshal_VkPipelineCacheCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineCacheCreateInfo * forMarshaling)1624 void marshal_VkPipelineCacheCreateInfo(
1625     VulkanStreamGuest* vkStream,
1626     const VkPipelineCacheCreateInfo* forMarshaling)
1627 {
1628     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1629     marshal_extension_struct(vkStream, forMarshaling->pNext);
1630     vkStream->write((VkPipelineCacheCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCacheCreateFlags));
1631     uint64_t cgen_var_54 = (uint64_t)forMarshaling->initialDataSize;
1632     vkStream->putBe64(cgen_var_54);
1633     vkStream->write((const void*)forMarshaling->pInitialData, forMarshaling->initialDataSize * sizeof(const uint8_t));
1634 }
1635 
unmarshal_VkPipelineCacheCreateInfo(VulkanStreamGuest * vkStream,VkPipelineCacheCreateInfo * forUnmarshaling)1636 void unmarshal_VkPipelineCacheCreateInfo(
1637     VulkanStreamGuest* vkStream,
1638     VkPipelineCacheCreateInfo* forUnmarshaling)
1639 {
1640     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1641     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1642     vkStream->read((VkPipelineCacheCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCacheCreateFlags));
1643     forUnmarshaling->initialDataSize = (size_t)vkStream->getBe64();
1644     vkStream->read((void*)forUnmarshaling->pInitialData, forUnmarshaling->initialDataSize * sizeof(const uint8_t));
1645 }
1646 
marshal_VkSpecializationMapEntry(VulkanStreamGuest * vkStream,const VkSpecializationMapEntry * forMarshaling)1647 void marshal_VkSpecializationMapEntry(
1648     VulkanStreamGuest* vkStream,
1649     const VkSpecializationMapEntry* forMarshaling)
1650 {
1651     vkStream->write((uint32_t*)&forMarshaling->constantID, sizeof(uint32_t));
1652     vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
1653     uint64_t cgen_var_56 = (uint64_t)forMarshaling->size;
1654     vkStream->putBe64(cgen_var_56);
1655 }
1656 
unmarshal_VkSpecializationMapEntry(VulkanStreamGuest * vkStream,VkSpecializationMapEntry * forUnmarshaling)1657 void unmarshal_VkSpecializationMapEntry(
1658     VulkanStreamGuest* vkStream,
1659     VkSpecializationMapEntry* forUnmarshaling)
1660 {
1661     vkStream->read((uint32_t*)&forUnmarshaling->constantID, sizeof(uint32_t));
1662     vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
1663     forUnmarshaling->size = (size_t)vkStream->getBe64();
1664 }
1665 
marshal_VkSpecializationInfo(VulkanStreamGuest * vkStream,const VkSpecializationInfo * forMarshaling)1666 void marshal_VkSpecializationInfo(
1667     VulkanStreamGuest* vkStream,
1668     const VkSpecializationInfo* forMarshaling)
1669 {
1670     vkStream->write((uint32_t*)&forMarshaling->mapEntryCount, sizeof(uint32_t));
1671     for (uint32_t i = 0; i < (uint32_t)forMarshaling->mapEntryCount; ++i)
1672     {
1673         marshal_VkSpecializationMapEntry(vkStream, (const VkSpecializationMapEntry*)(forMarshaling->pMapEntries + i));
1674     }
1675     uint64_t cgen_var_58 = (uint64_t)forMarshaling->dataSize;
1676     vkStream->putBe64(cgen_var_58);
1677     vkStream->write((const void*)forMarshaling->pData, forMarshaling->dataSize * sizeof(const uint8_t));
1678 }
1679 
unmarshal_VkSpecializationInfo(VulkanStreamGuest * vkStream,VkSpecializationInfo * forUnmarshaling)1680 void unmarshal_VkSpecializationInfo(
1681     VulkanStreamGuest* vkStream,
1682     VkSpecializationInfo* forUnmarshaling)
1683 {
1684     vkStream->read((uint32_t*)&forUnmarshaling->mapEntryCount, sizeof(uint32_t));
1685     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->mapEntryCount; ++i)
1686     {
1687         unmarshal_VkSpecializationMapEntry(vkStream, (VkSpecializationMapEntry*)(forUnmarshaling->pMapEntries + i));
1688     }
1689     forUnmarshaling->dataSize = (size_t)vkStream->getBe64();
1690     vkStream->read((void*)forUnmarshaling->pData, forUnmarshaling->dataSize * sizeof(const uint8_t));
1691 }
1692 
marshal_VkPipelineShaderStageCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineShaderStageCreateInfo * forMarshaling)1693 void marshal_VkPipelineShaderStageCreateInfo(
1694     VulkanStreamGuest* vkStream,
1695     const VkPipelineShaderStageCreateInfo* forMarshaling)
1696 {
1697     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1698     marshal_extension_struct(vkStream, forMarshaling->pNext);
1699     vkStream->write((VkPipelineShaderStageCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags));
1700     vkStream->write((VkShaderStageFlagBits*)&forMarshaling->stage, sizeof(VkShaderStageFlagBits));
1701     uint64_t cgen_var_60;
1702     vkStream->handleMapping()->mapHandles_VkShaderModule_u64(&forMarshaling->module, &cgen_var_60, 1);
1703     vkStream->write((uint64_t*)&cgen_var_60, 1 * 8);
1704     vkStream->putString(forMarshaling->pName);
1705     // WARNING PTR CHECK
1706     uint64_t cgen_var_61 = (uint64_t)(uintptr_t)forMarshaling->pSpecializationInfo;
1707     vkStream->putBe64(cgen_var_61);
1708     if (forMarshaling->pSpecializationInfo)
1709     {
1710         marshal_VkSpecializationInfo(vkStream, (const VkSpecializationInfo*)(forMarshaling->pSpecializationInfo));
1711     }
1712 }
1713 
unmarshal_VkPipelineShaderStageCreateInfo(VulkanStreamGuest * vkStream,VkPipelineShaderStageCreateInfo * forUnmarshaling)1714 void unmarshal_VkPipelineShaderStageCreateInfo(
1715     VulkanStreamGuest* vkStream,
1716     VkPipelineShaderStageCreateInfo* forUnmarshaling)
1717 {
1718     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1719     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1720     vkStream->read((VkPipelineShaderStageCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags));
1721     vkStream->read((VkShaderStageFlagBits*)&forUnmarshaling->stage, sizeof(VkShaderStageFlagBits));
1722     uint64_t cgen_var_62;
1723     vkStream->read((uint64_t*)&cgen_var_62, 1 * 8);
1724     vkStream->handleMapping()->mapHandles_u64_VkShaderModule(&cgen_var_62, (VkShaderModule*)&forUnmarshaling->module, 1);
1725     vkStream->loadStringInPlace((char**)&forUnmarshaling->pName);
1726     // WARNING PTR CHECK
1727     const VkSpecializationInfo* check_pSpecializationInfo;
1728     check_pSpecializationInfo = (const VkSpecializationInfo*)(uintptr_t)vkStream->getBe64();
1729     if (forUnmarshaling->pSpecializationInfo)
1730     {
1731         if (!(check_pSpecializationInfo))
1732         {
1733             fprintf(stderr, "fatal: forUnmarshaling->pSpecializationInfo inconsistent between guest and host\n");
1734         }
1735         unmarshal_VkSpecializationInfo(vkStream, (VkSpecializationInfo*)(forUnmarshaling->pSpecializationInfo));
1736     }
1737 }
1738 
marshal_VkVertexInputBindingDescription(VulkanStreamGuest * vkStream,const VkVertexInputBindingDescription * forMarshaling)1739 void marshal_VkVertexInputBindingDescription(
1740     VulkanStreamGuest* vkStream,
1741     const VkVertexInputBindingDescription* forMarshaling)
1742 {
1743     vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
1744     vkStream->write((uint32_t*)&forMarshaling->stride, sizeof(uint32_t));
1745     vkStream->write((VkVertexInputRate*)&forMarshaling->inputRate, sizeof(VkVertexInputRate));
1746 }
1747 
unmarshal_VkVertexInputBindingDescription(VulkanStreamGuest * vkStream,VkVertexInputBindingDescription * forUnmarshaling)1748 void unmarshal_VkVertexInputBindingDescription(
1749     VulkanStreamGuest* vkStream,
1750     VkVertexInputBindingDescription* forUnmarshaling)
1751 {
1752     vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
1753     vkStream->read((uint32_t*)&forUnmarshaling->stride, sizeof(uint32_t));
1754     vkStream->read((VkVertexInputRate*)&forUnmarshaling->inputRate, sizeof(VkVertexInputRate));
1755 }
1756 
marshal_VkVertexInputAttributeDescription(VulkanStreamGuest * vkStream,const VkVertexInputAttributeDescription * forMarshaling)1757 void marshal_VkVertexInputAttributeDescription(
1758     VulkanStreamGuest* vkStream,
1759     const VkVertexInputAttributeDescription* forMarshaling)
1760 {
1761     vkStream->write((uint32_t*)&forMarshaling->location, sizeof(uint32_t));
1762     vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
1763     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
1764     vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
1765 }
1766 
unmarshal_VkVertexInputAttributeDescription(VulkanStreamGuest * vkStream,VkVertexInputAttributeDescription * forUnmarshaling)1767 void unmarshal_VkVertexInputAttributeDescription(
1768     VulkanStreamGuest* vkStream,
1769     VkVertexInputAttributeDescription* forUnmarshaling)
1770 {
1771     vkStream->read((uint32_t*)&forUnmarshaling->location, sizeof(uint32_t));
1772     vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
1773     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
1774     vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
1775 }
1776 
marshal_VkPipelineVertexInputStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineVertexInputStateCreateInfo * forMarshaling)1777 void marshal_VkPipelineVertexInputStateCreateInfo(
1778     VulkanStreamGuest* vkStream,
1779     const VkPipelineVertexInputStateCreateInfo* forMarshaling)
1780 {
1781     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1782     marshal_extension_struct(vkStream, forMarshaling->pNext);
1783     vkStream->write((VkPipelineVertexInputStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags));
1784     vkStream->write((uint32_t*)&forMarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
1785     for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDescriptionCount; ++i)
1786     {
1787         marshal_VkVertexInputBindingDescription(vkStream, (const VkVertexInputBindingDescription*)(forMarshaling->pVertexBindingDescriptions + i));
1788     }
1789     vkStream->write((uint32_t*)&forMarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
1790     for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexAttributeDescriptionCount; ++i)
1791     {
1792         marshal_VkVertexInputAttributeDescription(vkStream, (const VkVertexInputAttributeDescription*)(forMarshaling->pVertexAttributeDescriptions + i));
1793     }
1794 }
1795 
unmarshal_VkPipelineVertexInputStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineVertexInputStateCreateInfo * forUnmarshaling)1796 void unmarshal_VkPipelineVertexInputStateCreateInfo(
1797     VulkanStreamGuest* vkStream,
1798     VkPipelineVertexInputStateCreateInfo* forUnmarshaling)
1799 {
1800     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1801     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1802     vkStream->read((VkPipelineVertexInputStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags));
1803     vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
1804     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDescriptionCount; ++i)
1805     {
1806         unmarshal_VkVertexInputBindingDescription(vkStream, (VkVertexInputBindingDescription*)(forUnmarshaling->pVertexBindingDescriptions + i));
1807     }
1808     vkStream->read((uint32_t*)&forUnmarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
1809     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexAttributeDescriptionCount; ++i)
1810     {
1811         unmarshal_VkVertexInputAttributeDescription(vkStream, (VkVertexInputAttributeDescription*)(forUnmarshaling->pVertexAttributeDescriptions + i));
1812     }
1813 }
1814 
marshal_VkPipelineInputAssemblyStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineInputAssemblyStateCreateInfo * forMarshaling)1815 void marshal_VkPipelineInputAssemblyStateCreateInfo(
1816     VulkanStreamGuest* vkStream,
1817     const VkPipelineInputAssemblyStateCreateInfo* forMarshaling)
1818 {
1819     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1820     marshal_extension_struct(vkStream, forMarshaling->pNext);
1821     vkStream->write((VkPipelineInputAssemblyStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags));
1822     vkStream->write((VkPrimitiveTopology*)&forMarshaling->topology, sizeof(VkPrimitiveTopology));
1823     vkStream->write((VkBool32*)&forMarshaling->primitiveRestartEnable, sizeof(VkBool32));
1824 }
1825 
unmarshal_VkPipelineInputAssemblyStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineInputAssemblyStateCreateInfo * forUnmarshaling)1826 void unmarshal_VkPipelineInputAssemblyStateCreateInfo(
1827     VulkanStreamGuest* vkStream,
1828     VkPipelineInputAssemblyStateCreateInfo* forUnmarshaling)
1829 {
1830     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1831     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1832     vkStream->read((VkPipelineInputAssemblyStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags));
1833     vkStream->read((VkPrimitiveTopology*)&forUnmarshaling->topology, sizeof(VkPrimitiveTopology));
1834     vkStream->read((VkBool32*)&forUnmarshaling->primitiveRestartEnable, sizeof(VkBool32));
1835 }
1836 
marshal_VkPipelineTessellationStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineTessellationStateCreateInfo * forMarshaling)1837 void marshal_VkPipelineTessellationStateCreateInfo(
1838     VulkanStreamGuest* vkStream,
1839     const VkPipelineTessellationStateCreateInfo* forMarshaling)
1840 {
1841     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1842     marshal_extension_struct(vkStream, forMarshaling->pNext);
1843     vkStream->write((VkPipelineTessellationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags));
1844     vkStream->write((uint32_t*)&forMarshaling->patchControlPoints, sizeof(uint32_t));
1845 }
1846 
unmarshal_VkPipelineTessellationStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineTessellationStateCreateInfo * forUnmarshaling)1847 void unmarshal_VkPipelineTessellationStateCreateInfo(
1848     VulkanStreamGuest* vkStream,
1849     VkPipelineTessellationStateCreateInfo* forUnmarshaling)
1850 {
1851     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1852     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1853     vkStream->read((VkPipelineTessellationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags));
1854     vkStream->read((uint32_t*)&forUnmarshaling->patchControlPoints, sizeof(uint32_t));
1855 }
1856 
marshal_VkViewport(VulkanStreamGuest * vkStream,const VkViewport * forMarshaling)1857 void marshal_VkViewport(
1858     VulkanStreamGuest* vkStream,
1859     const VkViewport* forMarshaling)
1860 {
1861     vkStream->write((float*)&forMarshaling->x, sizeof(float));
1862     vkStream->write((float*)&forMarshaling->y, sizeof(float));
1863     vkStream->write((float*)&forMarshaling->width, sizeof(float));
1864     vkStream->write((float*)&forMarshaling->height, sizeof(float));
1865     vkStream->write((float*)&forMarshaling->minDepth, sizeof(float));
1866     vkStream->write((float*)&forMarshaling->maxDepth, sizeof(float));
1867 }
1868 
unmarshal_VkViewport(VulkanStreamGuest * vkStream,VkViewport * forUnmarshaling)1869 void unmarshal_VkViewport(
1870     VulkanStreamGuest* vkStream,
1871     VkViewport* forUnmarshaling)
1872 {
1873     vkStream->read((float*)&forUnmarshaling->x, sizeof(float));
1874     vkStream->read((float*)&forUnmarshaling->y, sizeof(float));
1875     vkStream->read((float*)&forUnmarshaling->width, sizeof(float));
1876     vkStream->read((float*)&forUnmarshaling->height, sizeof(float));
1877     vkStream->read((float*)&forUnmarshaling->minDepth, sizeof(float));
1878     vkStream->read((float*)&forUnmarshaling->maxDepth, sizeof(float));
1879 }
1880 
marshal_VkOffset2D(VulkanStreamGuest * vkStream,const VkOffset2D * forMarshaling)1881 void marshal_VkOffset2D(
1882     VulkanStreamGuest* vkStream,
1883     const VkOffset2D* forMarshaling)
1884 {
1885     vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t));
1886     vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t));
1887 }
1888 
unmarshal_VkOffset2D(VulkanStreamGuest * vkStream,VkOffset2D * forUnmarshaling)1889 void unmarshal_VkOffset2D(
1890     VulkanStreamGuest* vkStream,
1891     VkOffset2D* forUnmarshaling)
1892 {
1893     vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t));
1894     vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t));
1895 }
1896 
marshal_VkExtent2D(VulkanStreamGuest * vkStream,const VkExtent2D * forMarshaling)1897 void marshal_VkExtent2D(
1898     VulkanStreamGuest* vkStream,
1899     const VkExtent2D* forMarshaling)
1900 {
1901     vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
1902     vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
1903 }
1904 
unmarshal_VkExtent2D(VulkanStreamGuest * vkStream,VkExtent2D * forUnmarshaling)1905 void unmarshal_VkExtent2D(
1906     VulkanStreamGuest* vkStream,
1907     VkExtent2D* forUnmarshaling)
1908 {
1909     vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
1910     vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
1911 }
1912 
marshal_VkRect2D(VulkanStreamGuest * vkStream,const VkRect2D * forMarshaling)1913 void marshal_VkRect2D(
1914     VulkanStreamGuest* vkStream,
1915     const VkRect2D* forMarshaling)
1916 {
1917     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->offset));
1918     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->extent));
1919 }
1920 
unmarshal_VkRect2D(VulkanStreamGuest * vkStream,VkRect2D * forUnmarshaling)1921 void unmarshal_VkRect2D(
1922     VulkanStreamGuest* vkStream,
1923     VkRect2D* forUnmarshaling)
1924 {
1925     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->offset));
1926     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->extent));
1927 }
1928 
marshal_VkPipelineViewportStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineViewportStateCreateInfo * forMarshaling)1929 void marshal_VkPipelineViewportStateCreateInfo(
1930     VulkanStreamGuest* vkStream,
1931     const VkPipelineViewportStateCreateInfo* forMarshaling)
1932 {
1933     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
1934     marshal_extension_struct(vkStream, forMarshaling->pNext);
1935     vkStream->write((VkPipelineViewportStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags));
1936     vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t));
1937     // WARNING PTR CHECK
1938     uint64_t cgen_var_64 = (uint64_t)(uintptr_t)forMarshaling->pViewports;
1939     vkStream->putBe64(cgen_var_64);
1940     if (forMarshaling->pViewports)
1941     {
1942         for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i)
1943         {
1944             marshal_VkViewport(vkStream, (const VkViewport*)(forMarshaling->pViewports + i));
1945         }
1946     }
1947     vkStream->write((uint32_t*)&forMarshaling->scissorCount, sizeof(uint32_t));
1948     // WARNING PTR CHECK
1949     uint64_t cgen_var_65 = (uint64_t)(uintptr_t)forMarshaling->pScissors;
1950     vkStream->putBe64(cgen_var_65);
1951     if (forMarshaling->pScissors)
1952     {
1953         for (uint32_t i = 0; i < (uint32_t)forMarshaling->scissorCount; ++i)
1954         {
1955             marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pScissors + i));
1956         }
1957     }
1958 }
1959 
unmarshal_VkPipelineViewportStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineViewportStateCreateInfo * forUnmarshaling)1960 void unmarshal_VkPipelineViewportStateCreateInfo(
1961     VulkanStreamGuest* vkStream,
1962     VkPipelineViewportStateCreateInfo* forUnmarshaling)
1963 {
1964     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
1965     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
1966     vkStream->read((VkPipelineViewportStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags));
1967     vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t));
1968     // WARNING PTR CHECK
1969     const VkViewport* check_pViewports;
1970     check_pViewports = (const VkViewport*)(uintptr_t)vkStream->getBe64();
1971     if (forUnmarshaling->pViewports)
1972     {
1973         if (!(check_pViewports))
1974         {
1975             fprintf(stderr, "fatal: forUnmarshaling->pViewports inconsistent between guest and host\n");
1976         }
1977         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i)
1978         {
1979             unmarshal_VkViewport(vkStream, (VkViewport*)(forUnmarshaling->pViewports + i));
1980         }
1981     }
1982     vkStream->read((uint32_t*)&forUnmarshaling->scissorCount, sizeof(uint32_t));
1983     // WARNING PTR CHECK
1984     const VkRect2D* check_pScissors;
1985     check_pScissors = (const VkRect2D*)(uintptr_t)vkStream->getBe64();
1986     if (forUnmarshaling->pScissors)
1987     {
1988         if (!(check_pScissors))
1989         {
1990             fprintf(stderr, "fatal: forUnmarshaling->pScissors inconsistent between guest and host\n");
1991         }
1992         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->scissorCount; ++i)
1993         {
1994             unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pScissors + i));
1995         }
1996     }
1997 }
1998 
marshal_VkPipelineRasterizationStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineRasterizationStateCreateInfo * forMarshaling)1999 void marshal_VkPipelineRasterizationStateCreateInfo(
2000     VulkanStreamGuest* vkStream,
2001     const VkPipelineRasterizationStateCreateInfo* forMarshaling)
2002 {
2003     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2004     marshal_extension_struct(vkStream, forMarshaling->pNext);
2005     vkStream->write((VkPipelineRasterizationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags));
2006     vkStream->write((VkBool32*)&forMarshaling->depthClampEnable, sizeof(VkBool32));
2007     vkStream->write((VkBool32*)&forMarshaling->rasterizerDiscardEnable, sizeof(VkBool32));
2008     vkStream->write((VkPolygonMode*)&forMarshaling->polygonMode, sizeof(VkPolygonMode));
2009     vkStream->write((VkCullModeFlags*)&forMarshaling->cullMode, sizeof(VkCullModeFlags));
2010     vkStream->write((VkFrontFace*)&forMarshaling->frontFace, sizeof(VkFrontFace));
2011     vkStream->write((VkBool32*)&forMarshaling->depthBiasEnable, sizeof(VkBool32));
2012     vkStream->write((float*)&forMarshaling->depthBiasConstantFactor, sizeof(float));
2013     vkStream->write((float*)&forMarshaling->depthBiasClamp, sizeof(float));
2014     vkStream->write((float*)&forMarshaling->depthBiasSlopeFactor, sizeof(float));
2015     vkStream->write((float*)&forMarshaling->lineWidth, sizeof(float));
2016 }
2017 
unmarshal_VkPipelineRasterizationStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineRasterizationStateCreateInfo * forUnmarshaling)2018 void unmarshal_VkPipelineRasterizationStateCreateInfo(
2019     VulkanStreamGuest* vkStream,
2020     VkPipelineRasterizationStateCreateInfo* forUnmarshaling)
2021 {
2022     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2023     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2024     vkStream->read((VkPipelineRasterizationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags));
2025     vkStream->read((VkBool32*)&forUnmarshaling->depthClampEnable, sizeof(VkBool32));
2026     vkStream->read((VkBool32*)&forUnmarshaling->rasterizerDiscardEnable, sizeof(VkBool32));
2027     vkStream->read((VkPolygonMode*)&forUnmarshaling->polygonMode, sizeof(VkPolygonMode));
2028     vkStream->read((VkCullModeFlags*)&forUnmarshaling->cullMode, sizeof(VkCullModeFlags));
2029     vkStream->read((VkFrontFace*)&forUnmarshaling->frontFace, sizeof(VkFrontFace));
2030     vkStream->read((VkBool32*)&forUnmarshaling->depthBiasEnable, sizeof(VkBool32));
2031     vkStream->read((float*)&forUnmarshaling->depthBiasConstantFactor, sizeof(float));
2032     vkStream->read((float*)&forUnmarshaling->depthBiasClamp, sizeof(float));
2033     vkStream->read((float*)&forUnmarshaling->depthBiasSlopeFactor, sizeof(float));
2034     vkStream->read((float*)&forUnmarshaling->lineWidth, sizeof(float));
2035 }
2036 
marshal_VkPipelineMultisampleStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineMultisampleStateCreateInfo * forMarshaling)2037 void marshal_VkPipelineMultisampleStateCreateInfo(
2038     VulkanStreamGuest* vkStream,
2039     const VkPipelineMultisampleStateCreateInfo* forMarshaling)
2040 {
2041     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2042     marshal_extension_struct(vkStream, forMarshaling->pNext);
2043     vkStream->write((VkPipelineMultisampleStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags));
2044     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->rasterizationSamples, sizeof(VkSampleCountFlagBits));
2045     vkStream->write((VkBool32*)&forMarshaling->sampleShadingEnable, sizeof(VkBool32));
2046     vkStream->write((float*)&forMarshaling->minSampleShading, sizeof(float));
2047     // WARNING PTR CHECK
2048     uint64_t cgen_var_68 = (uint64_t)(uintptr_t)forMarshaling->pSampleMask;
2049     vkStream->putBe64(cgen_var_68);
2050     if (forMarshaling->pSampleMask)
2051     {
2052         vkStream->write((const VkSampleMask*)forMarshaling->pSampleMask, (((forMarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
2053     }
2054     vkStream->write((VkBool32*)&forMarshaling->alphaToCoverageEnable, sizeof(VkBool32));
2055     vkStream->write((VkBool32*)&forMarshaling->alphaToOneEnable, sizeof(VkBool32));
2056 }
2057 
unmarshal_VkPipelineMultisampleStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineMultisampleStateCreateInfo * forUnmarshaling)2058 void unmarshal_VkPipelineMultisampleStateCreateInfo(
2059     VulkanStreamGuest* vkStream,
2060     VkPipelineMultisampleStateCreateInfo* forUnmarshaling)
2061 {
2062     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2063     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2064     vkStream->read((VkPipelineMultisampleStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags));
2065     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->rasterizationSamples, sizeof(VkSampleCountFlagBits));
2066     vkStream->read((VkBool32*)&forUnmarshaling->sampleShadingEnable, sizeof(VkBool32));
2067     vkStream->read((float*)&forUnmarshaling->minSampleShading, sizeof(float));
2068     // WARNING PTR CHECK
2069     const VkSampleMask* check_pSampleMask;
2070     check_pSampleMask = (const VkSampleMask*)(uintptr_t)vkStream->getBe64();
2071     if (forUnmarshaling->pSampleMask)
2072     {
2073         if (!(check_pSampleMask))
2074         {
2075             fprintf(stderr, "fatal: forUnmarshaling->pSampleMask inconsistent between guest and host\n");
2076         }
2077         vkStream->read((VkSampleMask*)forUnmarshaling->pSampleMask, (((forUnmarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
2078     }
2079     vkStream->read((VkBool32*)&forUnmarshaling->alphaToCoverageEnable, sizeof(VkBool32));
2080     vkStream->read((VkBool32*)&forUnmarshaling->alphaToOneEnable, sizeof(VkBool32));
2081 }
2082 
marshal_VkStencilOpState(VulkanStreamGuest * vkStream,const VkStencilOpState * forMarshaling)2083 void marshal_VkStencilOpState(
2084     VulkanStreamGuest* vkStream,
2085     const VkStencilOpState* forMarshaling)
2086 {
2087     vkStream->write((VkStencilOp*)&forMarshaling->failOp, sizeof(VkStencilOp));
2088     vkStream->write((VkStencilOp*)&forMarshaling->passOp, sizeof(VkStencilOp));
2089     vkStream->write((VkStencilOp*)&forMarshaling->depthFailOp, sizeof(VkStencilOp));
2090     vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp));
2091     vkStream->write((uint32_t*)&forMarshaling->compareMask, sizeof(uint32_t));
2092     vkStream->write((uint32_t*)&forMarshaling->writeMask, sizeof(uint32_t));
2093     vkStream->write((uint32_t*)&forMarshaling->reference, sizeof(uint32_t));
2094 }
2095 
unmarshal_VkStencilOpState(VulkanStreamGuest * vkStream,VkStencilOpState * forUnmarshaling)2096 void unmarshal_VkStencilOpState(
2097     VulkanStreamGuest* vkStream,
2098     VkStencilOpState* forUnmarshaling)
2099 {
2100     vkStream->read((VkStencilOp*)&forUnmarshaling->failOp, sizeof(VkStencilOp));
2101     vkStream->read((VkStencilOp*)&forUnmarshaling->passOp, sizeof(VkStencilOp));
2102     vkStream->read((VkStencilOp*)&forUnmarshaling->depthFailOp, sizeof(VkStencilOp));
2103     vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp));
2104     vkStream->read((uint32_t*)&forUnmarshaling->compareMask, sizeof(uint32_t));
2105     vkStream->read((uint32_t*)&forUnmarshaling->writeMask, sizeof(uint32_t));
2106     vkStream->read((uint32_t*)&forUnmarshaling->reference, sizeof(uint32_t));
2107 }
2108 
marshal_VkPipelineDepthStencilStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineDepthStencilStateCreateInfo * forMarshaling)2109 void marshal_VkPipelineDepthStencilStateCreateInfo(
2110     VulkanStreamGuest* vkStream,
2111     const VkPipelineDepthStencilStateCreateInfo* forMarshaling)
2112 {
2113     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2114     marshal_extension_struct(vkStream, forMarshaling->pNext);
2115     vkStream->write((VkPipelineDepthStencilStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineDepthStencilStateCreateFlags));
2116     vkStream->write((VkBool32*)&forMarshaling->depthTestEnable, sizeof(VkBool32));
2117     vkStream->write((VkBool32*)&forMarshaling->depthWriteEnable, sizeof(VkBool32));
2118     vkStream->write((VkCompareOp*)&forMarshaling->depthCompareOp, sizeof(VkCompareOp));
2119     vkStream->write((VkBool32*)&forMarshaling->depthBoundsTestEnable, sizeof(VkBool32));
2120     vkStream->write((VkBool32*)&forMarshaling->stencilTestEnable, sizeof(VkBool32));
2121     marshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forMarshaling->front));
2122     marshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forMarshaling->back));
2123     vkStream->write((float*)&forMarshaling->minDepthBounds, sizeof(float));
2124     vkStream->write((float*)&forMarshaling->maxDepthBounds, sizeof(float));
2125 }
2126 
unmarshal_VkPipelineDepthStencilStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineDepthStencilStateCreateInfo * forUnmarshaling)2127 void unmarshal_VkPipelineDepthStencilStateCreateInfo(
2128     VulkanStreamGuest* vkStream,
2129     VkPipelineDepthStencilStateCreateInfo* forUnmarshaling)
2130 {
2131     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2132     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2133     vkStream->read((VkPipelineDepthStencilStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineDepthStencilStateCreateFlags));
2134     vkStream->read((VkBool32*)&forUnmarshaling->depthTestEnable, sizeof(VkBool32));
2135     vkStream->read((VkBool32*)&forUnmarshaling->depthWriteEnable, sizeof(VkBool32));
2136     vkStream->read((VkCompareOp*)&forUnmarshaling->depthCompareOp, sizeof(VkCompareOp));
2137     vkStream->read((VkBool32*)&forUnmarshaling->depthBoundsTestEnable, sizeof(VkBool32));
2138     vkStream->read((VkBool32*)&forUnmarshaling->stencilTestEnable, sizeof(VkBool32));
2139     unmarshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forUnmarshaling->front));
2140     unmarshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forUnmarshaling->back));
2141     vkStream->read((float*)&forUnmarshaling->minDepthBounds, sizeof(float));
2142     vkStream->read((float*)&forUnmarshaling->maxDepthBounds, sizeof(float));
2143 }
2144 
marshal_VkPipelineColorBlendAttachmentState(VulkanStreamGuest * vkStream,const VkPipelineColorBlendAttachmentState * forMarshaling)2145 void marshal_VkPipelineColorBlendAttachmentState(
2146     VulkanStreamGuest* vkStream,
2147     const VkPipelineColorBlendAttachmentState* forMarshaling)
2148 {
2149     vkStream->write((VkBool32*)&forMarshaling->blendEnable, sizeof(VkBool32));
2150     vkStream->write((VkBlendFactor*)&forMarshaling->srcColorBlendFactor, sizeof(VkBlendFactor));
2151     vkStream->write((VkBlendFactor*)&forMarshaling->dstColorBlendFactor, sizeof(VkBlendFactor));
2152     vkStream->write((VkBlendOp*)&forMarshaling->colorBlendOp, sizeof(VkBlendOp));
2153     vkStream->write((VkBlendFactor*)&forMarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor));
2154     vkStream->write((VkBlendFactor*)&forMarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor));
2155     vkStream->write((VkBlendOp*)&forMarshaling->alphaBlendOp, sizeof(VkBlendOp));
2156     vkStream->write((VkColorComponentFlags*)&forMarshaling->colorWriteMask, sizeof(VkColorComponentFlags));
2157 }
2158 
unmarshal_VkPipelineColorBlendAttachmentState(VulkanStreamGuest * vkStream,VkPipelineColorBlendAttachmentState * forUnmarshaling)2159 void unmarshal_VkPipelineColorBlendAttachmentState(
2160     VulkanStreamGuest* vkStream,
2161     VkPipelineColorBlendAttachmentState* forUnmarshaling)
2162 {
2163     vkStream->read((VkBool32*)&forUnmarshaling->blendEnable, sizeof(VkBool32));
2164     vkStream->read((VkBlendFactor*)&forUnmarshaling->srcColorBlendFactor, sizeof(VkBlendFactor));
2165     vkStream->read((VkBlendFactor*)&forUnmarshaling->dstColorBlendFactor, sizeof(VkBlendFactor));
2166     vkStream->read((VkBlendOp*)&forUnmarshaling->colorBlendOp, sizeof(VkBlendOp));
2167     vkStream->read((VkBlendFactor*)&forUnmarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor));
2168     vkStream->read((VkBlendFactor*)&forUnmarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor));
2169     vkStream->read((VkBlendOp*)&forUnmarshaling->alphaBlendOp, sizeof(VkBlendOp));
2170     vkStream->read((VkColorComponentFlags*)&forUnmarshaling->colorWriteMask, sizeof(VkColorComponentFlags));
2171 }
2172 
marshal_VkPipelineColorBlendStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineColorBlendStateCreateInfo * forMarshaling)2173 void marshal_VkPipelineColorBlendStateCreateInfo(
2174     VulkanStreamGuest* vkStream,
2175     const VkPipelineColorBlendStateCreateInfo* forMarshaling)
2176 {
2177     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2178     marshal_extension_struct(vkStream, forMarshaling->pNext);
2179     vkStream->write((VkPipelineColorBlendStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineColorBlendStateCreateFlags));
2180     vkStream->write((VkBool32*)&forMarshaling->logicOpEnable, sizeof(VkBool32));
2181     vkStream->write((VkLogicOp*)&forMarshaling->logicOp, sizeof(VkLogicOp));
2182     vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
2183     for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i)
2184     {
2185         marshal_VkPipelineColorBlendAttachmentState(vkStream, (const VkPipelineColorBlendAttachmentState*)(forMarshaling->pAttachments + i));
2186     }
2187     vkStream->write((float*)forMarshaling->blendConstants, 4 * sizeof(float));
2188 }
2189 
unmarshal_VkPipelineColorBlendStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineColorBlendStateCreateInfo * forUnmarshaling)2190 void unmarshal_VkPipelineColorBlendStateCreateInfo(
2191     VulkanStreamGuest* vkStream,
2192     VkPipelineColorBlendStateCreateInfo* forUnmarshaling)
2193 {
2194     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2195     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2196     vkStream->read((VkPipelineColorBlendStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineColorBlendStateCreateFlags));
2197     vkStream->read((VkBool32*)&forUnmarshaling->logicOpEnable, sizeof(VkBool32));
2198     vkStream->read((VkLogicOp*)&forUnmarshaling->logicOp, sizeof(VkLogicOp));
2199     vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
2200     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i)
2201     {
2202         unmarshal_VkPipelineColorBlendAttachmentState(vkStream, (VkPipelineColorBlendAttachmentState*)(forUnmarshaling->pAttachments + i));
2203     }
2204     vkStream->read((float*)forUnmarshaling->blendConstants, 4 * sizeof(float));
2205 }
2206 
marshal_VkPipelineDynamicStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineDynamicStateCreateInfo * forMarshaling)2207 void marshal_VkPipelineDynamicStateCreateInfo(
2208     VulkanStreamGuest* vkStream,
2209     const VkPipelineDynamicStateCreateInfo* forMarshaling)
2210 {
2211     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2212     marshal_extension_struct(vkStream, forMarshaling->pNext);
2213     vkStream->write((VkPipelineDynamicStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineDynamicStateCreateFlags));
2214     vkStream->write((uint32_t*)&forMarshaling->dynamicStateCount, sizeof(uint32_t));
2215     vkStream->write((const VkDynamicState*)forMarshaling->pDynamicStates, forMarshaling->dynamicStateCount * sizeof(const VkDynamicState));
2216 }
2217 
unmarshal_VkPipelineDynamicStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineDynamicStateCreateInfo * forUnmarshaling)2218 void unmarshal_VkPipelineDynamicStateCreateInfo(
2219     VulkanStreamGuest* vkStream,
2220     VkPipelineDynamicStateCreateInfo* forUnmarshaling)
2221 {
2222     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2223     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2224     vkStream->read((VkPipelineDynamicStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineDynamicStateCreateFlags));
2225     vkStream->read((uint32_t*)&forUnmarshaling->dynamicStateCount, sizeof(uint32_t));
2226     vkStream->read((VkDynamicState*)forUnmarshaling->pDynamicStates, forUnmarshaling->dynamicStateCount * sizeof(const VkDynamicState));
2227 }
2228 
marshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest * vkStream,const VkGraphicsPipelineCreateInfo * forMarshaling)2229 void marshal_VkGraphicsPipelineCreateInfo(
2230     VulkanStreamGuest* vkStream,
2231     const VkGraphicsPipelineCreateInfo* forMarshaling)
2232 {
2233     uint32_t hasRasterization = 1;
2234     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2235     {
2236         hasRasterization = (((0 == forMarshaling->pRasterizationState)) ? (0) : (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable)));
2237         uint32_t cgen_var_70 = (uint32_t)hasRasterization;
2238         vkStream->putBe32(cgen_var_70);
2239     }
2240     uint32_t hasTessellation = 1;
2241     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2242     {
2243         hasTessellation = arrayany(forMarshaling->pStages, 0, forMarshaling->stageCount, [](VkPipelineShaderStageCreateInfo s) { return ((s.stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) || (s.stage == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)); });
2244         uint32_t cgen_var_71 = (uint32_t)hasTessellation;
2245         vkStream->putBe32(cgen_var_71);
2246     }
2247     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2248     marshal_extension_struct(vkStream, forMarshaling->pNext);
2249     vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags));
2250     vkStream->write((uint32_t*)&forMarshaling->stageCount, sizeof(uint32_t));
2251     for (uint32_t i = 0; i < (uint32_t)forMarshaling->stageCount; ++i)
2252     {
2253         marshal_VkPipelineShaderStageCreateInfo(vkStream, (const VkPipelineShaderStageCreateInfo*)(forMarshaling->pStages + i));
2254     }
2255     // WARNING PTR CHECK
2256     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2257     {
2258         uint64_t cgen_var_72 = (uint64_t)(uintptr_t)forMarshaling->pVertexInputState;
2259         vkStream->putBe64(cgen_var_72);
2260     }
2261     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forMarshaling->pVertexInputState))
2262     {
2263         marshal_VkPipelineVertexInputStateCreateInfo(vkStream, (const VkPipelineVertexInputStateCreateInfo*)(forMarshaling->pVertexInputState));
2264     }
2265     // WARNING PTR CHECK
2266     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2267     {
2268         uint64_t cgen_var_73 = (uint64_t)(uintptr_t)forMarshaling->pInputAssemblyState;
2269         vkStream->putBe64(cgen_var_73);
2270     }
2271     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forMarshaling->pInputAssemblyState))
2272     {
2273         marshal_VkPipelineInputAssemblyStateCreateInfo(vkStream, (const VkPipelineInputAssemblyStateCreateInfo*)(forMarshaling->pInputAssemblyState));
2274     }
2275     // WARNING PTR CHECK
2276     uint64_t cgen_var_74 = (uint64_t)(uintptr_t)forMarshaling->pTessellationState;
2277     vkStream->putBe64(cgen_var_74);
2278     if (forMarshaling->pTessellationState)
2279     {
2280         if (hasTessellation)
2281         {
2282             marshal_VkPipelineTessellationStateCreateInfo(vkStream, (const VkPipelineTessellationStateCreateInfo*)(forMarshaling->pTessellationState));
2283         }
2284     }
2285     // WARNING PTR CHECK
2286     uint64_t cgen_var_75 = (uint64_t)(uintptr_t)forMarshaling->pViewportState;
2287     vkStream->putBe64(cgen_var_75);
2288     if (forMarshaling->pViewportState)
2289     {
2290         if (hasRasterization)
2291         {
2292             marshal_VkPipelineViewportStateCreateInfo(vkStream, (const VkPipelineViewportStateCreateInfo*)(forMarshaling->pViewportState));
2293         }
2294     }
2295     // WARNING PTR CHECK
2296     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2297     {
2298         uint64_t cgen_var_76 = (uint64_t)(uintptr_t)forMarshaling->pRasterizationState;
2299         vkStream->putBe64(cgen_var_76);
2300     }
2301     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forMarshaling->pRasterizationState))
2302     {
2303         marshal_VkPipelineRasterizationStateCreateInfo(vkStream, (const VkPipelineRasterizationStateCreateInfo*)(forMarshaling->pRasterizationState));
2304     }
2305     // WARNING PTR CHECK
2306     uint64_t cgen_var_77 = (uint64_t)(uintptr_t)forMarshaling->pMultisampleState;
2307     vkStream->putBe64(cgen_var_77);
2308     if (forMarshaling->pMultisampleState)
2309     {
2310         if (hasRasterization)
2311         {
2312             marshal_VkPipelineMultisampleStateCreateInfo(vkStream, (const VkPipelineMultisampleStateCreateInfo*)(forMarshaling->pMultisampleState));
2313         }
2314     }
2315     // WARNING PTR CHECK
2316     uint64_t cgen_var_78 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilState;
2317     vkStream->putBe64(cgen_var_78);
2318     if (forMarshaling->pDepthStencilState)
2319     {
2320         if (hasRasterization)
2321         {
2322             marshal_VkPipelineDepthStencilStateCreateInfo(vkStream, (const VkPipelineDepthStencilStateCreateInfo*)(forMarshaling->pDepthStencilState));
2323         }
2324     }
2325     // WARNING PTR CHECK
2326     uint64_t cgen_var_79 = (uint64_t)(uintptr_t)forMarshaling->pColorBlendState;
2327     vkStream->putBe64(cgen_var_79);
2328     if (forMarshaling->pColorBlendState)
2329     {
2330         if (hasRasterization)
2331         {
2332             marshal_VkPipelineColorBlendStateCreateInfo(vkStream, (const VkPipelineColorBlendStateCreateInfo*)(forMarshaling->pColorBlendState));
2333         }
2334     }
2335     // WARNING PTR CHECK
2336     uint64_t cgen_var_80 = (uint64_t)(uintptr_t)forMarshaling->pDynamicState;
2337     vkStream->putBe64(cgen_var_80);
2338     if (forMarshaling->pDynamicState)
2339     {
2340         marshal_VkPipelineDynamicStateCreateInfo(vkStream, (const VkPipelineDynamicStateCreateInfo*)(forMarshaling->pDynamicState));
2341     }
2342     uint64_t cgen_var_81;
2343     vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_81, 1);
2344     vkStream->write((uint64_t*)&cgen_var_81, 1 * 8);
2345     uint64_t cgen_var_82;
2346     vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_82, 1);
2347     vkStream->write((uint64_t*)&cgen_var_82, 1 * 8);
2348     vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
2349     uint64_t cgen_var_83;
2350     vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle, &cgen_var_83, 1);
2351     vkStream->write((uint64_t*)&cgen_var_83, 1 * 8);
2352     vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t));
2353 }
2354 
unmarshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest * vkStream,VkGraphicsPipelineCreateInfo * forUnmarshaling)2355 void unmarshal_VkGraphicsPipelineCreateInfo(
2356     VulkanStreamGuest* vkStream,
2357     VkGraphicsPipelineCreateInfo* forUnmarshaling)
2358 {
2359     uint32_t hasRasterization = 1;
2360     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2361     {
2362         hasRasterization = (const uint32_t)vkStream->getBe32();
2363     }
2364     uint32_t hasTessellation = 1;
2365     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2366     {
2367         hasTessellation = (const uint32_t)vkStream->getBe32();
2368     }
2369     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2370     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2371     vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags));
2372     vkStream->read((uint32_t*)&forUnmarshaling->stageCount, sizeof(uint32_t));
2373     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->stageCount; ++i)
2374     {
2375         unmarshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(forUnmarshaling->pStages + i));
2376     }
2377     // WARNING PTR CHECK
2378     const VkPipelineVertexInputStateCreateInfo* check_pVertexInputState;
2379     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2380     {
2381         check_pVertexInputState = (const VkPipelineVertexInputStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2382     }
2383     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forUnmarshaling->pVertexInputState))
2384     {
2385         unmarshal_VkPipelineVertexInputStateCreateInfo(vkStream, (VkPipelineVertexInputStateCreateInfo*)(forUnmarshaling->pVertexInputState));
2386     }
2387     // WARNING PTR CHECK
2388     const VkPipelineInputAssemblyStateCreateInfo* check_pInputAssemblyState;
2389     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2390     {
2391         check_pInputAssemblyState = (const VkPipelineInputAssemblyStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2392     }
2393     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forUnmarshaling->pInputAssemblyState))
2394     {
2395         unmarshal_VkPipelineInputAssemblyStateCreateInfo(vkStream, (VkPipelineInputAssemblyStateCreateInfo*)(forUnmarshaling->pInputAssemblyState));
2396     }
2397     // WARNING PTR CHECK
2398     const VkPipelineTessellationStateCreateInfo* check_pTessellationState;
2399     check_pTessellationState = (const VkPipelineTessellationStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2400     if (forUnmarshaling->pTessellationState)
2401     {
2402         if (!(check_pTessellationState))
2403         {
2404             fprintf(stderr, "fatal: forUnmarshaling->pTessellationState inconsistent between guest and host\n");
2405         }
2406         if (hasTessellation)
2407         {
2408             unmarshal_VkPipelineTessellationStateCreateInfo(vkStream, (VkPipelineTessellationStateCreateInfo*)(forUnmarshaling->pTessellationState));
2409         }
2410         else
2411         {
2412             forUnmarshaling->pTessellationState = 0;
2413         }
2414     }
2415     // WARNING PTR CHECK
2416     const VkPipelineViewportStateCreateInfo* check_pViewportState;
2417     check_pViewportState = (const VkPipelineViewportStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2418     if (forUnmarshaling->pViewportState)
2419     {
2420         if (!(check_pViewportState))
2421         {
2422             fprintf(stderr, "fatal: forUnmarshaling->pViewportState inconsistent between guest and host\n");
2423         }
2424         if (hasRasterization)
2425         {
2426             unmarshal_VkPipelineViewportStateCreateInfo(vkStream, (VkPipelineViewportStateCreateInfo*)(forUnmarshaling->pViewportState));
2427         }
2428         else
2429         {
2430             forUnmarshaling->pViewportState = 0;
2431         }
2432     }
2433     // WARNING PTR CHECK
2434     const VkPipelineRasterizationStateCreateInfo* check_pRasterizationState;
2435     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT)
2436     {
2437         check_pRasterizationState = (const VkPipelineRasterizationStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2438     }
2439     if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || forUnmarshaling->pRasterizationState))
2440     {
2441         unmarshal_VkPipelineRasterizationStateCreateInfo(vkStream, (VkPipelineRasterizationStateCreateInfo*)(forUnmarshaling->pRasterizationState));
2442     }
2443     // WARNING PTR CHECK
2444     const VkPipelineMultisampleStateCreateInfo* check_pMultisampleState;
2445     check_pMultisampleState = (const VkPipelineMultisampleStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2446     if (forUnmarshaling->pMultisampleState)
2447     {
2448         if (!(check_pMultisampleState))
2449         {
2450             fprintf(stderr, "fatal: forUnmarshaling->pMultisampleState inconsistent between guest and host\n");
2451         }
2452         if (hasRasterization)
2453         {
2454             unmarshal_VkPipelineMultisampleStateCreateInfo(vkStream, (VkPipelineMultisampleStateCreateInfo*)(forUnmarshaling->pMultisampleState));
2455         }
2456         else
2457         {
2458             forUnmarshaling->pMultisampleState = 0;
2459         }
2460     }
2461     // WARNING PTR CHECK
2462     const VkPipelineDepthStencilStateCreateInfo* check_pDepthStencilState;
2463     check_pDepthStencilState = (const VkPipelineDepthStencilStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2464     if (forUnmarshaling->pDepthStencilState)
2465     {
2466         if (!(check_pDepthStencilState))
2467         {
2468             fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilState inconsistent between guest and host\n");
2469         }
2470         if (hasRasterization)
2471         {
2472             unmarshal_VkPipelineDepthStencilStateCreateInfo(vkStream, (VkPipelineDepthStencilStateCreateInfo*)(forUnmarshaling->pDepthStencilState));
2473         }
2474         else
2475         {
2476             forUnmarshaling->pDepthStencilState = 0;
2477         }
2478     }
2479     // WARNING PTR CHECK
2480     const VkPipelineColorBlendStateCreateInfo* check_pColorBlendState;
2481     check_pColorBlendState = (const VkPipelineColorBlendStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2482     if (forUnmarshaling->pColorBlendState)
2483     {
2484         if (!(check_pColorBlendState))
2485         {
2486             fprintf(stderr, "fatal: forUnmarshaling->pColorBlendState inconsistent between guest and host\n");
2487         }
2488         if (hasRasterization)
2489         {
2490             unmarshal_VkPipelineColorBlendStateCreateInfo(vkStream, (VkPipelineColorBlendStateCreateInfo*)(forUnmarshaling->pColorBlendState));
2491         }
2492         else
2493         {
2494             forUnmarshaling->pColorBlendState = 0;
2495         }
2496     }
2497     // WARNING PTR CHECK
2498     const VkPipelineDynamicStateCreateInfo* check_pDynamicState;
2499     check_pDynamicState = (const VkPipelineDynamicStateCreateInfo*)(uintptr_t)vkStream->getBe64();
2500     if (forUnmarshaling->pDynamicState)
2501     {
2502         if (!(check_pDynamicState))
2503         {
2504             fprintf(stderr, "fatal: forUnmarshaling->pDynamicState inconsistent between guest and host\n");
2505         }
2506         unmarshal_VkPipelineDynamicStateCreateInfo(vkStream, (VkPipelineDynamicStateCreateInfo*)(forUnmarshaling->pDynamicState));
2507     }
2508     uint64_t cgen_var_95;
2509     vkStream->read((uint64_t*)&cgen_var_95, 1 * 8);
2510     vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_95, (VkPipelineLayout*)&forUnmarshaling->layout, 1);
2511     uint64_t cgen_var_96;
2512     vkStream->read((uint64_t*)&cgen_var_96, 1 * 8);
2513     vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_96, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
2514     vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
2515     uint64_t cgen_var_97;
2516     vkStream->read((uint64_t*)&cgen_var_97, 1 * 8);
2517     vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_97, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1);
2518     vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t));
2519 }
2520 
marshal_VkComputePipelineCreateInfo(VulkanStreamGuest * vkStream,const VkComputePipelineCreateInfo * forMarshaling)2521 void marshal_VkComputePipelineCreateInfo(
2522     VulkanStreamGuest* vkStream,
2523     const VkComputePipelineCreateInfo* forMarshaling)
2524 {
2525     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2526     marshal_extension_struct(vkStream, forMarshaling->pNext);
2527     vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags));
2528     marshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(&forMarshaling->stage));
2529     uint64_t cgen_var_98;
2530     vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_98, 1);
2531     vkStream->write((uint64_t*)&cgen_var_98, 1 * 8);
2532     uint64_t cgen_var_99;
2533     vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle, &cgen_var_99, 1);
2534     vkStream->write((uint64_t*)&cgen_var_99, 1 * 8);
2535     vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t));
2536 }
2537 
unmarshal_VkComputePipelineCreateInfo(VulkanStreamGuest * vkStream,VkComputePipelineCreateInfo * forUnmarshaling)2538 void unmarshal_VkComputePipelineCreateInfo(
2539     VulkanStreamGuest* vkStream,
2540     VkComputePipelineCreateInfo* forUnmarshaling)
2541 {
2542     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2543     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2544     vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags));
2545     unmarshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(&forUnmarshaling->stage));
2546     uint64_t cgen_var_100;
2547     vkStream->read((uint64_t*)&cgen_var_100, 1 * 8);
2548     vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_100, (VkPipelineLayout*)&forUnmarshaling->layout, 1);
2549     uint64_t cgen_var_101;
2550     vkStream->read((uint64_t*)&cgen_var_101, 1 * 8);
2551     vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_101, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1);
2552     vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t));
2553 }
2554 
marshal_VkPushConstantRange(VulkanStreamGuest * vkStream,const VkPushConstantRange * forMarshaling)2555 void marshal_VkPushConstantRange(
2556     VulkanStreamGuest* vkStream,
2557     const VkPushConstantRange* forMarshaling)
2558 {
2559     vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags));
2560     vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
2561     vkStream->write((uint32_t*)&forMarshaling->size, sizeof(uint32_t));
2562 }
2563 
unmarshal_VkPushConstantRange(VulkanStreamGuest * vkStream,VkPushConstantRange * forUnmarshaling)2564 void unmarshal_VkPushConstantRange(
2565     VulkanStreamGuest* vkStream,
2566     VkPushConstantRange* forUnmarshaling)
2567 {
2568     vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags));
2569     vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
2570     vkStream->read((uint32_t*)&forUnmarshaling->size, sizeof(uint32_t));
2571 }
2572 
marshal_VkPipelineLayoutCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineLayoutCreateInfo * forMarshaling)2573 void marshal_VkPipelineLayoutCreateInfo(
2574     VulkanStreamGuest* vkStream,
2575     const VkPipelineLayoutCreateInfo* forMarshaling)
2576 {
2577     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2578     marshal_extension_struct(vkStream, forMarshaling->pNext);
2579     vkStream->write((VkPipelineLayoutCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineLayoutCreateFlags));
2580     vkStream->write((uint32_t*)&forMarshaling->setLayoutCount, sizeof(uint32_t));
2581     if (forMarshaling->setLayoutCount)
2582     {
2583         uint64_t* cgen_var_102;
2584         vkStream->alloc((void**)&cgen_var_102, forMarshaling->setLayoutCount * 8);
2585         vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(forMarshaling->pSetLayouts, cgen_var_102, forMarshaling->setLayoutCount);
2586         vkStream->write((uint64_t*)cgen_var_102, forMarshaling->setLayoutCount * 8);
2587     }
2588     vkStream->write((uint32_t*)&forMarshaling->pushConstantRangeCount, sizeof(uint32_t));
2589     for (uint32_t i = 0; i < (uint32_t)forMarshaling->pushConstantRangeCount; ++i)
2590     {
2591         marshal_VkPushConstantRange(vkStream, (const VkPushConstantRange*)(forMarshaling->pPushConstantRanges + i));
2592     }
2593 }
2594 
unmarshal_VkPipelineLayoutCreateInfo(VulkanStreamGuest * vkStream,VkPipelineLayoutCreateInfo * forUnmarshaling)2595 void unmarshal_VkPipelineLayoutCreateInfo(
2596     VulkanStreamGuest* vkStream,
2597     VkPipelineLayoutCreateInfo* forUnmarshaling)
2598 {
2599     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2600     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2601     vkStream->read((VkPipelineLayoutCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineLayoutCreateFlags));
2602     vkStream->read((uint32_t*)&forUnmarshaling->setLayoutCount, sizeof(uint32_t));
2603     if (forUnmarshaling->setLayoutCount)
2604     {
2605         uint64_t* cgen_var_103;
2606         vkStream->alloc((void**)&cgen_var_103, forUnmarshaling->setLayoutCount * 8);
2607         vkStream->read((uint64_t*)cgen_var_103, forUnmarshaling->setLayoutCount * 8);
2608         vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(cgen_var_103, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts, forUnmarshaling->setLayoutCount);
2609     }
2610     vkStream->read((uint32_t*)&forUnmarshaling->pushConstantRangeCount, sizeof(uint32_t));
2611     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->pushConstantRangeCount; ++i)
2612     {
2613         unmarshal_VkPushConstantRange(vkStream, (VkPushConstantRange*)(forUnmarshaling->pPushConstantRanges + i));
2614     }
2615 }
2616 
marshal_VkSamplerCreateInfo(VulkanStreamGuest * vkStream,const VkSamplerCreateInfo * forMarshaling)2617 void marshal_VkSamplerCreateInfo(
2618     VulkanStreamGuest* vkStream,
2619     const VkSamplerCreateInfo* forMarshaling)
2620 {
2621     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2622     marshal_extension_struct(vkStream, forMarshaling->pNext);
2623     vkStream->write((VkSamplerCreateFlags*)&forMarshaling->flags, sizeof(VkSamplerCreateFlags));
2624     vkStream->write((VkFilter*)&forMarshaling->magFilter, sizeof(VkFilter));
2625     vkStream->write((VkFilter*)&forMarshaling->minFilter, sizeof(VkFilter));
2626     vkStream->write((VkSamplerMipmapMode*)&forMarshaling->mipmapMode, sizeof(VkSamplerMipmapMode));
2627     vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeU, sizeof(VkSamplerAddressMode));
2628     vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeV, sizeof(VkSamplerAddressMode));
2629     vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeW, sizeof(VkSamplerAddressMode));
2630     vkStream->write((float*)&forMarshaling->mipLodBias, sizeof(float));
2631     vkStream->write((VkBool32*)&forMarshaling->anisotropyEnable, sizeof(VkBool32));
2632     vkStream->write((float*)&forMarshaling->maxAnisotropy, sizeof(float));
2633     vkStream->write((VkBool32*)&forMarshaling->compareEnable, sizeof(VkBool32));
2634     vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp));
2635     vkStream->write((float*)&forMarshaling->minLod, sizeof(float));
2636     vkStream->write((float*)&forMarshaling->maxLod, sizeof(float));
2637     vkStream->write((VkBorderColor*)&forMarshaling->borderColor, sizeof(VkBorderColor));
2638     vkStream->write((VkBool32*)&forMarshaling->unnormalizedCoordinates, sizeof(VkBool32));
2639 }
2640 
unmarshal_VkSamplerCreateInfo(VulkanStreamGuest * vkStream,VkSamplerCreateInfo * forUnmarshaling)2641 void unmarshal_VkSamplerCreateInfo(
2642     VulkanStreamGuest* vkStream,
2643     VkSamplerCreateInfo* forUnmarshaling)
2644 {
2645     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2646     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2647     vkStream->read((VkSamplerCreateFlags*)&forUnmarshaling->flags, sizeof(VkSamplerCreateFlags));
2648     vkStream->read((VkFilter*)&forUnmarshaling->magFilter, sizeof(VkFilter));
2649     vkStream->read((VkFilter*)&forUnmarshaling->minFilter, sizeof(VkFilter));
2650     vkStream->read((VkSamplerMipmapMode*)&forUnmarshaling->mipmapMode, sizeof(VkSamplerMipmapMode));
2651     vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeU, sizeof(VkSamplerAddressMode));
2652     vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeV, sizeof(VkSamplerAddressMode));
2653     vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeW, sizeof(VkSamplerAddressMode));
2654     vkStream->read((float*)&forUnmarshaling->mipLodBias, sizeof(float));
2655     vkStream->read((VkBool32*)&forUnmarshaling->anisotropyEnable, sizeof(VkBool32));
2656     vkStream->read((float*)&forUnmarshaling->maxAnisotropy, sizeof(float));
2657     vkStream->read((VkBool32*)&forUnmarshaling->compareEnable, sizeof(VkBool32));
2658     vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp));
2659     vkStream->read((float*)&forUnmarshaling->minLod, sizeof(float));
2660     vkStream->read((float*)&forUnmarshaling->maxLod, sizeof(float));
2661     vkStream->read((VkBorderColor*)&forUnmarshaling->borderColor, sizeof(VkBorderColor));
2662     vkStream->read((VkBool32*)&forUnmarshaling->unnormalizedCoordinates, sizeof(VkBool32));
2663 }
2664 
marshal_VkDescriptorSetLayoutBinding(VulkanStreamGuest * vkStream,const VkDescriptorSetLayoutBinding * forMarshaling)2665 void marshal_VkDescriptorSetLayoutBinding(
2666     VulkanStreamGuest* vkStream,
2667     const VkDescriptorSetLayoutBinding* forMarshaling)
2668 {
2669     vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
2670     vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
2671     vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
2672     vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags));
2673     // WARNING PTR CHECK
2674     uint64_t cgen_var_104 = (uint64_t)(uintptr_t)forMarshaling->pImmutableSamplers;
2675     vkStream->putBe64(cgen_var_104);
2676     if (forMarshaling->pImmutableSamplers)
2677     {
2678         if (forMarshaling->descriptorCount)
2679         {
2680             uint64_t* cgen_var_105;
2681             vkStream->alloc((void**)&cgen_var_105, forMarshaling->descriptorCount * 8);
2682             vkStream->handleMapping()->mapHandles_VkSampler_u64(forMarshaling->pImmutableSamplers, cgen_var_105, forMarshaling->descriptorCount);
2683             vkStream->write((uint64_t*)cgen_var_105, forMarshaling->descriptorCount * 8);
2684         }
2685     }
2686 }
2687 
unmarshal_VkDescriptorSetLayoutBinding(VulkanStreamGuest * vkStream,VkDescriptorSetLayoutBinding * forUnmarshaling)2688 void unmarshal_VkDescriptorSetLayoutBinding(
2689     VulkanStreamGuest* vkStream,
2690     VkDescriptorSetLayoutBinding* forUnmarshaling)
2691 {
2692     vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
2693     vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
2694     vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
2695     vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags));
2696     // WARNING PTR CHECK
2697     const VkSampler* check_pImmutableSamplers;
2698     check_pImmutableSamplers = (const VkSampler*)(uintptr_t)vkStream->getBe64();
2699     if (forUnmarshaling->pImmutableSamplers)
2700     {
2701         if (!(check_pImmutableSamplers))
2702         {
2703             fprintf(stderr, "fatal: forUnmarshaling->pImmutableSamplers inconsistent between guest and host\n");
2704         }
2705         if (forUnmarshaling->descriptorCount)
2706         {
2707             uint64_t* cgen_var_107;
2708             vkStream->alloc((void**)&cgen_var_107, forUnmarshaling->descriptorCount * 8);
2709             vkStream->read((uint64_t*)cgen_var_107, forUnmarshaling->descriptorCount * 8);
2710             vkStream->handleMapping()->mapHandles_u64_VkSampler(cgen_var_107, (VkSampler*)forUnmarshaling->pImmutableSamplers, forUnmarshaling->descriptorCount);
2711         }
2712     }
2713 }
2714 
marshal_VkDescriptorSetLayoutCreateInfo(VulkanStreamGuest * vkStream,const VkDescriptorSetLayoutCreateInfo * forMarshaling)2715 void marshal_VkDescriptorSetLayoutCreateInfo(
2716     VulkanStreamGuest* vkStream,
2717     const VkDescriptorSetLayoutCreateInfo* forMarshaling)
2718 {
2719     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2720     marshal_extension_struct(vkStream, forMarshaling->pNext);
2721     vkStream->write((VkDescriptorSetLayoutCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorSetLayoutCreateFlags));
2722     vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t));
2723     for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindingCount; ++i)
2724     {
2725         marshal_VkDescriptorSetLayoutBinding(vkStream, (const VkDescriptorSetLayoutBinding*)(forMarshaling->pBindings + i));
2726     }
2727 }
2728 
unmarshal_VkDescriptorSetLayoutCreateInfo(VulkanStreamGuest * vkStream,VkDescriptorSetLayoutCreateInfo * forUnmarshaling)2729 void unmarshal_VkDescriptorSetLayoutCreateInfo(
2730     VulkanStreamGuest* vkStream,
2731     VkDescriptorSetLayoutCreateInfo* forUnmarshaling)
2732 {
2733     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2734     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2735     vkStream->read((VkDescriptorSetLayoutCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorSetLayoutCreateFlags));
2736     vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t));
2737     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindingCount; ++i)
2738     {
2739         unmarshal_VkDescriptorSetLayoutBinding(vkStream, (VkDescriptorSetLayoutBinding*)(forUnmarshaling->pBindings + i));
2740     }
2741 }
2742 
marshal_VkDescriptorPoolSize(VulkanStreamGuest * vkStream,const VkDescriptorPoolSize * forMarshaling)2743 void marshal_VkDescriptorPoolSize(
2744     VulkanStreamGuest* vkStream,
2745     const VkDescriptorPoolSize* forMarshaling)
2746 {
2747     vkStream->write((VkDescriptorType*)&forMarshaling->type, sizeof(VkDescriptorType));
2748     vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
2749 }
2750 
unmarshal_VkDescriptorPoolSize(VulkanStreamGuest * vkStream,VkDescriptorPoolSize * forUnmarshaling)2751 void unmarshal_VkDescriptorPoolSize(
2752     VulkanStreamGuest* vkStream,
2753     VkDescriptorPoolSize* forUnmarshaling)
2754 {
2755     vkStream->read((VkDescriptorType*)&forUnmarshaling->type, sizeof(VkDescriptorType));
2756     vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
2757 }
2758 
marshal_VkDescriptorPoolCreateInfo(VulkanStreamGuest * vkStream,const VkDescriptorPoolCreateInfo * forMarshaling)2759 void marshal_VkDescriptorPoolCreateInfo(
2760     VulkanStreamGuest* vkStream,
2761     const VkDescriptorPoolCreateInfo* forMarshaling)
2762 {
2763     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2764     marshal_extension_struct(vkStream, forMarshaling->pNext);
2765     vkStream->write((VkDescriptorPoolCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorPoolCreateFlags));
2766     vkStream->write((uint32_t*)&forMarshaling->maxSets, sizeof(uint32_t));
2767     vkStream->write((uint32_t*)&forMarshaling->poolSizeCount, sizeof(uint32_t));
2768     for (uint32_t i = 0; i < (uint32_t)forMarshaling->poolSizeCount; ++i)
2769     {
2770         marshal_VkDescriptorPoolSize(vkStream, (const VkDescriptorPoolSize*)(forMarshaling->pPoolSizes + i));
2771     }
2772 }
2773 
unmarshal_VkDescriptorPoolCreateInfo(VulkanStreamGuest * vkStream,VkDescriptorPoolCreateInfo * forUnmarshaling)2774 void unmarshal_VkDescriptorPoolCreateInfo(
2775     VulkanStreamGuest* vkStream,
2776     VkDescriptorPoolCreateInfo* forUnmarshaling)
2777 {
2778     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2779     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2780     vkStream->read((VkDescriptorPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorPoolCreateFlags));
2781     vkStream->read((uint32_t*)&forUnmarshaling->maxSets, sizeof(uint32_t));
2782     vkStream->read((uint32_t*)&forUnmarshaling->poolSizeCount, sizeof(uint32_t));
2783     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->poolSizeCount; ++i)
2784     {
2785         unmarshal_VkDescriptorPoolSize(vkStream, (VkDescriptorPoolSize*)(forUnmarshaling->pPoolSizes + i));
2786     }
2787 }
2788 
marshal_VkDescriptorSetAllocateInfo(VulkanStreamGuest * vkStream,const VkDescriptorSetAllocateInfo * forMarshaling)2789 void marshal_VkDescriptorSetAllocateInfo(
2790     VulkanStreamGuest* vkStream,
2791     const VkDescriptorSetAllocateInfo* forMarshaling)
2792 {
2793     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2794     marshal_extension_struct(vkStream, forMarshaling->pNext);
2795     uint64_t cgen_var_108;
2796     vkStream->handleMapping()->mapHandles_VkDescriptorPool_u64(&forMarshaling->descriptorPool, &cgen_var_108, 1);
2797     vkStream->write((uint64_t*)&cgen_var_108, 1 * 8);
2798     vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t));
2799     if (forMarshaling->descriptorSetCount)
2800     {
2801         uint64_t* cgen_var_109;
2802         vkStream->alloc((void**)&cgen_var_109, forMarshaling->descriptorSetCount * 8);
2803         vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(forMarshaling->pSetLayouts, cgen_var_109, forMarshaling->descriptorSetCount);
2804         vkStream->write((uint64_t*)cgen_var_109, forMarshaling->descriptorSetCount * 8);
2805     }
2806 }
2807 
unmarshal_VkDescriptorSetAllocateInfo(VulkanStreamGuest * vkStream,VkDescriptorSetAllocateInfo * forUnmarshaling)2808 void unmarshal_VkDescriptorSetAllocateInfo(
2809     VulkanStreamGuest* vkStream,
2810     VkDescriptorSetAllocateInfo* forUnmarshaling)
2811 {
2812     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2813     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2814     uint64_t cgen_var_110;
2815     vkStream->read((uint64_t*)&cgen_var_110, 1 * 8);
2816     vkStream->handleMapping()->mapHandles_u64_VkDescriptorPool(&cgen_var_110, (VkDescriptorPool*)&forUnmarshaling->descriptorPool, 1);
2817     vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t));
2818     if (forUnmarshaling->descriptorSetCount)
2819     {
2820         uint64_t* cgen_var_111;
2821         vkStream->alloc((void**)&cgen_var_111, forUnmarshaling->descriptorSetCount * 8);
2822         vkStream->read((uint64_t*)cgen_var_111, forUnmarshaling->descriptorSetCount * 8);
2823         vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(cgen_var_111, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts, forUnmarshaling->descriptorSetCount);
2824     }
2825 }
2826 
marshal_VkDescriptorImageInfo(VulkanStreamGuest * vkStream,const VkDescriptorImageInfo * forMarshaling)2827 void marshal_VkDescriptorImageInfo(
2828     VulkanStreamGuest* vkStream,
2829     const VkDescriptorImageInfo* forMarshaling)
2830 {
2831     uint64_t cgen_var_112;
2832     vkStream->handleMapping()->mapHandles_VkSampler_u64(&forMarshaling->sampler, &cgen_var_112, 1);
2833     vkStream->write((uint64_t*)&cgen_var_112, 1 * 8);
2834     uint64_t cgen_var_113;
2835     vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_113, 1);
2836     vkStream->write((uint64_t*)&cgen_var_113, 1 * 8);
2837     vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout));
2838 }
2839 
unmarshal_VkDescriptorImageInfo(VulkanStreamGuest * vkStream,VkDescriptorImageInfo * forUnmarshaling)2840 void unmarshal_VkDescriptorImageInfo(
2841     VulkanStreamGuest* vkStream,
2842     VkDescriptorImageInfo* forUnmarshaling)
2843 {
2844     uint64_t cgen_var_114;
2845     vkStream->read((uint64_t*)&cgen_var_114, 1 * 8);
2846     vkStream->handleMapping()->mapHandles_u64_VkSampler(&cgen_var_114, (VkSampler*)&forUnmarshaling->sampler, 1);
2847     uint64_t cgen_var_115;
2848     vkStream->read((uint64_t*)&cgen_var_115, 1 * 8);
2849     vkStream->handleMapping()->mapHandles_u64_VkImageView(&cgen_var_115, (VkImageView*)&forUnmarshaling->imageView, 1);
2850     vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout));
2851 }
2852 
marshal_VkDescriptorBufferInfo(VulkanStreamGuest * vkStream,const VkDescriptorBufferInfo * forMarshaling)2853 void marshal_VkDescriptorBufferInfo(
2854     VulkanStreamGuest* vkStream,
2855     const VkDescriptorBufferInfo* forMarshaling)
2856 {
2857     uint64_t cgen_var_116;
2858     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_116, 1);
2859     vkStream->write((uint64_t*)&cgen_var_116, 1 * 8);
2860     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
2861     vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize));
2862 }
2863 
unmarshal_VkDescriptorBufferInfo(VulkanStreamGuest * vkStream,VkDescriptorBufferInfo * forUnmarshaling)2864 void unmarshal_VkDescriptorBufferInfo(
2865     VulkanStreamGuest* vkStream,
2866     VkDescriptorBufferInfo* forUnmarshaling)
2867 {
2868     uint64_t cgen_var_117;
2869     vkStream->read((uint64_t*)&cgen_var_117, 1 * 8);
2870     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_117, (VkBuffer*)&forUnmarshaling->buffer, 1);
2871     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
2872     vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize));
2873 }
2874 
marshal_VkWriteDescriptorSet(VulkanStreamGuest * vkStream,const VkWriteDescriptorSet * forMarshaling)2875 void marshal_VkWriteDescriptorSet(
2876     VulkanStreamGuest* vkStream,
2877     const VkWriteDescriptorSet* forMarshaling)
2878 {
2879     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
2880     marshal_extension_struct(vkStream, forMarshaling->pNext);
2881     uint64_t cgen_var_118;
2882     vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_118, 1);
2883     vkStream->write((uint64_t*)&cgen_var_118, 1 * 8);
2884     vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
2885     vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
2886     vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
2887     vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
2888     // WARNING PTR CHECK
2889     uint64_t cgen_var_119 = (uint64_t)(uintptr_t)forMarshaling->pImageInfo;
2890     vkStream->putBe64(cgen_var_119);
2891     if (forMarshaling->pImageInfo)
2892     {
2893         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_SAMPLER == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT == forMarshaling->descriptorType))))
2894         {
2895             for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i)
2896             {
2897                 marshal_VkDescriptorImageInfo(vkStream, (const VkDescriptorImageInfo*)(forMarshaling->pImageInfo + i));
2898             }
2899         }
2900     }
2901     // WARNING PTR CHECK
2902     uint64_t cgen_var_120 = (uint64_t)(uintptr_t)forMarshaling->pBufferInfo;
2903     vkStream->putBe64(cgen_var_120);
2904     if (forMarshaling->pBufferInfo)
2905     {
2906         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC == forMarshaling->descriptorType))))
2907         {
2908             for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i)
2909             {
2910                 marshal_VkDescriptorBufferInfo(vkStream, (const VkDescriptorBufferInfo*)(forMarshaling->pBufferInfo + i));
2911             }
2912         }
2913     }
2914     // WARNING PTR CHECK
2915     uint64_t cgen_var_121 = (uint64_t)(uintptr_t)forMarshaling->pTexelBufferView;
2916     vkStream->putBe64(cgen_var_121);
2917     if (forMarshaling->pTexelBufferView)
2918     {
2919         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == forMarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == forMarshaling->descriptorType))))
2920         {
2921             if (forMarshaling->descriptorCount)
2922             {
2923                 uint64_t* cgen_var_122;
2924                 vkStream->alloc((void**)&cgen_var_122, forMarshaling->descriptorCount * 8);
2925                 vkStream->handleMapping()->mapHandles_VkBufferView_u64(forMarshaling->pTexelBufferView, cgen_var_122, forMarshaling->descriptorCount);
2926                 vkStream->write((uint64_t*)cgen_var_122, forMarshaling->descriptorCount * 8);
2927             }
2928         }
2929     }
2930 }
2931 
unmarshal_VkWriteDescriptorSet(VulkanStreamGuest * vkStream,VkWriteDescriptorSet * forUnmarshaling)2932 void unmarshal_VkWriteDescriptorSet(
2933     VulkanStreamGuest* vkStream,
2934     VkWriteDescriptorSet* forUnmarshaling)
2935 {
2936     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
2937     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
2938     uint64_t cgen_var_123;
2939     vkStream->read((uint64_t*)&cgen_var_123, 1 * 8);
2940     vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_123, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1);
2941     vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
2942     vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
2943     vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
2944     vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
2945     // WARNING PTR CHECK
2946     const VkDescriptorImageInfo* check_pImageInfo;
2947     check_pImageInfo = (const VkDescriptorImageInfo*)(uintptr_t)vkStream->getBe64();
2948     if (forUnmarshaling->pImageInfo)
2949     {
2950         if (!(check_pImageInfo))
2951         {
2952             fprintf(stderr, "fatal: forUnmarshaling->pImageInfo inconsistent between guest and host\n");
2953         }
2954         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_SAMPLER == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT == forUnmarshaling->descriptorType))))
2955         {
2956             for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i)
2957             {
2958                 unmarshal_VkDescriptorImageInfo(vkStream, (VkDescriptorImageInfo*)(forUnmarshaling->pImageInfo + i));
2959             }
2960         }
2961         else
2962         {
2963             forUnmarshaling->pImageInfo = 0;
2964         }
2965     }
2966     // WARNING PTR CHECK
2967     const VkDescriptorBufferInfo* check_pBufferInfo;
2968     check_pBufferInfo = (const VkDescriptorBufferInfo*)(uintptr_t)vkStream->getBe64();
2969     if (forUnmarshaling->pBufferInfo)
2970     {
2971         if (!(check_pBufferInfo))
2972         {
2973             fprintf(stderr, "fatal: forUnmarshaling->pBufferInfo inconsistent between guest and host\n");
2974         }
2975         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC == forUnmarshaling->descriptorType))))
2976         {
2977             for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i)
2978             {
2979                 unmarshal_VkDescriptorBufferInfo(vkStream, (VkDescriptorBufferInfo*)(forUnmarshaling->pBufferInfo + i));
2980             }
2981         }
2982         else
2983         {
2984             forUnmarshaling->pBufferInfo = 0;
2985         }
2986     }
2987     // WARNING PTR CHECK
2988     const VkBufferView* check_pTexelBufferView;
2989     check_pTexelBufferView = (const VkBufferView*)(uintptr_t)vkStream->getBe64();
2990     if (forUnmarshaling->pTexelBufferView)
2991     {
2992         if (!(check_pTexelBufferView))
2993         {
2994             fprintf(stderr, "fatal: forUnmarshaling->pTexelBufferView inconsistent between guest and host\n");
2995         }
2996         if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) || ((VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == forUnmarshaling->descriptorType) || (VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == forUnmarshaling->descriptorType))))
2997         {
2998             if (forUnmarshaling->descriptorCount)
2999             {
3000                 uint64_t* cgen_var_127;
3001                 vkStream->alloc((void**)&cgen_var_127, forUnmarshaling->descriptorCount * 8);
3002                 vkStream->read((uint64_t*)cgen_var_127, forUnmarshaling->descriptorCount * 8);
3003                 vkStream->handleMapping()->mapHandles_u64_VkBufferView(cgen_var_127, (VkBufferView*)forUnmarshaling->pTexelBufferView, forUnmarshaling->descriptorCount);
3004             }
3005         }
3006         else
3007         {
3008             forUnmarshaling->pTexelBufferView = 0;
3009         }
3010     }
3011 }
3012 
marshal_VkCopyDescriptorSet(VulkanStreamGuest * vkStream,const VkCopyDescriptorSet * forMarshaling)3013 void marshal_VkCopyDescriptorSet(
3014     VulkanStreamGuest* vkStream,
3015     const VkCopyDescriptorSet* forMarshaling)
3016 {
3017     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3018     marshal_extension_struct(vkStream, forMarshaling->pNext);
3019     uint64_t cgen_var_128;
3020     vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->srcSet, &cgen_var_128, 1);
3021     vkStream->write((uint64_t*)&cgen_var_128, 1 * 8);
3022     vkStream->write((uint32_t*)&forMarshaling->srcBinding, sizeof(uint32_t));
3023     vkStream->write((uint32_t*)&forMarshaling->srcArrayElement, sizeof(uint32_t));
3024     uint64_t cgen_var_129;
3025     vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_129, 1);
3026     vkStream->write((uint64_t*)&cgen_var_129, 1 * 8);
3027     vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
3028     vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
3029     vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
3030 }
3031 
unmarshal_VkCopyDescriptorSet(VulkanStreamGuest * vkStream,VkCopyDescriptorSet * forUnmarshaling)3032 void unmarshal_VkCopyDescriptorSet(
3033     VulkanStreamGuest* vkStream,
3034     VkCopyDescriptorSet* forUnmarshaling)
3035 {
3036     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3037     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3038     uint64_t cgen_var_130;
3039     vkStream->read((uint64_t*)&cgen_var_130, 1 * 8);
3040     vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_130, (VkDescriptorSet*)&forUnmarshaling->srcSet, 1);
3041     vkStream->read((uint32_t*)&forUnmarshaling->srcBinding, sizeof(uint32_t));
3042     vkStream->read((uint32_t*)&forUnmarshaling->srcArrayElement, sizeof(uint32_t));
3043     uint64_t cgen_var_131;
3044     vkStream->read((uint64_t*)&cgen_var_131, 1 * 8);
3045     vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_131, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1);
3046     vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
3047     vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
3048     vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
3049 }
3050 
marshal_VkFramebufferCreateInfo(VulkanStreamGuest * vkStream,const VkFramebufferCreateInfo * forMarshaling)3051 void marshal_VkFramebufferCreateInfo(
3052     VulkanStreamGuest* vkStream,
3053     const VkFramebufferCreateInfo* forMarshaling)
3054 {
3055     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3056     marshal_extension_struct(vkStream, forMarshaling->pNext);
3057     vkStream->write((VkFramebufferCreateFlags*)&forMarshaling->flags, sizeof(VkFramebufferCreateFlags));
3058     uint64_t cgen_var_132;
3059     vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_132, 1);
3060     vkStream->write((uint64_t*)&cgen_var_132, 1 * 8);
3061     vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
3062     if (forMarshaling->attachmentCount)
3063     {
3064         uint64_t* cgen_var_133;
3065         vkStream->alloc((void**)&cgen_var_133, forMarshaling->attachmentCount * 8);
3066         vkStream->handleMapping()->mapHandles_VkImageView_u64(forMarshaling->pAttachments, cgen_var_133, forMarshaling->attachmentCount);
3067         vkStream->write((uint64_t*)cgen_var_133, forMarshaling->attachmentCount * 8);
3068     }
3069     vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
3070     vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
3071     vkStream->write((uint32_t*)&forMarshaling->layers, sizeof(uint32_t));
3072 }
3073 
unmarshal_VkFramebufferCreateInfo(VulkanStreamGuest * vkStream,VkFramebufferCreateInfo * forUnmarshaling)3074 void unmarshal_VkFramebufferCreateInfo(
3075     VulkanStreamGuest* vkStream,
3076     VkFramebufferCreateInfo* forUnmarshaling)
3077 {
3078     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3079     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3080     vkStream->read((VkFramebufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkFramebufferCreateFlags));
3081     uint64_t cgen_var_134;
3082     vkStream->read((uint64_t*)&cgen_var_134, 1 * 8);
3083     vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_134, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
3084     vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
3085     if (forUnmarshaling->attachmentCount)
3086     {
3087         uint64_t* cgen_var_135;
3088         vkStream->alloc((void**)&cgen_var_135, forUnmarshaling->attachmentCount * 8);
3089         vkStream->read((uint64_t*)cgen_var_135, forUnmarshaling->attachmentCount * 8);
3090         vkStream->handleMapping()->mapHandles_u64_VkImageView(cgen_var_135, (VkImageView*)forUnmarshaling->pAttachments, forUnmarshaling->attachmentCount);
3091     }
3092     vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
3093     vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
3094     vkStream->read((uint32_t*)&forUnmarshaling->layers, sizeof(uint32_t));
3095 }
3096 
marshal_VkAttachmentDescription(VulkanStreamGuest * vkStream,const VkAttachmentDescription * forMarshaling)3097 void marshal_VkAttachmentDescription(
3098     VulkanStreamGuest* vkStream,
3099     const VkAttachmentDescription* forMarshaling)
3100 {
3101     vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags, sizeof(VkAttachmentDescriptionFlags));
3102     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
3103     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
3104     vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp));
3105     vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp));
3106     vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
3107     vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp));
3108     vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
3109     vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout));
3110 }
3111 
unmarshal_VkAttachmentDescription(VulkanStreamGuest * vkStream,VkAttachmentDescription * forUnmarshaling)3112 void unmarshal_VkAttachmentDescription(
3113     VulkanStreamGuest* vkStream,
3114     VkAttachmentDescription* forUnmarshaling)
3115 {
3116     vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkAttachmentDescriptionFlags));
3117     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
3118     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits));
3119     vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp));
3120     vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp));
3121     vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
3122     vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp));
3123     vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
3124     vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout));
3125 }
3126 
marshal_VkAttachmentReference(VulkanStreamGuest * vkStream,const VkAttachmentReference * forMarshaling)3127 void marshal_VkAttachmentReference(
3128     VulkanStreamGuest* vkStream,
3129     const VkAttachmentReference* forMarshaling)
3130 {
3131     vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t));
3132     vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout));
3133 }
3134 
unmarshal_VkAttachmentReference(VulkanStreamGuest * vkStream,VkAttachmentReference * forUnmarshaling)3135 void unmarshal_VkAttachmentReference(
3136     VulkanStreamGuest* vkStream,
3137     VkAttachmentReference* forUnmarshaling)
3138 {
3139     vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t));
3140     vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout));
3141 }
3142 
marshal_VkSubpassDescription(VulkanStreamGuest * vkStream,const VkSubpassDescription * forMarshaling)3143 void marshal_VkSubpassDescription(
3144     VulkanStreamGuest* vkStream,
3145     const VkSubpassDescription* forMarshaling)
3146 {
3147     vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags, sizeof(VkSubpassDescriptionFlags));
3148     vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
3149     vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t));
3150     for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i)
3151     {
3152         marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pInputAttachments + i));
3153     }
3154     vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
3155     for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i)
3156     {
3157         marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pColorAttachments + i));
3158     }
3159     // WARNING PTR CHECK
3160     uint64_t cgen_var_136 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments;
3161     vkStream->putBe64(cgen_var_136);
3162     if (forMarshaling->pResolveAttachments)
3163     {
3164         for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i)
3165         {
3166             marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pResolveAttachments + i));
3167         }
3168     }
3169     // WARNING PTR CHECK
3170     uint64_t cgen_var_137 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment;
3171     vkStream->putBe64(cgen_var_137);
3172     if (forMarshaling->pDepthStencilAttachment)
3173     {
3174         marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pDepthStencilAttachment));
3175     }
3176     vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t));
3177     vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments, forMarshaling->preserveAttachmentCount * sizeof(const uint32_t));
3178 }
3179 
unmarshal_VkSubpassDescription(VulkanStreamGuest * vkStream,VkSubpassDescription * forUnmarshaling)3180 void unmarshal_VkSubpassDescription(
3181     VulkanStreamGuest* vkStream,
3182     VkSubpassDescription* forUnmarshaling)
3183 {
3184     vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkSubpassDescriptionFlags));
3185     vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
3186     vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t));
3187     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i)
3188     {
3189         unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pInputAttachments + i));
3190     }
3191     vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
3192     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i)
3193     {
3194         unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pColorAttachments + i));
3195     }
3196     // WARNING PTR CHECK
3197     const VkAttachmentReference* check_pResolveAttachments;
3198     check_pResolveAttachments = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64();
3199     if (forUnmarshaling->pResolveAttachments)
3200     {
3201         if (!(check_pResolveAttachments))
3202         {
3203             fprintf(stderr, "fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and host\n");
3204         }
3205         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i)
3206         {
3207             unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pResolveAttachments + i));
3208         }
3209     }
3210     // WARNING PTR CHECK
3211     const VkAttachmentReference* check_pDepthStencilAttachment;
3212     check_pDepthStencilAttachment = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64();
3213     if (forUnmarshaling->pDepthStencilAttachment)
3214     {
3215         if (!(check_pDepthStencilAttachment))
3216         {
3217             fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest and host\n");
3218         }
3219         unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pDepthStencilAttachment));
3220     }
3221     vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t));
3222     vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments, forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t));
3223 }
3224 
marshal_VkSubpassDependency(VulkanStreamGuest * vkStream,const VkSubpassDependency * forMarshaling)3225 void marshal_VkSubpassDependency(
3226     VulkanStreamGuest* vkStream,
3227     const VkSubpassDependency* forMarshaling)
3228 {
3229     vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t));
3230     vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t));
3231     vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask, sizeof(VkPipelineStageFlags));
3232     vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask, sizeof(VkPipelineStageFlags));
3233     vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
3234     vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
3235     vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags));
3236 }
3237 
unmarshal_VkSubpassDependency(VulkanStreamGuest * vkStream,VkSubpassDependency * forUnmarshaling)3238 void unmarshal_VkSubpassDependency(
3239     VulkanStreamGuest* vkStream,
3240     VkSubpassDependency* forUnmarshaling)
3241 {
3242     vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t));
3243     vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t));
3244     vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask, sizeof(VkPipelineStageFlags));
3245     vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask, sizeof(VkPipelineStageFlags));
3246     vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
3247     vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
3248     vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags, sizeof(VkDependencyFlags));
3249 }
3250 
marshal_VkRenderPassCreateInfo(VulkanStreamGuest * vkStream,const VkRenderPassCreateInfo * forMarshaling)3251 void marshal_VkRenderPassCreateInfo(
3252     VulkanStreamGuest* vkStream,
3253     const VkRenderPassCreateInfo* forMarshaling)
3254 {
3255     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3256     marshal_extension_struct(vkStream, forMarshaling->pNext);
3257     vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags, sizeof(VkRenderPassCreateFlags));
3258     vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
3259     for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i)
3260     {
3261         marshal_VkAttachmentDescription(vkStream, (const VkAttachmentDescription*)(forMarshaling->pAttachments + i));
3262     }
3263     vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
3264     for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i)
3265     {
3266         marshal_VkSubpassDescription(vkStream, (const VkSubpassDescription*)(forMarshaling->pSubpasses + i));
3267     }
3268     vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
3269     for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i)
3270     {
3271         marshal_VkSubpassDependency(vkStream, (const VkSubpassDependency*)(forMarshaling->pDependencies + i));
3272     }
3273 }
3274 
unmarshal_VkRenderPassCreateInfo(VulkanStreamGuest * vkStream,VkRenderPassCreateInfo * forUnmarshaling)3275 void unmarshal_VkRenderPassCreateInfo(
3276     VulkanStreamGuest* vkStream,
3277     VkRenderPassCreateInfo* forUnmarshaling)
3278 {
3279     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3280     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3281     vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags, sizeof(VkRenderPassCreateFlags));
3282     vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
3283     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i)
3284     {
3285         unmarshal_VkAttachmentDescription(vkStream, (VkAttachmentDescription*)(forUnmarshaling->pAttachments + i));
3286     }
3287     vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
3288     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i)
3289     {
3290         unmarshal_VkSubpassDescription(vkStream, (VkSubpassDescription*)(forUnmarshaling->pSubpasses + i));
3291     }
3292     vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
3293     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i)
3294     {
3295         unmarshal_VkSubpassDependency(vkStream, (VkSubpassDependency*)(forUnmarshaling->pDependencies + i));
3296     }
3297 }
3298 
marshal_VkCommandPoolCreateInfo(VulkanStreamGuest * vkStream,const VkCommandPoolCreateInfo * forMarshaling)3299 void marshal_VkCommandPoolCreateInfo(
3300     VulkanStreamGuest* vkStream,
3301     const VkCommandPoolCreateInfo* forMarshaling)
3302 {
3303     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3304     marshal_extension_struct(vkStream, forMarshaling->pNext);
3305     vkStream->write((VkCommandPoolCreateFlags*)&forMarshaling->flags, sizeof(VkCommandPoolCreateFlags));
3306     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
3307 }
3308 
unmarshal_VkCommandPoolCreateInfo(VulkanStreamGuest * vkStream,VkCommandPoolCreateInfo * forUnmarshaling)3309 void unmarshal_VkCommandPoolCreateInfo(
3310     VulkanStreamGuest* vkStream,
3311     VkCommandPoolCreateInfo* forUnmarshaling)
3312 {
3313     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3314     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3315     vkStream->read((VkCommandPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkCommandPoolCreateFlags));
3316     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
3317 }
3318 
marshal_VkCommandBufferAllocateInfo(VulkanStreamGuest * vkStream,const VkCommandBufferAllocateInfo * forMarshaling)3319 void marshal_VkCommandBufferAllocateInfo(
3320     VulkanStreamGuest* vkStream,
3321     const VkCommandBufferAllocateInfo* forMarshaling)
3322 {
3323     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3324     marshal_extension_struct(vkStream, forMarshaling->pNext);
3325     uint64_t cgen_var_140;
3326     vkStream->handleMapping()->mapHandles_VkCommandPool_u64(&forMarshaling->commandPool, &cgen_var_140, 1);
3327     vkStream->write((uint64_t*)&cgen_var_140, 1 * 8);
3328     vkStream->write((VkCommandBufferLevel*)&forMarshaling->level, sizeof(VkCommandBufferLevel));
3329     vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
3330 }
3331 
unmarshal_VkCommandBufferAllocateInfo(VulkanStreamGuest * vkStream,VkCommandBufferAllocateInfo * forUnmarshaling)3332 void unmarshal_VkCommandBufferAllocateInfo(
3333     VulkanStreamGuest* vkStream,
3334     VkCommandBufferAllocateInfo* forUnmarshaling)
3335 {
3336     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3337     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3338     uint64_t cgen_var_141;
3339     vkStream->read((uint64_t*)&cgen_var_141, 1 * 8);
3340     vkStream->handleMapping()->mapHandles_u64_VkCommandPool(&cgen_var_141, (VkCommandPool*)&forUnmarshaling->commandPool, 1);
3341     vkStream->read((VkCommandBufferLevel*)&forUnmarshaling->level, sizeof(VkCommandBufferLevel));
3342     vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
3343 }
3344 
marshal_VkCommandBufferInheritanceInfo(VulkanStreamGuest * vkStream,const VkCommandBufferInheritanceInfo * forMarshaling)3345 void marshal_VkCommandBufferInheritanceInfo(
3346     VulkanStreamGuest* vkStream,
3347     const VkCommandBufferInheritanceInfo* forMarshaling)
3348 {
3349     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3350     marshal_extension_struct(vkStream, forMarshaling->pNext);
3351     uint64_t cgen_var_142;
3352     vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_142, 1);
3353     vkStream->write((uint64_t*)&cgen_var_142, 1 * 8);
3354     vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
3355     uint64_t cgen_var_143;
3356     vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer, &cgen_var_143, 1);
3357     vkStream->write((uint64_t*)&cgen_var_143, 1 * 8);
3358     vkStream->write((VkBool32*)&forMarshaling->occlusionQueryEnable, sizeof(VkBool32));
3359     vkStream->write((VkQueryControlFlags*)&forMarshaling->queryFlags, sizeof(VkQueryControlFlags));
3360     vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
3361 }
3362 
unmarshal_VkCommandBufferInheritanceInfo(VulkanStreamGuest * vkStream,VkCommandBufferInheritanceInfo * forUnmarshaling)3363 void unmarshal_VkCommandBufferInheritanceInfo(
3364     VulkanStreamGuest* vkStream,
3365     VkCommandBufferInheritanceInfo* forUnmarshaling)
3366 {
3367     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3368     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3369     uint64_t cgen_var_144;
3370     vkStream->read((uint64_t*)&cgen_var_144, 1 * 8);
3371     vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_144, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
3372     vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
3373     uint64_t cgen_var_145;
3374     vkStream->read((uint64_t*)&cgen_var_145, 1 * 8);
3375     vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(&cgen_var_145, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1);
3376     vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryEnable, sizeof(VkBool32));
3377     vkStream->read((VkQueryControlFlags*)&forUnmarshaling->queryFlags, sizeof(VkQueryControlFlags));
3378     vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
3379 }
3380 
marshal_VkCommandBufferBeginInfo(VulkanStreamGuest * vkStream,const VkCommandBufferBeginInfo * forMarshaling)3381 void marshal_VkCommandBufferBeginInfo(
3382     VulkanStreamGuest* vkStream,
3383     const VkCommandBufferBeginInfo* forMarshaling)
3384 {
3385     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3386     marshal_extension_struct(vkStream, forMarshaling->pNext);
3387     vkStream->write((VkCommandBufferUsageFlags*)&forMarshaling->flags, sizeof(VkCommandBufferUsageFlags));
3388     // WARNING PTR CHECK
3389     uint64_t cgen_var_146 = (uint64_t)(uintptr_t)forMarshaling->pInheritanceInfo;
3390     vkStream->putBe64(cgen_var_146);
3391     if (forMarshaling->pInheritanceInfo)
3392     {
3393         marshal_VkCommandBufferInheritanceInfo(vkStream, (const VkCommandBufferInheritanceInfo*)(forMarshaling->pInheritanceInfo));
3394     }
3395 }
3396 
unmarshal_VkCommandBufferBeginInfo(VulkanStreamGuest * vkStream,VkCommandBufferBeginInfo * forUnmarshaling)3397 void unmarshal_VkCommandBufferBeginInfo(
3398     VulkanStreamGuest* vkStream,
3399     VkCommandBufferBeginInfo* forUnmarshaling)
3400 {
3401     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3402     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3403     vkStream->read((VkCommandBufferUsageFlags*)&forUnmarshaling->flags, sizeof(VkCommandBufferUsageFlags));
3404     // WARNING PTR CHECK
3405     const VkCommandBufferInheritanceInfo* check_pInheritanceInfo;
3406     check_pInheritanceInfo = (const VkCommandBufferInheritanceInfo*)(uintptr_t)vkStream->getBe64();
3407     if (forUnmarshaling->pInheritanceInfo)
3408     {
3409         if (!(check_pInheritanceInfo))
3410         {
3411             fprintf(stderr, "fatal: forUnmarshaling->pInheritanceInfo inconsistent between guest and host\n");
3412         }
3413         unmarshal_VkCommandBufferInheritanceInfo(vkStream, (VkCommandBufferInheritanceInfo*)(forUnmarshaling->pInheritanceInfo));
3414     }
3415 }
3416 
marshal_VkBufferCopy(VulkanStreamGuest * vkStream,const VkBufferCopy * forMarshaling)3417 void marshal_VkBufferCopy(
3418     VulkanStreamGuest* vkStream,
3419     const VkBufferCopy* forMarshaling)
3420 {
3421     vkStream->write((VkDeviceSize*)&forMarshaling->srcOffset, sizeof(VkDeviceSize));
3422     vkStream->write((VkDeviceSize*)&forMarshaling->dstOffset, sizeof(VkDeviceSize));
3423     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
3424 }
3425 
unmarshal_VkBufferCopy(VulkanStreamGuest * vkStream,VkBufferCopy * forUnmarshaling)3426 void unmarshal_VkBufferCopy(
3427     VulkanStreamGuest* vkStream,
3428     VkBufferCopy* forUnmarshaling)
3429 {
3430     vkStream->read((VkDeviceSize*)&forUnmarshaling->srcOffset, sizeof(VkDeviceSize));
3431     vkStream->read((VkDeviceSize*)&forUnmarshaling->dstOffset, sizeof(VkDeviceSize));
3432     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
3433 }
3434 
marshal_VkImageSubresourceLayers(VulkanStreamGuest * vkStream,const VkImageSubresourceLayers * forMarshaling)3435 void marshal_VkImageSubresourceLayers(
3436     VulkanStreamGuest* vkStream,
3437     const VkImageSubresourceLayers* forMarshaling)
3438 {
3439     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
3440     vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t));
3441     vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
3442     vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
3443 }
3444 
unmarshal_VkImageSubresourceLayers(VulkanStreamGuest * vkStream,VkImageSubresourceLayers * forUnmarshaling)3445 void unmarshal_VkImageSubresourceLayers(
3446     VulkanStreamGuest* vkStream,
3447     VkImageSubresourceLayers* forUnmarshaling)
3448 {
3449     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
3450     vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t));
3451     vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
3452     vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
3453 }
3454 
marshal_VkImageCopy(VulkanStreamGuest * vkStream,const VkImageCopy * forMarshaling)3455 void marshal_VkImageCopy(
3456     VulkanStreamGuest* vkStream,
3457     const VkImageCopy* forMarshaling)
3458 {
3459     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
3460     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->srcOffset));
3461     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
3462     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->dstOffset));
3463     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
3464 }
3465 
unmarshal_VkImageCopy(VulkanStreamGuest * vkStream,VkImageCopy * forUnmarshaling)3466 void unmarshal_VkImageCopy(
3467     VulkanStreamGuest* vkStream,
3468     VkImageCopy* forUnmarshaling)
3469 {
3470     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
3471     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->srcOffset));
3472     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
3473     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->dstOffset));
3474     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
3475 }
3476 
marshal_VkImageBlit(VulkanStreamGuest * vkStream,const VkImageBlit * forMarshaling)3477 void marshal_VkImageBlit(
3478     VulkanStreamGuest* vkStream,
3479     const VkImageBlit* forMarshaling)
3480 {
3481     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
3482     for (uint32_t i = 0; i < (uint32_t)2; ++i)
3483     {
3484         marshal_VkOffset3D(vkStream, (VkOffset3D*)(forMarshaling->srcOffsets + i));
3485     }
3486     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
3487     for (uint32_t i = 0; i < (uint32_t)2; ++i)
3488     {
3489         marshal_VkOffset3D(vkStream, (VkOffset3D*)(forMarshaling->dstOffsets + i));
3490     }
3491 }
3492 
unmarshal_VkImageBlit(VulkanStreamGuest * vkStream,VkImageBlit * forUnmarshaling)3493 void unmarshal_VkImageBlit(
3494     VulkanStreamGuest* vkStream,
3495     VkImageBlit* forUnmarshaling)
3496 {
3497     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
3498     for (uint32_t i = 0; i < (uint32_t)2; ++i)
3499     {
3500         unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(forUnmarshaling->srcOffsets + i));
3501     }
3502     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
3503     for (uint32_t i = 0; i < (uint32_t)2; ++i)
3504     {
3505         unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(forUnmarshaling->dstOffsets + i));
3506     }
3507 }
3508 
marshal_VkBufferImageCopy(VulkanStreamGuest * vkStream,const VkBufferImageCopy * forMarshaling)3509 void marshal_VkBufferImageCopy(
3510     VulkanStreamGuest* vkStream,
3511     const VkBufferImageCopy* forMarshaling)
3512 {
3513     vkStream->write((VkDeviceSize*)&forMarshaling->bufferOffset, sizeof(VkDeviceSize));
3514     vkStream->write((uint32_t*)&forMarshaling->bufferRowLength, sizeof(uint32_t));
3515     vkStream->write((uint32_t*)&forMarshaling->bufferImageHeight, sizeof(uint32_t));
3516     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->imageSubresource));
3517     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->imageOffset));
3518     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->imageExtent));
3519 }
3520 
unmarshal_VkBufferImageCopy(VulkanStreamGuest * vkStream,VkBufferImageCopy * forUnmarshaling)3521 void unmarshal_VkBufferImageCopy(
3522     VulkanStreamGuest* vkStream,
3523     VkBufferImageCopy* forUnmarshaling)
3524 {
3525     vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferOffset, sizeof(VkDeviceSize));
3526     vkStream->read((uint32_t*)&forUnmarshaling->bufferRowLength, sizeof(uint32_t));
3527     vkStream->read((uint32_t*)&forUnmarshaling->bufferImageHeight, sizeof(uint32_t));
3528     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->imageSubresource));
3529     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->imageOffset));
3530     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->imageExtent));
3531 }
3532 
marshal_VkClearColorValue(VulkanStreamGuest * vkStream,const VkClearColorValue * forMarshaling)3533 void marshal_VkClearColorValue(
3534     VulkanStreamGuest* vkStream,
3535     const VkClearColorValue* forMarshaling)
3536 {
3537     vkStream->write((float*)forMarshaling->float32, 4 * sizeof(float));
3538 }
3539 
unmarshal_VkClearColorValue(VulkanStreamGuest * vkStream,VkClearColorValue * forUnmarshaling)3540 void unmarshal_VkClearColorValue(
3541     VulkanStreamGuest* vkStream,
3542     VkClearColorValue* forUnmarshaling)
3543 {
3544     vkStream->read((float*)forUnmarshaling->float32, 4 * sizeof(float));
3545 }
3546 
marshal_VkClearDepthStencilValue(VulkanStreamGuest * vkStream,const VkClearDepthStencilValue * forMarshaling)3547 void marshal_VkClearDepthStencilValue(
3548     VulkanStreamGuest* vkStream,
3549     const VkClearDepthStencilValue* forMarshaling)
3550 {
3551     vkStream->write((float*)&forMarshaling->depth, sizeof(float));
3552     vkStream->write((uint32_t*)&forMarshaling->stencil, sizeof(uint32_t));
3553 }
3554 
unmarshal_VkClearDepthStencilValue(VulkanStreamGuest * vkStream,VkClearDepthStencilValue * forUnmarshaling)3555 void unmarshal_VkClearDepthStencilValue(
3556     VulkanStreamGuest* vkStream,
3557     VkClearDepthStencilValue* forUnmarshaling)
3558 {
3559     vkStream->read((float*)&forUnmarshaling->depth, sizeof(float));
3560     vkStream->read((uint32_t*)&forUnmarshaling->stencil, sizeof(uint32_t));
3561 }
3562 
marshal_VkClearValue(VulkanStreamGuest * vkStream,const VkClearValue * forMarshaling)3563 void marshal_VkClearValue(
3564     VulkanStreamGuest* vkStream,
3565     const VkClearValue* forMarshaling)
3566 {
3567     marshal_VkClearColorValue(vkStream, (VkClearColorValue*)(&forMarshaling->color));
3568 }
3569 
unmarshal_VkClearValue(VulkanStreamGuest * vkStream,VkClearValue * forUnmarshaling)3570 void unmarshal_VkClearValue(
3571     VulkanStreamGuest* vkStream,
3572     VkClearValue* forUnmarshaling)
3573 {
3574     unmarshal_VkClearColorValue(vkStream, (VkClearColorValue*)(&forUnmarshaling->color));
3575 }
3576 
marshal_VkClearAttachment(VulkanStreamGuest * vkStream,const VkClearAttachment * forMarshaling)3577 void marshal_VkClearAttachment(
3578     VulkanStreamGuest* vkStream,
3579     const VkClearAttachment* forMarshaling)
3580 {
3581     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
3582     vkStream->write((uint32_t*)&forMarshaling->colorAttachment, sizeof(uint32_t));
3583     marshal_VkClearValue(vkStream, (VkClearValue*)(&forMarshaling->clearValue));
3584 }
3585 
unmarshal_VkClearAttachment(VulkanStreamGuest * vkStream,VkClearAttachment * forUnmarshaling)3586 void unmarshal_VkClearAttachment(
3587     VulkanStreamGuest* vkStream,
3588     VkClearAttachment* forUnmarshaling)
3589 {
3590     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
3591     vkStream->read((uint32_t*)&forUnmarshaling->colorAttachment, sizeof(uint32_t));
3592     unmarshal_VkClearValue(vkStream, (VkClearValue*)(&forUnmarshaling->clearValue));
3593 }
3594 
marshal_VkClearRect(VulkanStreamGuest * vkStream,const VkClearRect * forMarshaling)3595 void marshal_VkClearRect(
3596     VulkanStreamGuest* vkStream,
3597     const VkClearRect* forMarshaling)
3598 {
3599     marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->rect));
3600     vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
3601     vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
3602 }
3603 
unmarshal_VkClearRect(VulkanStreamGuest * vkStream,VkClearRect * forUnmarshaling)3604 void unmarshal_VkClearRect(
3605     VulkanStreamGuest* vkStream,
3606     VkClearRect* forUnmarshaling)
3607 {
3608     unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->rect));
3609     vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
3610     vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
3611 }
3612 
marshal_VkImageResolve(VulkanStreamGuest * vkStream,const VkImageResolve * forMarshaling)3613 void marshal_VkImageResolve(
3614     VulkanStreamGuest* vkStream,
3615     const VkImageResolve* forMarshaling)
3616 {
3617     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
3618     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->srcOffset));
3619     marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
3620     marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->dstOffset));
3621     marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
3622 }
3623 
unmarshal_VkImageResolve(VulkanStreamGuest * vkStream,VkImageResolve * forUnmarshaling)3624 void unmarshal_VkImageResolve(
3625     VulkanStreamGuest* vkStream,
3626     VkImageResolve* forUnmarshaling)
3627 {
3628     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
3629     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->srcOffset));
3630     unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
3631     unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->dstOffset));
3632     unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
3633 }
3634 
marshal_VkMemoryBarrier(VulkanStreamGuest * vkStream,const VkMemoryBarrier * forMarshaling)3635 void marshal_VkMemoryBarrier(
3636     VulkanStreamGuest* vkStream,
3637     const VkMemoryBarrier* forMarshaling)
3638 {
3639     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3640     marshal_extension_struct(vkStream, forMarshaling->pNext);
3641     vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
3642     vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
3643 }
3644 
unmarshal_VkMemoryBarrier(VulkanStreamGuest * vkStream,VkMemoryBarrier * forUnmarshaling)3645 void unmarshal_VkMemoryBarrier(
3646     VulkanStreamGuest* vkStream,
3647     VkMemoryBarrier* forUnmarshaling)
3648 {
3649     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3650     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3651     vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
3652     vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
3653 }
3654 
marshal_VkBufferMemoryBarrier(VulkanStreamGuest * vkStream,const VkBufferMemoryBarrier * forMarshaling)3655 void marshal_VkBufferMemoryBarrier(
3656     VulkanStreamGuest* vkStream,
3657     const VkBufferMemoryBarrier* forMarshaling)
3658 {
3659     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3660     marshal_extension_struct(vkStream, forMarshaling->pNext);
3661     vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
3662     vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
3663     vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
3664     vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
3665     uint64_t cgen_var_148;
3666     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_148, 1);
3667     vkStream->write((uint64_t*)&cgen_var_148, 1 * 8);
3668     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
3669     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
3670 }
3671 
unmarshal_VkBufferMemoryBarrier(VulkanStreamGuest * vkStream,VkBufferMemoryBarrier * forUnmarshaling)3672 void unmarshal_VkBufferMemoryBarrier(
3673     VulkanStreamGuest* vkStream,
3674     VkBufferMemoryBarrier* forUnmarshaling)
3675 {
3676     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3677     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3678     vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
3679     vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
3680     vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
3681     vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
3682     uint64_t cgen_var_149;
3683     vkStream->read((uint64_t*)&cgen_var_149, 1 * 8);
3684     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_149, (VkBuffer*)&forUnmarshaling->buffer, 1);
3685     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
3686     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
3687 }
3688 
marshal_VkImageMemoryBarrier(VulkanStreamGuest * vkStream,const VkImageMemoryBarrier * forMarshaling)3689 void marshal_VkImageMemoryBarrier(
3690     VulkanStreamGuest* vkStream,
3691     const VkImageMemoryBarrier* forMarshaling)
3692 {
3693     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3694     marshal_extension_struct(vkStream, forMarshaling->pNext);
3695     vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
3696     vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
3697     vkStream->write((VkImageLayout*)&forMarshaling->oldLayout, sizeof(VkImageLayout));
3698     vkStream->write((VkImageLayout*)&forMarshaling->newLayout, sizeof(VkImageLayout));
3699     vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
3700     vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
3701     uint64_t cgen_var_150;
3702     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_150, 1);
3703     vkStream->write((uint64_t*)&cgen_var_150, 1 * 8);
3704     marshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange));
3705 }
3706 
unmarshal_VkImageMemoryBarrier(VulkanStreamGuest * vkStream,VkImageMemoryBarrier * forUnmarshaling)3707 void unmarshal_VkImageMemoryBarrier(
3708     VulkanStreamGuest* vkStream,
3709     VkImageMemoryBarrier* forUnmarshaling)
3710 {
3711     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3712     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3713     vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
3714     vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
3715     vkStream->read((VkImageLayout*)&forUnmarshaling->oldLayout, sizeof(VkImageLayout));
3716     vkStream->read((VkImageLayout*)&forUnmarshaling->newLayout, sizeof(VkImageLayout));
3717     vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
3718     vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
3719     uint64_t cgen_var_151;
3720     vkStream->read((uint64_t*)&cgen_var_151, 1 * 8);
3721     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_151, (VkImage*)&forUnmarshaling->image, 1);
3722     unmarshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange));
3723 }
3724 
marshal_VkRenderPassBeginInfo(VulkanStreamGuest * vkStream,const VkRenderPassBeginInfo * forMarshaling)3725 void marshal_VkRenderPassBeginInfo(
3726     VulkanStreamGuest* vkStream,
3727     const VkRenderPassBeginInfo* forMarshaling)
3728 {
3729     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3730     marshal_extension_struct(vkStream, forMarshaling->pNext);
3731     uint64_t cgen_var_152;
3732     vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_152, 1);
3733     vkStream->write((uint64_t*)&cgen_var_152, 1 * 8);
3734     uint64_t cgen_var_153;
3735     vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer, &cgen_var_153, 1);
3736     vkStream->write((uint64_t*)&cgen_var_153, 1 * 8);
3737     marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->renderArea));
3738     vkStream->write((uint32_t*)&forMarshaling->clearValueCount, sizeof(uint32_t));
3739     // WARNING PTR CHECK
3740     uint64_t cgen_var_154 = (uint64_t)(uintptr_t)forMarshaling->pClearValues;
3741     vkStream->putBe64(cgen_var_154);
3742     if (forMarshaling->pClearValues)
3743     {
3744         for (uint32_t i = 0; i < (uint32_t)forMarshaling->clearValueCount; ++i)
3745         {
3746             marshal_VkClearValue(vkStream, (const VkClearValue*)(forMarshaling->pClearValues + i));
3747         }
3748     }
3749 }
3750 
unmarshal_VkRenderPassBeginInfo(VulkanStreamGuest * vkStream,VkRenderPassBeginInfo * forUnmarshaling)3751 void unmarshal_VkRenderPassBeginInfo(
3752     VulkanStreamGuest* vkStream,
3753     VkRenderPassBeginInfo* forUnmarshaling)
3754 {
3755     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3756     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3757     uint64_t cgen_var_155;
3758     vkStream->read((uint64_t*)&cgen_var_155, 1 * 8);
3759     vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_155, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
3760     uint64_t cgen_var_156;
3761     vkStream->read((uint64_t*)&cgen_var_156, 1 * 8);
3762     vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(&cgen_var_156, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1);
3763     unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->renderArea));
3764     vkStream->read((uint32_t*)&forUnmarshaling->clearValueCount, sizeof(uint32_t));
3765     // WARNING PTR CHECK
3766     const VkClearValue* check_pClearValues;
3767     check_pClearValues = (const VkClearValue*)(uintptr_t)vkStream->getBe64();
3768     if (forUnmarshaling->pClearValues)
3769     {
3770         if (!(check_pClearValues))
3771         {
3772             fprintf(stderr, "fatal: forUnmarshaling->pClearValues inconsistent between guest and host\n");
3773         }
3774         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->clearValueCount; ++i)
3775         {
3776             unmarshal_VkClearValue(vkStream, (VkClearValue*)(forUnmarshaling->pClearValues + i));
3777         }
3778     }
3779 }
3780 
marshal_VkDispatchIndirectCommand(VulkanStreamGuest * vkStream,const VkDispatchIndirectCommand * forMarshaling)3781 void marshal_VkDispatchIndirectCommand(
3782     VulkanStreamGuest* vkStream,
3783     const VkDispatchIndirectCommand* forMarshaling)
3784 {
3785     vkStream->write((uint32_t*)&forMarshaling->x, sizeof(uint32_t));
3786     vkStream->write((uint32_t*)&forMarshaling->y, sizeof(uint32_t));
3787     vkStream->write((uint32_t*)&forMarshaling->z, sizeof(uint32_t));
3788 }
3789 
unmarshal_VkDispatchIndirectCommand(VulkanStreamGuest * vkStream,VkDispatchIndirectCommand * forUnmarshaling)3790 void unmarshal_VkDispatchIndirectCommand(
3791     VulkanStreamGuest* vkStream,
3792     VkDispatchIndirectCommand* forUnmarshaling)
3793 {
3794     vkStream->read((uint32_t*)&forUnmarshaling->x, sizeof(uint32_t));
3795     vkStream->read((uint32_t*)&forUnmarshaling->y, sizeof(uint32_t));
3796     vkStream->read((uint32_t*)&forUnmarshaling->z, sizeof(uint32_t));
3797 }
3798 
marshal_VkDrawIndexedIndirectCommand(VulkanStreamGuest * vkStream,const VkDrawIndexedIndirectCommand * forMarshaling)3799 void marshal_VkDrawIndexedIndirectCommand(
3800     VulkanStreamGuest* vkStream,
3801     const VkDrawIndexedIndirectCommand* forMarshaling)
3802 {
3803     vkStream->write((uint32_t*)&forMarshaling->indexCount, sizeof(uint32_t));
3804     vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t));
3805     vkStream->write((uint32_t*)&forMarshaling->firstIndex, sizeof(uint32_t));
3806     vkStream->write((int32_t*)&forMarshaling->vertexOffset, sizeof(int32_t));
3807     vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t));
3808 }
3809 
unmarshal_VkDrawIndexedIndirectCommand(VulkanStreamGuest * vkStream,VkDrawIndexedIndirectCommand * forUnmarshaling)3810 void unmarshal_VkDrawIndexedIndirectCommand(
3811     VulkanStreamGuest* vkStream,
3812     VkDrawIndexedIndirectCommand* forUnmarshaling)
3813 {
3814     vkStream->read((uint32_t*)&forUnmarshaling->indexCount, sizeof(uint32_t));
3815     vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t));
3816     vkStream->read((uint32_t*)&forUnmarshaling->firstIndex, sizeof(uint32_t));
3817     vkStream->read((int32_t*)&forUnmarshaling->vertexOffset, sizeof(int32_t));
3818     vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t));
3819 }
3820 
marshal_VkDrawIndirectCommand(VulkanStreamGuest * vkStream,const VkDrawIndirectCommand * forMarshaling)3821 void marshal_VkDrawIndirectCommand(
3822     VulkanStreamGuest* vkStream,
3823     const VkDrawIndirectCommand* forMarshaling)
3824 {
3825     vkStream->write((uint32_t*)&forMarshaling->vertexCount, sizeof(uint32_t));
3826     vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t));
3827     vkStream->write((uint32_t*)&forMarshaling->firstVertex, sizeof(uint32_t));
3828     vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t));
3829 }
3830 
unmarshal_VkDrawIndirectCommand(VulkanStreamGuest * vkStream,VkDrawIndirectCommand * forUnmarshaling)3831 void unmarshal_VkDrawIndirectCommand(
3832     VulkanStreamGuest* vkStream,
3833     VkDrawIndirectCommand* forUnmarshaling)
3834 {
3835     vkStream->read((uint32_t*)&forUnmarshaling->vertexCount, sizeof(uint32_t));
3836     vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t));
3837     vkStream->read((uint32_t*)&forUnmarshaling->firstVertex, sizeof(uint32_t));
3838     vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t));
3839 }
3840 
marshal_VkBaseOutStructure(VulkanStreamGuest * vkStream,const VkBaseOutStructure * forMarshaling)3841 void marshal_VkBaseOutStructure(
3842     VulkanStreamGuest* vkStream,
3843     const VkBaseOutStructure* forMarshaling)
3844 {
3845     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3846     marshal_extension_struct(vkStream, forMarshaling->pNext);
3847 }
3848 
unmarshal_VkBaseOutStructure(VulkanStreamGuest * vkStream,VkBaseOutStructure * forUnmarshaling)3849 void unmarshal_VkBaseOutStructure(
3850     VulkanStreamGuest* vkStream,
3851     VkBaseOutStructure* forUnmarshaling)
3852 {
3853     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3854     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3855 }
3856 
marshal_VkBaseInStructure(VulkanStreamGuest * vkStream,const VkBaseInStructure * forMarshaling)3857 void marshal_VkBaseInStructure(
3858     VulkanStreamGuest* vkStream,
3859     const VkBaseInStructure* forMarshaling)
3860 {
3861     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3862     marshal_extension_struct(vkStream, forMarshaling->pNext);
3863 }
3864 
unmarshal_VkBaseInStructure(VulkanStreamGuest * vkStream,VkBaseInStructure * forUnmarshaling)3865 void unmarshal_VkBaseInStructure(
3866     VulkanStreamGuest* vkStream,
3867     VkBaseInStructure* forUnmarshaling)
3868 {
3869     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3870     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3871 }
3872 
3873 #endif
3874 #ifdef VK_VERSION_1_1
marshal_VkPhysicalDeviceSubgroupProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSubgroupProperties * forMarshaling)3875 void marshal_VkPhysicalDeviceSubgroupProperties(
3876     VulkanStreamGuest* vkStream,
3877     const VkPhysicalDeviceSubgroupProperties* forMarshaling)
3878 {
3879     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3880     marshal_extension_struct(vkStream, forMarshaling->pNext);
3881     vkStream->write((uint32_t*)&forMarshaling->subgroupSize, sizeof(uint32_t));
3882     vkStream->write((VkShaderStageFlags*)&forMarshaling->supportedStages, sizeof(VkShaderStageFlags));
3883     vkStream->write((VkSubgroupFeatureFlags*)&forMarshaling->supportedOperations, sizeof(VkSubgroupFeatureFlags));
3884     vkStream->write((VkBool32*)&forMarshaling->quadOperationsInAllStages, sizeof(VkBool32));
3885 }
3886 
unmarshal_VkPhysicalDeviceSubgroupProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceSubgroupProperties * forUnmarshaling)3887 void unmarshal_VkPhysicalDeviceSubgroupProperties(
3888     VulkanStreamGuest* vkStream,
3889     VkPhysicalDeviceSubgroupProperties* forUnmarshaling)
3890 {
3891     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3892     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3893     vkStream->read((uint32_t*)&forUnmarshaling->subgroupSize, sizeof(uint32_t));
3894     vkStream->read((VkShaderStageFlags*)&forUnmarshaling->supportedStages, sizeof(VkShaderStageFlags));
3895     vkStream->read((VkSubgroupFeatureFlags*)&forUnmarshaling->supportedOperations, sizeof(VkSubgroupFeatureFlags));
3896     vkStream->read((VkBool32*)&forUnmarshaling->quadOperationsInAllStages, sizeof(VkBool32));
3897 }
3898 
marshal_VkBindBufferMemoryInfo(VulkanStreamGuest * vkStream,const VkBindBufferMemoryInfo * forMarshaling)3899 void marshal_VkBindBufferMemoryInfo(
3900     VulkanStreamGuest* vkStream,
3901     const VkBindBufferMemoryInfo* forMarshaling)
3902 {
3903     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3904     marshal_extension_struct(vkStream, forMarshaling->pNext);
3905     uint64_t cgen_var_158;
3906     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_158, 1);
3907     vkStream->write((uint64_t*)&cgen_var_158, 1 * 8);
3908     uint64_t cgen_var_159;
3909     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_159, 1);
3910     vkStream->write((uint64_t*)&cgen_var_159, 1 * 8);
3911     vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
3912 }
3913 
unmarshal_VkBindBufferMemoryInfo(VulkanStreamGuest * vkStream,VkBindBufferMemoryInfo * forUnmarshaling)3914 void unmarshal_VkBindBufferMemoryInfo(
3915     VulkanStreamGuest* vkStream,
3916     VkBindBufferMemoryInfo* forUnmarshaling)
3917 {
3918     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3919     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3920     uint64_t cgen_var_160;
3921     vkStream->read((uint64_t*)&cgen_var_160, 1 * 8);
3922     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_160, (VkBuffer*)&forUnmarshaling->buffer, 1);
3923     uint64_t cgen_var_161;
3924     vkStream->read((uint64_t*)&cgen_var_161, 1 * 8);
3925     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_161, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
3926     vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
3927 }
3928 
marshal_VkBindImageMemoryInfo(VulkanStreamGuest * vkStream,const VkBindImageMemoryInfo * forMarshaling)3929 void marshal_VkBindImageMemoryInfo(
3930     VulkanStreamGuest* vkStream,
3931     const VkBindImageMemoryInfo* forMarshaling)
3932 {
3933     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3934     marshal_extension_struct(vkStream, forMarshaling->pNext);
3935     uint64_t cgen_var_162;
3936     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_162, 1);
3937     vkStream->write((uint64_t*)&cgen_var_162, 1 * 8);
3938     uint64_t cgen_var_163;
3939     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_163, 1);
3940     vkStream->write((uint64_t*)&cgen_var_163, 1 * 8);
3941     vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
3942 }
3943 
unmarshal_VkBindImageMemoryInfo(VulkanStreamGuest * vkStream,VkBindImageMemoryInfo * forUnmarshaling)3944 void unmarshal_VkBindImageMemoryInfo(
3945     VulkanStreamGuest* vkStream,
3946     VkBindImageMemoryInfo* forUnmarshaling)
3947 {
3948     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3949     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3950     uint64_t cgen_var_164;
3951     vkStream->read((uint64_t*)&cgen_var_164, 1 * 8);
3952     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_164, (VkImage*)&forUnmarshaling->image, 1);
3953     uint64_t cgen_var_165;
3954     vkStream->read((uint64_t*)&cgen_var_165, 1 * 8);
3955     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_165, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
3956     vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
3957 }
3958 
marshal_VkPhysicalDevice16BitStorageFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDevice16BitStorageFeatures * forMarshaling)3959 void marshal_VkPhysicalDevice16BitStorageFeatures(
3960     VulkanStreamGuest* vkStream,
3961     const VkPhysicalDevice16BitStorageFeatures* forMarshaling)
3962 {
3963     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3964     marshal_extension_struct(vkStream, forMarshaling->pNext);
3965     vkStream->write((VkBool32*)&forMarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
3966     vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer16BitAccess, sizeof(VkBool32));
3967     vkStream->write((VkBool32*)&forMarshaling->storagePushConstant16, sizeof(VkBool32));
3968     vkStream->write((VkBool32*)&forMarshaling->storageInputOutput16, sizeof(VkBool32));
3969 }
3970 
unmarshal_VkPhysicalDevice16BitStorageFeatures(VulkanStreamGuest * vkStream,VkPhysicalDevice16BitStorageFeatures * forUnmarshaling)3971 void unmarshal_VkPhysicalDevice16BitStorageFeatures(
3972     VulkanStreamGuest* vkStream,
3973     VkPhysicalDevice16BitStorageFeatures* forUnmarshaling)
3974 {
3975     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3976     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3977     vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
3978     vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer16BitAccess, sizeof(VkBool32));
3979     vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant16, sizeof(VkBool32));
3980     vkStream->read((VkBool32*)&forUnmarshaling->storageInputOutput16, sizeof(VkBool32));
3981 }
3982 
marshal_VkMemoryDedicatedRequirements(VulkanStreamGuest * vkStream,const VkMemoryDedicatedRequirements * forMarshaling)3983 void marshal_VkMemoryDedicatedRequirements(
3984     VulkanStreamGuest* vkStream,
3985     const VkMemoryDedicatedRequirements* forMarshaling)
3986 {
3987     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
3988     marshal_extension_struct(vkStream, forMarshaling->pNext);
3989     vkStream->write((VkBool32*)&forMarshaling->prefersDedicatedAllocation, sizeof(VkBool32));
3990     vkStream->write((VkBool32*)&forMarshaling->requiresDedicatedAllocation, sizeof(VkBool32));
3991 }
3992 
unmarshal_VkMemoryDedicatedRequirements(VulkanStreamGuest * vkStream,VkMemoryDedicatedRequirements * forUnmarshaling)3993 void unmarshal_VkMemoryDedicatedRequirements(
3994     VulkanStreamGuest* vkStream,
3995     VkMemoryDedicatedRequirements* forUnmarshaling)
3996 {
3997     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
3998     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
3999     vkStream->read((VkBool32*)&forUnmarshaling->prefersDedicatedAllocation, sizeof(VkBool32));
4000     vkStream->read((VkBool32*)&forUnmarshaling->requiresDedicatedAllocation, sizeof(VkBool32));
4001 }
4002 
marshal_VkMemoryDedicatedAllocateInfo(VulkanStreamGuest * vkStream,const VkMemoryDedicatedAllocateInfo * forMarshaling)4003 void marshal_VkMemoryDedicatedAllocateInfo(
4004     VulkanStreamGuest* vkStream,
4005     const VkMemoryDedicatedAllocateInfo* forMarshaling)
4006 {
4007     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4008     marshal_extension_struct(vkStream, forMarshaling->pNext);
4009     uint64_t cgen_var_166;
4010     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_166, 1);
4011     vkStream->write((uint64_t*)&cgen_var_166, 1 * 8);
4012     uint64_t cgen_var_167;
4013     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_167, 1);
4014     vkStream->write((uint64_t*)&cgen_var_167, 1 * 8);
4015 }
4016 
unmarshal_VkMemoryDedicatedAllocateInfo(VulkanStreamGuest * vkStream,VkMemoryDedicatedAllocateInfo * forUnmarshaling)4017 void unmarshal_VkMemoryDedicatedAllocateInfo(
4018     VulkanStreamGuest* vkStream,
4019     VkMemoryDedicatedAllocateInfo* forUnmarshaling)
4020 {
4021     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4022     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4023     uint64_t cgen_var_168;
4024     vkStream->read((uint64_t*)&cgen_var_168, 1 * 8);
4025     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_168, (VkImage*)&forUnmarshaling->image, 1);
4026     uint64_t cgen_var_169;
4027     vkStream->read((uint64_t*)&cgen_var_169, 1 * 8);
4028     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_169, (VkBuffer*)&forUnmarshaling->buffer, 1);
4029 }
4030 
marshal_VkMemoryAllocateFlagsInfo(VulkanStreamGuest * vkStream,const VkMemoryAllocateFlagsInfo * forMarshaling)4031 void marshal_VkMemoryAllocateFlagsInfo(
4032     VulkanStreamGuest* vkStream,
4033     const VkMemoryAllocateFlagsInfo* forMarshaling)
4034 {
4035     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4036     marshal_extension_struct(vkStream, forMarshaling->pNext);
4037     vkStream->write((VkMemoryAllocateFlags*)&forMarshaling->flags, sizeof(VkMemoryAllocateFlags));
4038     vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
4039 }
4040 
unmarshal_VkMemoryAllocateFlagsInfo(VulkanStreamGuest * vkStream,VkMemoryAllocateFlagsInfo * forUnmarshaling)4041 void unmarshal_VkMemoryAllocateFlagsInfo(
4042     VulkanStreamGuest* vkStream,
4043     VkMemoryAllocateFlagsInfo* forUnmarshaling)
4044 {
4045     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4046     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4047     vkStream->read((VkMemoryAllocateFlags*)&forUnmarshaling->flags, sizeof(VkMemoryAllocateFlags));
4048     vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
4049 }
4050 
marshal_VkDeviceGroupRenderPassBeginInfo(VulkanStreamGuest * vkStream,const VkDeviceGroupRenderPassBeginInfo * forMarshaling)4051 void marshal_VkDeviceGroupRenderPassBeginInfo(
4052     VulkanStreamGuest* vkStream,
4053     const VkDeviceGroupRenderPassBeginInfo* forMarshaling)
4054 {
4055     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4056     marshal_extension_struct(vkStream, forMarshaling->pNext);
4057     vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
4058     vkStream->write((uint32_t*)&forMarshaling->deviceRenderAreaCount, sizeof(uint32_t));
4059     for (uint32_t i = 0; i < (uint32_t)forMarshaling->deviceRenderAreaCount; ++i)
4060     {
4061         marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pDeviceRenderAreas + i));
4062     }
4063 }
4064 
unmarshal_VkDeviceGroupRenderPassBeginInfo(VulkanStreamGuest * vkStream,VkDeviceGroupRenderPassBeginInfo * forUnmarshaling)4065 void unmarshal_VkDeviceGroupRenderPassBeginInfo(
4066     VulkanStreamGuest* vkStream,
4067     VkDeviceGroupRenderPassBeginInfo* forUnmarshaling)
4068 {
4069     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4070     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4071     vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
4072     vkStream->read((uint32_t*)&forUnmarshaling->deviceRenderAreaCount, sizeof(uint32_t));
4073     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->deviceRenderAreaCount; ++i)
4074     {
4075         unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pDeviceRenderAreas + i));
4076     }
4077 }
4078 
marshal_VkDeviceGroupCommandBufferBeginInfo(VulkanStreamGuest * vkStream,const VkDeviceGroupCommandBufferBeginInfo * forMarshaling)4079 void marshal_VkDeviceGroupCommandBufferBeginInfo(
4080     VulkanStreamGuest* vkStream,
4081     const VkDeviceGroupCommandBufferBeginInfo* forMarshaling)
4082 {
4083     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4084     marshal_extension_struct(vkStream, forMarshaling->pNext);
4085     vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
4086 }
4087 
unmarshal_VkDeviceGroupCommandBufferBeginInfo(VulkanStreamGuest * vkStream,VkDeviceGroupCommandBufferBeginInfo * forUnmarshaling)4088 void unmarshal_VkDeviceGroupCommandBufferBeginInfo(
4089     VulkanStreamGuest* vkStream,
4090     VkDeviceGroupCommandBufferBeginInfo* forUnmarshaling)
4091 {
4092     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4093     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4094     vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
4095 }
4096 
marshal_VkDeviceGroupSubmitInfo(VulkanStreamGuest * vkStream,const VkDeviceGroupSubmitInfo * forMarshaling)4097 void marshal_VkDeviceGroupSubmitInfo(
4098     VulkanStreamGuest* vkStream,
4099     const VkDeviceGroupSubmitInfo* forMarshaling)
4100 {
4101     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4102     marshal_extension_struct(vkStream, forMarshaling->pNext);
4103     vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
4104     vkStream->write((const uint32_t*)forMarshaling->pWaitSemaphoreDeviceIndices, forMarshaling->waitSemaphoreCount * sizeof(const uint32_t));
4105     vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
4106     vkStream->write((const uint32_t*)forMarshaling->pCommandBufferDeviceMasks, forMarshaling->commandBufferCount * sizeof(const uint32_t));
4107     vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
4108     vkStream->write((const uint32_t*)forMarshaling->pSignalSemaphoreDeviceIndices, forMarshaling->signalSemaphoreCount * sizeof(const uint32_t));
4109 }
4110 
unmarshal_VkDeviceGroupSubmitInfo(VulkanStreamGuest * vkStream,VkDeviceGroupSubmitInfo * forUnmarshaling)4111 void unmarshal_VkDeviceGroupSubmitInfo(
4112     VulkanStreamGuest* vkStream,
4113     VkDeviceGroupSubmitInfo* forUnmarshaling)
4114 {
4115     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4116     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4117     vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
4118     vkStream->read((uint32_t*)forUnmarshaling->pWaitSemaphoreDeviceIndices, forUnmarshaling->waitSemaphoreCount * sizeof(const uint32_t));
4119     vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
4120     vkStream->read((uint32_t*)forUnmarshaling->pCommandBufferDeviceMasks, forUnmarshaling->commandBufferCount * sizeof(const uint32_t));
4121     vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
4122     vkStream->read((uint32_t*)forUnmarshaling->pSignalSemaphoreDeviceIndices, forUnmarshaling->signalSemaphoreCount * sizeof(const uint32_t));
4123 }
4124 
marshal_VkDeviceGroupBindSparseInfo(VulkanStreamGuest * vkStream,const VkDeviceGroupBindSparseInfo * forMarshaling)4125 void marshal_VkDeviceGroupBindSparseInfo(
4126     VulkanStreamGuest* vkStream,
4127     const VkDeviceGroupBindSparseInfo* forMarshaling)
4128 {
4129     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4130     marshal_extension_struct(vkStream, forMarshaling->pNext);
4131     vkStream->write((uint32_t*)&forMarshaling->resourceDeviceIndex, sizeof(uint32_t));
4132     vkStream->write((uint32_t*)&forMarshaling->memoryDeviceIndex, sizeof(uint32_t));
4133 }
4134 
unmarshal_VkDeviceGroupBindSparseInfo(VulkanStreamGuest * vkStream,VkDeviceGroupBindSparseInfo * forUnmarshaling)4135 void unmarshal_VkDeviceGroupBindSparseInfo(
4136     VulkanStreamGuest* vkStream,
4137     VkDeviceGroupBindSparseInfo* forUnmarshaling)
4138 {
4139     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4140     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4141     vkStream->read((uint32_t*)&forUnmarshaling->resourceDeviceIndex, sizeof(uint32_t));
4142     vkStream->read((uint32_t*)&forUnmarshaling->memoryDeviceIndex, sizeof(uint32_t));
4143 }
4144 
marshal_VkBindBufferMemoryDeviceGroupInfo(VulkanStreamGuest * vkStream,const VkBindBufferMemoryDeviceGroupInfo * forMarshaling)4145 void marshal_VkBindBufferMemoryDeviceGroupInfo(
4146     VulkanStreamGuest* vkStream,
4147     const VkBindBufferMemoryDeviceGroupInfo* forMarshaling)
4148 {
4149     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4150     marshal_extension_struct(vkStream, forMarshaling->pNext);
4151     vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t));
4152     vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices, forMarshaling->deviceIndexCount * sizeof(const uint32_t));
4153 }
4154 
unmarshal_VkBindBufferMemoryDeviceGroupInfo(VulkanStreamGuest * vkStream,VkBindBufferMemoryDeviceGroupInfo * forUnmarshaling)4155 void unmarshal_VkBindBufferMemoryDeviceGroupInfo(
4156     VulkanStreamGuest* vkStream,
4157     VkBindBufferMemoryDeviceGroupInfo* forUnmarshaling)
4158 {
4159     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4160     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4161     vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t));
4162     vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices, forUnmarshaling->deviceIndexCount * sizeof(const uint32_t));
4163 }
4164 
marshal_VkBindImageMemoryDeviceGroupInfo(VulkanStreamGuest * vkStream,const VkBindImageMemoryDeviceGroupInfo * forMarshaling)4165 void marshal_VkBindImageMemoryDeviceGroupInfo(
4166     VulkanStreamGuest* vkStream,
4167     const VkBindImageMemoryDeviceGroupInfo* forMarshaling)
4168 {
4169     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4170     marshal_extension_struct(vkStream, forMarshaling->pNext);
4171     vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t));
4172     vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices, forMarshaling->deviceIndexCount * sizeof(const uint32_t));
4173     vkStream->write((uint32_t*)&forMarshaling->splitInstanceBindRegionCount, sizeof(uint32_t));
4174     for (uint32_t i = 0; i < (uint32_t)forMarshaling->splitInstanceBindRegionCount; ++i)
4175     {
4176         marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pSplitInstanceBindRegions + i));
4177     }
4178 }
4179 
unmarshal_VkBindImageMemoryDeviceGroupInfo(VulkanStreamGuest * vkStream,VkBindImageMemoryDeviceGroupInfo * forUnmarshaling)4180 void unmarshal_VkBindImageMemoryDeviceGroupInfo(
4181     VulkanStreamGuest* vkStream,
4182     VkBindImageMemoryDeviceGroupInfo* forUnmarshaling)
4183 {
4184     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4185     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4186     vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t));
4187     vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices, forUnmarshaling->deviceIndexCount * sizeof(const uint32_t));
4188     vkStream->read((uint32_t*)&forUnmarshaling->splitInstanceBindRegionCount, sizeof(uint32_t));
4189     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->splitInstanceBindRegionCount; ++i)
4190     {
4191         unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pSplitInstanceBindRegions + i));
4192     }
4193 }
4194 
marshal_VkPhysicalDeviceGroupProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceGroupProperties * forMarshaling)4195 void marshal_VkPhysicalDeviceGroupProperties(
4196     VulkanStreamGuest* vkStream,
4197     const VkPhysicalDeviceGroupProperties* forMarshaling)
4198 {
4199     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4200     marshal_extension_struct(vkStream, forMarshaling->pNext);
4201     vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t));
4202     vkStream->write((VkPhysicalDevice*)forMarshaling->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
4203     vkStream->write((VkBool32*)&forMarshaling->subsetAllocation, sizeof(VkBool32));
4204 }
4205 
unmarshal_VkPhysicalDeviceGroupProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceGroupProperties * forUnmarshaling)4206 void unmarshal_VkPhysicalDeviceGroupProperties(
4207     VulkanStreamGuest* vkStream,
4208     VkPhysicalDeviceGroupProperties* forUnmarshaling)
4209 {
4210     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4211     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4212     vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t));
4213     vkStream->read((VkPhysicalDevice*)forUnmarshaling->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
4214     vkStream->read((VkBool32*)&forUnmarshaling->subsetAllocation, sizeof(VkBool32));
4215 }
4216 
marshal_VkDeviceGroupDeviceCreateInfo(VulkanStreamGuest * vkStream,const VkDeviceGroupDeviceCreateInfo * forMarshaling)4217 void marshal_VkDeviceGroupDeviceCreateInfo(
4218     VulkanStreamGuest* vkStream,
4219     const VkDeviceGroupDeviceCreateInfo* forMarshaling)
4220 {
4221     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4222     marshal_extension_struct(vkStream, forMarshaling->pNext);
4223     vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t));
4224     if (forMarshaling->physicalDeviceCount)
4225     {
4226         uint64_t* cgen_var_170;
4227         vkStream->alloc((void**)&cgen_var_170, forMarshaling->physicalDeviceCount * 8);
4228         vkStream->handleMapping()->mapHandles_VkPhysicalDevice_u64(forMarshaling->pPhysicalDevices, cgen_var_170, forMarshaling->physicalDeviceCount);
4229         vkStream->write((uint64_t*)cgen_var_170, forMarshaling->physicalDeviceCount * 8);
4230     }
4231 }
4232 
unmarshal_VkDeviceGroupDeviceCreateInfo(VulkanStreamGuest * vkStream,VkDeviceGroupDeviceCreateInfo * forUnmarshaling)4233 void unmarshal_VkDeviceGroupDeviceCreateInfo(
4234     VulkanStreamGuest* vkStream,
4235     VkDeviceGroupDeviceCreateInfo* forUnmarshaling)
4236 {
4237     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4238     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4239     vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t));
4240     if (forUnmarshaling->physicalDeviceCount)
4241     {
4242         uint64_t* cgen_var_171;
4243         vkStream->alloc((void**)&cgen_var_171, forUnmarshaling->physicalDeviceCount * 8);
4244         vkStream->read((uint64_t*)cgen_var_171, forUnmarshaling->physicalDeviceCount * 8);
4245         vkStream->handleMapping()->mapHandles_u64_VkPhysicalDevice(cgen_var_171, (VkPhysicalDevice*)forUnmarshaling->pPhysicalDevices, forUnmarshaling->physicalDeviceCount);
4246     }
4247 }
4248 
marshal_VkBufferMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,const VkBufferMemoryRequirementsInfo2 * forMarshaling)4249 void marshal_VkBufferMemoryRequirementsInfo2(
4250     VulkanStreamGuest* vkStream,
4251     const VkBufferMemoryRequirementsInfo2* forMarshaling)
4252 {
4253     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4254     marshal_extension_struct(vkStream, forMarshaling->pNext);
4255     uint64_t cgen_var_172;
4256     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_172, 1);
4257     vkStream->write((uint64_t*)&cgen_var_172, 1 * 8);
4258 }
4259 
unmarshal_VkBufferMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,VkBufferMemoryRequirementsInfo2 * forUnmarshaling)4260 void unmarshal_VkBufferMemoryRequirementsInfo2(
4261     VulkanStreamGuest* vkStream,
4262     VkBufferMemoryRequirementsInfo2* forUnmarshaling)
4263 {
4264     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4265     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4266     uint64_t cgen_var_173;
4267     vkStream->read((uint64_t*)&cgen_var_173, 1 * 8);
4268     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_173, (VkBuffer*)&forUnmarshaling->buffer, 1);
4269 }
4270 
marshal_VkImageMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,const VkImageMemoryRequirementsInfo2 * forMarshaling)4271 void marshal_VkImageMemoryRequirementsInfo2(
4272     VulkanStreamGuest* vkStream,
4273     const VkImageMemoryRequirementsInfo2* forMarshaling)
4274 {
4275     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4276     marshal_extension_struct(vkStream, forMarshaling->pNext);
4277     uint64_t cgen_var_174;
4278     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_174, 1);
4279     vkStream->write((uint64_t*)&cgen_var_174, 1 * 8);
4280 }
4281 
unmarshal_VkImageMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,VkImageMemoryRequirementsInfo2 * forUnmarshaling)4282 void unmarshal_VkImageMemoryRequirementsInfo2(
4283     VulkanStreamGuest* vkStream,
4284     VkImageMemoryRequirementsInfo2* forUnmarshaling)
4285 {
4286     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4287     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4288     uint64_t cgen_var_175;
4289     vkStream->read((uint64_t*)&cgen_var_175, 1 * 8);
4290     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_175, (VkImage*)&forUnmarshaling->image, 1);
4291 }
4292 
marshal_VkImageSparseMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,const VkImageSparseMemoryRequirementsInfo2 * forMarshaling)4293 void marshal_VkImageSparseMemoryRequirementsInfo2(
4294     VulkanStreamGuest* vkStream,
4295     const VkImageSparseMemoryRequirementsInfo2* forMarshaling)
4296 {
4297     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4298     marshal_extension_struct(vkStream, forMarshaling->pNext);
4299     uint64_t cgen_var_176;
4300     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_176, 1);
4301     vkStream->write((uint64_t*)&cgen_var_176, 1 * 8);
4302 }
4303 
unmarshal_VkImageSparseMemoryRequirementsInfo2(VulkanStreamGuest * vkStream,VkImageSparseMemoryRequirementsInfo2 * forUnmarshaling)4304 void unmarshal_VkImageSparseMemoryRequirementsInfo2(
4305     VulkanStreamGuest* vkStream,
4306     VkImageSparseMemoryRequirementsInfo2* forUnmarshaling)
4307 {
4308     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4309     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4310     uint64_t cgen_var_177;
4311     vkStream->read((uint64_t*)&cgen_var_177, 1 * 8);
4312     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_177, (VkImage*)&forUnmarshaling->image, 1);
4313 }
4314 
marshal_VkMemoryRequirements2(VulkanStreamGuest * vkStream,const VkMemoryRequirements2 * forMarshaling)4315 void marshal_VkMemoryRequirements2(
4316     VulkanStreamGuest* vkStream,
4317     const VkMemoryRequirements2* forMarshaling)
4318 {
4319     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4320     marshal_extension_struct(vkStream, forMarshaling->pNext);
4321     marshal_VkMemoryRequirements(vkStream, (VkMemoryRequirements*)(&forMarshaling->memoryRequirements));
4322 }
4323 
unmarshal_VkMemoryRequirements2(VulkanStreamGuest * vkStream,VkMemoryRequirements2 * forUnmarshaling)4324 void unmarshal_VkMemoryRequirements2(
4325     VulkanStreamGuest* vkStream,
4326     VkMemoryRequirements2* forUnmarshaling)
4327 {
4328     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4329     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4330     unmarshal_VkMemoryRequirements(vkStream, (VkMemoryRequirements*)(&forUnmarshaling->memoryRequirements));
4331 }
4332 
marshal_VkSparseImageMemoryRequirements2(VulkanStreamGuest * vkStream,const VkSparseImageMemoryRequirements2 * forMarshaling)4333 void marshal_VkSparseImageMemoryRequirements2(
4334     VulkanStreamGuest* vkStream,
4335     const VkSparseImageMemoryRequirements2* forMarshaling)
4336 {
4337     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4338     marshal_extension_struct(vkStream, forMarshaling->pNext);
4339     marshal_VkSparseImageMemoryRequirements(vkStream, (VkSparseImageMemoryRequirements*)(&forMarshaling->memoryRequirements));
4340 }
4341 
unmarshal_VkSparseImageMemoryRequirements2(VulkanStreamGuest * vkStream,VkSparseImageMemoryRequirements2 * forUnmarshaling)4342 void unmarshal_VkSparseImageMemoryRequirements2(
4343     VulkanStreamGuest* vkStream,
4344     VkSparseImageMemoryRequirements2* forUnmarshaling)
4345 {
4346     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4347     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4348     unmarshal_VkSparseImageMemoryRequirements(vkStream, (VkSparseImageMemoryRequirements*)(&forUnmarshaling->memoryRequirements));
4349 }
4350 
marshal_VkPhysicalDeviceFeatures2(VulkanStreamGuest * vkStream,const VkPhysicalDeviceFeatures2 * forMarshaling)4351 void marshal_VkPhysicalDeviceFeatures2(
4352     VulkanStreamGuest* vkStream,
4353     const VkPhysicalDeviceFeatures2* forMarshaling)
4354 {
4355     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4356     marshal_extension_struct(vkStream, forMarshaling->pNext);
4357     marshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(&forMarshaling->features));
4358 }
4359 
unmarshal_VkPhysicalDeviceFeatures2(VulkanStreamGuest * vkStream,VkPhysicalDeviceFeatures2 * forUnmarshaling)4360 void unmarshal_VkPhysicalDeviceFeatures2(
4361     VulkanStreamGuest* vkStream,
4362     VkPhysicalDeviceFeatures2* forUnmarshaling)
4363 {
4364     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4365     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4366     unmarshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(&forUnmarshaling->features));
4367 }
4368 
marshal_VkPhysicalDeviceProperties2(VulkanStreamGuest * vkStream,const VkPhysicalDeviceProperties2 * forMarshaling)4369 void marshal_VkPhysicalDeviceProperties2(
4370     VulkanStreamGuest* vkStream,
4371     const VkPhysicalDeviceProperties2* forMarshaling)
4372 {
4373     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4374     marshal_extension_struct(vkStream, forMarshaling->pNext);
4375     marshal_VkPhysicalDeviceProperties(vkStream, (VkPhysicalDeviceProperties*)(&forMarshaling->properties));
4376 }
4377 
unmarshal_VkPhysicalDeviceProperties2(VulkanStreamGuest * vkStream,VkPhysicalDeviceProperties2 * forUnmarshaling)4378 void unmarshal_VkPhysicalDeviceProperties2(
4379     VulkanStreamGuest* vkStream,
4380     VkPhysicalDeviceProperties2* forUnmarshaling)
4381 {
4382     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4383     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4384     unmarshal_VkPhysicalDeviceProperties(vkStream, (VkPhysicalDeviceProperties*)(&forUnmarshaling->properties));
4385 }
4386 
marshal_VkFormatProperties2(VulkanStreamGuest * vkStream,const VkFormatProperties2 * forMarshaling)4387 void marshal_VkFormatProperties2(
4388     VulkanStreamGuest* vkStream,
4389     const VkFormatProperties2* forMarshaling)
4390 {
4391     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4392     marshal_extension_struct(vkStream, forMarshaling->pNext);
4393     marshal_VkFormatProperties(vkStream, (VkFormatProperties*)(&forMarshaling->formatProperties));
4394 }
4395 
unmarshal_VkFormatProperties2(VulkanStreamGuest * vkStream,VkFormatProperties2 * forUnmarshaling)4396 void unmarshal_VkFormatProperties2(
4397     VulkanStreamGuest* vkStream,
4398     VkFormatProperties2* forUnmarshaling)
4399 {
4400     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4401     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4402     unmarshal_VkFormatProperties(vkStream, (VkFormatProperties*)(&forUnmarshaling->formatProperties));
4403 }
4404 
marshal_VkImageFormatProperties2(VulkanStreamGuest * vkStream,const VkImageFormatProperties2 * forMarshaling)4405 void marshal_VkImageFormatProperties2(
4406     VulkanStreamGuest* vkStream,
4407     const VkImageFormatProperties2* forMarshaling)
4408 {
4409     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4410     marshal_extension_struct(vkStream, forMarshaling->pNext);
4411     marshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forMarshaling->imageFormatProperties));
4412 }
4413 
unmarshal_VkImageFormatProperties2(VulkanStreamGuest * vkStream,VkImageFormatProperties2 * forUnmarshaling)4414 void unmarshal_VkImageFormatProperties2(
4415     VulkanStreamGuest* vkStream,
4416     VkImageFormatProperties2* forUnmarshaling)
4417 {
4418     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4419     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4420     unmarshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forUnmarshaling->imageFormatProperties));
4421 }
4422 
marshal_VkPhysicalDeviceImageFormatInfo2(VulkanStreamGuest * vkStream,const VkPhysicalDeviceImageFormatInfo2 * forMarshaling)4423 void marshal_VkPhysicalDeviceImageFormatInfo2(
4424     VulkanStreamGuest* vkStream,
4425     const VkPhysicalDeviceImageFormatInfo2* forMarshaling)
4426 {
4427     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4428     marshal_extension_struct(vkStream, forMarshaling->pNext);
4429     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
4430     vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType));
4431     vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
4432     vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
4433     vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags));
4434 }
4435 
unmarshal_VkPhysicalDeviceImageFormatInfo2(VulkanStreamGuest * vkStream,VkPhysicalDeviceImageFormatInfo2 * forUnmarshaling)4436 void unmarshal_VkPhysicalDeviceImageFormatInfo2(
4437     VulkanStreamGuest* vkStream,
4438     VkPhysicalDeviceImageFormatInfo2* forUnmarshaling)
4439 {
4440     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4441     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4442     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
4443     vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType));
4444     vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
4445     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
4446     vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags));
4447 }
4448 
marshal_VkQueueFamilyProperties2(VulkanStreamGuest * vkStream,const VkQueueFamilyProperties2 * forMarshaling)4449 void marshal_VkQueueFamilyProperties2(
4450     VulkanStreamGuest* vkStream,
4451     const VkQueueFamilyProperties2* forMarshaling)
4452 {
4453     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4454     marshal_extension_struct(vkStream, forMarshaling->pNext);
4455     marshal_VkQueueFamilyProperties(vkStream, (VkQueueFamilyProperties*)(&forMarshaling->queueFamilyProperties));
4456 }
4457 
unmarshal_VkQueueFamilyProperties2(VulkanStreamGuest * vkStream,VkQueueFamilyProperties2 * forUnmarshaling)4458 void unmarshal_VkQueueFamilyProperties2(
4459     VulkanStreamGuest* vkStream,
4460     VkQueueFamilyProperties2* forUnmarshaling)
4461 {
4462     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4463     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4464     unmarshal_VkQueueFamilyProperties(vkStream, (VkQueueFamilyProperties*)(&forUnmarshaling->queueFamilyProperties));
4465 }
4466 
marshal_VkPhysicalDeviceMemoryProperties2(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMemoryProperties2 * forMarshaling)4467 void marshal_VkPhysicalDeviceMemoryProperties2(
4468     VulkanStreamGuest* vkStream,
4469     const VkPhysicalDeviceMemoryProperties2* forMarshaling)
4470 {
4471     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4472     marshal_extension_struct(vkStream, forMarshaling->pNext);
4473     marshal_VkPhysicalDeviceMemoryProperties(vkStream, (VkPhysicalDeviceMemoryProperties*)(&forMarshaling->memoryProperties));
4474 }
4475 
unmarshal_VkPhysicalDeviceMemoryProperties2(VulkanStreamGuest * vkStream,VkPhysicalDeviceMemoryProperties2 * forUnmarshaling)4476 void unmarshal_VkPhysicalDeviceMemoryProperties2(
4477     VulkanStreamGuest* vkStream,
4478     VkPhysicalDeviceMemoryProperties2* forUnmarshaling)
4479 {
4480     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4481     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4482     unmarshal_VkPhysicalDeviceMemoryProperties(vkStream, (VkPhysicalDeviceMemoryProperties*)(&forUnmarshaling->memoryProperties));
4483 }
4484 
marshal_VkSparseImageFormatProperties2(VulkanStreamGuest * vkStream,const VkSparseImageFormatProperties2 * forMarshaling)4485 void marshal_VkSparseImageFormatProperties2(
4486     VulkanStreamGuest* vkStream,
4487     const VkSparseImageFormatProperties2* forMarshaling)
4488 {
4489     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4490     marshal_extension_struct(vkStream, forMarshaling->pNext);
4491     marshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forMarshaling->properties));
4492 }
4493 
unmarshal_VkSparseImageFormatProperties2(VulkanStreamGuest * vkStream,VkSparseImageFormatProperties2 * forUnmarshaling)4494 void unmarshal_VkSparseImageFormatProperties2(
4495     VulkanStreamGuest* vkStream,
4496     VkSparseImageFormatProperties2* forUnmarshaling)
4497 {
4498     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4499     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4500     unmarshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forUnmarshaling->properties));
4501 }
4502 
marshal_VkPhysicalDeviceSparseImageFormatInfo2(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSparseImageFormatInfo2 * forMarshaling)4503 void marshal_VkPhysicalDeviceSparseImageFormatInfo2(
4504     VulkanStreamGuest* vkStream,
4505     const VkPhysicalDeviceSparseImageFormatInfo2* forMarshaling)
4506 {
4507     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4508     marshal_extension_struct(vkStream, forMarshaling->pNext);
4509     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
4510     vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType));
4511     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
4512     vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
4513     vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
4514 }
4515 
unmarshal_VkPhysicalDeviceSparseImageFormatInfo2(VulkanStreamGuest * vkStream,VkPhysicalDeviceSparseImageFormatInfo2 * forUnmarshaling)4516 void unmarshal_VkPhysicalDeviceSparseImageFormatInfo2(
4517     VulkanStreamGuest* vkStream,
4518     VkPhysicalDeviceSparseImageFormatInfo2* forUnmarshaling)
4519 {
4520     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4521     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4522     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
4523     vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType));
4524     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits));
4525     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
4526     vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
4527 }
4528 
marshal_VkPhysicalDevicePointClippingProperties(VulkanStreamGuest * vkStream,const VkPhysicalDevicePointClippingProperties * forMarshaling)4529 void marshal_VkPhysicalDevicePointClippingProperties(
4530     VulkanStreamGuest* vkStream,
4531     const VkPhysicalDevicePointClippingProperties* forMarshaling)
4532 {
4533     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4534     marshal_extension_struct(vkStream, forMarshaling->pNext);
4535     vkStream->write((VkPointClippingBehavior*)&forMarshaling->pointClippingBehavior, sizeof(VkPointClippingBehavior));
4536 }
4537 
unmarshal_VkPhysicalDevicePointClippingProperties(VulkanStreamGuest * vkStream,VkPhysicalDevicePointClippingProperties * forUnmarshaling)4538 void unmarshal_VkPhysicalDevicePointClippingProperties(
4539     VulkanStreamGuest* vkStream,
4540     VkPhysicalDevicePointClippingProperties* forUnmarshaling)
4541 {
4542     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4543     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4544     vkStream->read((VkPointClippingBehavior*)&forUnmarshaling->pointClippingBehavior, sizeof(VkPointClippingBehavior));
4545 }
4546 
marshal_VkInputAttachmentAspectReference(VulkanStreamGuest * vkStream,const VkInputAttachmentAspectReference * forMarshaling)4547 void marshal_VkInputAttachmentAspectReference(
4548     VulkanStreamGuest* vkStream,
4549     const VkInputAttachmentAspectReference* forMarshaling)
4550 {
4551     vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
4552     vkStream->write((uint32_t*)&forMarshaling->inputAttachmentIndex, sizeof(uint32_t));
4553     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
4554 }
4555 
unmarshal_VkInputAttachmentAspectReference(VulkanStreamGuest * vkStream,VkInputAttachmentAspectReference * forUnmarshaling)4556 void unmarshal_VkInputAttachmentAspectReference(
4557     VulkanStreamGuest* vkStream,
4558     VkInputAttachmentAspectReference* forUnmarshaling)
4559 {
4560     vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
4561     vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentIndex, sizeof(uint32_t));
4562     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
4563 }
4564 
marshal_VkRenderPassInputAttachmentAspectCreateInfo(VulkanStreamGuest * vkStream,const VkRenderPassInputAttachmentAspectCreateInfo * forMarshaling)4565 void marshal_VkRenderPassInputAttachmentAspectCreateInfo(
4566     VulkanStreamGuest* vkStream,
4567     const VkRenderPassInputAttachmentAspectCreateInfo* forMarshaling)
4568 {
4569     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4570     marshal_extension_struct(vkStream, forMarshaling->pNext);
4571     vkStream->write((uint32_t*)&forMarshaling->aspectReferenceCount, sizeof(uint32_t));
4572     for (uint32_t i = 0; i < (uint32_t)forMarshaling->aspectReferenceCount; ++i)
4573     {
4574         marshal_VkInputAttachmentAspectReference(vkStream, (const VkInputAttachmentAspectReference*)(forMarshaling->pAspectReferences + i));
4575     }
4576 }
4577 
unmarshal_VkRenderPassInputAttachmentAspectCreateInfo(VulkanStreamGuest * vkStream,VkRenderPassInputAttachmentAspectCreateInfo * forUnmarshaling)4578 void unmarshal_VkRenderPassInputAttachmentAspectCreateInfo(
4579     VulkanStreamGuest* vkStream,
4580     VkRenderPassInputAttachmentAspectCreateInfo* forUnmarshaling)
4581 {
4582     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4583     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4584     vkStream->read((uint32_t*)&forUnmarshaling->aspectReferenceCount, sizeof(uint32_t));
4585     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->aspectReferenceCount; ++i)
4586     {
4587         unmarshal_VkInputAttachmentAspectReference(vkStream, (VkInputAttachmentAspectReference*)(forUnmarshaling->pAspectReferences + i));
4588     }
4589 }
4590 
marshal_VkImageViewUsageCreateInfo(VulkanStreamGuest * vkStream,const VkImageViewUsageCreateInfo * forMarshaling)4591 void marshal_VkImageViewUsageCreateInfo(
4592     VulkanStreamGuest* vkStream,
4593     const VkImageViewUsageCreateInfo* forMarshaling)
4594 {
4595     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4596     marshal_extension_struct(vkStream, forMarshaling->pNext);
4597     vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
4598 }
4599 
unmarshal_VkImageViewUsageCreateInfo(VulkanStreamGuest * vkStream,VkImageViewUsageCreateInfo * forUnmarshaling)4600 void unmarshal_VkImageViewUsageCreateInfo(
4601     VulkanStreamGuest* vkStream,
4602     VkImageViewUsageCreateInfo* forUnmarshaling)
4603 {
4604     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4605     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4606     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
4607 }
4608 
marshal_VkPipelineTessellationDomainOriginStateCreateInfo(VulkanStreamGuest * vkStream,const VkPipelineTessellationDomainOriginStateCreateInfo * forMarshaling)4609 void marshal_VkPipelineTessellationDomainOriginStateCreateInfo(
4610     VulkanStreamGuest* vkStream,
4611     const VkPipelineTessellationDomainOriginStateCreateInfo* forMarshaling)
4612 {
4613     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4614     marshal_extension_struct(vkStream, forMarshaling->pNext);
4615     vkStream->write((VkTessellationDomainOrigin*)&forMarshaling->domainOrigin, sizeof(VkTessellationDomainOrigin));
4616 }
4617 
unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo(VulkanStreamGuest * vkStream,VkPipelineTessellationDomainOriginStateCreateInfo * forUnmarshaling)4618 void unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo(
4619     VulkanStreamGuest* vkStream,
4620     VkPipelineTessellationDomainOriginStateCreateInfo* forUnmarshaling)
4621 {
4622     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4623     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4624     vkStream->read((VkTessellationDomainOrigin*)&forUnmarshaling->domainOrigin, sizeof(VkTessellationDomainOrigin));
4625 }
4626 
marshal_VkRenderPassMultiviewCreateInfo(VulkanStreamGuest * vkStream,const VkRenderPassMultiviewCreateInfo * forMarshaling)4627 void marshal_VkRenderPassMultiviewCreateInfo(
4628     VulkanStreamGuest* vkStream,
4629     const VkRenderPassMultiviewCreateInfo* forMarshaling)
4630 {
4631     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4632     marshal_extension_struct(vkStream, forMarshaling->pNext);
4633     vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
4634     vkStream->write((const uint32_t*)forMarshaling->pViewMasks, forMarshaling->subpassCount * sizeof(const uint32_t));
4635     vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
4636     vkStream->write((const int32_t*)forMarshaling->pViewOffsets, forMarshaling->dependencyCount * sizeof(const int32_t));
4637     vkStream->write((uint32_t*)&forMarshaling->correlationMaskCount, sizeof(uint32_t));
4638     vkStream->write((const uint32_t*)forMarshaling->pCorrelationMasks, forMarshaling->correlationMaskCount * sizeof(const uint32_t));
4639 }
4640 
unmarshal_VkRenderPassMultiviewCreateInfo(VulkanStreamGuest * vkStream,VkRenderPassMultiviewCreateInfo * forUnmarshaling)4641 void unmarshal_VkRenderPassMultiviewCreateInfo(
4642     VulkanStreamGuest* vkStream,
4643     VkRenderPassMultiviewCreateInfo* forUnmarshaling)
4644 {
4645     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4646     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4647     vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
4648     vkStream->read((uint32_t*)forUnmarshaling->pViewMasks, forUnmarshaling->subpassCount * sizeof(const uint32_t));
4649     vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
4650     vkStream->read((int32_t*)forUnmarshaling->pViewOffsets, forUnmarshaling->dependencyCount * sizeof(const int32_t));
4651     vkStream->read((uint32_t*)&forUnmarshaling->correlationMaskCount, sizeof(uint32_t));
4652     vkStream->read((uint32_t*)forUnmarshaling->pCorrelationMasks, forUnmarshaling->correlationMaskCount * sizeof(const uint32_t));
4653 }
4654 
marshal_VkPhysicalDeviceMultiviewFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMultiviewFeatures * forMarshaling)4655 void marshal_VkPhysicalDeviceMultiviewFeatures(
4656     VulkanStreamGuest* vkStream,
4657     const VkPhysicalDeviceMultiviewFeatures* forMarshaling)
4658 {
4659     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4660     marshal_extension_struct(vkStream, forMarshaling->pNext);
4661     vkStream->write((VkBool32*)&forMarshaling->multiview, sizeof(VkBool32));
4662     vkStream->write((VkBool32*)&forMarshaling->multiviewGeometryShader, sizeof(VkBool32));
4663     vkStream->write((VkBool32*)&forMarshaling->multiviewTessellationShader, sizeof(VkBool32));
4664 }
4665 
unmarshal_VkPhysicalDeviceMultiviewFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceMultiviewFeatures * forUnmarshaling)4666 void unmarshal_VkPhysicalDeviceMultiviewFeatures(
4667     VulkanStreamGuest* vkStream,
4668     VkPhysicalDeviceMultiviewFeatures* forUnmarshaling)
4669 {
4670     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4671     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4672     vkStream->read((VkBool32*)&forUnmarshaling->multiview, sizeof(VkBool32));
4673     vkStream->read((VkBool32*)&forUnmarshaling->multiviewGeometryShader, sizeof(VkBool32));
4674     vkStream->read((VkBool32*)&forUnmarshaling->multiviewTessellationShader, sizeof(VkBool32));
4675 }
4676 
marshal_VkPhysicalDeviceMultiviewProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMultiviewProperties * forMarshaling)4677 void marshal_VkPhysicalDeviceMultiviewProperties(
4678     VulkanStreamGuest* vkStream,
4679     const VkPhysicalDeviceMultiviewProperties* forMarshaling)
4680 {
4681     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4682     marshal_extension_struct(vkStream, forMarshaling->pNext);
4683     vkStream->write((uint32_t*)&forMarshaling->maxMultiviewViewCount, sizeof(uint32_t));
4684     vkStream->write((uint32_t*)&forMarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
4685 }
4686 
unmarshal_VkPhysicalDeviceMultiviewProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceMultiviewProperties * forUnmarshaling)4687 void unmarshal_VkPhysicalDeviceMultiviewProperties(
4688     VulkanStreamGuest* vkStream,
4689     VkPhysicalDeviceMultiviewProperties* forUnmarshaling)
4690 {
4691     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4692     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4693     vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewViewCount, sizeof(uint32_t));
4694     vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
4695 }
4696 
marshal_VkPhysicalDeviceVariablePointerFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceVariablePointerFeatures * forMarshaling)4697 void marshal_VkPhysicalDeviceVariablePointerFeatures(
4698     VulkanStreamGuest* vkStream,
4699     const VkPhysicalDeviceVariablePointerFeatures* forMarshaling)
4700 {
4701     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4702     marshal_extension_struct(vkStream, forMarshaling->pNext);
4703     vkStream->write((VkBool32*)&forMarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
4704     vkStream->write((VkBool32*)&forMarshaling->variablePointers, sizeof(VkBool32));
4705 }
4706 
unmarshal_VkPhysicalDeviceVariablePointerFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceVariablePointerFeatures * forUnmarshaling)4707 void unmarshal_VkPhysicalDeviceVariablePointerFeatures(
4708     VulkanStreamGuest* vkStream,
4709     VkPhysicalDeviceVariablePointerFeatures* forUnmarshaling)
4710 {
4711     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4712     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4713     vkStream->read((VkBool32*)&forUnmarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
4714     vkStream->read((VkBool32*)&forUnmarshaling->variablePointers, sizeof(VkBool32));
4715 }
4716 
marshal_VkPhysicalDeviceProtectedMemoryFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceProtectedMemoryFeatures * forMarshaling)4717 void marshal_VkPhysicalDeviceProtectedMemoryFeatures(
4718     VulkanStreamGuest* vkStream,
4719     const VkPhysicalDeviceProtectedMemoryFeatures* forMarshaling)
4720 {
4721     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4722     marshal_extension_struct(vkStream, forMarshaling->pNext);
4723     vkStream->write((VkBool32*)&forMarshaling->protectedMemory, sizeof(VkBool32));
4724 }
4725 
unmarshal_VkPhysicalDeviceProtectedMemoryFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceProtectedMemoryFeatures * forUnmarshaling)4726 void unmarshal_VkPhysicalDeviceProtectedMemoryFeatures(
4727     VulkanStreamGuest* vkStream,
4728     VkPhysicalDeviceProtectedMemoryFeatures* forUnmarshaling)
4729 {
4730     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4731     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4732     vkStream->read((VkBool32*)&forUnmarshaling->protectedMemory, sizeof(VkBool32));
4733 }
4734 
marshal_VkPhysicalDeviceProtectedMemoryProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceProtectedMemoryProperties * forMarshaling)4735 void marshal_VkPhysicalDeviceProtectedMemoryProperties(
4736     VulkanStreamGuest* vkStream,
4737     const VkPhysicalDeviceProtectedMemoryProperties* forMarshaling)
4738 {
4739     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4740     marshal_extension_struct(vkStream, forMarshaling->pNext);
4741     vkStream->write((VkBool32*)&forMarshaling->protectedNoFault, sizeof(VkBool32));
4742 }
4743 
unmarshal_VkPhysicalDeviceProtectedMemoryProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceProtectedMemoryProperties * forUnmarshaling)4744 void unmarshal_VkPhysicalDeviceProtectedMemoryProperties(
4745     VulkanStreamGuest* vkStream,
4746     VkPhysicalDeviceProtectedMemoryProperties* forUnmarshaling)
4747 {
4748     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4749     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4750     vkStream->read((VkBool32*)&forUnmarshaling->protectedNoFault, sizeof(VkBool32));
4751 }
4752 
marshal_VkDeviceQueueInfo2(VulkanStreamGuest * vkStream,const VkDeviceQueueInfo2 * forMarshaling)4753 void marshal_VkDeviceQueueInfo2(
4754     VulkanStreamGuest* vkStream,
4755     const VkDeviceQueueInfo2* forMarshaling)
4756 {
4757     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4758     marshal_extension_struct(vkStream, forMarshaling->pNext);
4759     vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
4760     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
4761     vkStream->write((uint32_t*)&forMarshaling->queueIndex, sizeof(uint32_t));
4762 }
4763 
unmarshal_VkDeviceQueueInfo2(VulkanStreamGuest * vkStream,VkDeviceQueueInfo2 * forUnmarshaling)4764 void unmarshal_VkDeviceQueueInfo2(
4765     VulkanStreamGuest* vkStream,
4766     VkDeviceQueueInfo2* forUnmarshaling)
4767 {
4768     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4769     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4770     vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
4771     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
4772     vkStream->read((uint32_t*)&forUnmarshaling->queueIndex, sizeof(uint32_t));
4773 }
4774 
marshal_VkProtectedSubmitInfo(VulkanStreamGuest * vkStream,const VkProtectedSubmitInfo * forMarshaling)4775 void marshal_VkProtectedSubmitInfo(
4776     VulkanStreamGuest* vkStream,
4777     const VkProtectedSubmitInfo* forMarshaling)
4778 {
4779     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4780     marshal_extension_struct(vkStream, forMarshaling->pNext);
4781     vkStream->write((VkBool32*)&forMarshaling->protectedSubmit, sizeof(VkBool32));
4782 }
4783 
unmarshal_VkProtectedSubmitInfo(VulkanStreamGuest * vkStream,VkProtectedSubmitInfo * forUnmarshaling)4784 void unmarshal_VkProtectedSubmitInfo(
4785     VulkanStreamGuest* vkStream,
4786     VkProtectedSubmitInfo* forUnmarshaling)
4787 {
4788     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4789     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4790     vkStream->read((VkBool32*)&forUnmarshaling->protectedSubmit, sizeof(VkBool32));
4791 }
4792 
marshal_VkSamplerYcbcrConversionCreateInfo(VulkanStreamGuest * vkStream,const VkSamplerYcbcrConversionCreateInfo * forMarshaling)4793 void marshal_VkSamplerYcbcrConversionCreateInfo(
4794     VulkanStreamGuest* vkStream,
4795     const VkSamplerYcbcrConversionCreateInfo* forMarshaling)
4796 {
4797     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4798     marshal_extension_struct(vkStream, forMarshaling->pNext);
4799     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
4800     vkStream->write((VkSamplerYcbcrModelConversion*)&forMarshaling->ycbcrModel, sizeof(VkSamplerYcbcrModelConversion));
4801     vkStream->write((VkSamplerYcbcrRange*)&forMarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange));
4802     marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->components));
4803     vkStream->write((VkChromaLocation*)&forMarshaling->xChromaOffset, sizeof(VkChromaLocation));
4804     vkStream->write((VkChromaLocation*)&forMarshaling->yChromaOffset, sizeof(VkChromaLocation));
4805     vkStream->write((VkFilter*)&forMarshaling->chromaFilter, sizeof(VkFilter));
4806     vkStream->write((VkBool32*)&forMarshaling->forceExplicitReconstruction, sizeof(VkBool32));
4807 }
4808 
unmarshal_VkSamplerYcbcrConversionCreateInfo(VulkanStreamGuest * vkStream,VkSamplerYcbcrConversionCreateInfo * forUnmarshaling)4809 void unmarshal_VkSamplerYcbcrConversionCreateInfo(
4810     VulkanStreamGuest* vkStream,
4811     VkSamplerYcbcrConversionCreateInfo* forUnmarshaling)
4812 {
4813     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4814     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4815     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
4816     vkStream->read((VkSamplerYcbcrModelConversion*)&forUnmarshaling->ycbcrModel, sizeof(VkSamplerYcbcrModelConversion));
4817     vkStream->read((VkSamplerYcbcrRange*)&forUnmarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange));
4818     unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->components));
4819     vkStream->read((VkChromaLocation*)&forUnmarshaling->xChromaOffset, sizeof(VkChromaLocation));
4820     vkStream->read((VkChromaLocation*)&forUnmarshaling->yChromaOffset, sizeof(VkChromaLocation));
4821     vkStream->read((VkFilter*)&forUnmarshaling->chromaFilter, sizeof(VkFilter));
4822     vkStream->read((VkBool32*)&forUnmarshaling->forceExplicitReconstruction, sizeof(VkBool32));
4823 }
4824 
marshal_VkSamplerYcbcrConversionInfo(VulkanStreamGuest * vkStream,const VkSamplerYcbcrConversionInfo * forMarshaling)4825 void marshal_VkSamplerYcbcrConversionInfo(
4826     VulkanStreamGuest* vkStream,
4827     const VkSamplerYcbcrConversionInfo* forMarshaling)
4828 {
4829     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4830     marshal_extension_struct(vkStream, forMarshaling->pNext);
4831     uint64_t cgen_var_178;
4832     vkStream->handleMapping()->mapHandles_VkSamplerYcbcrConversion_u64(&forMarshaling->conversion, &cgen_var_178, 1);
4833     vkStream->write((uint64_t*)&cgen_var_178, 1 * 8);
4834 }
4835 
unmarshal_VkSamplerYcbcrConversionInfo(VulkanStreamGuest * vkStream,VkSamplerYcbcrConversionInfo * forUnmarshaling)4836 void unmarshal_VkSamplerYcbcrConversionInfo(
4837     VulkanStreamGuest* vkStream,
4838     VkSamplerYcbcrConversionInfo* forUnmarshaling)
4839 {
4840     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4841     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4842     uint64_t cgen_var_179;
4843     vkStream->read((uint64_t*)&cgen_var_179, 1 * 8);
4844     vkStream->handleMapping()->mapHandles_u64_VkSamplerYcbcrConversion(&cgen_var_179, (VkSamplerYcbcrConversion*)&forUnmarshaling->conversion, 1);
4845 }
4846 
marshal_VkBindImagePlaneMemoryInfo(VulkanStreamGuest * vkStream,const VkBindImagePlaneMemoryInfo * forMarshaling)4847 void marshal_VkBindImagePlaneMemoryInfo(
4848     VulkanStreamGuest* vkStream,
4849     const VkBindImagePlaneMemoryInfo* forMarshaling)
4850 {
4851     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4852     marshal_extension_struct(vkStream, forMarshaling->pNext);
4853     vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect, sizeof(VkImageAspectFlagBits));
4854 }
4855 
unmarshal_VkBindImagePlaneMemoryInfo(VulkanStreamGuest * vkStream,VkBindImagePlaneMemoryInfo * forUnmarshaling)4856 void unmarshal_VkBindImagePlaneMemoryInfo(
4857     VulkanStreamGuest* vkStream,
4858     VkBindImagePlaneMemoryInfo* forUnmarshaling)
4859 {
4860     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4861     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4862     vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect, sizeof(VkImageAspectFlagBits));
4863 }
4864 
marshal_VkImagePlaneMemoryRequirementsInfo(VulkanStreamGuest * vkStream,const VkImagePlaneMemoryRequirementsInfo * forMarshaling)4865 void marshal_VkImagePlaneMemoryRequirementsInfo(
4866     VulkanStreamGuest* vkStream,
4867     const VkImagePlaneMemoryRequirementsInfo* forMarshaling)
4868 {
4869     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4870     marshal_extension_struct(vkStream, forMarshaling->pNext);
4871     vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect, sizeof(VkImageAspectFlagBits));
4872 }
4873 
unmarshal_VkImagePlaneMemoryRequirementsInfo(VulkanStreamGuest * vkStream,VkImagePlaneMemoryRequirementsInfo * forUnmarshaling)4874 void unmarshal_VkImagePlaneMemoryRequirementsInfo(
4875     VulkanStreamGuest* vkStream,
4876     VkImagePlaneMemoryRequirementsInfo* forUnmarshaling)
4877 {
4878     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4879     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4880     vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect, sizeof(VkImageAspectFlagBits));
4881 }
4882 
marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSamplerYcbcrConversionFeatures * forMarshaling)4883 void marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
4884     VulkanStreamGuest* vkStream,
4885     const VkPhysicalDeviceSamplerYcbcrConversionFeatures* forMarshaling)
4886 {
4887     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4888     marshal_extension_struct(vkStream, forMarshaling->pNext);
4889     vkStream->write((VkBool32*)&forMarshaling->samplerYcbcrConversion, sizeof(VkBool32));
4890 }
4891 
unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceSamplerYcbcrConversionFeatures * forUnmarshaling)4892 void unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
4893     VulkanStreamGuest* vkStream,
4894     VkPhysicalDeviceSamplerYcbcrConversionFeatures* forUnmarshaling)
4895 {
4896     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4897     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4898     vkStream->read((VkBool32*)&forUnmarshaling->samplerYcbcrConversion, sizeof(VkBool32));
4899 }
4900 
marshal_VkSamplerYcbcrConversionImageFormatProperties(VulkanStreamGuest * vkStream,const VkSamplerYcbcrConversionImageFormatProperties * forMarshaling)4901 void marshal_VkSamplerYcbcrConversionImageFormatProperties(
4902     VulkanStreamGuest* vkStream,
4903     const VkSamplerYcbcrConversionImageFormatProperties* forMarshaling)
4904 {
4905     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4906     marshal_extension_struct(vkStream, forMarshaling->pNext);
4907     vkStream->write((uint32_t*)&forMarshaling->combinedImageSamplerDescriptorCount, sizeof(uint32_t));
4908 }
4909 
unmarshal_VkSamplerYcbcrConversionImageFormatProperties(VulkanStreamGuest * vkStream,VkSamplerYcbcrConversionImageFormatProperties * forUnmarshaling)4910 void unmarshal_VkSamplerYcbcrConversionImageFormatProperties(
4911     VulkanStreamGuest* vkStream,
4912     VkSamplerYcbcrConversionImageFormatProperties* forUnmarshaling)
4913 {
4914     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4915     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4916     vkStream->read((uint32_t*)&forUnmarshaling->combinedImageSamplerDescriptorCount, sizeof(uint32_t));
4917 }
4918 
marshal_VkDescriptorUpdateTemplateEntry(VulkanStreamGuest * vkStream,const VkDescriptorUpdateTemplateEntry * forMarshaling)4919 void marshal_VkDescriptorUpdateTemplateEntry(
4920     VulkanStreamGuest* vkStream,
4921     const VkDescriptorUpdateTemplateEntry* forMarshaling)
4922 {
4923     vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
4924     vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
4925     vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
4926     vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
4927     uint64_t cgen_var_180 = (uint64_t)forMarshaling->offset;
4928     vkStream->putBe64(cgen_var_180);
4929     uint64_t cgen_var_181 = (uint64_t)forMarshaling->stride;
4930     vkStream->putBe64(cgen_var_181);
4931 }
4932 
unmarshal_VkDescriptorUpdateTemplateEntry(VulkanStreamGuest * vkStream,VkDescriptorUpdateTemplateEntry * forUnmarshaling)4933 void unmarshal_VkDescriptorUpdateTemplateEntry(
4934     VulkanStreamGuest* vkStream,
4935     VkDescriptorUpdateTemplateEntry* forUnmarshaling)
4936 {
4937     vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
4938     vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
4939     vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
4940     vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
4941     forUnmarshaling->offset = (size_t)vkStream->getBe64();
4942     forUnmarshaling->stride = (size_t)vkStream->getBe64();
4943 }
4944 
marshal_VkDescriptorUpdateTemplateCreateInfo(VulkanStreamGuest * vkStream,const VkDescriptorUpdateTemplateCreateInfo * forMarshaling)4945 void marshal_VkDescriptorUpdateTemplateCreateInfo(
4946     VulkanStreamGuest* vkStream,
4947     const VkDescriptorUpdateTemplateCreateInfo* forMarshaling)
4948 {
4949     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
4950     marshal_extension_struct(vkStream, forMarshaling->pNext);
4951     vkStream->write((VkDescriptorUpdateTemplateCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorUpdateTemplateCreateFlags));
4952     vkStream->write((uint32_t*)&forMarshaling->descriptorUpdateEntryCount, sizeof(uint32_t));
4953     for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorUpdateEntryCount; ++i)
4954     {
4955         marshal_VkDescriptorUpdateTemplateEntry(vkStream, (const VkDescriptorUpdateTemplateEntry*)(forMarshaling->pDescriptorUpdateEntries + i));
4956     }
4957     vkStream->write((VkDescriptorUpdateTemplateType*)&forMarshaling->templateType, sizeof(VkDescriptorUpdateTemplateType));
4958     uint64_t cgen_var_184;
4959     vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(&forMarshaling->descriptorSetLayout, &cgen_var_184, 1);
4960     vkStream->write((uint64_t*)&cgen_var_184, 1 * 8);
4961     vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
4962     uint64_t cgen_var_185;
4963     vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_185, 1);
4964     vkStream->write((uint64_t*)&cgen_var_185, 1 * 8);
4965     vkStream->write((uint32_t*)&forMarshaling->set, sizeof(uint32_t));
4966 }
4967 
unmarshal_VkDescriptorUpdateTemplateCreateInfo(VulkanStreamGuest * vkStream,VkDescriptorUpdateTemplateCreateInfo * forUnmarshaling)4968 void unmarshal_VkDescriptorUpdateTemplateCreateInfo(
4969     VulkanStreamGuest* vkStream,
4970     VkDescriptorUpdateTemplateCreateInfo* forUnmarshaling)
4971 {
4972     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
4973     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
4974     vkStream->read((VkDescriptorUpdateTemplateCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorUpdateTemplateCreateFlags));
4975     vkStream->read((uint32_t*)&forUnmarshaling->descriptorUpdateEntryCount, sizeof(uint32_t));
4976     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorUpdateEntryCount; ++i)
4977     {
4978         unmarshal_VkDescriptorUpdateTemplateEntry(vkStream, (VkDescriptorUpdateTemplateEntry*)(forUnmarshaling->pDescriptorUpdateEntries + i));
4979     }
4980     vkStream->read((VkDescriptorUpdateTemplateType*)&forUnmarshaling->templateType, sizeof(VkDescriptorUpdateTemplateType));
4981     uint64_t cgen_var_186;
4982     vkStream->read((uint64_t*)&cgen_var_186, 1 * 8);
4983     vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(&cgen_var_186, (VkDescriptorSetLayout*)&forUnmarshaling->descriptorSetLayout, 1);
4984     vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
4985     uint64_t cgen_var_187;
4986     vkStream->read((uint64_t*)&cgen_var_187, 1 * 8);
4987     vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_187, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1);
4988     vkStream->read((uint32_t*)&forUnmarshaling->set, sizeof(uint32_t));
4989 }
4990 
marshal_VkExternalMemoryProperties(VulkanStreamGuest * vkStream,const VkExternalMemoryProperties * forMarshaling)4991 void marshal_VkExternalMemoryProperties(
4992     VulkanStreamGuest* vkStream,
4993     const VkExternalMemoryProperties* forMarshaling)
4994 {
4995     vkStream->write((VkExternalMemoryFeatureFlags*)&forMarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlags));
4996     vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
4997     vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
4998 }
4999 
unmarshal_VkExternalMemoryProperties(VulkanStreamGuest * vkStream,VkExternalMemoryProperties * forUnmarshaling)5000 void unmarshal_VkExternalMemoryProperties(
5001     VulkanStreamGuest* vkStream,
5002     VkExternalMemoryProperties* forUnmarshaling)
5003 {
5004     vkStream->read((VkExternalMemoryFeatureFlags*)&forUnmarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlags));
5005     vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5006     vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5007 }
5008 
marshal_VkPhysicalDeviceExternalImageFormatInfo(VulkanStreamGuest * vkStream,const VkPhysicalDeviceExternalImageFormatInfo * forMarshaling)5009 void marshal_VkPhysicalDeviceExternalImageFormatInfo(
5010     VulkanStreamGuest* vkStream,
5011     const VkPhysicalDeviceExternalImageFormatInfo* forMarshaling)
5012 {
5013     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5014     marshal_extension_struct(vkStream, forMarshaling->pNext);
5015     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
5016 }
5017 
unmarshal_VkPhysicalDeviceExternalImageFormatInfo(VulkanStreamGuest * vkStream,VkPhysicalDeviceExternalImageFormatInfo * forUnmarshaling)5018 void unmarshal_VkPhysicalDeviceExternalImageFormatInfo(
5019     VulkanStreamGuest* vkStream,
5020     VkPhysicalDeviceExternalImageFormatInfo* forUnmarshaling)
5021 {
5022     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5023     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5024     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
5025 }
5026 
marshal_VkExternalImageFormatProperties(VulkanStreamGuest * vkStream,const VkExternalImageFormatProperties * forMarshaling)5027 void marshal_VkExternalImageFormatProperties(
5028     VulkanStreamGuest* vkStream,
5029     const VkExternalImageFormatProperties* forMarshaling)
5030 {
5031     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5032     marshal_extension_struct(vkStream, forMarshaling->pNext);
5033     marshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties));
5034 }
5035 
unmarshal_VkExternalImageFormatProperties(VulkanStreamGuest * vkStream,VkExternalImageFormatProperties * forUnmarshaling)5036 void unmarshal_VkExternalImageFormatProperties(
5037     VulkanStreamGuest* vkStream,
5038     VkExternalImageFormatProperties* forUnmarshaling)
5039 {
5040     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5041     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5042     unmarshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties));
5043 }
5044 
marshal_VkPhysicalDeviceExternalBufferInfo(VulkanStreamGuest * vkStream,const VkPhysicalDeviceExternalBufferInfo * forMarshaling)5045 void marshal_VkPhysicalDeviceExternalBufferInfo(
5046     VulkanStreamGuest* vkStream,
5047     const VkPhysicalDeviceExternalBufferInfo* forMarshaling)
5048 {
5049     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5050     marshal_extension_struct(vkStream, forMarshaling->pNext);
5051     vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags));
5052     vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags));
5053     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
5054 }
5055 
unmarshal_VkPhysicalDeviceExternalBufferInfo(VulkanStreamGuest * vkStream,VkPhysicalDeviceExternalBufferInfo * forUnmarshaling)5056 void unmarshal_VkPhysicalDeviceExternalBufferInfo(
5057     VulkanStreamGuest* vkStream,
5058     VkPhysicalDeviceExternalBufferInfo* forUnmarshaling)
5059 {
5060     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5061     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5062     vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags));
5063     vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags));
5064     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
5065 }
5066 
marshal_VkExternalBufferProperties(VulkanStreamGuest * vkStream,const VkExternalBufferProperties * forMarshaling)5067 void marshal_VkExternalBufferProperties(
5068     VulkanStreamGuest* vkStream,
5069     const VkExternalBufferProperties* forMarshaling)
5070 {
5071     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5072     marshal_extension_struct(vkStream, forMarshaling->pNext);
5073     marshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties));
5074 }
5075 
unmarshal_VkExternalBufferProperties(VulkanStreamGuest * vkStream,VkExternalBufferProperties * forUnmarshaling)5076 void unmarshal_VkExternalBufferProperties(
5077     VulkanStreamGuest* vkStream,
5078     VkExternalBufferProperties* forUnmarshaling)
5079 {
5080     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5081     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5082     unmarshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties));
5083 }
5084 
marshal_VkPhysicalDeviceIDProperties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceIDProperties * forMarshaling)5085 void marshal_VkPhysicalDeviceIDProperties(
5086     VulkanStreamGuest* vkStream,
5087     const VkPhysicalDeviceIDProperties* forMarshaling)
5088 {
5089     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5090     marshal_extension_struct(vkStream, forMarshaling->pNext);
5091     vkStream->write((uint8_t*)forMarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
5092     vkStream->write((uint8_t*)forMarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
5093     vkStream->write((uint8_t*)forMarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
5094     vkStream->write((uint32_t*)&forMarshaling->deviceNodeMask, sizeof(uint32_t));
5095     vkStream->write((VkBool32*)&forMarshaling->deviceLUIDValid, sizeof(VkBool32));
5096 }
5097 
unmarshal_VkPhysicalDeviceIDProperties(VulkanStreamGuest * vkStream,VkPhysicalDeviceIDProperties * forUnmarshaling)5098 void unmarshal_VkPhysicalDeviceIDProperties(
5099     VulkanStreamGuest* vkStream,
5100     VkPhysicalDeviceIDProperties* forUnmarshaling)
5101 {
5102     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5103     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5104     vkStream->read((uint8_t*)forUnmarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
5105     vkStream->read((uint8_t*)forUnmarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
5106     vkStream->read((uint8_t*)forUnmarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
5107     vkStream->read((uint32_t*)&forUnmarshaling->deviceNodeMask, sizeof(uint32_t));
5108     vkStream->read((VkBool32*)&forUnmarshaling->deviceLUIDValid, sizeof(VkBool32));
5109 }
5110 
marshal_VkExternalMemoryImageCreateInfo(VulkanStreamGuest * vkStream,const VkExternalMemoryImageCreateInfo * forMarshaling)5111 void marshal_VkExternalMemoryImageCreateInfo(
5112     VulkanStreamGuest* vkStream,
5113     const VkExternalMemoryImageCreateInfo* forMarshaling)
5114 {
5115     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5116     marshal_extension_struct(vkStream, forMarshaling->pNext);
5117     vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5118 }
5119 
unmarshal_VkExternalMemoryImageCreateInfo(VulkanStreamGuest * vkStream,VkExternalMemoryImageCreateInfo * forUnmarshaling)5120 void unmarshal_VkExternalMemoryImageCreateInfo(
5121     VulkanStreamGuest* vkStream,
5122     VkExternalMemoryImageCreateInfo* forUnmarshaling)
5123 {
5124     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5125     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5126     vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5127 }
5128 
marshal_VkExternalMemoryBufferCreateInfo(VulkanStreamGuest * vkStream,const VkExternalMemoryBufferCreateInfo * forMarshaling)5129 void marshal_VkExternalMemoryBufferCreateInfo(
5130     VulkanStreamGuest* vkStream,
5131     const VkExternalMemoryBufferCreateInfo* forMarshaling)
5132 {
5133     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5134     marshal_extension_struct(vkStream, forMarshaling->pNext);
5135     vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5136 }
5137 
unmarshal_VkExternalMemoryBufferCreateInfo(VulkanStreamGuest * vkStream,VkExternalMemoryBufferCreateInfo * forUnmarshaling)5138 void unmarshal_VkExternalMemoryBufferCreateInfo(
5139     VulkanStreamGuest* vkStream,
5140     VkExternalMemoryBufferCreateInfo* forUnmarshaling)
5141 {
5142     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5143     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5144     vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5145 }
5146 
marshal_VkExportMemoryAllocateInfo(VulkanStreamGuest * vkStream,const VkExportMemoryAllocateInfo * forMarshaling)5147 void marshal_VkExportMemoryAllocateInfo(
5148     VulkanStreamGuest* vkStream,
5149     const VkExportMemoryAllocateInfo* forMarshaling)
5150 {
5151     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5152     marshal_extension_struct(vkStream, forMarshaling->pNext);
5153     vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5154 }
5155 
unmarshal_VkExportMemoryAllocateInfo(VulkanStreamGuest * vkStream,VkExportMemoryAllocateInfo * forUnmarshaling)5156 void unmarshal_VkExportMemoryAllocateInfo(
5157     VulkanStreamGuest* vkStream,
5158     VkExportMemoryAllocateInfo* forUnmarshaling)
5159 {
5160     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5161     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5162     vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags));
5163 }
5164 
marshal_VkPhysicalDeviceExternalFenceInfo(VulkanStreamGuest * vkStream,const VkPhysicalDeviceExternalFenceInfo * forMarshaling)5165 void marshal_VkPhysicalDeviceExternalFenceInfo(
5166     VulkanStreamGuest* vkStream,
5167     const VkPhysicalDeviceExternalFenceInfo* forMarshaling)
5168 {
5169     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5170     marshal_extension_struct(vkStream, forMarshaling->pNext);
5171     vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
5172 }
5173 
unmarshal_VkPhysicalDeviceExternalFenceInfo(VulkanStreamGuest * vkStream,VkPhysicalDeviceExternalFenceInfo * forUnmarshaling)5174 void unmarshal_VkPhysicalDeviceExternalFenceInfo(
5175     VulkanStreamGuest* vkStream,
5176     VkPhysicalDeviceExternalFenceInfo* forUnmarshaling)
5177 {
5178     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5179     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5180     vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
5181 }
5182 
marshal_VkExternalFenceProperties(VulkanStreamGuest * vkStream,const VkExternalFenceProperties * forMarshaling)5183 void marshal_VkExternalFenceProperties(
5184     VulkanStreamGuest* vkStream,
5185     const VkExternalFenceProperties* forMarshaling)
5186 {
5187     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5188     marshal_extension_struct(vkStream, forMarshaling->pNext);
5189     vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5190     vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5191     vkStream->write((VkExternalFenceFeatureFlags*)&forMarshaling->externalFenceFeatures, sizeof(VkExternalFenceFeatureFlags));
5192 }
5193 
unmarshal_VkExternalFenceProperties(VulkanStreamGuest * vkStream,VkExternalFenceProperties * forUnmarshaling)5194 void unmarshal_VkExternalFenceProperties(
5195     VulkanStreamGuest* vkStream,
5196     VkExternalFenceProperties* forUnmarshaling)
5197 {
5198     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5199     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5200     vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5201     vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5202     vkStream->read((VkExternalFenceFeatureFlags*)&forUnmarshaling->externalFenceFeatures, sizeof(VkExternalFenceFeatureFlags));
5203 }
5204 
marshal_VkExportFenceCreateInfo(VulkanStreamGuest * vkStream,const VkExportFenceCreateInfo * forMarshaling)5205 void marshal_VkExportFenceCreateInfo(
5206     VulkanStreamGuest* vkStream,
5207     const VkExportFenceCreateInfo* forMarshaling)
5208 {
5209     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5210     marshal_extension_struct(vkStream, forMarshaling->pNext);
5211     vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5212 }
5213 
unmarshal_VkExportFenceCreateInfo(VulkanStreamGuest * vkStream,VkExportFenceCreateInfo * forUnmarshaling)5214 void unmarshal_VkExportFenceCreateInfo(
5215     VulkanStreamGuest* vkStream,
5216     VkExportFenceCreateInfo* forUnmarshaling)
5217 {
5218     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5219     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5220     vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalFenceHandleTypeFlags));
5221 }
5222 
marshal_VkExportSemaphoreCreateInfo(VulkanStreamGuest * vkStream,const VkExportSemaphoreCreateInfo * forMarshaling)5223 void marshal_VkExportSemaphoreCreateInfo(
5224     VulkanStreamGuest* vkStream,
5225     const VkExportSemaphoreCreateInfo* forMarshaling)
5226 {
5227     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5228     marshal_extension_struct(vkStream, forMarshaling->pNext);
5229     vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5230 }
5231 
unmarshal_VkExportSemaphoreCreateInfo(VulkanStreamGuest * vkStream,VkExportSemaphoreCreateInfo * forUnmarshaling)5232 void unmarshal_VkExportSemaphoreCreateInfo(
5233     VulkanStreamGuest* vkStream,
5234     VkExportSemaphoreCreateInfo* forUnmarshaling)
5235 {
5236     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5237     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5238     vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5239 }
5240 
marshal_VkPhysicalDeviceExternalSemaphoreInfo(VulkanStreamGuest * vkStream,const VkPhysicalDeviceExternalSemaphoreInfo * forMarshaling)5241 void marshal_VkPhysicalDeviceExternalSemaphoreInfo(
5242     VulkanStreamGuest* vkStream,
5243     const VkPhysicalDeviceExternalSemaphoreInfo* forMarshaling)
5244 {
5245     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5246     marshal_extension_struct(vkStream, forMarshaling->pNext);
5247     vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
5248 }
5249 
unmarshal_VkPhysicalDeviceExternalSemaphoreInfo(VulkanStreamGuest * vkStream,VkPhysicalDeviceExternalSemaphoreInfo * forUnmarshaling)5250 void unmarshal_VkPhysicalDeviceExternalSemaphoreInfo(
5251     VulkanStreamGuest* vkStream,
5252     VkPhysicalDeviceExternalSemaphoreInfo* forUnmarshaling)
5253 {
5254     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5255     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5256     vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
5257 }
5258 
marshal_VkExternalSemaphoreProperties(VulkanStreamGuest * vkStream,const VkExternalSemaphoreProperties * forMarshaling)5259 void marshal_VkExternalSemaphoreProperties(
5260     VulkanStreamGuest* vkStream,
5261     const VkExternalSemaphoreProperties* forMarshaling)
5262 {
5263     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5264     marshal_extension_struct(vkStream, forMarshaling->pNext);
5265     vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5266     vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5267     vkStream->write((VkExternalSemaphoreFeatureFlags*)&forMarshaling->externalSemaphoreFeatures, sizeof(VkExternalSemaphoreFeatureFlags));
5268 }
5269 
unmarshal_VkExternalSemaphoreProperties(VulkanStreamGuest * vkStream,VkExternalSemaphoreProperties * forUnmarshaling)5270 void unmarshal_VkExternalSemaphoreProperties(
5271     VulkanStreamGuest* vkStream,
5272     VkExternalSemaphoreProperties* forUnmarshaling)
5273 {
5274     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5275     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5276     vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5277     vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags));
5278     vkStream->read((VkExternalSemaphoreFeatureFlags*)&forUnmarshaling->externalSemaphoreFeatures, sizeof(VkExternalSemaphoreFeatureFlags));
5279 }
5280 
marshal_VkPhysicalDeviceMaintenance3Properties(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMaintenance3Properties * forMarshaling)5281 void marshal_VkPhysicalDeviceMaintenance3Properties(
5282     VulkanStreamGuest* vkStream,
5283     const VkPhysicalDeviceMaintenance3Properties* forMarshaling)
5284 {
5285     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5286     marshal_extension_struct(vkStream, forMarshaling->pNext);
5287     vkStream->write((uint32_t*)&forMarshaling->maxPerSetDescriptors, sizeof(uint32_t));
5288     vkStream->write((VkDeviceSize*)&forMarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
5289 }
5290 
unmarshal_VkPhysicalDeviceMaintenance3Properties(VulkanStreamGuest * vkStream,VkPhysicalDeviceMaintenance3Properties * forUnmarshaling)5291 void unmarshal_VkPhysicalDeviceMaintenance3Properties(
5292     VulkanStreamGuest* vkStream,
5293     VkPhysicalDeviceMaintenance3Properties* forUnmarshaling)
5294 {
5295     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5296     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5297     vkStream->read((uint32_t*)&forUnmarshaling->maxPerSetDescriptors, sizeof(uint32_t));
5298     vkStream->read((VkDeviceSize*)&forUnmarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
5299 }
5300 
marshal_VkDescriptorSetLayoutSupport(VulkanStreamGuest * vkStream,const VkDescriptorSetLayoutSupport * forMarshaling)5301 void marshal_VkDescriptorSetLayoutSupport(
5302     VulkanStreamGuest* vkStream,
5303     const VkDescriptorSetLayoutSupport* forMarshaling)
5304 {
5305     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5306     marshal_extension_struct(vkStream, forMarshaling->pNext);
5307     vkStream->write((VkBool32*)&forMarshaling->supported, sizeof(VkBool32));
5308 }
5309 
unmarshal_VkDescriptorSetLayoutSupport(VulkanStreamGuest * vkStream,VkDescriptorSetLayoutSupport * forUnmarshaling)5310 void unmarshal_VkDescriptorSetLayoutSupport(
5311     VulkanStreamGuest* vkStream,
5312     VkDescriptorSetLayoutSupport* forUnmarshaling)
5313 {
5314     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5315     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5316     vkStream->read((VkBool32*)&forUnmarshaling->supported, sizeof(VkBool32));
5317 }
5318 
marshal_VkPhysicalDeviceShaderDrawParameterFeatures(VulkanStreamGuest * vkStream,const VkPhysicalDeviceShaderDrawParameterFeatures * forMarshaling)5319 void marshal_VkPhysicalDeviceShaderDrawParameterFeatures(
5320     VulkanStreamGuest* vkStream,
5321     const VkPhysicalDeviceShaderDrawParameterFeatures* forMarshaling)
5322 {
5323     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5324     marshal_extension_struct(vkStream, forMarshaling->pNext);
5325     vkStream->write((VkBool32*)&forMarshaling->shaderDrawParameters, sizeof(VkBool32));
5326 }
5327 
unmarshal_VkPhysicalDeviceShaderDrawParameterFeatures(VulkanStreamGuest * vkStream,VkPhysicalDeviceShaderDrawParameterFeatures * forUnmarshaling)5328 void unmarshal_VkPhysicalDeviceShaderDrawParameterFeatures(
5329     VulkanStreamGuest* vkStream,
5330     VkPhysicalDeviceShaderDrawParameterFeatures* forUnmarshaling)
5331 {
5332     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5333     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5334     vkStream->read((VkBool32*)&forUnmarshaling->shaderDrawParameters, sizeof(VkBool32));
5335 }
5336 
5337 #endif
5338 #ifdef VK_KHR_surface
marshal_VkSurfaceCapabilitiesKHR(VulkanStreamGuest * vkStream,const VkSurfaceCapabilitiesKHR * forMarshaling)5339 void marshal_VkSurfaceCapabilitiesKHR(
5340     VulkanStreamGuest* vkStream,
5341     const VkSurfaceCapabilitiesKHR* forMarshaling)
5342 {
5343     vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t));
5344     vkStream->write((uint32_t*)&forMarshaling->maxImageCount, sizeof(uint32_t));
5345     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->currentExtent));
5346     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minImageExtent));
5347     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxImageExtent));
5348     vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t));
5349     vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
5350     vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
5351     vkStream->write((VkCompositeAlphaFlagsKHR*)&forMarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR));
5352     vkStream->write((VkImageUsageFlags*)&forMarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags));
5353 }
5354 
unmarshal_VkSurfaceCapabilitiesKHR(VulkanStreamGuest * vkStream,VkSurfaceCapabilitiesKHR * forUnmarshaling)5355 void unmarshal_VkSurfaceCapabilitiesKHR(
5356     VulkanStreamGuest* vkStream,
5357     VkSurfaceCapabilitiesKHR* forUnmarshaling)
5358 {
5359     vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t));
5360     vkStream->read((uint32_t*)&forUnmarshaling->maxImageCount, sizeof(uint32_t));
5361     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->currentExtent));
5362     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minImageExtent));
5363     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxImageExtent));
5364     vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t));
5365     vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
5366     vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
5367     vkStream->read((VkCompositeAlphaFlagsKHR*)&forUnmarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR));
5368     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags));
5369 }
5370 
marshal_VkSurfaceFormatKHR(VulkanStreamGuest * vkStream,const VkSurfaceFormatKHR * forMarshaling)5371 void marshal_VkSurfaceFormatKHR(
5372     VulkanStreamGuest* vkStream,
5373     const VkSurfaceFormatKHR* forMarshaling)
5374 {
5375     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
5376     vkStream->write((VkColorSpaceKHR*)&forMarshaling->colorSpace, sizeof(VkColorSpaceKHR));
5377 }
5378 
unmarshal_VkSurfaceFormatKHR(VulkanStreamGuest * vkStream,VkSurfaceFormatKHR * forUnmarshaling)5379 void unmarshal_VkSurfaceFormatKHR(
5380     VulkanStreamGuest* vkStream,
5381     VkSurfaceFormatKHR* forUnmarshaling)
5382 {
5383     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
5384     vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->colorSpace, sizeof(VkColorSpaceKHR));
5385 }
5386 
5387 #endif
5388 #ifdef VK_KHR_swapchain
marshal_VkSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,const VkSwapchainCreateInfoKHR * forMarshaling)5389 void marshal_VkSwapchainCreateInfoKHR(
5390     VulkanStreamGuest* vkStream,
5391     const VkSwapchainCreateInfoKHR* forMarshaling)
5392 {
5393     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5394     marshal_extension_struct(vkStream, forMarshaling->pNext);
5395     vkStream->write((VkSwapchainCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkSwapchainCreateFlagsKHR));
5396     uint64_t cgen_var_188;
5397     vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_188, 1);
5398     vkStream->write((uint64_t*)&cgen_var_188, 1 * 8);
5399     vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t));
5400     vkStream->write((VkFormat*)&forMarshaling->imageFormat, sizeof(VkFormat));
5401     vkStream->write((VkColorSpaceKHR*)&forMarshaling->imageColorSpace, sizeof(VkColorSpaceKHR));
5402     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->imageExtent));
5403     vkStream->write((uint32_t*)&forMarshaling->imageArrayLayers, sizeof(uint32_t));
5404     vkStream->write((VkImageUsageFlags*)&forMarshaling->imageUsage, sizeof(VkImageUsageFlags));
5405     vkStream->write((VkSharingMode*)&forMarshaling->imageSharingMode, sizeof(VkSharingMode));
5406     vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
5407     // WARNING PTR CHECK
5408     uint64_t cgen_var_189 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
5409     vkStream->putBe64(cgen_var_189);
5410     if (forMarshaling->pQueueFamilyIndices)
5411     {
5412         vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
5413     }
5414     vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->preTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
5415     vkStream->write((VkCompositeAlphaFlagBitsKHR*)&forMarshaling->compositeAlpha, sizeof(VkCompositeAlphaFlagBitsKHR));
5416     vkStream->write((VkPresentModeKHR*)&forMarshaling->presentMode, sizeof(VkPresentModeKHR));
5417     vkStream->write((VkBool32*)&forMarshaling->clipped, sizeof(VkBool32));
5418     uint64_t cgen_var_190;
5419     vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->oldSwapchain, &cgen_var_190, 1);
5420     vkStream->write((uint64_t*)&cgen_var_190, 1 * 8);
5421 }
5422 
unmarshal_VkSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,VkSwapchainCreateInfoKHR * forUnmarshaling)5423 void unmarshal_VkSwapchainCreateInfoKHR(
5424     VulkanStreamGuest* vkStream,
5425     VkSwapchainCreateInfoKHR* forUnmarshaling)
5426 {
5427     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5428     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5429     vkStream->read((VkSwapchainCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkSwapchainCreateFlagsKHR));
5430     uint64_t cgen_var_191;
5431     vkStream->read((uint64_t*)&cgen_var_191, 1 * 8);
5432     vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_191, (VkSurfaceKHR*)&forUnmarshaling->surface, 1);
5433     vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t));
5434     vkStream->read((VkFormat*)&forUnmarshaling->imageFormat, sizeof(VkFormat));
5435     vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->imageColorSpace, sizeof(VkColorSpaceKHR));
5436     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->imageExtent));
5437     vkStream->read((uint32_t*)&forUnmarshaling->imageArrayLayers, sizeof(uint32_t));
5438     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->imageUsage, sizeof(VkImageUsageFlags));
5439     vkStream->read((VkSharingMode*)&forUnmarshaling->imageSharingMode, sizeof(VkSharingMode));
5440     vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t));
5441     // WARNING PTR CHECK
5442     const uint32_t* check_pQueueFamilyIndices;
5443     check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64();
5444     if (forUnmarshaling->pQueueFamilyIndices)
5445     {
5446         if (!(check_pQueueFamilyIndices))
5447         {
5448             fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n");
5449         }
5450         vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
5451     }
5452     vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->preTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
5453     vkStream->read((VkCompositeAlphaFlagBitsKHR*)&forUnmarshaling->compositeAlpha, sizeof(VkCompositeAlphaFlagBitsKHR));
5454     vkStream->read((VkPresentModeKHR*)&forUnmarshaling->presentMode, sizeof(VkPresentModeKHR));
5455     vkStream->read((VkBool32*)&forUnmarshaling->clipped, sizeof(VkBool32));
5456     uint64_t cgen_var_193;
5457     vkStream->read((uint64_t*)&cgen_var_193, 1 * 8);
5458     vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_193, (VkSwapchainKHR*)&forUnmarshaling->oldSwapchain, 1);
5459 }
5460 
marshal_VkPresentInfoKHR(VulkanStreamGuest * vkStream,const VkPresentInfoKHR * forMarshaling)5461 void marshal_VkPresentInfoKHR(
5462     VulkanStreamGuest* vkStream,
5463     const VkPresentInfoKHR* forMarshaling)
5464 {
5465     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5466     marshal_extension_struct(vkStream, forMarshaling->pNext);
5467     vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
5468     if (forMarshaling->waitSemaphoreCount)
5469     {
5470         uint64_t* cgen_var_194;
5471         vkStream->alloc((void**)&cgen_var_194, forMarshaling->waitSemaphoreCount * 8);
5472         vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_194, forMarshaling->waitSemaphoreCount);
5473         vkStream->write((uint64_t*)cgen_var_194, forMarshaling->waitSemaphoreCount * 8);
5474     }
5475     vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
5476     if (forMarshaling->swapchainCount)
5477     {
5478         uint64_t* cgen_var_195;
5479         vkStream->alloc((void**)&cgen_var_195, forMarshaling->swapchainCount * 8);
5480         vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(forMarshaling->pSwapchains, cgen_var_195, forMarshaling->swapchainCount);
5481         vkStream->write((uint64_t*)cgen_var_195, forMarshaling->swapchainCount * 8);
5482     }
5483     vkStream->write((const uint32_t*)forMarshaling->pImageIndices, forMarshaling->swapchainCount * sizeof(const uint32_t));
5484     // WARNING PTR CHECK
5485     uint64_t cgen_var_196 = (uint64_t)(uintptr_t)forMarshaling->pResults;
5486     vkStream->putBe64(cgen_var_196);
5487     if (forMarshaling->pResults)
5488     {
5489         vkStream->write((VkResult*)forMarshaling->pResults, forMarshaling->swapchainCount * sizeof(VkResult));
5490     }
5491 }
5492 
unmarshal_VkPresentInfoKHR(VulkanStreamGuest * vkStream,VkPresentInfoKHR * forUnmarshaling)5493 void unmarshal_VkPresentInfoKHR(
5494     VulkanStreamGuest* vkStream,
5495     VkPresentInfoKHR* forUnmarshaling)
5496 {
5497     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5498     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5499     vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
5500     if (forUnmarshaling->waitSemaphoreCount)
5501     {
5502         uint64_t* cgen_var_197;
5503         vkStream->alloc((void**)&cgen_var_197, forUnmarshaling->waitSemaphoreCount * 8);
5504         vkStream->read((uint64_t*)cgen_var_197, forUnmarshaling->waitSemaphoreCount * 8);
5505         vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_197, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount);
5506     }
5507     vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
5508     if (forUnmarshaling->swapchainCount)
5509     {
5510         uint64_t* cgen_var_198;
5511         vkStream->alloc((void**)&cgen_var_198, forUnmarshaling->swapchainCount * 8);
5512         vkStream->read((uint64_t*)cgen_var_198, forUnmarshaling->swapchainCount * 8);
5513         vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(cgen_var_198, (VkSwapchainKHR*)forUnmarshaling->pSwapchains, forUnmarshaling->swapchainCount);
5514     }
5515     vkStream->read((uint32_t*)forUnmarshaling->pImageIndices, forUnmarshaling->swapchainCount * sizeof(const uint32_t));
5516     // WARNING PTR CHECK
5517     VkResult* check_pResults;
5518     check_pResults = (VkResult*)(uintptr_t)vkStream->getBe64();
5519     if (forUnmarshaling->pResults)
5520     {
5521         if (!(check_pResults))
5522         {
5523             fprintf(stderr, "fatal: forUnmarshaling->pResults inconsistent between guest and host\n");
5524         }
5525         vkStream->read((VkResult*)forUnmarshaling->pResults, forUnmarshaling->swapchainCount * sizeof(VkResult));
5526     }
5527 }
5528 
marshal_VkImageSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,const VkImageSwapchainCreateInfoKHR * forMarshaling)5529 void marshal_VkImageSwapchainCreateInfoKHR(
5530     VulkanStreamGuest* vkStream,
5531     const VkImageSwapchainCreateInfoKHR* forMarshaling)
5532 {
5533     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5534     marshal_extension_struct(vkStream, forMarshaling->pNext);
5535     uint64_t cgen_var_200;
5536     vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_200, 1);
5537     vkStream->write((uint64_t*)&cgen_var_200, 1 * 8);
5538 }
5539 
unmarshal_VkImageSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,VkImageSwapchainCreateInfoKHR * forUnmarshaling)5540 void unmarshal_VkImageSwapchainCreateInfoKHR(
5541     VulkanStreamGuest* vkStream,
5542     VkImageSwapchainCreateInfoKHR* forUnmarshaling)
5543 {
5544     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5545     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5546     uint64_t cgen_var_201;
5547     vkStream->read((uint64_t*)&cgen_var_201, 1 * 8);
5548     vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_201, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
5549 }
5550 
marshal_VkBindImageMemorySwapchainInfoKHR(VulkanStreamGuest * vkStream,const VkBindImageMemorySwapchainInfoKHR * forMarshaling)5551 void marshal_VkBindImageMemorySwapchainInfoKHR(
5552     VulkanStreamGuest* vkStream,
5553     const VkBindImageMemorySwapchainInfoKHR* forMarshaling)
5554 {
5555     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5556     marshal_extension_struct(vkStream, forMarshaling->pNext);
5557     uint64_t cgen_var_202;
5558     vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_202, 1);
5559     vkStream->write((uint64_t*)&cgen_var_202, 1 * 8);
5560     vkStream->write((uint32_t*)&forMarshaling->imageIndex, sizeof(uint32_t));
5561 }
5562 
unmarshal_VkBindImageMemorySwapchainInfoKHR(VulkanStreamGuest * vkStream,VkBindImageMemorySwapchainInfoKHR * forUnmarshaling)5563 void unmarshal_VkBindImageMemorySwapchainInfoKHR(
5564     VulkanStreamGuest* vkStream,
5565     VkBindImageMemorySwapchainInfoKHR* forUnmarshaling)
5566 {
5567     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5568     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5569     uint64_t cgen_var_203;
5570     vkStream->read((uint64_t*)&cgen_var_203, 1 * 8);
5571     vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_203, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
5572     vkStream->read((uint32_t*)&forUnmarshaling->imageIndex, sizeof(uint32_t));
5573 }
5574 
marshal_VkAcquireNextImageInfoKHR(VulkanStreamGuest * vkStream,const VkAcquireNextImageInfoKHR * forMarshaling)5575 void marshal_VkAcquireNextImageInfoKHR(
5576     VulkanStreamGuest* vkStream,
5577     const VkAcquireNextImageInfoKHR* forMarshaling)
5578 {
5579     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5580     marshal_extension_struct(vkStream, forMarshaling->pNext);
5581     uint64_t cgen_var_204;
5582     vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_204, 1);
5583     vkStream->write((uint64_t*)&cgen_var_204, 1 * 8);
5584     vkStream->write((uint64_t*)&forMarshaling->timeout, sizeof(uint64_t));
5585     uint64_t cgen_var_205;
5586     vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_205, 1);
5587     vkStream->write((uint64_t*)&cgen_var_205, 1 * 8);
5588     uint64_t cgen_var_206;
5589     vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_206, 1);
5590     vkStream->write((uint64_t*)&cgen_var_206, 1 * 8);
5591     vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
5592 }
5593 
unmarshal_VkAcquireNextImageInfoKHR(VulkanStreamGuest * vkStream,VkAcquireNextImageInfoKHR * forUnmarshaling)5594 void unmarshal_VkAcquireNextImageInfoKHR(
5595     VulkanStreamGuest* vkStream,
5596     VkAcquireNextImageInfoKHR* forUnmarshaling)
5597 {
5598     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5599     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5600     uint64_t cgen_var_207;
5601     vkStream->read((uint64_t*)&cgen_var_207, 1 * 8);
5602     vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_207, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
5603     vkStream->read((uint64_t*)&forUnmarshaling->timeout, sizeof(uint64_t));
5604     uint64_t cgen_var_208;
5605     vkStream->read((uint64_t*)&cgen_var_208, 1 * 8);
5606     vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_208, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
5607     uint64_t cgen_var_209;
5608     vkStream->read((uint64_t*)&cgen_var_209, 1 * 8);
5609     vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_209, (VkFence*)&forUnmarshaling->fence, 1);
5610     vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
5611 }
5612 
marshal_VkDeviceGroupPresentCapabilitiesKHR(VulkanStreamGuest * vkStream,const VkDeviceGroupPresentCapabilitiesKHR * forMarshaling)5613 void marshal_VkDeviceGroupPresentCapabilitiesKHR(
5614     VulkanStreamGuest* vkStream,
5615     const VkDeviceGroupPresentCapabilitiesKHR* forMarshaling)
5616 {
5617     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5618     marshal_extension_struct(vkStream, forMarshaling->pNext);
5619     vkStream->write((uint32_t*)forMarshaling->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
5620     vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
5621 }
5622 
unmarshal_VkDeviceGroupPresentCapabilitiesKHR(VulkanStreamGuest * vkStream,VkDeviceGroupPresentCapabilitiesKHR * forUnmarshaling)5623 void unmarshal_VkDeviceGroupPresentCapabilitiesKHR(
5624     VulkanStreamGuest* vkStream,
5625     VkDeviceGroupPresentCapabilitiesKHR* forUnmarshaling)
5626 {
5627     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5628     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5629     vkStream->read((uint32_t*)forUnmarshaling->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
5630     vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
5631 }
5632 
marshal_VkDeviceGroupPresentInfoKHR(VulkanStreamGuest * vkStream,const VkDeviceGroupPresentInfoKHR * forMarshaling)5633 void marshal_VkDeviceGroupPresentInfoKHR(
5634     VulkanStreamGuest* vkStream,
5635     const VkDeviceGroupPresentInfoKHR* forMarshaling)
5636 {
5637     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5638     marshal_extension_struct(vkStream, forMarshaling->pNext);
5639     vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
5640     vkStream->write((const uint32_t*)forMarshaling->pDeviceMasks, forMarshaling->swapchainCount * sizeof(const uint32_t));
5641     vkStream->write((VkDeviceGroupPresentModeFlagBitsKHR*)&forMarshaling->mode, sizeof(VkDeviceGroupPresentModeFlagBitsKHR));
5642 }
5643 
unmarshal_VkDeviceGroupPresentInfoKHR(VulkanStreamGuest * vkStream,VkDeviceGroupPresentInfoKHR * forUnmarshaling)5644 void unmarshal_VkDeviceGroupPresentInfoKHR(
5645     VulkanStreamGuest* vkStream,
5646     VkDeviceGroupPresentInfoKHR* forUnmarshaling)
5647 {
5648     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5649     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5650     vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
5651     vkStream->read((uint32_t*)forUnmarshaling->pDeviceMasks, forUnmarshaling->swapchainCount * sizeof(const uint32_t));
5652     vkStream->read((VkDeviceGroupPresentModeFlagBitsKHR*)&forUnmarshaling->mode, sizeof(VkDeviceGroupPresentModeFlagBitsKHR));
5653 }
5654 
marshal_VkDeviceGroupSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,const VkDeviceGroupSwapchainCreateInfoKHR * forMarshaling)5655 void marshal_VkDeviceGroupSwapchainCreateInfoKHR(
5656     VulkanStreamGuest* vkStream,
5657     const VkDeviceGroupSwapchainCreateInfoKHR* forMarshaling)
5658 {
5659     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5660     marshal_extension_struct(vkStream, forMarshaling->pNext);
5661     vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
5662 }
5663 
unmarshal_VkDeviceGroupSwapchainCreateInfoKHR(VulkanStreamGuest * vkStream,VkDeviceGroupSwapchainCreateInfoKHR * forUnmarshaling)5664 void unmarshal_VkDeviceGroupSwapchainCreateInfoKHR(
5665     VulkanStreamGuest* vkStream,
5666     VkDeviceGroupSwapchainCreateInfoKHR* forUnmarshaling)
5667 {
5668     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5669     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5670     vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
5671 }
5672 
5673 #endif
5674 #ifdef VK_KHR_display
marshal_VkDisplayPropertiesKHR(VulkanStreamGuest * vkStream,const VkDisplayPropertiesKHR * forMarshaling)5675 void marshal_VkDisplayPropertiesKHR(
5676     VulkanStreamGuest* vkStream,
5677     const VkDisplayPropertiesKHR* forMarshaling)
5678 {
5679     uint64_t cgen_var_210;
5680     vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->display, &cgen_var_210, 1);
5681     vkStream->write((uint64_t*)&cgen_var_210, 1 * 8);
5682     vkStream->putString(forMarshaling->displayName);
5683     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->physicalDimensions));
5684     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->physicalResolution));
5685     vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
5686     vkStream->write((VkBool32*)&forMarshaling->planeReorderPossible, sizeof(VkBool32));
5687     vkStream->write((VkBool32*)&forMarshaling->persistentContent, sizeof(VkBool32));
5688 }
5689 
unmarshal_VkDisplayPropertiesKHR(VulkanStreamGuest * vkStream,VkDisplayPropertiesKHR * forUnmarshaling)5690 void unmarshal_VkDisplayPropertiesKHR(
5691     VulkanStreamGuest* vkStream,
5692     VkDisplayPropertiesKHR* forUnmarshaling)
5693 {
5694     uint64_t cgen_var_211;
5695     vkStream->read((uint64_t*)&cgen_var_211, 1 * 8);
5696     vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(&cgen_var_211, (VkDisplayKHR*)&forUnmarshaling->display, 1);
5697     vkStream->loadStringInPlace((char**)&forUnmarshaling->displayName);
5698     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->physicalDimensions));
5699     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->physicalResolution));
5700     vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
5701     vkStream->read((VkBool32*)&forUnmarshaling->planeReorderPossible, sizeof(VkBool32));
5702     vkStream->read((VkBool32*)&forUnmarshaling->persistentContent, sizeof(VkBool32));
5703 }
5704 
marshal_VkDisplayModeParametersKHR(VulkanStreamGuest * vkStream,const VkDisplayModeParametersKHR * forMarshaling)5705 void marshal_VkDisplayModeParametersKHR(
5706     VulkanStreamGuest* vkStream,
5707     const VkDisplayModeParametersKHR* forMarshaling)
5708 {
5709     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->visibleRegion));
5710     vkStream->write((uint32_t*)&forMarshaling->refreshRate, sizeof(uint32_t));
5711 }
5712 
unmarshal_VkDisplayModeParametersKHR(VulkanStreamGuest * vkStream,VkDisplayModeParametersKHR * forUnmarshaling)5713 void unmarshal_VkDisplayModeParametersKHR(
5714     VulkanStreamGuest* vkStream,
5715     VkDisplayModeParametersKHR* forUnmarshaling)
5716 {
5717     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->visibleRegion));
5718     vkStream->read((uint32_t*)&forUnmarshaling->refreshRate, sizeof(uint32_t));
5719 }
5720 
marshal_VkDisplayModePropertiesKHR(VulkanStreamGuest * vkStream,const VkDisplayModePropertiesKHR * forMarshaling)5721 void marshal_VkDisplayModePropertiesKHR(
5722     VulkanStreamGuest* vkStream,
5723     const VkDisplayModePropertiesKHR* forMarshaling)
5724 {
5725     uint64_t cgen_var_212;
5726     vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode, &cgen_var_212, 1);
5727     vkStream->write((uint64_t*)&cgen_var_212, 1 * 8);
5728     marshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forMarshaling->parameters));
5729 }
5730 
unmarshal_VkDisplayModePropertiesKHR(VulkanStreamGuest * vkStream,VkDisplayModePropertiesKHR * forUnmarshaling)5731 void unmarshal_VkDisplayModePropertiesKHR(
5732     VulkanStreamGuest* vkStream,
5733     VkDisplayModePropertiesKHR* forUnmarshaling)
5734 {
5735     uint64_t cgen_var_213;
5736     vkStream->read((uint64_t*)&cgen_var_213, 1 * 8);
5737     vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_213, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1);
5738     unmarshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters));
5739 }
5740 
marshal_VkDisplayModeCreateInfoKHR(VulkanStreamGuest * vkStream,const VkDisplayModeCreateInfoKHR * forMarshaling)5741 void marshal_VkDisplayModeCreateInfoKHR(
5742     VulkanStreamGuest* vkStream,
5743     const VkDisplayModeCreateInfoKHR* forMarshaling)
5744 {
5745     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5746     marshal_extension_struct(vkStream, forMarshaling->pNext);
5747     vkStream->write((VkDisplayModeCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkDisplayModeCreateFlagsKHR));
5748     marshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forMarshaling->parameters));
5749 }
5750 
unmarshal_VkDisplayModeCreateInfoKHR(VulkanStreamGuest * vkStream,VkDisplayModeCreateInfoKHR * forUnmarshaling)5751 void unmarshal_VkDisplayModeCreateInfoKHR(
5752     VulkanStreamGuest* vkStream,
5753     VkDisplayModeCreateInfoKHR* forUnmarshaling)
5754 {
5755     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5756     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5757     vkStream->read((VkDisplayModeCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkDisplayModeCreateFlagsKHR));
5758     unmarshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters));
5759 }
5760 
marshal_VkDisplayPlaneCapabilitiesKHR(VulkanStreamGuest * vkStream,const VkDisplayPlaneCapabilitiesKHR * forMarshaling)5761 void marshal_VkDisplayPlaneCapabilitiesKHR(
5762     VulkanStreamGuest* vkStream,
5763     const VkDisplayPlaneCapabilitiesKHR* forMarshaling)
5764 {
5765     vkStream->write((VkDisplayPlaneAlphaFlagsKHR*)&forMarshaling->supportedAlpha, sizeof(VkDisplayPlaneAlphaFlagsKHR));
5766     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->minSrcPosition));
5767     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->maxSrcPosition));
5768     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minSrcExtent));
5769     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSrcExtent));
5770     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->minDstPosition));
5771     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->maxDstPosition));
5772     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minDstExtent));
5773     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxDstExtent));
5774 }
5775 
unmarshal_VkDisplayPlaneCapabilitiesKHR(VulkanStreamGuest * vkStream,VkDisplayPlaneCapabilitiesKHR * forUnmarshaling)5776 void unmarshal_VkDisplayPlaneCapabilitiesKHR(
5777     VulkanStreamGuest* vkStream,
5778     VkDisplayPlaneCapabilitiesKHR* forUnmarshaling)
5779 {
5780     vkStream->read((VkDisplayPlaneAlphaFlagsKHR*)&forUnmarshaling->supportedAlpha, sizeof(VkDisplayPlaneAlphaFlagsKHR));
5781     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->minSrcPosition));
5782     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->maxSrcPosition));
5783     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minSrcExtent));
5784     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSrcExtent));
5785     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->minDstPosition));
5786     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->maxDstPosition));
5787     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minDstExtent));
5788     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxDstExtent));
5789 }
5790 
marshal_VkDisplayPlanePropertiesKHR(VulkanStreamGuest * vkStream,const VkDisplayPlanePropertiesKHR * forMarshaling)5791 void marshal_VkDisplayPlanePropertiesKHR(
5792     VulkanStreamGuest* vkStream,
5793     const VkDisplayPlanePropertiesKHR* forMarshaling)
5794 {
5795     uint64_t cgen_var_214;
5796     vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->currentDisplay, &cgen_var_214, 1);
5797     vkStream->write((uint64_t*)&cgen_var_214, 1 * 8);
5798     vkStream->write((uint32_t*)&forMarshaling->currentStackIndex, sizeof(uint32_t));
5799 }
5800 
unmarshal_VkDisplayPlanePropertiesKHR(VulkanStreamGuest * vkStream,VkDisplayPlanePropertiesKHR * forUnmarshaling)5801 void unmarshal_VkDisplayPlanePropertiesKHR(
5802     VulkanStreamGuest* vkStream,
5803     VkDisplayPlanePropertiesKHR* forUnmarshaling)
5804 {
5805     uint64_t cgen_var_215;
5806     vkStream->read((uint64_t*)&cgen_var_215, 1 * 8);
5807     vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(&cgen_var_215, (VkDisplayKHR*)&forUnmarshaling->currentDisplay, 1);
5808     vkStream->read((uint32_t*)&forUnmarshaling->currentStackIndex, sizeof(uint32_t));
5809 }
5810 
marshal_VkDisplaySurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkDisplaySurfaceCreateInfoKHR * forMarshaling)5811 void marshal_VkDisplaySurfaceCreateInfoKHR(
5812     VulkanStreamGuest* vkStream,
5813     const VkDisplaySurfaceCreateInfoKHR* forMarshaling)
5814 {
5815     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5816     marshal_extension_struct(vkStream, forMarshaling->pNext);
5817     vkStream->write((VkDisplaySurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkDisplaySurfaceCreateFlagsKHR));
5818     uint64_t cgen_var_216;
5819     vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode, &cgen_var_216, 1);
5820     vkStream->write((uint64_t*)&cgen_var_216, 1 * 8);
5821     vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t));
5822     vkStream->write((uint32_t*)&forMarshaling->planeStackIndex, sizeof(uint32_t));
5823     vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->transform, sizeof(VkSurfaceTransformFlagBitsKHR));
5824     vkStream->write((float*)&forMarshaling->globalAlpha, sizeof(float));
5825     vkStream->write((VkDisplayPlaneAlphaFlagBitsKHR*)&forMarshaling->alphaMode, sizeof(VkDisplayPlaneAlphaFlagBitsKHR));
5826     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->imageExtent));
5827 }
5828 
unmarshal_VkDisplaySurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkDisplaySurfaceCreateInfoKHR * forUnmarshaling)5829 void unmarshal_VkDisplaySurfaceCreateInfoKHR(
5830     VulkanStreamGuest* vkStream,
5831     VkDisplaySurfaceCreateInfoKHR* forUnmarshaling)
5832 {
5833     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5834     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5835     vkStream->read((VkDisplaySurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkDisplaySurfaceCreateFlagsKHR));
5836     uint64_t cgen_var_217;
5837     vkStream->read((uint64_t*)&cgen_var_217, 1 * 8);
5838     vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_217, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1);
5839     vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t));
5840     vkStream->read((uint32_t*)&forUnmarshaling->planeStackIndex, sizeof(uint32_t));
5841     vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->transform, sizeof(VkSurfaceTransformFlagBitsKHR));
5842     vkStream->read((float*)&forUnmarshaling->globalAlpha, sizeof(float));
5843     vkStream->read((VkDisplayPlaneAlphaFlagBitsKHR*)&forUnmarshaling->alphaMode, sizeof(VkDisplayPlaneAlphaFlagBitsKHR));
5844     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->imageExtent));
5845 }
5846 
5847 #endif
5848 #ifdef VK_KHR_display_swapchain
marshal_VkDisplayPresentInfoKHR(VulkanStreamGuest * vkStream,const VkDisplayPresentInfoKHR * forMarshaling)5849 void marshal_VkDisplayPresentInfoKHR(
5850     VulkanStreamGuest* vkStream,
5851     const VkDisplayPresentInfoKHR* forMarshaling)
5852 {
5853     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5854     marshal_extension_struct(vkStream, forMarshaling->pNext);
5855     marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->srcRect));
5856     marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->dstRect));
5857     vkStream->write((VkBool32*)&forMarshaling->persistent, sizeof(VkBool32));
5858 }
5859 
unmarshal_VkDisplayPresentInfoKHR(VulkanStreamGuest * vkStream,VkDisplayPresentInfoKHR * forUnmarshaling)5860 void unmarshal_VkDisplayPresentInfoKHR(
5861     VulkanStreamGuest* vkStream,
5862     VkDisplayPresentInfoKHR* forUnmarshaling)
5863 {
5864     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5865     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5866     unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->srcRect));
5867     unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->dstRect));
5868     vkStream->read((VkBool32*)&forUnmarshaling->persistent, sizeof(VkBool32));
5869 }
5870 
5871 #endif
5872 #ifdef VK_KHR_xlib_surface
marshal_VkXlibSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkXlibSurfaceCreateInfoKHR * forMarshaling)5873 void marshal_VkXlibSurfaceCreateInfoKHR(
5874     VulkanStreamGuest* vkStream,
5875     const VkXlibSurfaceCreateInfoKHR* forMarshaling)
5876 {
5877     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5878     marshal_extension_struct(vkStream, forMarshaling->pNext);
5879     vkStream->write((VkXlibSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkXlibSurfaceCreateFlagsKHR));
5880     // WARNING PTR CHECK
5881     uint64_t cgen_var_218 = (uint64_t)(uintptr_t)forMarshaling->dpy;
5882     vkStream->putBe64(cgen_var_218);
5883     if (forMarshaling->dpy)
5884     {
5885         vkStream->write((Display*)forMarshaling->dpy, sizeof(Display));
5886     }
5887     vkStream->write((Window*)&forMarshaling->window, sizeof(Window));
5888 }
5889 
unmarshal_VkXlibSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkXlibSurfaceCreateInfoKHR * forUnmarshaling)5890 void unmarshal_VkXlibSurfaceCreateInfoKHR(
5891     VulkanStreamGuest* vkStream,
5892     VkXlibSurfaceCreateInfoKHR* forUnmarshaling)
5893 {
5894     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5895     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5896     vkStream->read((VkXlibSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkXlibSurfaceCreateFlagsKHR));
5897     // WARNING PTR CHECK
5898     Display* check_dpy;
5899     check_dpy = (Display*)(uintptr_t)vkStream->getBe64();
5900     if (forUnmarshaling->dpy)
5901     {
5902         if (!(check_dpy))
5903         {
5904             fprintf(stderr, "fatal: forUnmarshaling->dpy inconsistent between guest and host\n");
5905         }
5906         vkStream->read((Display*)forUnmarshaling->dpy, sizeof(Display));
5907     }
5908     vkStream->read((Window*)&forUnmarshaling->window, sizeof(Window));
5909 }
5910 
5911 #endif
5912 #ifdef VK_KHR_xcb_surface
marshal_VkXcbSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkXcbSurfaceCreateInfoKHR * forMarshaling)5913 void marshal_VkXcbSurfaceCreateInfoKHR(
5914     VulkanStreamGuest* vkStream,
5915     const VkXcbSurfaceCreateInfoKHR* forMarshaling)
5916 {
5917     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5918     marshal_extension_struct(vkStream, forMarshaling->pNext);
5919     vkStream->write((VkXcbSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkXcbSurfaceCreateFlagsKHR));
5920     // WARNING PTR CHECK
5921     uint64_t cgen_var_220 = (uint64_t)(uintptr_t)forMarshaling->connection;
5922     vkStream->putBe64(cgen_var_220);
5923     if (forMarshaling->connection)
5924     {
5925         vkStream->write((xcb_connection_t*)forMarshaling->connection, sizeof(xcb_connection_t));
5926     }
5927     vkStream->write((xcb_window_t*)&forMarshaling->window, sizeof(xcb_window_t));
5928 }
5929 
unmarshal_VkXcbSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkXcbSurfaceCreateInfoKHR * forUnmarshaling)5930 void unmarshal_VkXcbSurfaceCreateInfoKHR(
5931     VulkanStreamGuest* vkStream,
5932     VkXcbSurfaceCreateInfoKHR* forUnmarshaling)
5933 {
5934     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5935     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5936     vkStream->read((VkXcbSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkXcbSurfaceCreateFlagsKHR));
5937     // WARNING PTR CHECK
5938     xcb_connection_t* check_connection;
5939     check_connection = (xcb_connection_t*)(uintptr_t)vkStream->getBe64();
5940     if (forUnmarshaling->connection)
5941     {
5942         if (!(check_connection))
5943         {
5944             fprintf(stderr, "fatal: forUnmarshaling->connection inconsistent between guest and host\n");
5945         }
5946         vkStream->read((xcb_connection_t*)forUnmarshaling->connection, sizeof(xcb_connection_t));
5947     }
5948     vkStream->read((xcb_window_t*)&forUnmarshaling->window, sizeof(xcb_window_t));
5949 }
5950 
5951 #endif
5952 #ifdef VK_KHR_wayland_surface
marshal_VkWaylandSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkWaylandSurfaceCreateInfoKHR * forMarshaling)5953 void marshal_VkWaylandSurfaceCreateInfoKHR(
5954     VulkanStreamGuest* vkStream,
5955     const VkWaylandSurfaceCreateInfoKHR* forMarshaling)
5956 {
5957     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
5958     marshal_extension_struct(vkStream, forMarshaling->pNext);
5959     vkStream->write((VkWaylandSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkWaylandSurfaceCreateFlagsKHR));
5960     // WARNING PTR CHECK
5961     uint64_t cgen_var_222 = (uint64_t)(uintptr_t)forMarshaling->display;
5962     vkStream->putBe64(cgen_var_222);
5963     if (forMarshaling->display)
5964     {
5965         vkStream->write((wl_display*)forMarshaling->display, sizeof(wl_display));
5966     }
5967     // WARNING PTR CHECK
5968     uint64_t cgen_var_223 = (uint64_t)(uintptr_t)forMarshaling->surface;
5969     vkStream->putBe64(cgen_var_223);
5970     if (forMarshaling->surface)
5971     {
5972         vkStream->write((wl_surface*)forMarshaling->surface, sizeof(wl_surface));
5973     }
5974 }
5975 
unmarshal_VkWaylandSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkWaylandSurfaceCreateInfoKHR * forUnmarshaling)5976 void unmarshal_VkWaylandSurfaceCreateInfoKHR(
5977     VulkanStreamGuest* vkStream,
5978     VkWaylandSurfaceCreateInfoKHR* forUnmarshaling)
5979 {
5980     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
5981     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
5982     vkStream->read((VkWaylandSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkWaylandSurfaceCreateFlagsKHR));
5983     // WARNING PTR CHECK
5984     wl_display* check_display;
5985     check_display = (wl_display*)(uintptr_t)vkStream->getBe64();
5986     if (forUnmarshaling->display)
5987     {
5988         if (!(check_display))
5989         {
5990             fprintf(stderr, "fatal: forUnmarshaling->display inconsistent between guest and host\n");
5991         }
5992         vkStream->read((wl_display*)forUnmarshaling->display, sizeof(wl_display));
5993     }
5994     // WARNING PTR CHECK
5995     wl_surface* check_surface;
5996     check_surface = (wl_surface*)(uintptr_t)vkStream->getBe64();
5997     if (forUnmarshaling->surface)
5998     {
5999         if (!(check_surface))
6000         {
6001             fprintf(stderr, "fatal: forUnmarshaling->surface inconsistent between guest and host\n");
6002         }
6003         vkStream->read((wl_surface*)forUnmarshaling->surface, sizeof(wl_surface));
6004     }
6005 }
6006 
6007 #endif
6008 #ifdef VK_KHR_mir_surface
marshal_VkMirSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkMirSurfaceCreateInfoKHR * forMarshaling)6009 void marshal_VkMirSurfaceCreateInfoKHR(
6010     VulkanStreamGuest* vkStream,
6011     const VkMirSurfaceCreateInfoKHR* forMarshaling)
6012 {
6013     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6014     marshal_extension_struct(vkStream, forMarshaling->pNext);
6015     vkStream->write((VkMirSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkMirSurfaceCreateFlagsKHR));
6016     // WARNING PTR CHECK
6017     uint64_t cgen_var_226 = (uint64_t)(uintptr_t)forMarshaling->connection;
6018     vkStream->putBe64(cgen_var_226);
6019     if (forMarshaling->connection)
6020     {
6021         vkStream->write((MirConnection*)forMarshaling->connection, sizeof(MirConnection));
6022     }
6023     // WARNING PTR CHECK
6024     uint64_t cgen_var_227 = (uint64_t)(uintptr_t)forMarshaling->mirSurface;
6025     vkStream->putBe64(cgen_var_227);
6026     if (forMarshaling->mirSurface)
6027     {
6028         vkStream->write((MirSurface*)forMarshaling->mirSurface, sizeof(MirSurface));
6029     }
6030 }
6031 
unmarshal_VkMirSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkMirSurfaceCreateInfoKHR * forUnmarshaling)6032 void unmarshal_VkMirSurfaceCreateInfoKHR(
6033     VulkanStreamGuest* vkStream,
6034     VkMirSurfaceCreateInfoKHR* forUnmarshaling)
6035 {
6036     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6037     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6038     vkStream->read((VkMirSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkMirSurfaceCreateFlagsKHR));
6039     // WARNING PTR CHECK
6040     MirConnection* check_connection;
6041     check_connection = (MirConnection*)(uintptr_t)vkStream->getBe64();
6042     if (forUnmarshaling->connection)
6043     {
6044         if (!(check_connection))
6045         {
6046             fprintf(stderr, "fatal: forUnmarshaling->connection inconsistent between guest and host\n");
6047         }
6048         vkStream->read((MirConnection*)forUnmarshaling->connection, sizeof(MirConnection));
6049     }
6050     // WARNING PTR CHECK
6051     MirSurface* check_mirSurface;
6052     check_mirSurface = (MirSurface*)(uintptr_t)vkStream->getBe64();
6053     if (forUnmarshaling->mirSurface)
6054     {
6055         if (!(check_mirSurface))
6056         {
6057             fprintf(stderr, "fatal: forUnmarshaling->mirSurface inconsistent between guest and host\n");
6058         }
6059         vkStream->read((MirSurface*)forUnmarshaling->mirSurface, sizeof(MirSurface));
6060     }
6061 }
6062 
6063 #endif
6064 #ifdef VK_KHR_android_surface
marshal_VkAndroidSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkAndroidSurfaceCreateInfoKHR * forMarshaling)6065 void marshal_VkAndroidSurfaceCreateInfoKHR(
6066     VulkanStreamGuest* vkStream,
6067     const VkAndroidSurfaceCreateInfoKHR* forMarshaling)
6068 {
6069     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6070     marshal_extension_struct(vkStream, forMarshaling->pNext);
6071     vkStream->write((VkAndroidSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkAndroidSurfaceCreateFlagsKHR));
6072     // WARNING PTR CHECK
6073     uint64_t cgen_var_230 = (uint64_t)(uintptr_t)forMarshaling->window;
6074     vkStream->putBe64(cgen_var_230);
6075     if (forMarshaling->window)
6076     {
6077         vkStream->write((ANativeWindow*)forMarshaling->window, sizeof(ANativeWindow));
6078     }
6079 }
6080 
unmarshal_VkAndroidSurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkAndroidSurfaceCreateInfoKHR * forUnmarshaling)6081 void unmarshal_VkAndroidSurfaceCreateInfoKHR(
6082     VulkanStreamGuest* vkStream,
6083     VkAndroidSurfaceCreateInfoKHR* forUnmarshaling)
6084 {
6085     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6086     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6087     vkStream->read((VkAndroidSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkAndroidSurfaceCreateFlagsKHR));
6088     // WARNING PTR CHECK
6089     ANativeWindow* check_window;
6090     check_window = (ANativeWindow*)(uintptr_t)vkStream->getBe64();
6091     if (forUnmarshaling->window)
6092     {
6093         if (!(check_window))
6094         {
6095             fprintf(stderr, "fatal: forUnmarshaling->window inconsistent between guest and host\n");
6096         }
6097         vkStream->read((ANativeWindow*)forUnmarshaling->window, sizeof(ANativeWindow));
6098     }
6099 }
6100 
6101 #endif
6102 #ifdef VK_KHR_win32_surface
marshal_VkWin32SurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,const VkWin32SurfaceCreateInfoKHR * forMarshaling)6103 void marshal_VkWin32SurfaceCreateInfoKHR(
6104     VulkanStreamGuest* vkStream,
6105     const VkWin32SurfaceCreateInfoKHR* forMarshaling)
6106 {
6107     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6108     marshal_extension_struct(vkStream, forMarshaling->pNext);
6109     vkStream->write((VkWin32SurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkWin32SurfaceCreateFlagsKHR));
6110     vkStream->write((HINSTANCE*)&forMarshaling->hinstance, sizeof(HINSTANCE));
6111     vkStream->write((HWND*)&forMarshaling->hwnd, sizeof(HWND));
6112 }
6113 
unmarshal_VkWin32SurfaceCreateInfoKHR(VulkanStreamGuest * vkStream,VkWin32SurfaceCreateInfoKHR * forUnmarshaling)6114 void unmarshal_VkWin32SurfaceCreateInfoKHR(
6115     VulkanStreamGuest* vkStream,
6116     VkWin32SurfaceCreateInfoKHR* forUnmarshaling)
6117 {
6118     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6119     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6120     vkStream->read((VkWin32SurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkWin32SurfaceCreateFlagsKHR));
6121     vkStream->read((HINSTANCE*)&forUnmarshaling->hinstance, sizeof(HINSTANCE));
6122     vkStream->read((HWND*)&forUnmarshaling->hwnd, sizeof(HWND));
6123 }
6124 
6125 #endif
6126 #ifdef VK_KHR_sampler_mirror_clamp_to_edge
6127 #endif
6128 #ifdef VK_KHR_multiview
6129 #endif
6130 #ifdef VK_KHR_get_physical_device_properties2
6131 #endif
6132 #ifdef VK_KHR_device_group
6133 #endif
6134 #ifdef VK_KHR_shader_draw_parameters
6135 #endif
6136 #ifdef VK_KHR_maintenance1
6137 #endif
6138 #ifdef VK_KHR_device_group_creation
6139 #endif
6140 #ifdef VK_KHR_external_memory_capabilities
6141 #endif
6142 #ifdef VK_KHR_external_memory
6143 #endif
6144 #ifdef VK_KHR_external_memory_win32
marshal_VkImportMemoryWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkImportMemoryWin32HandleInfoKHR * forMarshaling)6145 void marshal_VkImportMemoryWin32HandleInfoKHR(
6146     VulkanStreamGuest* vkStream,
6147     const VkImportMemoryWin32HandleInfoKHR* forMarshaling)
6148 {
6149     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6150     marshal_extension_struct(vkStream, forMarshaling->pNext);
6151     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6152     vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
6153     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
6154 }
6155 
unmarshal_VkImportMemoryWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkImportMemoryWin32HandleInfoKHR * forUnmarshaling)6156 void unmarshal_VkImportMemoryWin32HandleInfoKHR(
6157     VulkanStreamGuest* vkStream,
6158     VkImportMemoryWin32HandleInfoKHR* forUnmarshaling)
6159 {
6160     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6161     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6162     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6163     vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
6164     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
6165 }
6166 
marshal_VkExportMemoryWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkExportMemoryWin32HandleInfoKHR * forMarshaling)6167 void marshal_VkExportMemoryWin32HandleInfoKHR(
6168     VulkanStreamGuest* vkStream,
6169     const VkExportMemoryWin32HandleInfoKHR* forMarshaling)
6170 {
6171     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6172     marshal_extension_struct(vkStream, forMarshaling->pNext);
6173     // WARNING PTR CHECK
6174     uint64_t cgen_var_232 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
6175     vkStream->putBe64(cgen_var_232);
6176     if (forMarshaling->pAttributes)
6177     {
6178         vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
6179     }
6180     vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
6181     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
6182 }
6183 
unmarshal_VkExportMemoryWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkExportMemoryWin32HandleInfoKHR * forUnmarshaling)6184 void unmarshal_VkExportMemoryWin32HandleInfoKHR(
6185     VulkanStreamGuest* vkStream,
6186     VkExportMemoryWin32HandleInfoKHR* forUnmarshaling)
6187 {
6188     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6189     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6190     // WARNING PTR CHECK
6191     const SECURITY_ATTRIBUTES* check_pAttributes;
6192     check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
6193     if (forUnmarshaling->pAttributes)
6194     {
6195         if (!(check_pAttributes))
6196         {
6197             fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
6198         }
6199         vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
6200     }
6201     vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
6202     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
6203 }
6204 
marshal_VkMemoryWin32HandlePropertiesKHR(VulkanStreamGuest * vkStream,const VkMemoryWin32HandlePropertiesKHR * forMarshaling)6205 void marshal_VkMemoryWin32HandlePropertiesKHR(
6206     VulkanStreamGuest* vkStream,
6207     const VkMemoryWin32HandlePropertiesKHR* forMarshaling)
6208 {
6209     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6210     marshal_extension_struct(vkStream, forMarshaling->pNext);
6211     vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
6212 }
6213 
unmarshal_VkMemoryWin32HandlePropertiesKHR(VulkanStreamGuest * vkStream,VkMemoryWin32HandlePropertiesKHR * forUnmarshaling)6214 void unmarshal_VkMemoryWin32HandlePropertiesKHR(
6215     VulkanStreamGuest* vkStream,
6216     VkMemoryWin32HandlePropertiesKHR* forUnmarshaling)
6217 {
6218     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6219     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6220     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
6221 }
6222 
marshal_VkMemoryGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkMemoryGetWin32HandleInfoKHR * forMarshaling)6223 void marshal_VkMemoryGetWin32HandleInfoKHR(
6224     VulkanStreamGuest* vkStream,
6225     const VkMemoryGetWin32HandleInfoKHR* forMarshaling)
6226 {
6227     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6228     marshal_extension_struct(vkStream, forMarshaling->pNext);
6229     uint64_t cgen_var_234;
6230     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_234, 1);
6231     vkStream->write((uint64_t*)&cgen_var_234, 1 * 8);
6232     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6233 }
6234 
unmarshal_VkMemoryGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkMemoryGetWin32HandleInfoKHR * forUnmarshaling)6235 void unmarshal_VkMemoryGetWin32HandleInfoKHR(
6236     VulkanStreamGuest* vkStream,
6237     VkMemoryGetWin32HandleInfoKHR* forUnmarshaling)
6238 {
6239     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6240     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6241     uint64_t cgen_var_235;
6242     vkStream->read((uint64_t*)&cgen_var_235, 1 * 8);
6243     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_235, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
6244     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6245 }
6246 
6247 #endif
6248 #ifdef VK_KHR_external_memory_fd
marshal_VkImportMemoryFdInfoKHR(VulkanStreamGuest * vkStream,const VkImportMemoryFdInfoKHR * forMarshaling)6249 void marshal_VkImportMemoryFdInfoKHR(
6250     VulkanStreamGuest* vkStream,
6251     const VkImportMemoryFdInfoKHR* forMarshaling)
6252 {
6253     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6254     marshal_extension_struct(vkStream, forMarshaling->pNext);
6255     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6256     vkStream->write((int*)&forMarshaling->fd, sizeof(int));
6257 }
6258 
unmarshal_VkImportMemoryFdInfoKHR(VulkanStreamGuest * vkStream,VkImportMemoryFdInfoKHR * forUnmarshaling)6259 void unmarshal_VkImportMemoryFdInfoKHR(
6260     VulkanStreamGuest* vkStream,
6261     VkImportMemoryFdInfoKHR* forUnmarshaling)
6262 {
6263     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6264     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6265     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6266     vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
6267 }
6268 
marshal_VkMemoryFdPropertiesKHR(VulkanStreamGuest * vkStream,const VkMemoryFdPropertiesKHR * forMarshaling)6269 void marshal_VkMemoryFdPropertiesKHR(
6270     VulkanStreamGuest* vkStream,
6271     const VkMemoryFdPropertiesKHR* forMarshaling)
6272 {
6273     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6274     marshal_extension_struct(vkStream, forMarshaling->pNext);
6275     vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
6276 }
6277 
unmarshal_VkMemoryFdPropertiesKHR(VulkanStreamGuest * vkStream,VkMemoryFdPropertiesKHR * forUnmarshaling)6278 void unmarshal_VkMemoryFdPropertiesKHR(
6279     VulkanStreamGuest* vkStream,
6280     VkMemoryFdPropertiesKHR* forUnmarshaling)
6281 {
6282     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6283     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6284     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
6285 }
6286 
marshal_VkMemoryGetFdInfoKHR(VulkanStreamGuest * vkStream,const VkMemoryGetFdInfoKHR * forMarshaling)6287 void marshal_VkMemoryGetFdInfoKHR(
6288     VulkanStreamGuest* vkStream,
6289     const VkMemoryGetFdInfoKHR* forMarshaling)
6290 {
6291     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6292     marshal_extension_struct(vkStream, forMarshaling->pNext);
6293     uint64_t cgen_var_236;
6294     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_236, 1);
6295     vkStream->write((uint64_t*)&cgen_var_236, 1 * 8);
6296     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6297 }
6298 
unmarshal_VkMemoryGetFdInfoKHR(VulkanStreamGuest * vkStream,VkMemoryGetFdInfoKHR * forUnmarshaling)6299 void unmarshal_VkMemoryGetFdInfoKHR(
6300     VulkanStreamGuest* vkStream,
6301     VkMemoryGetFdInfoKHR* forUnmarshaling)
6302 {
6303     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6304     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6305     uint64_t cgen_var_237;
6306     vkStream->read((uint64_t*)&cgen_var_237, 1 * 8);
6307     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_237, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
6308     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
6309 }
6310 
6311 #endif
6312 #ifdef VK_KHR_win32_keyed_mutex
marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(VulkanStreamGuest * vkStream,const VkWin32KeyedMutexAcquireReleaseInfoKHR * forMarshaling)6313 void marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(
6314     VulkanStreamGuest* vkStream,
6315     const VkWin32KeyedMutexAcquireReleaseInfoKHR* forMarshaling)
6316 {
6317     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6318     marshal_extension_struct(vkStream, forMarshaling->pNext);
6319     vkStream->write((uint32_t*)&forMarshaling->acquireCount, sizeof(uint32_t));
6320     if (forMarshaling->acquireCount)
6321     {
6322         uint64_t* cgen_var_238;
6323         vkStream->alloc((void**)&cgen_var_238, forMarshaling->acquireCount * 8);
6324         vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pAcquireSyncs, cgen_var_238, forMarshaling->acquireCount);
6325         vkStream->write((uint64_t*)cgen_var_238, forMarshaling->acquireCount * 8);
6326     }
6327     vkStream->write((const uint64_t*)forMarshaling->pAcquireKeys, forMarshaling->acquireCount * sizeof(const uint64_t));
6328     vkStream->write((const uint32_t*)forMarshaling->pAcquireTimeouts, forMarshaling->acquireCount * sizeof(const uint32_t));
6329     vkStream->write((uint32_t*)&forMarshaling->releaseCount, sizeof(uint32_t));
6330     if (forMarshaling->releaseCount)
6331     {
6332         uint64_t* cgen_var_239;
6333         vkStream->alloc((void**)&cgen_var_239, forMarshaling->releaseCount * 8);
6334         vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pReleaseSyncs, cgen_var_239, forMarshaling->releaseCount);
6335         vkStream->write((uint64_t*)cgen_var_239, forMarshaling->releaseCount * 8);
6336     }
6337     vkStream->write((const uint64_t*)forMarshaling->pReleaseKeys, forMarshaling->releaseCount * sizeof(const uint64_t));
6338 }
6339 
unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(VulkanStreamGuest * vkStream,VkWin32KeyedMutexAcquireReleaseInfoKHR * forUnmarshaling)6340 void unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(
6341     VulkanStreamGuest* vkStream,
6342     VkWin32KeyedMutexAcquireReleaseInfoKHR* forUnmarshaling)
6343 {
6344     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6345     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6346     vkStream->read((uint32_t*)&forUnmarshaling->acquireCount, sizeof(uint32_t));
6347     if (forUnmarshaling->acquireCount)
6348     {
6349         uint64_t* cgen_var_240;
6350         vkStream->alloc((void**)&cgen_var_240, forUnmarshaling->acquireCount * 8);
6351         vkStream->read((uint64_t*)cgen_var_240, forUnmarshaling->acquireCount * 8);
6352         vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_240, (VkDeviceMemory*)forUnmarshaling->pAcquireSyncs, forUnmarshaling->acquireCount);
6353     }
6354     vkStream->read((uint64_t*)forUnmarshaling->pAcquireKeys, forUnmarshaling->acquireCount * sizeof(const uint64_t));
6355     vkStream->read((uint32_t*)forUnmarshaling->pAcquireTimeouts, forUnmarshaling->acquireCount * sizeof(const uint32_t));
6356     vkStream->read((uint32_t*)&forUnmarshaling->releaseCount, sizeof(uint32_t));
6357     if (forUnmarshaling->releaseCount)
6358     {
6359         uint64_t* cgen_var_241;
6360         vkStream->alloc((void**)&cgen_var_241, forUnmarshaling->releaseCount * 8);
6361         vkStream->read((uint64_t*)cgen_var_241, forUnmarshaling->releaseCount * 8);
6362         vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_241, (VkDeviceMemory*)forUnmarshaling->pReleaseSyncs, forUnmarshaling->releaseCount);
6363     }
6364     vkStream->read((uint64_t*)forUnmarshaling->pReleaseKeys, forUnmarshaling->releaseCount * sizeof(const uint64_t));
6365 }
6366 
6367 #endif
6368 #ifdef VK_KHR_external_semaphore_capabilities
6369 #endif
6370 #ifdef VK_KHR_external_semaphore
6371 #endif
6372 #ifdef VK_KHR_external_semaphore_win32
marshal_VkImportSemaphoreWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkImportSemaphoreWin32HandleInfoKHR * forMarshaling)6373 void marshal_VkImportSemaphoreWin32HandleInfoKHR(
6374     VulkanStreamGuest* vkStream,
6375     const VkImportSemaphoreWin32HandleInfoKHR* forMarshaling)
6376 {
6377     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6378     marshal_extension_struct(vkStream, forMarshaling->pNext);
6379     uint64_t cgen_var_242;
6380     vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_242, 1);
6381     vkStream->write((uint64_t*)&cgen_var_242, 1 * 8);
6382     vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags));
6383     vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6384     vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
6385     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
6386 }
6387 
unmarshal_VkImportSemaphoreWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkImportSemaphoreWin32HandleInfoKHR * forUnmarshaling)6388 void unmarshal_VkImportSemaphoreWin32HandleInfoKHR(
6389     VulkanStreamGuest* vkStream,
6390     VkImportSemaphoreWin32HandleInfoKHR* forUnmarshaling)
6391 {
6392     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6393     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6394     uint64_t cgen_var_243;
6395     vkStream->read((uint64_t*)&cgen_var_243, 1 * 8);
6396     vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_243, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
6397     vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreImportFlags));
6398     vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6399     vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
6400     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
6401 }
6402 
marshal_VkExportSemaphoreWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkExportSemaphoreWin32HandleInfoKHR * forMarshaling)6403 void marshal_VkExportSemaphoreWin32HandleInfoKHR(
6404     VulkanStreamGuest* vkStream,
6405     const VkExportSemaphoreWin32HandleInfoKHR* forMarshaling)
6406 {
6407     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6408     marshal_extension_struct(vkStream, forMarshaling->pNext);
6409     // WARNING PTR CHECK
6410     uint64_t cgen_var_244 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
6411     vkStream->putBe64(cgen_var_244);
6412     if (forMarshaling->pAttributes)
6413     {
6414         vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
6415     }
6416     vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
6417     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
6418 }
6419 
unmarshal_VkExportSemaphoreWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkExportSemaphoreWin32HandleInfoKHR * forUnmarshaling)6420 void unmarshal_VkExportSemaphoreWin32HandleInfoKHR(
6421     VulkanStreamGuest* vkStream,
6422     VkExportSemaphoreWin32HandleInfoKHR* forUnmarshaling)
6423 {
6424     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6425     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6426     // WARNING PTR CHECK
6427     const SECURITY_ATTRIBUTES* check_pAttributes;
6428     check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
6429     if (forUnmarshaling->pAttributes)
6430     {
6431         if (!(check_pAttributes))
6432         {
6433             fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
6434         }
6435         vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
6436     }
6437     vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
6438     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
6439 }
6440 
marshal_VkD3D12FenceSubmitInfoKHR(VulkanStreamGuest * vkStream,const VkD3D12FenceSubmitInfoKHR * forMarshaling)6441 void marshal_VkD3D12FenceSubmitInfoKHR(
6442     VulkanStreamGuest* vkStream,
6443     const VkD3D12FenceSubmitInfoKHR* forMarshaling)
6444 {
6445     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6446     marshal_extension_struct(vkStream, forMarshaling->pNext);
6447     vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreValuesCount, sizeof(uint32_t));
6448     // WARNING PTR CHECK
6449     uint64_t cgen_var_246 = (uint64_t)(uintptr_t)forMarshaling->pWaitSemaphoreValues;
6450     vkStream->putBe64(cgen_var_246);
6451     if (forMarshaling->pWaitSemaphoreValues)
6452     {
6453         vkStream->write((const uint64_t*)forMarshaling->pWaitSemaphoreValues, forMarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t));
6454     }
6455     vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreValuesCount, sizeof(uint32_t));
6456     // WARNING PTR CHECK
6457     uint64_t cgen_var_247 = (uint64_t)(uintptr_t)forMarshaling->pSignalSemaphoreValues;
6458     vkStream->putBe64(cgen_var_247);
6459     if (forMarshaling->pSignalSemaphoreValues)
6460     {
6461         vkStream->write((const uint64_t*)forMarshaling->pSignalSemaphoreValues, forMarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t));
6462     }
6463 }
6464 
unmarshal_VkD3D12FenceSubmitInfoKHR(VulkanStreamGuest * vkStream,VkD3D12FenceSubmitInfoKHR * forUnmarshaling)6465 void unmarshal_VkD3D12FenceSubmitInfoKHR(
6466     VulkanStreamGuest* vkStream,
6467     VkD3D12FenceSubmitInfoKHR* forUnmarshaling)
6468 {
6469     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6470     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6471     vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreValuesCount, sizeof(uint32_t));
6472     // WARNING PTR CHECK
6473     const uint64_t* check_pWaitSemaphoreValues;
6474     check_pWaitSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
6475     if (forUnmarshaling->pWaitSemaphoreValues)
6476     {
6477         if (!(check_pWaitSemaphoreValues))
6478         {
6479             fprintf(stderr, "fatal: forUnmarshaling->pWaitSemaphoreValues inconsistent between guest and host\n");
6480         }
6481         vkStream->read((uint64_t*)forUnmarshaling->pWaitSemaphoreValues, forUnmarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t));
6482     }
6483     vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreValuesCount, sizeof(uint32_t));
6484     // WARNING PTR CHECK
6485     const uint64_t* check_pSignalSemaphoreValues;
6486     check_pSignalSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
6487     if (forUnmarshaling->pSignalSemaphoreValues)
6488     {
6489         if (!(check_pSignalSemaphoreValues))
6490         {
6491             fprintf(stderr, "fatal: forUnmarshaling->pSignalSemaphoreValues inconsistent between guest and host\n");
6492         }
6493         vkStream->read((uint64_t*)forUnmarshaling->pSignalSemaphoreValues, forUnmarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t));
6494     }
6495 }
6496 
marshal_VkSemaphoreGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkSemaphoreGetWin32HandleInfoKHR * forMarshaling)6497 void marshal_VkSemaphoreGetWin32HandleInfoKHR(
6498     VulkanStreamGuest* vkStream,
6499     const VkSemaphoreGetWin32HandleInfoKHR* forMarshaling)
6500 {
6501     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6502     marshal_extension_struct(vkStream, forMarshaling->pNext);
6503     uint64_t cgen_var_250;
6504     vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_250, 1);
6505     vkStream->write((uint64_t*)&cgen_var_250, 1 * 8);
6506     vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6507 }
6508 
unmarshal_VkSemaphoreGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkSemaphoreGetWin32HandleInfoKHR * forUnmarshaling)6509 void unmarshal_VkSemaphoreGetWin32HandleInfoKHR(
6510     VulkanStreamGuest* vkStream,
6511     VkSemaphoreGetWin32HandleInfoKHR* forUnmarshaling)
6512 {
6513     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6514     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6515     uint64_t cgen_var_251;
6516     vkStream->read((uint64_t*)&cgen_var_251, 1 * 8);
6517     vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_251, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
6518     vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6519 }
6520 
6521 #endif
6522 #ifdef VK_KHR_external_semaphore_fd
marshal_VkImportSemaphoreFdInfoKHR(VulkanStreamGuest * vkStream,const VkImportSemaphoreFdInfoKHR * forMarshaling)6523 void marshal_VkImportSemaphoreFdInfoKHR(
6524     VulkanStreamGuest* vkStream,
6525     const VkImportSemaphoreFdInfoKHR* forMarshaling)
6526 {
6527     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6528     marshal_extension_struct(vkStream, forMarshaling->pNext);
6529     uint64_t cgen_var_252;
6530     vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_252, 1);
6531     vkStream->write((uint64_t*)&cgen_var_252, 1 * 8);
6532     vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags));
6533     vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6534     vkStream->write((int*)&forMarshaling->fd, sizeof(int));
6535 }
6536 
unmarshal_VkImportSemaphoreFdInfoKHR(VulkanStreamGuest * vkStream,VkImportSemaphoreFdInfoKHR * forUnmarshaling)6537 void unmarshal_VkImportSemaphoreFdInfoKHR(
6538     VulkanStreamGuest* vkStream,
6539     VkImportSemaphoreFdInfoKHR* forUnmarshaling)
6540 {
6541     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6542     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6543     uint64_t cgen_var_253;
6544     vkStream->read((uint64_t*)&cgen_var_253, 1 * 8);
6545     vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_253, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
6546     vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreImportFlags));
6547     vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6548     vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
6549 }
6550 
marshal_VkSemaphoreGetFdInfoKHR(VulkanStreamGuest * vkStream,const VkSemaphoreGetFdInfoKHR * forMarshaling)6551 void marshal_VkSemaphoreGetFdInfoKHR(
6552     VulkanStreamGuest* vkStream,
6553     const VkSemaphoreGetFdInfoKHR* forMarshaling)
6554 {
6555     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6556     marshal_extension_struct(vkStream, forMarshaling->pNext);
6557     uint64_t cgen_var_254;
6558     vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_254, 1);
6559     vkStream->write((uint64_t*)&cgen_var_254, 1 * 8);
6560     vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6561 }
6562 
unmarshal_VkSemaphoreGetFdInfoKHR(VulkanStreamGuest * vkStream,VkSemaphoreGetFdInfoKHR * forUnmarshaling)6563 void unmarshal_VkSemaphoreGetFdInfoKHR(
6564     VulkanStreamGuest* vkStream,
6565     VkSemaphoreGetFdInfoKHR* forUnmarshaling)
6566 {
6567     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6568     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6569     uint64_t cgen_var_255;
6570     vkStream->read((uint64_t*)&cgen_var_255, 1 * 8);
6571     vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_255, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
6572     vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits));
6573 }
6574 
6575 #endif
6576 #ifdef VK_KHR_push_descriptor
marshal_VkPhysicalDevicePushDescriptorPropertiesKHR(VulkanStreamGuest * vkStream,const VkPhysicalDevicePushDescriptorPropertiesKHR * forMarshaling)6577 void marshal_VkPhysicalDevicePushDescriptorPropertiesKHR(
6578     VulkanStreamGuest* vkStream,
6579     const VkPhysicalDevicePushDescriptorPropertiesKHR* forMarshaling)
6580 {
6581     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6582     marshal_extension_struct(vkStream, forMarshaling->pNext);
6583     vkStream->write((uint32_t*)&forMarshaling->maxPushDescriptors, sizeof(uint32_t));
6584 }
6585 
unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR(VulkanStreamGuest * vkStream,VkPhysicalDevicePushDescriptorPropertiesKHR * forUnmarshaling)6586 void unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR(
6587     VulkanStreamGuest* vkStream,
6588     VkPhysicalDevicePushDescriptorPropertiesKHR* forUnmarshaling)
6589 {
6590     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6591     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6592     vkStream->read((uint32_t*)&forUnmarshaling->maxPushDescriptors, sizeof(uint32_t));
6593 }
6594 
6595 #endif
6596 #ifdef VK_KHR_16bit_storage
6597 #endif
6598 #ifdef VK_KHR_incremental_present
marshal_VkRectLayerKHR(VulkanStreamGuest * vkStream,const VkRectLayerKHR * forMarshaling)6599 void marshal_VkRectLayerKHR(
6600     VulkanStreamGuest* vkStream,
6601     const VkRectLayerKHR* forMarshaling)
6602 {
6603     marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->offset));
6604     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->extent));
6605     vkStream->write((uint32_t*)&forMarshaling->layer, sizeof(uint32_t));
6606 }
6607 
unmarshal_VkRectLayerKHR(VulkanStreamGuest * vkStream,VkRectLayerKHR * forUnmarshaling)6608 void unmarshal_VkRectLayerKHR(
6609     VulkanStreamGuest* vkStream,
6610     VkRectLayerKHR* forUnmarshaling)
6611 {
6612     unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->offset));
6613     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->extent));
6614     vkStream->read((uint32_t*)&forUnmarshaling->layer, sizeof(uint32_t));
6615 }
6616 
marshal_VkPresentRegionKHR(VulkanStreamGuest * vkStream,const VkPresentRegionKHR * forMarshaling)6617 void marshal_VkPresentRegionKHR(
6618     VulkanStreamGuest* vkStream,
6619     const VkPresentRegionKHR* forMarshaling)
6620 {
6621     vkStream->write((uint32_t*)&forMarshaling->rectangleCount, sizeof(uint32_t));
6622     // WARNING PTR CHECK
6623     uint64_t cgen_var_256 = (uint64_t)(uintptr_t)forMarshaling->pRectangles;
6624     vkStream->putBe64(cgen_var_256);
6625     if (forMarshaling->pRectangles)
6626     {
6627         for (uint32_t i = 0; i < (uint32_t)forMarshaling->rectangleCount; ++i)
6628         {
6629             marshal_VkRectLayerKHR(vkStream, (const VkRectLayerKHR*)(forMarshaling->pRectangles + i));
6630         }
6631     }
6632 }
6633 
unmarshal_VkPresentRegionKHR(VulkanStreamGuest * vkStream,VkPresentRegionKHR * forUnmarshaling)6634 void unmarshal_VkPresentRegionKHR(
6635     VulkanStreamGuest* vkStream,
6636     VkPresentRegionKHR* forUnmarshaling)
6637 {
6638     vkStream->read((uint32_t*)&forUnmarshaling->rectangleCount, sizeof(uint32_t));
6639     // WARNING PTR CHECK
6640     const VkRectLayerKHR* check_pRectangles;
6641     check_pRectangles = (const VkRectLayerKHR*)(uintptr_t)vkStream->getBe64();
6642     if (forUnmarshaling->pRectangles)
6643     {
6644         if (!(check_pRectangles))
6645         {
6646             fprintf(stderr, "fatal: forUnmarshaling->pRectangles inconsistent between guest and host\n");
6647         }
6648         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->rectangleCount; ++i)
6649         {
6650             unmarshal_VkRectLayerKHR(vkStream, (VkRectLayerKHR*)(forUnmarshaling->pRectangles + i));
6651         }
6652     }
6653 }
6654 
marshal_VkPresentRegionsKHR(VulkanStreamGuest * vkStream,const VkPresentRegionsKHR * forMarshaling)6655 void marshal_VkPresentRegionsKHR(
6656     VulkanStreamGuest* vkStream,
6657     const VkPresentRegionsKHR* forMarshaling)
6658 {
6659     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6660     marshal_extension_struct(vkStream, forMarshaling->pNext);
6661     vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
6662     // WARNING PTR CHECK
6663     uint64_t cgen_var_258 = (uint64_t)(uintptr_t)forMarshaling->pRegions;
6664     vkStream->putBe64(cgen_var_258);
6665     if (forMarshaling->pRegions)
6666     {
6667         for (uint32_t i = 0; i < (uint32_t)forMarshaling->swapchainCount; ++i)
6668         {
6669             marshal_VkPresentRegionKHR(vkStream, (const VkPresentRegionKHR*)(forMarshaling->pRegions + i));
6670         }
6671     }
6672 }
6673 
unmarshal_VkPresentRegionsKHR(VulkanStreamGuest * vkStream,VkPresentRegionsKHR * forUnmarshaling)6674 void unmarshal_VkPresentRegionsKHR(
6675     VulkanStreamGuest* vkStream,
6676     VkPresentRegionsKHR* forUnmarshaling)
6677 {
6678     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6679     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6680     vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
6681     // WARNING PTR CHECK
6682     const VkPresentRegionKHR* check_pRegions;
6683     check_pRegions = (const VkPresentRegionKHR*)(uintptr_t)vkStream->getBe64();
6684     if (forUnmarshaling->pRegions)
6685     {
6686         if (!(check_pRegions))
6687         {
6688             fprintf(stderr, "fatal: forUnmarshaling->pRegions inconsistent between guest and host\n");
6689         }
6690         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->swapchainCount; ++i)
6691         {
6692             unmarshal_VkPresentRegionKHR(vkStream, (VkPresentRegionKHR*)(forUnmarshaling->pRegions + i));
6693         }
6694     }
6695 }
6696 
6697 #endif
6698 #ifdef VK_KHR_descriptor_update_template
6699 #endif
6700 #ifdef VK_KHR_create_renderpass2
marshal_VkAttachmentDescription2KHR(VulkanStreamGuest * vkStream,const VkAttachmentDescription2KHR * forMarshaling)6701 void marshal_VkAttachmentDescription2KHR(
6702     VulkanStreamGuest* vkStream,
6703     const VkAttachmentDescription2KHR* forMarshaling)
6704 {
6705     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6706     marshal_extension_struct(vkStream, forMarshaling->pNext);
6707     vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags, sizeof(VkAttachmentDescriptionFlags));
6708     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
6709     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
6710     vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp));
6711     vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp));
6712     vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
6713     vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp));
6714     vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
6715     vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout));
6716 }
6717 
unmarshal_VkAttachmentDescription2KHR(VulkanStreamGuest * vkStream,VkAttachmentDescription2KHR * forUnmarshaling)6718 void unmarshal_VkAttachmentDescription2KHR(
6719     VulkanStreamGuest* vkStream,
6720     VkAttachmentDescription2KHR* forUnmarshaling)
6721 {
6722     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6723     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6724     vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkAttachmentDescriptionFlags));
6725     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
6726     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits));
6727     vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp));
6728     vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp));
6729     vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
6730     vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp));
6731     vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
6732     vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout));
6733 }
6734 
marshal_VkAttachmentReference2KHR(VulkanStreamGuest * vkStream,const VkAttachmentReference2KHR * forMarshaling)6735 void marshal_VkAttachmentReference2KHR(
6736     VulkanStreamGuest* vkStream,
6737     const VkAttachmentReference2KHR* forMarshaling)
6738 {
6739     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6740     marshal_extension_struct(vkStream, forMarshaling->pNext);
6741     vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t));
6742     vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout));
6743     vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
6744 }
6745 
unmarshal_VkAttachmentReference2KHR(VulkanStreamGuest * vkStream,VkAttachmentReference2KHR * forUnmarshaling)6746 void unmarshal_VkAttachmentReference2KHR(
6747     VulkanStreamGuest* vkStream,
6748     VkAttachmentReference2KHR* forUnmarshaling)
6749 {
6750     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6751     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6752     vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t));
6753     vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout));
6754     vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
6755 }
6756 
marshal_VkSubpassDescription2KHR(VulkanStreamGuest * vkStream,const VkSubpassDescription2KHR * forMarshaling)6757 void marshal_VkSubpassDescription2KHR(
6758     VulkanStreamGuest* vkStream,
6759     const VkSubpassDescription2KHR* forMarshaling)
6760 {
6761     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6762     marshal_extension_struct(vkStream, forMarshaling->pNext);
6763     vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags, sizeof(VkSubpassDescriptionFlags));
6764     vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
6765     vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t));
6766     vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t));
6767     for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i)
6768     {
6769         marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pInputAttachments + i));
6770     }
6771     vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
6772     for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i)
6773     {
6774         marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pColorAttachments + i));
6775     }
6776     // WARNING PTR CHECK
6777     uint64_t cgen_var_260 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments;
6778     vkStream->putBe64(cgen_var_260);
6779     if (forMarshaling->pResolveAttachments)
6780     {
6781         for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i)
6782         {
6783             marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pResolveAttachments + i));
6784         }
6785     }
6786     // WARNING PTR CHECK
6787     uint64_t cgen_var_261 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment;
6788     vkStream->putBe64(cgen_var_261);
6789     if (forMarshaling->pDepthStencilAttachment)
6790     {
6791         marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pDepthStencilAttachment));
6792     }
6793     vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t));
6794     vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments, forMarshaling->preserveAttachmentCount * sizeof(const uint32_t));
6795 }
6796 
unmarshal_VkSubpassDescription2KHR(VulkanStreamGuest * vkStream,VkSubpassDescription2KHR * forUnmarshaling)6797 void unmarshal_VkSubpassDescription2KHR(
6798     VulkanStreamGuest* vkStream,
6799     VkSubpassDescription2KHR* forUnmarshaling)
6800 {
6801     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6802     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6803     vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkSubpassDescriptionFlags));
6804     vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
6805     vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t));
6806     vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t));
6807     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i)
6808     {
6809         unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pInputAttachments + i));
6810     }
6811     vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
6812     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i)
6813     {
6814         unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pColorAttachments + i));
6815     }
6816     // WARNING PTR CHECK
6817     const VkAttachmentReference2KHR* check_pResolveAttachments;
6818     check_pResolveAttachments = (const VkAttachmentReference2KHR*)(uintptr_t)vkStream->getBe64();
6819     if (forUnmarshaling->pResolveAttachments)
6820     {
6821         if (!(check_pResolveAttachments))
6822         {
6823             fprintf(stderr, "fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and host\n");
6824         }
6825         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i)
6826         {
6827             unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pResolveAttachments + i));
6828         }
6829     }
6830     // WARNING PTR CHECK
6831     const VkAttachmentReference2KHR* check_pDepthStencilAttachment;
6832     check_pDepthStencilAttachment = (const VkAttachmentReference2KHR*)(uintptr_t)vkStream->getBe64();
6833     if (forUnmarshaling->pDepthStencilAttachment)
6834     {
6835         if (!(check_pDepthStencilAttachment))
6836         {
6837             fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest and host\n");
6838         }
6839         unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pDepthStencilAttachment));
6840     }
6841     vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t));
6842     vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments, forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t));
6843 }
6844 
marshal_VkSubpassDependency2KHR(VulkanStreamGuest * vkStream,const VkSubpassDependency2KHR * forMarshaling)6845 void marshal_VkSubpassDependency2KHR(
6846     VulkanStreamGuest* vkStream,
6847     const VkSubpassDependency2KHR* forMarshaling)
6848 {
6849     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6850     marshal_extension_struct(vkStream, forMarshaling->pNext);
6851     vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t));
6852     vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t));
6853     vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask, sizeof(VkPipelineStageFlags));
6854     vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask, sizeof(VkPipelineStageFlags));
6855     vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
6856     vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
6857     vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags));
6858     vkStream->write((int32_t*)&forMarshaling->viewOffset, sizeof(int32_t));
6859 }
6860 
unmarshal_VkSubpassDependency2KHR(VulkanStreamGuest * vkStream,VkSubpassDependency2KHR * forUnmarshaling)6861 void unmarshal_VkSubpassDependency2KHR(
6862     VulkanStreamGuest* vkStream,
6863     VkSubpassDependency2KHR* forUnmarshaling)
6864 {
6865     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6866     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6867     vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t));
6868     vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t));
6869     vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask, sizeof(VkPipelineStageFlags));
6870     vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask, sizeof(VkPipelineStageFlags));
6871     vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
6872     vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
6873     vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags, sizeof(VkDependencyFlags));
6874     vkStream->read((int32_t*)&forUnmarshaling->viewOffset, sizeof(int32_t));
6875 }
6876 
marshal_VkRenderPassCreateInfo2KHR(VulkanStreamGuest * vkStream,const VkRenderPassCreateInfo2KHR * forMarshaling)6877 void marshal_VkRenderPassCreateInfo2KHR(
6878     VulkanStreamGuest* vkStream,
6879     const VkRenderPassCreateInfo2KHR* forMarshaling)
6880 {
6881     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6882     marshal_extension_struct(vkStream, forMarshaling->pNext);
6883     vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags, sizeof(VkRenderPassCreateFlags));
6884     vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
6885     for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i)
6886     {
6887         marshal_VkAttachmentDescription2KHR(vkStream, (const VkAttachmentDescription2KHR*)(forMarshaling->pAttachments + i));
6888     }
6889     vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
6890     for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i)
6891     {
6892         marshal_VkSubpassDescription2KHR(vkStream, (const VkSubpassDescription2KHR*)(forMarshaling->pSubpasses + i));
6893     }
6894     vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
6895     for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i)
6896     {
6897         marshal_VkSubpassDependency2KHR(vkStream, (const VkSubpassDependency2KHR*)(forMarshaling->pDependencies + i));
6898     }
6899     vkStream->write((uint32_t*)&forMarshaling->correlatedViewMaskCount, sizeof(uint32_t));
6900     vkStream->write((const uint32_t*)forMarshaling->pCorrelatedViewMasks, forMarshaling->correlatedViewMaskCount * sizeof(const uint32_t));
6901 }
6902 
unmarshal_VkRenderPassCreateInfo2KHR(VulkanStreamGuest * vkStream,VkRenderPassCreateInfo2KHR * forUnmarshaling)6903 void unmarshal_VkRenderPassCreateInfo2KHR(
6904     VulkanStreamGuest* vkStream,
6905     VkRenderPassCreateInfo2KHR* forUnmarshaling)
6906 {
6907     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6908     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6909     vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags, sizeof(VkRenderPassCreateFlags));
6910     vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
6911     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i)
6912     {
6913         unmarshal_VkAttachmentDescription2KHR(vkStream, (VkAttachmentDescription2KHR*)(forUnmarshaling->pAttachments + i));
6914     }
6915     vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
6916     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i)
6917     {
6918         unmarshal_VkSubpassDescription2KHR(vkStream, (VkSubpassDescription2KHR*)(forUnmarshaling->pSubpasses + i));
6919     }
6920     vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
6921     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i)
6922     {
6923         unmarshal_VkSubpassDependency2KHR(vkStream, (VkSubpassDependency2KHR*)(forUnmarshaling->pDependencies + i));
6924     }
6925     vkStream->read((uint32_t*)&forUnmarshaling->correlatedViewMaskCount, sizeof(uint32_t));
6926     vkStream->read((uint32_t*)forUnmarshaling->pCorrelatedViewMasks, forUnmarshaling->correlatedViewMaskCount * sizeof(const uint32_t));
6927 }
6928 
marshal_VkSubpassBeginInfoKHR(VulkanStreamGuest * vkStream,const VkSubpassBeginInfoKHR * forMarshaling)6929 void marshal_VkSubpassBeginInfoKHR(
6930     VulkanStreamGuest* vkStream,
6931     const VkSubpassBeginInfoKHR* forMarshaling)
6932 {
6933     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6934     marshal_extension_struct(vkStream, forMarshaling->pNext);
6935     vkStream->write((VkSubpassContents*)&forMarshaling->contents, sizeof(VkSubpassContents));
6936 }
6937 
unmarshal_VkSubpassBeginInfoKHR(VulkanStreamGuest * vkStream,VkSubpassBeginInfoKHR * forUnmarshaling)6938 void unmarshal_VkSubpassBeginInfoKHR(
6939     VulkanStreamGuest* vkStream,
6940     VkSubpassBeginInfoKHR* forUnmarshaling)
6941 {
6942     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6943     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6944     vkStream->read((VkSubpassContents*)&forUnmarshaling->contents, sizeof(VkSubpassContents));
6945 }
6946 
marshal_VkSubpassEndInfoKHR(VulkanStreamGuest * vkStream,const VkSubpassEndInfoKHR * forMarshaling)6947 void marshal_VkSubpassEndInfoKHR(
6948     VulkanStreamGuest* vkStream,
6949     const VkSubpassEndInfoKHR* forMarshaling)
6950 {
6951     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6952     marshal_extension_struct(vkStream, forMarshaling->pNext);
6953 }
6954 
unmarshal_VkSubpassEndInfoKHR(VulkanStreamGuest * vkStream,VkSubpassEndInfoKHR * forUnmarshaling)6955 void unmarshal_VkSubpassEndInfoKHR(
6956     VulkanStreamGuest* vkStream,
6957     VkSubpassEndInfoKHR* forUnmarshaling)
6958 {
6959     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6960     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6961 }
6962 
6963 #endif
6964 #ifdef VK_KHR_shared_presentable_image
marshal_VkSharedPresentSurfaceCapabilitiesKHR(VulkanStreamGuest * vkStream,const VkSharedPresentSurfaceCapabilitiesKHR * forMarshaling)6965 void marshal_VkSharedPresentSurfaceCapabilitiesKHR(
6966     VulkanStreamGuest* vkStream,
6967     const VkSharedPresentSurfaceCapabilitiesKHR* forMarshaling)
6968 {
6969     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6970     marshal_extension_struct(vkStream, forMarshaling->pNext);
6971     vkStream->write((VkImageUsageFlags*)&forMarshaling->sharedPresentSupportedUsageFlags, sizeof(VkImageUsageFlags));
6972 }
6973 
unmarshal_VkSharedPresentSurfaceCapabilitiesKHR(VulkanStreamGuest * vkStream,VkSharedPresentSurfaceCapabilitiesKHR * forUnmarshaling)6974 void unmarshal_VkSharedPresentSurfaceCapabilitiesKHR(
6975     VulkanStreamGuest* vkStream,
6976     VkSharedPresentSurfaceCapabilitiesKHR* forUnmarshaling)
6977 {
6978     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
6979     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
6980     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->sharedPresentSupportedUsageFlags, sizeof(VkImageUsageFlags));
6981 }
6982 
6983 #endif
6984 #ifdef VK_KHR_external_fence_capabilities
6985 #endif
6986 #ifdef VK_KHR_external_fence
6987 #endif
6988 #ifdef VK_KHR_external_fence_win32
marshal_VkImportFenceWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkImportFenceWin32HandleInfoKHR * forMarshaling)6989 void marshal_VkImportFenceWin32HandleInfoKHR(
6990     VulkanStreamGuest* vkStream,
6991     const VkImportFenceWin32HandleInfoKHR* forMarshaling)
6992 {
6993     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
6994     marshal_extension_struct(vkStream, forMarshaling->pNext);
6995     uint64_t cgen_var_264;
6996     vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_264, 1);
6997     vkStream->write((uint64_t*)&cgen_var_264, 1 * 8);
6998     vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags));
6999     vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7000     vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
7001     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
7002 }
7003 
unmarshal_VkImportFenceWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkImportFenceWin32HandleInfoKHR * forUnmarshaling)7004 void unmarshal_VkImportFenceWin32HandleInfoKHR(
7005     VulkanStreamGuest* vkStream,
7006     VkImportFenceWin32HandleInfoKHR* forUnmarshaling)
7007 {
7008     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7009     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7010     uint64_t cgen_var_265;
7011     vkStream->read((uint64_t*)&cgen_var_265, 1 * 8);
7012     vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_265, (VkFence*)&forUnmarshaling->fence, 1);
7013     vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags));
7014     vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7015     vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
7016     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
7017 }
7018 
marshal_VkExportFenceWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkExportFenceWin32HandleInfoKHR * forMarshaling)7019 void marshal_VkExportFenceWin32HandleInfoKHR(
7020     VulkanStreamGuest* vkStream,
7021     const VkExportFenceWin32HandleInfoKHR* forMarshaling)
7022 {
7023     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7024     marshal_extension_struct(vkStream, forMarshaling->pNext);
7025     // WARNING PTR CHECK
7026     uint64_t cgen_var_266 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
7027     vkStream->putBe64(cgen_var_266);
7028     if (forMarshaling->pAttributes)
7029     {
7030         vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
7031     }
7032     vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
7033     vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
7034 }
7035 
unmarshal_VkExportFenceWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkExportFenceWin32HandleInfoKHR * forUnmarshaling)7036 void unmarshal_VkExportFenceWin32HandleInfoKHR(
7037     VulkanStreamGuest* vkStream,
7038     VkExportFenceWin32HandleInfoKHR* forUnmarshaling)
7039 {
7040     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7041     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7042     // WARNING PTR CHECK
7043     const SECURITY_ATTRIBUTES* check_pAttributes;
7044     check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
7045     if (forUnmarshaling->pAttributes)
7046     {
7047         if (!(check_pAttributes))
7048         {
7049             fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
7050         }
7051         vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
7052     }
7053     vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
7054     vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
7055 }
7056 
marshal_VkFenceGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,const VkFenceGetWin32HandleInfoKHR * forMarshaling)7057 void marshal_VkFenceGetWin32HandleInfoKHR(
7058     VulkanStreamGuest* vkStream,
7059     const VkFenceGetWin32HandleInfoKHR* forMarshaling)
7060 {
7061     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7062     marshal_extension_struct(vkStream, forMarshaling->pNext);
7063     uint64_t cgen_var_268;
7064     vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_268, 1);
7065     vkStream->write((uint64_t*)&cgen_var_268, 1 * 8);
7066     vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7067 }
7068 
unmarshal_VkFenceGetWin32HandleInfoKHR(VulkanStreamGuest * vkStream,VkFenceGetWin32HandleInfoKHR * forUnmarshaling)7069 void unmarshal_VkFenceGetWin32HandleInfoKHR(
7070     VulkanStreamGuest* vkStream,
7071     VkFenceGetWin32HandleInfoKHR* forUnmarshaling)
7072 {
7073     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7074     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7075     uint64_t cgen_var_269;
7076     vkStream->read((uint64_t*)&cgen_var_269, 1 * 8);
7077     vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_269, (VkFence*)&forUnmarshaling->fence, 1);
7078     vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7079 }
7080 
7081 #endif
7082 #ifdef VK_KHR_external_fence_fd
marshal_VkImportFenceFdInfoKHR(VulkanStreamGuest * vkStream,const VkImportFenceFdInfoKHR * forMarshaling)7083 void marshal_VkImportFenceFdInfoKHR(
7084     VulkanStreamGuest* vkStream,
7085     const VkImportFenceFdInfoKHR* forMarshaling)
7086 {
7087     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7088     marshal_extension_struct(vkStream, forMarshaling->pNext);
7089     uint64_t cgen_var_270;
7090     vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_270, 1);
7091     vkStream->write((uint64_t*)&cgen_var_270, 1 * 8);
7092     vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags));
7093     vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7094     vkStream->write((int*)&forMarshaling->fd, sizeof(int));
7095 }
7096 
unmarshal_VkImportFenceFdInfoKHR(VulkanStreamGuest * vkStream,VkImportFenceFdInfoKHR * forUnmarshaling)7097 void unmarshal_VkImportFenceFdInfoKHR(
7098     VulkanStreamGuest* vkStream,
7099     VkImportFenceFdInfoKHR* forUnmarshaling)
7100 {
7101     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7102     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7103     uint64_t cgen_var_271;
7104     vkStream->read((uint64_t*)&cgen_var_271, 1 * 8);
7105     vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_271, (VkFence*)&forUnmarshaling->fence, 1);
7106     vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags));
7107     vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7108     vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
7109 }
7110 
marshal_VkFenceGetFdInfoKHR(VulkanStreamGuest * vkStream,const VkFenceGetFdInfoKHR * forMarshaling)7111 void marshal_VkFenceGetFdInfoKHR(
7112     VulkanStreamGuest* vkStream,
7113     const VkFenceGetFdInfoKHR* forMarshaling)
7114 {
7115     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7116     marshal_extension_struct(vkStream, forMarshaling->pNext);
7117     uint64_t cgen_var_272;
7118     vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_272, 1);
7119     vkStream->write((uint64_t*)&cgen_var_272, 1 * 8);
7120     vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7121 }
7122 
unmarshal_VkFenceGetFdInfoKHR(VulkanStreamGuest * vkStream,VkFenceGetFdInfoKHR * forUnmarshaling)7123 void unmarshal_VkFenceGetFdInfoKHR(
7124     VulkanStreamGuest* vkStream,
7125     VkFenceGetFdInfoKHR* forUnmarshaling)
7126 {
7127     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7128     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7129     uint64_t cgen_var_273;
7130     vkStream->read((uint64_t*)&cgen_var_273, 1 * 8);
7131     vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_273, (VkFence*)&forUnmarshaling->fence, 1);
7132     vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits));
7133 }
7134 
7135 #endif
7136 #ifdef VK_KHR_maintenance2
7137 #endif
7138 #ifdef VK_KHR_get_surface_capabilities2
marshal_VkPhysicalDeviceSurfaceInfo2KHR(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSurfaceInfo2KHR * forMarshaling)7139 void marshal_VkPhysicalDeviceSurfaceInfo2KHR(
7140     VulkanStreamGuest* vkStream,
7141     const VkPhysicalDeviceSurfaceInfo2KHR* forMarshaling)
7142 {
7143     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7144     marshal_extension_struct(vkStream, forMarshaling->pNext);
7145     uint64_t cgen_var_274;
7146     vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_274, 1);
7147     vkStream->write((uint64_t*)&cgen_var_274, 1 * 8);
7148 }
7149 
unmarshal_VkPhysicalDeviceSurfaceInfo2KHR(VulkanStreamGuest * vkStream,VkPhysicalDeviceSurfaceInfo2KHR * forUnmarshaling)7150 void unmarshal_VkPhysicalDeviceSurfaceInfo2KHR(
7151     VulkanStreamGuest* vkStream,
7152     VkPhysicalDeviceSurfaceInfo2KHR* forUnmarshaling)
7153 {
7154     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7155     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7156     uint64_t cgen_var_275;
7157     vkStream->read((uint64_t*)&cgen_var_275, 1 * 8);
7158     vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_275, (VkSurfaceKHR*)&forUnmarshaling->surface, 1);
7159 }
7160 
marshal_VkSurfaceCapabilities2KHR(VulkanStreamGuest * vkStream,const VkSurfaceCapabilities2KHR * forMarshaling)7161 void marshal_VkSurfaceCapabilities2KHR(
7162     VulkanStreamGuest* vkStream,
7163     const VkSurfaceCapabilities2KHR* forMarshaling)
7164 {
7165     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7166     marshal_extension_struct(vkStream, forMarshaling->pNext);
7167     marshal_VkSurfaceCapabilitiesKHR(vkStream, (VkSurfaceCapabilitiesKHR*)(&forMarshaling->surfaceCapabilities));
7168 }
7169 
unmarshal_VkSurfaceCapabilities2KHR(VulkanStreamGuest * vkStream,VkSurfaceCapabilities2KHR * forUnmarshaling)7170 void unmarshal_VkSurfaceCapabilities2KHR(
7171     VulkanStreamGuest* vkStream,
7172     VkSurfaceCapabilities2KHR* forUnmarshaling)
7173 {
7174     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7175     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7176     unmarshal_VkSurfaceCapabilitiesKHR(vkStream, (VkSurfaceCapabilitiesKHR*)(&forUnmarshaling->surfaceCapabilities));
7177 }
7178 
marshal_VkSurfaceFormat2KHR(VulkanStreamGuest * vkStream,const VkSurfaceFormat2KHR * forMarshaling)7179 void marshal_VkSurfaceFormat2KHR(
7180     VulkanStreamGuest* vkStream,
7181     const VkSurfaceFormat2KHR* forMarshaling)
7182 {
7183     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7184     marshal_extension_struct(vkStream, forMarshaling->pNext);
7185     marshal_VkSurfaceFormatKHR(vkStream, (VkSurfaceFormatKHR*)(&forMarshaling->surfaceFormat));
7186 }
7187 
unmarshal_VkSurfaceFormat2KHR(VulkanStreamGuest * vkStream,VkSurfaceFormat2KHR * forUnmarshaling)7188 void unmarshal_VkSurfaceFormat2KHR(
7189     VulkanStreamGuest* vkStream,
7190     VkSurfaceFormat2KHR* forUnmarshaling)
7191 {
7192     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7193     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7194     unmarshal_VkSurfaceFormatKHR(vkStream, (VkSurfaceFormatKHR*)(&forUnmarshaling->surfaceFormat));
7195 }
7196 
7197 #endif
7198 #ifdef VK_KHR_variable_pointers
7199 #endif
7200 #ifdef VK_KHR_get_display_properties2
marshal_VkDisplayProperties2KHR(VulkanStreamGuest * vkStream,const VkDisplayProperties2KHR * forMarshaling)7201 void marshal_VkDisplayProperties2KHR(
7202     VulkanStreamGuest* vkStream,
7203     const VkDisplayProperties2KHR* forMarshaling)
7204 {
7205     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7206     marshal_extension_struct(vkStream, forMarshaling->pNext);
7207     marshal_VkDisplayPropertiesKHR(vkStream, (VkDisplayPropertiesKHR*)(&forMarshaling->displayProperties));
7208 }
7209 
unmarshal_VkDisplayProperties2KHR(VulkanStreamGuest * vkStream,VkDisplayProperties2KHR * forUnmarshaling)7210 void unmarshal_VkDisplayProperties2KHR(
7211     VulkanStreamGuest* vkStream,
7212     VkDisplayProperties2KHR* forUnmarshaling)
7213 {
7214     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7215     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7216     unmarshal_VkDisplayPropertiesKHR(vkStream, (VkDisplayPropertiesKHR*)(&forUnmarshaling->displayProperties));
7217 }
7218 
marshal_VkDisplayPlaneProperties2KHR(VulkanStreamGuest * vkStream,const VkDisplayPlaneProperties2KHR * forMarshaling)7219 void marshal_VkDisplayPlaneProperties2KHR(
7220     VulkanStreamGuest* vkStream,
7221     const VkDisplayPlaneProperties2KHR* forMarshaling)
7222 {
7223     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7224     marshal_extension_struct(vkStream, forMarshaling->pNext);
7225     marshal_VkDisplayPlanePropertiesKHR(vkStream, (VkDisplayPlanePropertiesKHR*)(&forMarshaling->displayPlaneProperties));
7226 }
7227 
unmarshal_VkDisplayPlaneProperties2KHR(VulkanStreamGuest * vkStream,VkDisplayPlaneProperties2KHR * forUnmarshaling)7228 void unmarshal_VkDisplayPlaneProperties2KHR(
7229     VulkanStreamGuest* vkStream,
7230     VkDisplayPlaneProperties2KHR* forUnmarshaling)
7231 {
7232     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7233     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7234     unmarshal_VkDisplayPlanePropertiesKHR(vkStream, (VkDisplayPlanePropertiesKHR*)(&forUnmarshaling->displayPlaneProperties));
7235 }
7236 
marshal_VkDisplayModeProperties2KHR(VulkanStreamGuest * vkStream,const VkDisplayModeProperties2KHR * forMarshaling)7237 void marshal_VkDisplayModeProperties2KHR(
7238     VulkanStreamGuest* vkStream,
7239     const VkDisplayModeProperties2KHR* forMarshaling)
7240 {
7241     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7242     marshal_extension_struct(vkStream, forMarshaling->pNext);
7243     marshal_VkDisplayModePropertiesKHR(vkStream, (VkDisplayModePropertiesKHR*)(&forMarshaling->displayModeProperties));
7244 }
7245 
unmarshal_VkDisplayModeProperties2KHR(VulkanStreamGuest * vkStream,VkDisplayModeProperties2KHR * forUnmarshaling)7246 void unmarshal_VkDisplayModeProperties2KHR(
7247     VulkanStreamGuest* vkStream,
7248     VkDisplayModeProperties2KHR* forUnmarshaling)
7249 {
7250     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7251     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7252     unmarshal_VkDisplayModePropertiesKHR(vkStream, (VkDisplayModePropertiesKHR*)(&forUnmarshaling->displayModeProperties));
7253 }
7254 
marshal_VkDisplayPlaneInfo2KHR(VulkanStreamGuest * vkStream,const VkDisplayPlaneInfo2KHR * forMarshaling)7255 void marshal_VkDisplayPlaneInfo2KHR(
7256     VulkanStreamGuest* vkStream,
7257     const VkDisplayPlaneInfo2KHR* forMarshaling)
7258 {
7259     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7260     marshal_extension_struct(vkStream, forMarshaling->pNext);
7261     uint64_t cgen_var_276;
7262     vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->mode, &cgen_var_276, 1);
7263     vkStream->write((uint64_t*)&cgen_var_276, 1 * 8);
7264     vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t));
7265 }
7266 
unmarshal_VkDisplayPlaneInfo2KHR(VulkanStreamGuest * vkStream,VkDisplayPlaneInfo2KHR * forUnmarshaling)7267 void unmarshal_VkDisplayPlaneInfo2KHR(
7268     VulkanStreamGuest* vkStream,
7269     VkDisplayPlaneInfo2KHR* forUnmarshaling)
7270 {
7271     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7272     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7273     uint64_t cgen_var_277;
7274     vkStream->read((uint64_t*)&cgen_var_277, 1 * 8);
7275     vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_277, (VkDisplayModeKHR*)&forUnmarshaling->mode, 1);
7276     vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t));
7277 }
7278 
marshal_VkDisplayPlaneCapabilities2KHR(VulkanStreamGuest * vkStream,const VkDisplayPlaneCapabilities2KHR * forMarshaling)7279 void marshal_VkDisplayPlaneCapabilities2KHR(
7280     VulkanStreamGuest* vkStream,
7281     const VkDisplayPlaneCapabilities2KHR* forMarshaling)
7282 {
7283     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7284     marshal_extension_struct(vkStream, forMarshaling->pNext);
7285     marshal_VkDisplayPlaneCapabilitiesKHR(vkStream, (VkDisplayPlaneCapabilitiesKHR*)(&forMarshaling->capabilities));
7286 }
7287 
unmarshal_VkDisplayPlaneCapabilities2KHR(VulkanStreamGuest * vkStream,VkDisplayPlaneCapabilities2KHR * forUnmarshaling)7288 void unmarshal_VkDisplayPlaneCapabilities2KHR(
7289     VulkanStreamGuest* vkStream,
7290     VkDisplayPlaneCapabilities2KHR* forUnmarshaling)
7291 {
7292     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7293     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7294     unmarshal_VkDisplayPlaneCapabilitiesKHR(vkStream, (VkDisplayPlaneCapabilitiesKHR*)(&forUnmarshaling->capabilities));
7295 }
7296 
7297 #endif
7298 #ifdef VK_KHR_dedicated_allocation
7299 #endif
7300 #ifdef VK_KHR_storage_buffer_storage_class
7301 #endif
7302 #ifdef VK_KHR_relaxed_block_layout
7303 #endif
7304 #ifdef VK_KHR_get_memory_requirements2
7305 #endif
7306 #ifdef VK_KHR_image_format_list
marshal_VkImageFormatListCreateInfoKHR(VulkanStreamGuest * vkStream,const VkImageFormatListCreateInfoKHR * forMarshaling)7307 void marshal_VkImageFormatListCreateInfoKHR(
7308     VulkanStreamGuest* vkStream,
7309     const VkImageFormatListCreateInfoKHR* forMarshaling)
7310 {
7311     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7312     marshal_extension_struct(vkStream, forMarshaling->pNext);
7313     vkStream->write((uint32_t*)&forMarshaling->viewFormatCount, sizeof(uint32_t));
7314     vkStream->write((const VkFormat*)forMarshaling->pViewFormats, forMarshaling->viewFormatCount * sizeof(const VkFormat));
7315 }
7316 
unmarshal_VkImageFormatListCreateInfoKHR(VulkanStreamGuest * vkStream,VkImageFormatListCreateInfoKHR * forUnmarshaling)7317 void unmarshal_VkImageFormatListCreateInfoKHR(
7318     VulkanStreamGuest* vkStream,
7319     VkImageFormatListCreateInfoKHR* forUnmarshaling)
7320 {
7321     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7322     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7323     vkStream->read((uint32_t*)&forUnmarshaling->viewFormatCount, sizeof(uint32_t));
7324     vkStream->read((VkFormat*)forUnmarshaling->pViewFormats, forUnmarshaling->viewFormatCount * sizeof(const VkFormat));
7325 }
7326 
7327 #endif
7328 #ifdef VK_KHR_sampler_ycbcr_conversion
7329 #endif
7330 #ifdef VK_KHR_bind_memory2
7331 #endif
7332 #ifdef VK_KHR_maintenance3
7333 #endif
7334 #ifdef VK_KHR_draw_indirect_count
7335 #endif
7336 #ifdef VK_KHR_8bit_storage
marshal_VkPhysicalDevice8BitStorageFeaturesKHR(VulkanStreamGuest * vkStream,const VkPhysicalDevice8BitStorageFeaturesKHR * forMarshaling)7337 void marshal_VkPhysicalDevice8BitStorageFeaturesKHR(
7338     VulkanStreamGuest* vkStream,
7339     const VkPhysicalDevice8BitStorageFeaturesKHR* forMarshaling)
7340 {
7341     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7342     marshal_extension_struct(vkStream, forMarshaling->pNext);
7343     vkStream->write((VkBool32*)&forMarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
7344     vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32));
7345     vkStream->write((VkBool32*)&forMarshaling->storagePushConstant8, sizeof(VkBool32));
7346 }
7347 
unmarshal_VkPhysicalDevice8BitStorageFeaturesKHR(VulkanStreamGuest * vkStream,VkPhysicalDevice8BitStorageFeaturesKHR * forUnmarshaling)7348 void unmarshal_VkPhysicalDevice8BitStorageFeaturesKHR(
7349     VulkanStreamGuest* vkStream,
7350     VkPhysicalDevice8BitStorageFeaturesKHR* forUnmarshaling)
7351 {
7352     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7353     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7354     vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
7355     vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32));
7356     vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant8, sizeof(VkBool32));
7357 }
7358 
7359 #endif
7360 #ifdef VK_KHR_shader_float16_int8
marshal_VkPhysicalDeviceShaderFloat16Int8Features(VulkanStreamGuest * vkStream,const VkPhysicalDeviceShaderFloat16Int8Features * forMarshaling)7361 void marshal_VkPhysicalDeviceShaderFloat16Int8Features(
7362     VulkanStreamGuest* vkStream,
7363     const VkPhysicalDeviceShaderFloat16Int8Features* forMarshaling)
7364 {
7365     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7366     marshal_extension_struct(vkStream, forMarshaling->pNext);
7367     vkStream->write((VkBool32*)&forMarshaling->shaderFloat16, sizeof(VkBool32));
7368     vkStream->write((VkBool32*)&forMarshaling->shaderInt8, sizeof(VkBool32));
7369 }
7370 
unmarshal_VkPhysicalDeviceShaderFloat16Int8Features(VulkanStreamGuest * vkStream,VkPhysicalDeviceShaderFloat16Int8Features * forUnmarshaling)7371 void unmarshal_VkPhysicalDeviceShaderFloat16Int8Features(
7372     VulkanStreamGuest* vkStream,
7373     VkPhysicalDeviceShaderFloat16Int8Features* forUnmarshaling)
7374 {
7375     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7376     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7377     vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat16, sizeof(VkBool32));
7378     vkStream->read((VkBool32*)&forUnmarshaling->shaderInt8, sizeof(VkBool32));
7379 }
7380 
7381 #endif
7382 #ifdef VK_ANDROID_native_buffer
marshal_VkNativeBufferANDROID(VulkanStreamGuest * vkStream,const VkNativeBufferANDROID * forMarshaling)7383 void marshal_VkNativeBufferANDROID(
7384     VulkanStreamGuest* vkStream,
7385     const VkNativeBufferANDROID* forMarshaling)
7386 {
7387     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7388     marshal_extension_struct(vkStream, forMarshaling->pNext);
7389     // WARNING PTR CHECK
7390     uint64_t cgen_var_278 = (uint64_t)(uintptr_t)forMarshaling->handle;
7391     vkStream->putBe64(cgen_var_278);
7392     if (forMarshaling->handle)
7393     {
7394         vkStream->write((const uint32_t*)forMarshaling->handle, sizeof(const uint32_t));
7395     }
7396     vkStream->write((int*)&forMarshaling->stride, sizeof(int));
7397     vkStream->write((int*)&forMarshaling->format, sizeof(int));
7398     vkStream->write((int*)&forMarshaling->usage, sizeof(int));
7399     vkStream->write((uint64_t*)&forMarshaling->consumer, sizeof(uint64_t));
7400     vkStream->write((uint64_t*)&forMarshaling->producer, sizeof(uint64_t));
7401 }
7402 
unmarshal_VkNativeBufferANDROID(VulkanStreamGuest * vkStream,VkNativeBufferANDROID * forUnmarshaling)7403 void unmarshal_VkNativeBufferANDROID(
7404     VulkanStreamGuest* vkStream,
7405     VkNativeBufferANDROID* forUnmarshaling)
7406 {
7407     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7408     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7409     // WARNING PTR CHECK
7410     const uint32_t* check_handle;
7411     check_handle = (const uint32_t*)(uintptr_t)vkStream->getBe64();
7412     if (forUnmarshaling->handle)
7413     {
7414         if (!(check_handle))
7415         {
7416             fprintf(stderr, "fatal: forUnmarshaling->handle inconsistent between guest and host\n");
7417         }
7418         vkStream->read((uint32_t*)forUnmarshaling->handle, sizeof(const uint32_t));
7419     }
7420     vkStream->read((int*)&forUnmarshaling->stride, sizeof(int));
7421     vkStream->read((int*)&forUnmarshaling->format, sizeof(int));
7422     vkStream->read((int*)&forUnmarshaling->usage, sizeof(int));
7423     vkStream->read((uint64_t*)&forUnmarshaling->consumer, sizeof(uint64_t));
7424     vkStream->read((uint64_t*)&forUnmarshaling->producer, sizeof(uint64_t));
7425 }
7426 
7427 #endif
7428 #ifdef VK_EXT_debug_report
marshal_VkDebugReportCallbackCreateInfoEXT(VulkanStreamGuest * vkStream,const VkDebugReportCallbackCreateInfoEXT * forMarshaling)7429 void marshal_VkDebugReportCallbackCreateInfoEXT(
7430     VulkanStreamGuest* vkStream,
7431     const VkDebugReportCallbackCreateInfoEXT* forMarshaling)
7432 {
7433     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7434     marshal_extension_struct(vkStream, forMarshaling->pNext);
7435     vkStream->write((VkDebugReportFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugReportFlagsEXT));
7436     uint64_t cgen_var_280 = (uint64_t)forMarshaling->pfnCallback;
7437     vkStream->putBe64(cgen_var_280);
7438     // WARNING PTR CHECK
7439     uint64_t cgen_var_281 = (uint64_t)(uintptr_t)forMarshaling->pUserData;
7440     vkStream->putBe64(cgen_var_281);
7441     if (forMarshaling->pUserData)
7442     {
7443         vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t));
7444     }
7445 }
7446 
unmarshal_VkDebugReportCallbackCreateInfoEXT(VulkanStreamGuest * vkStream,VkDebugReportCallbackCreateInfoEXT * forUnmarshaling)7447 void unmarshal_VkDebugReportCallbackCreateInfoEXT(
7448     VulkanStreamGuest* vkStream,
7449     VkDebugReportCallbackCreateInfoEXT* forUnmarshaling)
7450 {
7451     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7452     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7453     vkStream->read((VkDebugReportFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugReportFlagsEXT));
7454     forUnmarshaling->pfnCallback = (PFN_vkDebugReportCallbackEXT)vkStream->getBe64();
7455     // WARNING PTR CHECK
7456     void* check_pUserData;
7457     check_pUserData = (void*)(uintptr_t)vkStream->getBe64();
7458     if (forUnmarshaling->pUserData)
7459     {
7460         if (!(check_pUserData))
7461         {
7462             fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n");
7463         }
7464         vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t));
7465     }
7466 }
7467 
7468 #endif
7469 #ifdef VK_NV_glsl_shader
7470 #endif
7471 #ifdef VK_EXT_depth_range_unrestricted
7472 #endif
7473 #ifdef VK_IMG_filter_cubic
7474 #endif
7475 #ifdef VK_AMD_rasterization_order
marshal_VkPipelineRasterizationStateRasterizationOrderAMD(VulkanStreamGuest * vkStream,const VkPipelineRasterizationStateRasterizationOrderAMD * forMarshaling)7476 void marshal_VkPipelineRasterizationStateRasterizationOrderAMD(
7477     VulkanStreamGuest* vkStream,
7478     const VkPipelineRasterizationStateRasterizationOrderAMD* forMarshaling)
7479 {
7480     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7481     marshal_extension_struct(vkStream, forMarshaling->pNext);
7482     vkStream->write((VkRasterizationOrderAMD*)&forMarshaling->rasterizationOrder, sizeof(VkRasterizationOrderAMD));
7483 }
7484 
unmarshal_VkPipelineRasterizationStateRasterizationOrderAMD(VulkanStreamGuest * vkStream,VkPipelineRasterizationStateRasterizationOrderAMD * forUnmarshaling)7485 void unmarshal_VkPipelineRasterizationStateRasterizationOrderAMD(
7486     VulkanStreamGuest* vkStream,
7487     VkPipelineRasterizationStateRasterizationOrderAMD* forUnmarshaling)
7488 {
7489     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7490     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7491     vkStream->read((VkRasterizationOrderAMD*)&forUnmarshaling->rasterizationOrder, sizeof(VkRasterizationOrderAMD));
7492 }
7493 
7494 #endif
7495 #ifdef VK_AMD_shader_trinary_minmax
7496 #endif
7497 #ifdef VK_AMD_shader_explicit_vertex_parameter
7498 #endif
7499 #ifdef VK_EXT_debug_marker
marshal_VkDebugMarkerObjectNameInfoEXT(VulkanStreamGuest * vkStream,const VkDebugMarkerObjectNameInfoEXT * forMarshaling)7500 void marshal_VkDebugMarkerObjectNameInfoEXT(
7501     VulkanStreamGuest* vkStream,
7502     const VkDebugMarkerObjectNameInfoEXT* forMarshaling)
7503 {
7504     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7505     marshal_extension_struct(vkStream, forMarshaling->pNext);
7506     vkStream->write((VkDebugReportObjectTypeEXT*)&forMarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT));
7507     vkStream->write((uint64_t*)&forMarshaling->object, sizeof(uint64_t));
7508     vkStream->putString(forMarshaling->pObjectName);
7509 }
7510 
unmarshal_VkDebugMarkerObjectNameInfoEXT(VulkanStreamGuest * vkStream,VkDebugMarkerObjectNameInfoEXT * forUnmarshaling)7511 void unmarshal_VkDebugMarkerObjectNameInfoEXT(
7512     VulkanStreamGuest* vkStream,
7513     VkDebugMarkerObjectNameInfoEXT* forUnmarshaling)
7514 {
7515     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7516     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7517     vkStream->read((VkDebugReportObjectTypeEXT*)&forUnmarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT));
7518     vkStream->read((uint64_t*)&forUnmarshaling->object, sizeof(uint64_t));
7519     vkStream->loadStringInPlace((char**)&forUnmarshaling->pObjectName);
7520 }
7521 
marshal_VkDebugMarkerObjectTagInfoEXT(VulkanStreamGuest * vkStream,const VkDebugMarkerObjectTagInfoEXT * forMarshaling)7522 void marshal_VkDebugMarkerObjectTagInfoEXT(
7523     VulkanStreamGuest* vkStream,
7524     const VkDebugMarkerObjectTagInfoEXT* forMarshaling)
7525 {
7526     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7527     marshal_extension_struct(vkStream, forMarshaling->pNext);
7528     vkStream->write((VkDebugReportObjectTypeEXT*)&forMarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT));
7529     vkStream->write((uint64_t*)&forMarshaling->object, sizeof(uint64_t));
7530     vkStream->write((uint64_t*)&forMarshaling->tagName, sizeof(uint64_t));
7531     uint64_t cgen_var_284 = (uint64_t)forMarshaling->tagSize;
7532     vkStream->putBe64(cgen_var_284);
7533     vkStream->write((const void*)forMarshaling->pTag, forMarshaling->tagSize * sizeof(const uint8_t));
7534 }
7535 
unmarshal_VkDebugMarkerObjectTagInfoEXT(VulkanStreamGuest * vkStream,VkDebugMarkerObjectTagInfoEXT * forUnmarshaling)7536 void unmarshal_VkDebugMarkerObjectTagInfoEXT(
7537     VulkanStreamGuest* vkStream,
7538     VkDebugMarkerObjectTagInfoEXT* forUnmarshaling)
7539 {
7540     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7541     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7542     vkStream->read((VkDebugReportObjectTypeEXT*)&forUnmarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT));
7543     vkStream->read((uint64_t*)&forUnmarshaling->object, sizeof(uint64_t));
7544     vkStream->read((uint64_t*)&forUnmarshaling->tagName, sizeof(uint64_t));
7545     forUnmarshaling->tagSize = (size_t)vkStream->getBe64();
7546     vkStream->read((void*)forUnmarshaling->pTag, forUnmarshaling->tagSize * sizeof(const uint8_t));
7547 }
7548 
marshal_VkDebugMarkerMarkerInfoEXT(VulkanStreamGuest * vkStream,const VkDebugMarkerMarkerInfoEXT * forMarshaling)7549 void marshal_VkDebugMarkerMarkerInfoEXT(
7550     VulkanStreamGuest* vkStream,
7551     const VkDebugMarkerMarkerInfoEXT* forMarshaling)
7552 {
7553     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7554     marshal_extension_struct(vkStream, forMarshaling->pNext);
7555     vkStream->putString(forMarshaling->pMarkerName);
7556     vkStream->write((float*)forMarshaling->color, 4 * sizeof(float));
7557 }
7558 
unmarshal_VkDebugMarkerMarkerInfoEXT(VulkanStreamGuest * vkStream,VkDebugMarkerMarkerInfoEXT * forUnmarshaling)7559 void unmarshal_VkDebugMarkerMarkerInfoEXT(
7560     VulkanStreamGuest* vkStream,
7561     VkDebugMarkerMarkerInfoEXT* forUnmarshaling)
7562 {
7563     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7564     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7565     vkStream->loadStringInPlace((char**)&forUnmarshaling->pMarkerName);
7566     vkStream->read((float*)forUnmarshaling->color, 4 * sizeof(float));
7567 }
7568 
7569 #endif
7570 #ifdef VK_AMD_gcn_shader
7571 #endif
7572 #ifdef VK_NV_dedicated_allocation
marshal_VkDedicatedAllocationImageCreateInfoNV(VulkanStreamGuest * vkStream,const VkDedicatedAllocationImageCreateInfoNV * forMarshaling)7573 void marshal_VkDedicatedAllocationImageCreateInfoNV(
7574     VulkanStreamGuest* vkStream,
7575     const VkDedicatedAllocationImageCreateInfoNV* forMarshaling)
7576 {
7577     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7578     marshal_extension_struct(vkStream, forMarshaling->pNext);
7579     vkStream->write((VkBool32*)&forMarshaling->dedicatedAllocation, sizeof(VkBool32));
7580 }
7581 
unmarshal_VkDedicatedAllocationImageCreateInfoNV(VulkanStreamGuest * vkStream,VkDedicatedAllocationImageCreateInfoNV * forUnmarshaling)7582 void unmarshal_VkDedicatedAllocationImageCreateInfoNV(
7583     VulkanStreamGuest* vkStream,
7584     VkDedicatedAllocationImageCreateInfoNV* forUnmarshaling)
7585 {
7586     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7587     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7588     vkStream->read((VkBool32*)&forUnmarshaling->dedicatedAllocation, sizeof(VkBool32));
7589 }
7590 
marshal_VkDedicatedAllocationBufferCreateInfoNV(VulkanStreamGuest * vkStream,const VkDedicatedAllocationBufferCreateInfoNV * forMarshaling)7591 void marshal_VkDedicatedAllocationBufferCreateInfoNV(
7592     VulkanStreamGuest* vkStream,
7593     const VkDedicatedAllocationBufferCreateInfoNV* forMarshaling)
7594 {
7595     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7596     marshal_extension_struct(vkStream, forMarshaling->pNext);
7597     vkStream->write((VkBool32*)&forMarshaling->dedicatedAllocation, sizeof(VkBool32));
7598 }
7599 
unmarshal_VkDedicatedAllocationBufferCreateInfoNV(VulkanStreamGuest * vkStream,VkDedicatedAllocationBufferCreateInfoNV * forUnmarshaling)7600 void unmarshal_VkDedicatedAllocationBufferCreateInfoNV(
7601     VulkanStreamGuest* vkStream,
7602     VkDedicatedAllocationBufferCreateInfoNV* forUnmarshaling)
7603 {
7604     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7605     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7606     vkStream->read((VkBool32*)&forUnmarshaling->dedicatedAllocation, sizeof(VkBool32));
7607 }
7608 
marshal_VkDedicatedAllocationMemoryAllocateInfoNV(VulkanStreamGuest * vkStream,const VkDedicatedAllocationMemoryAllocateInfoNV * forMarshaling)7609 void marshal_VkDedicatedAllocationMemoryAllocateInfoNV(
7610     VulkanStreamGuest* vkStream,
7611     const VkDedicatedAllocationMemoryAllocateInfoNV* forMarshaling)
7612 {
7613     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7614     marshal_extension_struct(vkStream, forMarshaling->pNext);
7615     uint64_t cgen_var_286;
7616     vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_286, 1);
7617     vkStream->write((uint64_t*)&cgen_var_286, 1 * 8);
7618     uint64_t cgen_var_287;
7619     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_287, 1);
7620     vkStream->write((uint64_t*)&cgen_var_287, 1 * 8);
7621 }
7622 
unmarshal_VkDedicatedAllocationMemoryAllocateInfoNV(VulkanStreamGuest * vkStream,VkDedicatedAllocationMemoryAllocateInfoNV * forUnmarshaling)7623 void unmarshal_VkDedicatedAllocationMemoryAllocateInfoNV(
7624     VulkanStreamGuest* vkStream,
7625     VkDedicatedAllocationMemoryAllocateInfoNV* forUnmarshaling)
7626 {
7627     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7628     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7629     uint64_t cgen_var_288;
7630     vkStream->read((uint64_t*)&cgen_var_288, 1 * 8);
7631     vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_288, (VkImage*)&forUnmarshaling->image, 1);
7632     uint64_t cgen_var_289;
7633     vkStream->read((uint64_t*)&cgen_var_289, 1 * 8);
7634     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_289, (VkBuffer*)&forUnmarshaling->buffer, 1);
7635 }
7636 
7637 #endif
7638 #ifdef VK_AMD_draw_indirect_count
7639 #endif
7640 #ifdef VK_AMD_negative_viewport_height
7641 #endif
7642 #ifdef VK_AMD_gpu_shader_half_float
7643 #endif
7644 #ifdef VK_AMD_shader_ballot
7645 #endif
7646 #ifdef VK_AMD_texture_gather_bias_lod
marshal_VkTextureLODGatherFormatPropertiesAMD(VulkanStreamGuest * vkStream,const VkTextureLODGatherFormatPropertiesAMD * forMarshaling)7647 void marshal_VkTextureLODGatherFormatPropertiesAMD(
7648     VulkanStreamGuest* vkStream,
7649     const VkTextureLODGatherFormatPropertiesAMD* forMarshaling)
7650 {
7651     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7652     marshal_extension_struct(vkStream, forMarshaling->pNext);
7653     vkStream->write((VkBool32*)&forMarshaling->supportsTextureGatherLODBiasAMD, sizeof(VkBool32));
7654 }
7655 
unmarshal_VkTextureLODGatherFormatPropertiesAMD(VulkanStreamGuest * vkStream,VkTextureLODGatherFormatPropertiesAMD * forUnmarshaling)7656 void unmarshal_VkTextureLODGatherFormatPropertiesAMD(
7657     VulkanStreamGuest* vkStream,
7658     VkTextureLODGatherFormatPropertiesAMD* forUnmarshaling)
7659 {
7660     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7661     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7662     vkStream->read((VkBool32*)&forUnmarshaling->supportsTextureGatherLODBiasAMD, sizeof(VkBool32));
7663 }
7664 
7665 #endif
7666 #ifdef VK_AMD_shader_info
marshal_VkShaderResourceUsageAMD(VulkanStreamGuest * vkStream,const VkShaderResourceUsageAMD * forMarshaling)7667 void marshal_VkShaderResourceUsageAMD(
7668     VulkanStreamGuest* vkStream,
7669     const VkShaderResourceUsageAMD* forMarshaling)
7670 {
7671     vkStream->write((uint32_t*)&forMarshaling->numUsedVgprs, sizeof(uint32_t));
7672     vkStream->write((uint32_t*)&forMarshaling->numUsedSgprs, sizeof(uint32_t));
7673     vkStream->write((uint32_t*)&forMarshaling->ldsSizePerLocalWorkGroup, sizeof(uint32_t));
7674     uint64_t cgen_var_290 = (uint64_t)forMarshaling->ldsUsageSizeInBytes;
7675     vkStream->putBe64(cgen_var_290);
7676     uint64_t cgen_var_291 = (uint64_t)forMarshaling->scratchMemUsageInBytes;
7677     vkStream->putBe64(cgen_var_291);
7678 }
7679 
unmarshal_VkShaderResourceUsageAMD(VulkanStreamGuest * vkStream,VkShaderResourceUsageAMD * forUnmarshaling)7680 void unmarshal_VkShaderResourceUsageAMD(
7681     VulkanStreamGuest* vkStream,
7682     VkShaderResourceUsageAMD* forUnmarshaling)
7683 {
7684     vkStream->read((uint32_t*)&forUnmarshaling->numUsedVgprs, sizeof(uint32_t));
7685     vkStream->read((uint32_t*)&forUnmarshaling->numUsedSgprs, sizeof(uint32_t));
7686     vkStream->read((uint32_t*)&forUnmarshaling->ldsSizePerLocalWorkGroup, sizeof(uint32_t));
7687     forUnmarshaling->ldsUsageSizeInBytes = (size_t)vkStream->getBe64();
7688     forUnmarshaling->scratchMemUsageInBytes = (size_t)vkStream->getBe64();
7689 }
7690 
marshal_VkShaderStatisticsInfoAMD(VulkanStreamGuest * vkStream,const VkShaderStatisticsInfoAMD * forMarshaling)7691 void marshal_VkShaderStatisticsInfoAMD(
7692     VulkanStreamGuest* vkStream,
7693     const VkShaderStatisticsInfoAMD* forMarshaling)
7694 {
7695     vkStream->write((VkShaderStageFlags*)&forMarshaling->shaderStageMask, sizeof(VkShaderStageFlags));
7696     marshal_VkShaderResourceUsageAMD(vkStream, (VkShaderResourceUsageAMD*)(&forMarshaling->resourceUsage));
7697     vkStream->write((uint32_t*)&forMarshaling->numPhysicalVgprs, sizeof(uint32_t));
7698     vkStream->write((uint32_t*)&forMarshaling->numPhysicalSgprs, sizeof(uint32_t));
7699     vkStream->write((uint32_t*)&forMarshaling->numAvailableVgprs, sizeof(uint32_t));
7700     vkStream->write((uint32_t*)&forMarshaling->numAvailableSgprs, sizeof(uint32_t));
7701     vkStream->write((uint32_t*)forMarshaling->computeWorkGroupSize, 3 * sizeof(uint32_t));
7702 }
7703 
unmarshal_VkShaderStatisticsInfoAMD(VulkanStreamGuest * vkStream,VkShaderStatisticsInfoAMD * forUnmarshaling)7704 void unmarshal_VkShaderStatisticsInfoAMD(
7705     VulkanStreamGuest* vkStream,
7706     VkShaderStatisticsInfoAMD* forUnmarshaling)
7707 {
7708     vkStream->read((VkShaderStageFlags*)&forUnmarshaling->shaderStageMask, sizeof(VkShaderStageFlags));
7709     unmarshal_VkShaderResourceUsageAMD(vkStream, (VkShaderResourceUsageAMD*)(&forUnmarshaling->resourceUsage));
7710     vkStream->read((uint32_t*)&forUnmarshaling->numPhysicalVgprs, sizeof(uint32_t));
7711     vkStream->read((uint32_t*)&forUnmarshaling->numPhysicalSgprs, sizeof(uint32_t));
7712     vkStream->read((uint32_t*)&forUnmarshaling->numAvailableVgprs, sizeof(uint32_t));
7713     vkStream->read((uint32_t*)&forUnmarshaling->numAvailableSgprs, sizeof(uint32_t));
7714     vkStream->read((uint32_t*)forUnmarshaling->computeWorkGroupSize, 3 * sizeof(uint32_t));
7715 }
7716 
7717 #endif
7718 #ifdef VK_AMD_shader_image_load_store_lod
7719 #endif
7720 #ifdef VK_IMG_format_pvrtc
7721 #endif
7722 #ifdef VK_NV_external_memory_capabilities
marshal_VkExternalImageFormatPropertiesNV(VulkanStreamGuest * vkStream,const VkExternalImageFormatPropertiesNV * forMarshaling)7723 void marshal_VkExternalImageFormatPropertiesNV(
7724     VulkanStreamGuest* vkStream,
7725     const VkExternalImageFormatPropertiesNV* forMarshaling)
7726 {
7727     marshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forMarshaling->imageFormatProperties));
7728     vkStream->write((VkExternalMemoryFeatureFlagsNV*)&forMarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlagsNV));
7729     vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7730     vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7731 }
7732 
unmarshal_VkExternalImageFormatPropertiesNV(VulkanStreamGuest * vkStream,VkExternalImageFormatPropertiesNV * forUnmarshaling)7733 void unmarshal_VkExternalImageFormatPropertiesNV(
7734     VulkanStreamGuest* vkStream,
7735     VkExternalImageFormatPropertiesNV* forUnmarshaling)
7736 {
7737     unmarshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forUnmarshaling->imageFormatProperties));
7738     vkStream->read((VkExternalMemoryFeatureFlagsNV*)&forUnmarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlagsNV));
7739     vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7740     vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7741 }
7742 
7743 #endif
7744 #ifdef VK_NV_external_memory
marshal_VkExternalMemoryImageCreateInfoNV(VulkanStreamGuest * vkStream,const VkExternalMemoryImageCreateInfoNV * forMarshaling)7745 void marshal_VkExternalMemoryImageCreateInfoNV(
7746     VulkanStreamGuest* vkStream,
7747     const VkExternalMemoryImageCreateInfoNV* forMarshaling)
7748 {
7749     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7750     marshal_extension_struct(vkStream, forMarshaling->pNext);
7751     vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7752 }
7753 
unmarshal_VkExternalMemoryImageCreateInfoNV(VulkanStreamGuest * vkStream,VkExternalMemoryImageCreateInfoNV * forUnmarshaling)7754 void unmarshal_VkExternalMemoryImageCreateInfoNV(
7755     VulkanStreamGuest* vkStream,
7756     VkExternalMemoryImageCreateInfoNV* forUnmarshaling)
7757 {
7758     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7759     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7760     vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7761 }
7762 
marshal_VkExportMemoryAllocateInfoNV(VulkanStreamGuest * vkStream,const VkExportMemoryAllocateInfoNV * forMarshaling)7763 void marshal_VkExportMemoryAllocateInfoNV(
7764     VulkanStreamGuest* vkStream,
7765     const VkExportMemoryAllocateInfoNV* forMarshaling)
7766 {
7767     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7768     marshal_extension_struct(vkStream, forMarshaling->pNext);
7769     vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7770 }
7771 
unmarshal_VkExportMemoryAllocateInfoNV(VulkanStreamGuest * vkStream,VkExportMemoryAllocateInfoNV * forUnmarshaling)7772 void unmarshal_VkExportMemoryAllocateInfoNV(
7773     VulkanStreamGuest* vkStream,
7774     VkExportMemoryAllocateInfoNV* forUnmarshaling)
7775 {
7776     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7777     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7778     vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7779 }
7780 
7781 #endif
7782 #ifdef VK_NV_external_memory_win32
marshal_VkImportMemoryWin32HandleInfoNV(VulkanStreamGuest * vkStream,const VkImportMemoryWin32HandleInfoNV * forMarshaling)7783 void marshal_VkImportMemoryWin32HandleInfoNV(
7784     VulkanStreamGuest* vkStream,
7785     const VkImportMemoryWin32HandleInfoNV* forMarshaling)
7786 {
7787     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7788     marshal_extension_struct(vkStream, forMarshaling->pNext);
7789     vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7790     vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
7791 }
7792 
unmarshal_VkImportMemoryWin32HandleInfoNV(VulkanStreamGuest * vkStream,VkImportMemoryWin32HandleInfoNV * forUnmarshaling)7793 void unmarshal_VkImportMemoryWin32HandleInfoNV(
7794     VulkanStreamGuest* vkStream,
7795     VkImportMemoryWin32HandleInfoNV* forUnmarshaling)
7796 {
7797     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7798     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7799     vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV));
7800     vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
7801 }
7802 
marshal_VkExportMemoryWin32HandleInfoNV(VulkanStreamGuest * vkStream,const VkExportMemoryWin32HandleInfoNV * forMarshaling)7803 void marshal_VkExportMemoryWin32HandleInfoNV(
7804     VulkanStreamGuest* vkStream,
7805     const VkExportMemoryWin32HandleInfoNV* forMarshaling)
7806 {
7807     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7808     marshal_extension_struct(vkStream, forMarshaling->pNext);
7809     // WARNING PTR CHECK
7810     uint64_t cgen_var_294 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
7811     vkStream->putBe64(cgen_var_294);
7812     if (forMarshaling->pAttributes)
7813     {
7814         vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
7815     }
7816     vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
7817 }
7818 
unmarshal_VkExportMemoryWin32HandleInfoNV(VulkanStreamGuest * vkStream,VkExportMemoryWin32HandleInfoNV * forUnmarshaling)7819 void unmarshal_VkExportMemoryWin32HandleInfoNV(
7820     VulkanStreamGuest* vkStream,
7821     VkExportMemoryWin32HandleInfoNV* forUnmarshaling)
7822 {
7823     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7824     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7825     // WARNING PTR CHECK
7826     const SECURITY_ATTRIBUTES* check_pAttributes;
7827     check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
7828     if (forUnmarshaling->pAttributes)
7829     {
7830         if (!(check_pAttributes))
7831         {
7832             fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
7833         }
7834         vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES));
7835     }
7836     vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
7837 }
7838 
7839 #endif
7840 #ifdef VK_NV_win32_keyed_mutex
marshal_VkWin32KeyedMutexAcquireReleaseInfoNV(VulkanStreamGuest * vkStream,const VkWin32KeyedMutexAcquireReleaseInfoNV * forMarshaling)7841 void marshal_VkWin32KeyedMutexAcquireReleaseInfoNV(
7842     VulkanStreamGuest* vkStream,
7843     const VkWin32KeyedMutexAcquireReleaseInfoNV* forMarshaling)
7844 {
7845     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7846     marshal_extension_struct(vkStream, forMarshaling->pNext);
7847     vkStream->write((uint32_t*)&forMarshaling->acquireCount, sizeof(uint32_t));
7848     if (forMarshaling->acquireCount)
7849     {
7850         uint64_t* cgen_var_296;
7851         vkStream->alloc((void**)&cgen_var_296, forMarshaling->acquireCount * 8);
7852         vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pAcquireSyncs, cgen_var_296, forMarshaling->acquireCount);
7853         vkStream->write((uint64_t*)cgen_var_296, forMarshaling->acquireCount * 8);
7854     }
7855     vkStream->write((const uint64_t*)forMarshaling->pAcquireKeys, forMarshaling->acquireCount * sizeof(const uint64_t));
7856     vkStream->write((const uint32_t*)forMarshaling->pAcquireTimeoutMilliseconds, forMarshaling->acquireCount * sizeof(const uint32_t));
7857     vkStream->write((uint32_t*)&forMarshaling->releaseCount, sizeof(uint32_t));
7858     if (forMarshaling->releaseCount)
7859     {
7860         uint64_t* cgen_var_297;
7861         vkStream->alloc((void**)&cgen_var_297, forMarshaling->releaseCount * 8);
7862         vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pReleaseSyncs, cgen_var_297, forMarshaling->releaseCount);
7863         vkStream->write((uint64_t*)cgen_var_297, forMarshaling->releaseCount * 8);
7864     }
7865     vkStream->write((const uint64_t*)forMarshaling->pReleaseKeys, forMarshaling->releaseCount * sizeof(const uint64_t));
7866 }
7867 
unmarshal_VkWin32KeyedMutexAcquireReleaseInfoNV(VulkanStreamGuest * vkStream,VkWin32KeyedMutexAcquireReleaseInfoNV * forUnmarshaling)7868 void unmarshal_VkWin32KeyedMutexAcquireReleaseInfoNV(
7869     VulkanStreamGuest* vkStream,
7870     VkWin32KeyedMutexAcquireReleaseInfoNV* forUnmarshaling)
7871 {
7872     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7873     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7874     vkStream->read((uint32_t*)&forUnmarshaling->acquireCount, sizeof(uint32_t));
7875     if (forUnmarshaling->acquireCount)
7876     {
7877         uint64_t* cgen_var_298;
7878         vkStream->alloc((void**)&cgen_var_298, forUnmarshaling->acquireCount * 8);
7879         vkStream->read((uint64_t*)cgen_var_298, forUnmarshaling->acquireCount * 8);
7880         vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_298, (VkDeviceMemory*)forUnmarshaling->pAcquireSyncs, forUnmarshaling->acquireCount);
7881     }
7882     vkStream->read((uint64_t*)forUnmarshaling->pAcquireKeys, forUnmarshaling->acquireCount * sizeof(const uint64_t));
7883     vkStream->read((uint32_t*)forUnmarshaling->pAcquireTimeoutMilliseconds, forUnmarshaling->acquireCount * sizeof(const uint32_t));
7884     vkStream->read((uint32_t*)&forUnmarshaling->releaseCount, sizeof(uint32_t));
7885     if (forUnmarshaling->releaseCount)
7886     {
7887         uint64_t* cgen_var_299;
7888         vkStream->alloc((void**)&cgen_var_299, forUnmarshaling->releaseCount * 8);
7889         vkStream->read((uint64_t*)cgen_var_299, forUnmarshaling->releaseCount * 8);
7890         vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_299, (VkDeviceMemory*)forUnmarshaling->pReleaseSyncs, forUnmarshaling->releaseCount);
7891     }
7892     vkStream->read((uint64_t*)forUnmarshaling->pReleaseKeys, forUnmarshaling->releaseCount * sizeof(const uint64_t));
7893 }
7894 
7895 #endif
7896 #ifdef VK_EXT_validation_flags
marshal_VkValidationFlagsEXT(VulkanStreamGuest * vkStream,const VkValidationFlagsEXT * forMarshaling)7897 void marshal_VkValidationFlagsEXT(
7898     VulkanStreamGuest* vkStream,
7899     const VkValidationFlagsEXT* forMarshaling)
7900 {
7901     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7902     marshal_extension_struct(vkStream, forMarshaling->pNext);
7903     vkStream->write((uint32_t*)&forMarshaling->disabledValidationCheckCount, sizeof(uint32_t));
7904     vkStream->write((const VkValidationCheckEXT*)forMarshaling->pDisabledValidationChecks, forMarshaling->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT));
7905 }
7906 
unmarshal_VkValidationFlagsEXT(VulkanStreamGuest * vkStream,VkValidationFlagsEXT * forUnmarshaling)7907 void unmarshal_VkValidationFlagsEXT(
7908     VulkanStreamGuest* vkStream,
7909     VkValidationFlagsEXT* forUnmarshaling)
7910 {
7911     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7912     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7913     vkStream->read((uint32_t*)&forUnmarshaling->disabledValidationCheckCount, sizeof(uint32_t));
7914     vkStream->read((VkValidationCheckEXT*)forUnmarshaling->pDisabledValidationChecks, forUnmarshaling->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT));
7915 }
7916 
7917 #endif
7918 #ifdef VK_NN_vi_surface
marshal_VkViSurfaceCreateInfoNN(VulkanStreamGuest * vkStream,const VkViSurfaceCreateInfoNN * forMarshaling)7919 void marshal_VkViSurfaceCreateInfoNN(
7920     VulkanStreamGuest* vkStream,
7921     const VkViSurfaceCreateInfoNN* forMarshaling)
7922 {
7923     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7924     marshal_extension_struct(vkStream, forMarshaling->pNext);
7925     vkStream->write((VkViSurfaceCreateFlagsNN*)&forMarshaling->flags, sizeof(VkViSurfaceCreateFlagsNN));
7926     // WARNING PTR CHECK
7927     uint64_t cgen_var_300 = (uint64_t)(uintptr_t)forMarshaling->window;
7928     vkStream->putBe64(cgen_var_300);
7929     if (forMarshaling->window)
7930     {
7931         vkStream->write((void*)forMarshaling->window, sizeof(uint8_t));
7932     }
7933 }
7934 
unmarshal_VkViSurfaceCreateInfoNN(VulkanStreamGuest * vkStream,VkViSurfaceCreateInfoNN * forUnmarshaling)7935 void unmarshal_VkViSurfaceCreateInfoNN(
7936     VulkanStreamGuest* vkStream,
7937     VkViSurfaceCreateInfoNN* forUnmarshaling)
7938 {
7939     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7940     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7941     vkStream->read((VkViSurfaceCreateFlagsNN*)&forUnmarshaling->flags, sizeof(VkViSurfaceCreateFlagsNN));
7942     // WARNING PTR CHECK
7943     void* check_window;
7944     check_window = (void*)(uintptr_t)vkStream->getBe64();
7945     if (forUnmarshaling->window)
7946     {
7947         if (!(check_window))
7948         {
7949             fprintf(stderr, "fatal: forUnmarshaling->window inconsistent between guest and host\n");
7950         }
7951         vkStream->read((void*)forUnmarshaling->window, sizeof(uint8_t));
7952     }
7953 }
7954 
7955 #endif
7956 #ifdef VK_EXT_shader_subgroup_ballot
7957 #endif
7958 #ifdef VK_EXT_shader_subgroup_vote
7959 #endif
7960 #ifdef VK_EXT_conditional_rendering
marshal_VkConditionalRenderingBeginInfoEXT(VulkanStreamGuest * vkStream,const VkConditionalRenderingBeginInfoEXT * forMarshaling)7961 void marshal_VkConditionalRenderingBeginInfoEXT(
7962     VulkanStreamGuest* vkStream,
7963     const VkConditionalRenderingBeginInfoEXT* forMarshaling)
7964 {
7965     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7966     marshal_extension_struct(vkStream, forMarshaling->pNext);
7967     uint64_t cgen_var_302;
7968     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_302, 1);
7969     vkStream->write((uint64_t*)&cgen_var_302, 1 * 8);
7970     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
7971     vkStream->write((VkConditionalRenderingFlagsEXT*)&forMarshaling->flags, sizeof(VkConditionalRenderingFlagsEXT));
7972 }
7973 
unmarshal_VkConditionalRenderingBeginInfoEXT(VulkanStreamGuest * vkStream,VkConditionalRenderingBeginInfoEXT * forUnmarshaling)7974 void unmarshal_VkConditionalRenderingBeginInfoEXT(
7975     VulkanStreamGuest* vkStream,
7976     VkConditionalRenderingBeginInfoEXT* forUnmarshaling)
7977 {
7978     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
7979     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
7980     uint64_t cgen_var_303;
7981     vkStream->read((uint64_t*)&cgen_var_303, 1 * 8);
7982     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_303, (VkBuffer*)&forUnmarshaling->buffer, 1);
7983     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
7984     vkStream->read((VkConditionalRenderingFlagsEXT*)&forUnmarshaling->flags, sizeof(VkConditionalRenderingFlagsEXT));
7985 }
7986 
marshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceConditionalRenderingFeaturesEXT * forMarshaling)7987 void marshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(
7988     VulkanStreamGuest* vkStream,
7989     const VkPhysicalDeviceConditionalRenderingFeaturesEXT* forMarshaling)
7990 {
7991     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
7992     marshal_extension_struct(vkStream, forMarshaling->pNext);
7993     vkStream->write((VkBool32*)&forMarshaling->conditionalRendering, sizeof(VkBool32));
7994     vkStream->write((VkBool32*)&forMarshaling->inheritedConditionalRendering, sizeof(VkBool32));
7995 }
7996 
unmarshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceConditionalRenderingFeaturesEXT * forUnmarshaling)7997 void unmarshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(
7998     VulkanStreamGuest* vkStream,
7999     VkPhysicalDeviceConditionalRenderingFeaturesEXT* forUnmarshaling)
8000 {
8001     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8002     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8003     vkStream->read((VkBool32*)&forUnmarshaling->conditionalRendering, sizeof(VkBool32));
8004     vkStream->read((VkBool32*)&forUnmarshaling->inheritedConditionalRendering, sizeof(VkBool32));
8005 }
8006 
marshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(VulkanStreamGuest * vkStream,const VkCommandBufferInheritanceConditionalRenderingInfoEXT * forMarshaling)8007 void marshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(
8008     VulkanStreamGuest* vkStream,
8009     const VkCommandBufferInheritanceConditionalRenderingInfoEXT* forMarshaling)
8010 {
8011     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8012     marshal_extension_struct(vkStream, forMarshaling->pNext);
8013     vkStream->write((VkBool32*)&forMarshaling->conditionalRenderingEnable, sizeof(VkBool32));
8014 }
8015 
unmarshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(VulkanStreamGuest * vkStream,VkCommandBufferInheritanceConditionalRenderingInfoEXT * forUnmarshaling)8016 void unmarshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(
8017     VulkanStreamGuest* vkStream,
8018     VkCommandBufferInheritanceConditionalRenderingInfoEXT* forUnmarshaling)
8019 {
8020     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8021     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8022     vkStream->read((VkBool32*)&forUnmarshaling->conditionalRenderingEnable, sizeof(VkBool32));
8023 }
8024 
8025 #endif
8026 #ifdef VK_NVX_device_generated_commands
marshal_VkDeviceGeneratedCommandsFeaturesNVX(VulkanStreamGuest * vkStream,const VkDeviceGeneratedCommandsFeaturesNVX * forMarshaling)8027 void marshal_VkDeviceGeneratedCommandsFeaturesNVX(
8028     VulkanStreamGuest* vkStream,
8029     const VkDeviceGeneratedCommandsFeaturesNVX* forMarshaling)
8030 {
8031     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8032     marshal_extension_struct(vkStream, forMarshaling->pNext);
8033     vkStream->write((VkBool32*)&forMarshaling->computeBindingPointSupport, sizeof(VkBool32));
8034 }
8035 
unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(VulkanStreamGuest * vkStream,VkDeviceGeneratedCommandsFeaturesNVX * forUnmarshaling)8036 void unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(
8037     VulkanStreamGuest* vkStream,
8038     VkDeviceGeneratedCommandsFeaturesNVX* forUnmarshaling)
8039 {
8040     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8041     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8042     vkStream->read((VkBool32*)&forUnmarshaling->computeBindingPointSupport, sizeof(VkBool32));
8043 }
8044 
marshal_VkDeviceGeneratedCommandsLimitsNVX(VulkanStreamGuest * vkStream,const VkDeviceGeneratedCommandsLimitsNVX * forMarshaling)8045 void marshal_VkDeviceGeneratedCommandsLimitsNVX(
8046     VulkanStreamGuest* vkStream,
8047     const VkDeviceGeneratedCommandsLimitsNVX* forMarshaling)
8048 {
8049     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8050     marshal_extension_struct(vkStream, forMarshaling->pNext);
8051     vkStream->write((uint32_t*)&forMarshaling->maxIndirectCommandsLayoutTokenCount, sizeof(uint32_t));
8052     vkStream->write((uint32_t*)&forMarshaling->maxObjectEntryCounts, sizeof(uint32_t));
8053     vkStream->write((uint32_t*)&forMarshaling->minSequenceCountBufferOffsetAlignment, sizeof(uint32_t));
8054     vkStream->write((uint32_t*)&forMarshaling->minSequenceIndexBufferOffsetAlignment, sizeof(uint32_t));
8055     vkStream->write((uint32_t*)&forMarshaling->minCommandsTokenBufferOffsetAlignment, sizeof(uint32_t));
8056 }
8057 
unmarshal_VkDeviceGeneratedCommandsLimitsNVX(VulkanStreamGuest * vkStream,VkDeviceGeneratedCommandsLimitsNVX * forUnmarshaling)8058 void unmarshal_VkDeviceGeneratedCommandsLimitsNVX(
8059     VulkanStreamGuest* vkStream,
8060     VkDeviceGeneratedCommandsLimitsNVX* forUnmarshaling)
8061 {
8062     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8063     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8064     vkStream->read((uint32_t*)&forUnmarshaling->maxIndirectCommandsLayoutTokenCount, sizeof(uint32_t));
8065     vkStream->read((uint32_t*)&forUnmarshaling->maxObjectEntryCounts, sizeof(uint32_t));
8066     vkStream->read((uint32_t*)&forUnmarshaling->minSequenceCountBufferOffsetAlignment, sizeof(uint32_t));
8067     vkStream->read((uint32_t*)&forUnmarshaling->minSequenceIndexBufferOffsetAlignment, sizeof(uint32_t));
8068     vkStream->read((uint32_t*)&forUnmarshaling->minCommandsTokenBufferOffsetAlignment, sizeof(uint32_t));
8069 }
8070 
marshal_VkIndirectCommandsTokenNVX(VulkanStreamGuest * vkStream,const VkIndirectCommandsTokenNVX * forMarshaling)8071 void marshal_VkIndirectCommandsTokenNVX(
8072     VulkanStreamGuest* vkStream,
8073     const VkIndirectCommandsTokenNVX* forMarshaling)
8074 {
8075     vkStream->write((VkIndirectCommandsTokenTypeNVX*)&forMarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX));
8076     uint64_t cgen_var_304;
8077     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_304, 1);
8078     vkStream->write((uint64_t*)&cgen_var_304, 1 * 8);
8079     vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
8080 }
8081 
unmarshal_VkIndirectCommandsTokenNVX(VulkanStreamGuest * vkStream,VkIndirectCommandsTokenNVX * forUnmarshaling)8082 void unmarshal_VkIndirectCommandsTokenNVX(
8083     VulkanStreamGuest* vkStream,
8084     VkIndirectCommandsTokenNVX* forUnmarshaling)
8085 {
8086     vkStream->read((VkIndirectCommandsTokenTypeNVX*)&forUnmarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX));
8087     uint64_t cgen_var_305;
8088     vkStream->read((uint64_t*)&cgen_var_305, 1 * 8);
8089     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_305, (VkBuffer*)&forUnmarshaling->buffer, 1);
8090     vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
8091 }
8092 
marshal_VkIndirectCommandsLayoutTokenNVX(VulkanStreamGuest * vkStream,const VkIndirectCommandsLayoutTokenNVX * forMarshaling)8093 void marshal_VkIndirectCommandsLayoutTokenNVX(
8094     VulkanStreamGuest* vkStream,
8095     const VkIndirectCommandsLayoutTokenNVX* forMarshaling)
8096 {
8097     vkStream->write((VkIndirectCommandsTokenTypeNVX*)&forMarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX));
8098     vkStream->write((uint32_t*)&forMarshaling->bindingUnit, sizeof(uint32_t));
8099     vkStream->write((uint32_t*)&forMarshaling->dynamicCount, sizeof(uint32_t));
8100     vkStream->write((uint32_t*)&forMarshaling->divisor, sizeof(uint32_t));
8101 }
8102 
unmarshal_VkIndirectCommandsLayoutTokenNVX(VulkanStreamGuest * vkStream,VkIndirectCommandsLayoutTokenNVX * forUnmarshaling)8103 void unmarshal_VkIndirectCommandsLayoutTokenNVX(
8104     VulkanStreamGuest* vkStream,
8105     VkIndirectCommandsLayoutTokenNVX* forUnmarshaling)
8106 {
8107     vkStream->read((VkIndirectCommandsTokenTypeNVX*)&forUnmarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX));
8108     vkStream->read((uint32_t*)&forUnmarshaling->bindingUnit, sizeof(uint32_t));
8109     vkStream->read((uint32_t*)&forUnmarshaling->dynamicCount, sizeof(uint32_t));
8110     vkStream->read((uint32_t*)&forUnmarshaling->divisor, sizeof(uint32_t));
8111 }
8112 
marshal_VkIndirectCommandsLayoutCreateInfoNVX(VulkanStreamGuest * vkStream,const VkIndirectCommandsLayoutCreateInfoNVX * forMarshaling)8113 void marshal_VkIndirectCommandsLayoutCreateInfoNVX(
8114     VulkanStreamGuest* vkStream,
8115     const VkIndirectCommandsLayoutCreateInfoNVX* forMarshaling)
8116 {
8117     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8118     marshal_extension_struct(vkStream, forMarshaling->pNext);
8119     vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
8120     vkStream->write((VkIndirectCommandsLayoutUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkIndirectCommandsLayoutUsageFlagsNVX));
8121     vkStream->write((uint32_t*)&forMarshaling->tokenCount, sizeof(uint32_t));
8122     for (uint32_t i = 0; i < (uint32_t)forMarshaling->tokenCount; ++i)
8123     {
8124         marshal_VkIndirectCommandsLayoutTokenNVX(vkStream, (const VkIndirectCommandsLayoutTokenNVX*)(forMarshaling->pTokens + i));
8125     }
8126 }
8127 
unmarshal_VkIndirectCommandsLayoutCreateInfoNVX(VulkanStreamGuest * vkStream,VkIndirectCommandsLayoutCreateInfoNVX * forUnmarshaling)8128 void unmarshal_VkIndirectCommandsLayoutCreateInfoNVX(
8129     VulkanStreamGuest* vkStream,
8130     VkIndirectCommandsLayoutCreateInfoNVX* forUnmarshaling)
8131 {
8132     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8133     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8134     vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint));
8135     vkStream->read((VkIndirectCommandsLayoutUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkIndirectCommandsLayoutUsageFlagsNVX));
8136     vkStream->read((uint32_t*)&forUnmarshaling->tokenCount, sizeof(uint32_t));
8137     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->tokenCount; ++i)
8138     {
8139         unmarshal_VkIndirectCommandsLayoutTokenNVX(vkStream, (VkIndirectCommandsLayoutTokenNVX*)(forUnmarshaling->pTokens + i));
8140     }
8141 }
8142 
marshal_VkCmdProcessCommandsInfoNVX(VulkanStreamGuest * vkStream,const VkCmdProcessCommandsInfoNVX * forMarshaling)8143 void marshal_VkCmdProcessCommandsInfoNVX(
8144     VulkanStreamGuest* vkStream,
8145     const VkCmdProcessCommandsInfoNVX* forMarshaling)
8146 {
8147     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8148     marshal_extension_struct(vkStream, forMarshaling->pNext);
8149     uint64_t cgen_var_306;
8150     vkStream->handleMapping()->mapHandles_VkObjectTableNVX_u64(&forMarshaling->objectTable, &cgen_var_306, 1);
8151     vkStream->write((uint64_t*)&cgen_var_306, 1 * 8);
8152     uint64_t cgen_var_307;
8153     vkStream->handleMapping()->mapHandles_VkIndirectCommandsLayoutNVX_u64(&forMarshaling->indirectCommandsLayout, &cgen_var_307, 1);
8154     vkStream->write((uint64_t*)&cgen_var_307, 1 * 8);
8155     vkStream->write((uint32_t*)&forMarshaling->indirectCommandsTokenCount, sizeof(uint32_t));
8156     for (uint32_t i = 0; i < (uint32_t)forMarshaling->indirectCommandsTokenCount; ++i)
8157     {
8158         marshal_VkIndirectCommandsTokenNVX(vkStream, (const VkIndirectCommandsTokenNVX*)(forMarshaling->pIndirectCommandsTokens + i));
8159     }
8160     vkStream->write((uint32_t*)&forMarshaling->maxSequencesCount, sizeof(uint32_t));
8161     uint64_t cgen_var_308;
8162     vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(&forMarshaling->targetCommandBuffer, &cgen_var_308, 1);
8163     vkStream->write((uint64_t*)&cgen_var_308, 1 * 8);
8164     uint64_t cgen_var_309;
8165     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->sequencesCountBuffer, &cgen_var_309, 1);
8166     vkStream->write((uint64_t*)&cgen_var_309, 1 * 8);
8167     vkStream->write((VkDeviceSize*)&forMarshaling->sequencesCountOffset, sizeof(VkDeviceSize));
8168     uint64_t cgen_var_310;
8169     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->sequencesIndexBuffer, &cgen_var_310, 1);
8170     vkStream->write((uint64_t*)&cgen_var_310, 1 * 8);
8171     vkStream->write((VkDeviceSize*)&forMarshaling->sequencesIndexOffset, sizeof(VkDeviceSize));
8172 }
8173 
unmarshal_VkCmdProcessCommandsInfoNVX(VulkanStreamGuest * vkStream,VkCmdProcessCommandsInfoNVX * forUnmarshaling)8174 void unmarshal_VkCmdProcessCommandsInfoNVX(
8175     VulkanStreamGuest* vkStream,
8176     VkCmdProcessCommandsInfoNVX* forUnmarshaling)
8177 {
8178     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8179     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8180     uint64_t cgen_var_311;
8181     vkStream->read((uint64_t*)&cgen_var_311, 1 * 8);
8182     vkStream->handleMapping()->mapHandles_u64_VkObjectTableNVX(&cgen_var_311, (VkObjectTableNVX*)&forUnmarshaling->objectTable, 1);
8183     uint64_t cgen_var_312;
8184     vkStream->read((uint64_t*)&cgen_var_312, 1 * 8);
8185     vkStream->handleMapping()->mapHandles_u64_VkIndirectCommandsLayoutNVX(&cgen_var_312, (VkIndirectCommandsLayoutNVX*)&forUnmarshaling->indirectCommandsLayout, 1);
8186     vkStream->read((uint32_t*)&forUnmarshaling->indirectCommandsTokenCount, sizeof(uint32_t));
8187     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->indirectCommandsTokenCount; ++i)
8188     {
8189         unmarshal_VkIndirectCommandsTokenNVX(vkStream, (VkIndirectCommandsTokenNVX*)(forUnmarshaling->pIndirectCommandsTokens + i));
8190     }
8191     vkStream->read((uint32_t*)&forUnmarshaling->maxSequencesCount, sizeof(uint32_t));
8192     uint64_t cgen_var_313;
8193     vkStream->read((uint64_t*)&cgen_var_313, 1 * 8);
8194     vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(&cgen_var_313, (VkCommandBuffer*)&forUnmarshaling->targetCommandBuffer, 1);
8195     uint64_t cgen_var_314;
8196     vkStream->read((uint64_t*)&cgen_var_314, 1 * 8);
8197     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_314, (VkBuffer*)&forUnmarshaling->sequencesCountBuffer, 1);
8198     vkStream->read((VkDeviceSize*)&forUnmarshaling->sequencesCountOffset, sizeof(VkDeviceSize));
8199     uint64_t cgen_var_315;
8200     vkStream->read((uint64_t*)&cgen_var_315, 1 * 8);
8201     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_315, (VkBuffer*)&forUnmarshaling->sequencesIndexBuffer, 1);
8202     vkStream->read((VkDeviceSize*)&forUnmarshaling->sequencesIndexOffset, sizeof(VkDeviceSize));
8203 }
8204 
marshal_VkCmdReserveSpaceForCommandsInfoNVX(VulkanStreamGuest * vkStream,const VkCmdReserveSpaceForCommandsInfoNVX * forMarshaling)8205 void marshal_VkCmdReserveSpaceForCommandsInfoNVX(
8206     VulkanStreamGuest* vkStream,
8207     const VkCmdReserveSpaceForCommandsInfoNVX* forMarshaling)
8208 {
8209     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8210     marshal_extension_struct(vkStream, forMarshaling->pNext);
8211     uint64_t cgen_var_316;
8212     vkStream->handleMapping()->mapHandles_VkObjectTableNVX_u64(&forMarshaling->objectTable, &cgen_var_316, 1);
8213     vkStream->write((uint64_t*)&cgen_var_316, 1 * 8);
8214     uint64_t cgen_var_317;
8215     vkStream->handleMapping()->mapHandles_VkIndirectCommandsLayoutNVX_u64(&forMarshaling->indirectCommandsLayout, &cgen_var_317, 1);
8216     vkStream->write((uint64_t*)&cgen_var_317, 1 * 8);
8217     vkStream->write((uint32_t*)&forMarshaling->maxSequencesCount, sizeof(uint32_t));
8218 }
8219 
unmarshal_VkCmdReserveSpaceForCommandsInfoNVX(VulkanStreamGuest * vkStream,VkCmdReserveSpaceForCommandsInfoNVX * forUnmarshaling)8220 void unmarshal_VkCmdReserveSpaceForCommandsInfoNVX(
8221     VulkanStreamGuest* vkStream,
8222     VkCmdReserveSpaceForCommandsInfoNVX* forUnmarshaling)
8223 {
8224     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8225     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8226     uint64_t cgen_var_318;
8227     vkStream->read((uint64_t*)&cgen_var_318, 1 * 8);
8228     vkStream->handleMapping()->mapHandles_u64_VkObjectTableNVX(&cgen_var_318, (VkObjectTableNVX*)&forUnmarshaling->objectTable, 1);
8229     uint64_t cgen_var_319;
8230     vkStream->read((uint64_t*)&cgen_var_319, 1 * 8);
8231     vkStream->handleMapping()->mapHandles_u64_VkIndirectCommandsLayoutNVX(&cgen_var_319, (VkIndirectCommandsLayoutNVX*)&forUnmarshaling->indirectCommandsLayout, 1);
8232     vkStream->read((uint32_t*)&forUnmarshaling->maxSequencesCount, sizeof(uint32_t));
8233 }
8234 
marshal_VkObjectTableCreateInfoNVX(VulkanStreamGuest * vkStream,const VkObjectTableCreateInfoNVX * forMarshaling)8235 void marshal_VkObjectTableCreateInfoNVX(
8236     VulkanStreamGuest* vkStream,
8237     const VkObjectTableCreateInfoNVX* forMarshaling)
8238 {
8239     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8240     marshal_extension_struct(vkStream, forMarshaling->pNext);
8241     vkStream->write((uint32_t*)&forMarshaling->objectCount, sizeof(uint32_t));
8242     vkStream->write((const VkObjectEntryTypeNVX*)forMarshaling->pObjectEntryTypes, forMarshaling->objectCount * sizeof(const VkObjectEntryTypeNVX));
8243     vkStream->write((const uint32_t*)forMarshaling->pObjectEntryCounts, forMarshaling->objectCount * sizeof(const uint32_t));
8244     vkStream->write((const VkObjectEntryUsageFlagsNVX*)forMarshaling->pObjectEntryUsageFlags, forMarshaling->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX));
8245     vkStream->write((uint32_t*)&forMarshaling->maxUniformBuffersPerDescriptor, sizeof(uint32_t));
8246     vkStream->write((uint32_t*)&forMarshaling->maxStorageBuffersPerDescriptor, sizeof(uint32_t));
8247     vkStream->write((uint32_t*)&forMarshaling->maxStorageImagesPerDescriptor, sizeof(uint32_t));
8248     vkStream->write((uint32_t*)&forMarshaling->maxSampledImagesPerDescriptor, sizeof(uint32_t));
8249     vkStream->write((uint32_t*)&forMarshaling->maxPipelineLayouts, sizeof(uint32_t));
8250 }
8251 
unmarshal_VkObjectTableCreateInfoNVX(VulkanStreamGuest * vkStream,VkObjectTableCreateInfoNVX * forUnmarshaling)8252 void unmarshal_VkObjectTableCreateInfoNVX(
8253     VulkanStreamGuest* vkStream,
8254     VkObjectTableCreateInfoNVX* forUnmarshaling)
8255 {
8256     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8257     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8258     vkStream->read((uint32_t*)&forUnmarshaling->objectCount, sizeof(uint32_t));
8259     vkStream->read((VkObjectEntryTypeNVX*)forUnmarshaling->pObjectEntryTypes, forUnmarshaling->objectCount * sizeof(const VkObjectEntryTypeNVX));
8260     vkStream->read((uint32_t*)forUnmarshaling->pObjectEntryCounts, forUnmarshaling->objectCount * sizeof(const uint32_t));
8261     vkStream->read((VkObjectEntryUsageFlagsNVX*)forUnmarshaling->pObjectEntryUsageFlags, forUnmarshaling->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX));
8262     vkStream->read((uint32_t*)&forUnmarshaling->maxUniformBuffersPerDescriptor, sizeof(uint32_t));
8263     vkStream->read((uint32_t*)&forUnmarshaling->maxStorageBuffersPerDescriptor, sizeof(uint32_t));
8264     vkStream->read((uint32_t*)&forUnmarshaling->maxStorageImagesPerDescriptor, sizeof(uint32_t));
8265     vkStream->read((uint32_t*)&forUnmarshaling->maxSampledImagesPerDescriptor, sizeof(uint32_t));
8266     vkStream->read((uint32_t*)&forUnmarshaling->maxPipelineLayouts, sizeof(uint32_t));
8267 }
8268 
marshal_VkObjectTableEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTableEntryNVX * forMarshaling)8269 void marshal_VkObjectTableEntryNVX(
8270     VulkanStreamGuest* vkStream,
8271     const VkObjectTableEntryNVX* forMarshaling)
8272 {
8273     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8274     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8275 }
8276 
unmarshal_VkObjectTableEntryNVX(VulkanStreamGuest * vkStream,VkObjectTableEntryNVX * forUnmarshaling)8277 void unmarshal_VkObjectTableEntryNVX(
8278     VulkanStreamGuest* vkStream,
8279     VkObjectTableEntryNVX* forUnmarshaling)
8280 {
8281     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8282     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8283 }
8284 
marshal_VkObjectTablePipelineEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTablePipelineEntryNVX * forMarshaling)8285 void marshal_VkObjectTablePipelineEntryNVX(
8286     VulkanStreamGuest* vkStream,
8287     const VkObjectTablePipelineEntryNVX* forMarshaling)
8288 {
8289     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8290     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8291     uint64_t cgen_var_320;
8292     vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->pipeline, &cgen_var_320, 1);
8293     vkStream->write((uint64_t*)&cgen_var_320, 1 * 8);
8294 }
8295 
unmarshal_VkObjectTablePipelineEntryNVX(VulkanStreamGuest * vkStream,VkObjectTablePipelineEntryNVX * forUnmarshaling)8296 void unmarshal_VkObjectTablePipelineEntryNVX(
8297     VulkanStreamGuest* vkStream,
8298     VkObjectTablePipelineEntryNVX* forUnmarshaling)
8299 {
8300     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8301     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8302     uint64_t cgen_var_321;
8303     vkStream->read((uint64_t*)&cgen_var_321, 1 * 8);
8304     vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_321, (VkPipeline*)&forUnmarshaling->pipeline, 1);
8305 }
8306 
marshal_VkObjectTableDescriptorSetEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTableDescriptorSetEntryNVX * forMarshaling)8307 void marshal_VkObjectTableDescriptorSetEntryNVX(
8308     VulkanStreamGuest* vkStream,
8309     const VkObjectTableDescriptorSetEntryNVX* forMarshaling)
8310 {
8311     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8312     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8313     uint64_t cgen_var_322;
8314     vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_322, 1);
8315     vkStream->write((uint64_t*)&cgen_var_322, 1 * 8);
8316     uint64_t cgen_var_323;
8317     vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->descriptorSet, &cgen_var_323, 1);
8318     vkStream->write((uint64_t*)&cgen_var_323, 1 * 8);
8319 }
8320 
unmarshal_VkObjectTableDescriptorSetEntryNVX(VulkanStreamGuest * vkStream,VkObjectTableDescriptorSetEntryNVX * forUnmarshaling)8321 void unmarshal_VkObjectTableDescriptorSetEntryNVX(
8322     VulkanStreamGuest* vkStream,
8323     VkObjectTableDescriptorSetEntryNVX* forUnmarshaling)
8324 {
8325     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8326     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8327     uint64_t cgen_var_324;
8328     vkStream->read((uint64_t*)&cgen_var_324, 1 * 8);
8329     vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_324, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1);
8330     uint64_t cgen_var_325;
8331     vkStream->read((uint64_t*)&cgen_var_325, 1 * 8);
8332     vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_325, (VkDescriptorSet*)&forUnmarshaling->descriptorSet, 1);
8333 }
8334 
marshal_VkObjectTableVertexBufferEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTableVertexBufferEntryNVX * forMarshaling)8335 void marshal_VkObjectTableVertexBufferEntryNVX(
8336     VulkanStreamGuest* vkStream,
8337     const VkObjectTableVertexBufferEntryNVX* forMarshaling)
8338 {
8339     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8340     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8341     uint64_t cgen_var_326;
8342     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_326, 1);
8343     vkStream->write((uint64_t*)&cgen_var_326, 1 * 8);
8344 }
8345 
unmarshal_VkObjectTableVertexBufferEntryNVX(VulkanStreamGuest * vkStream,VkObjectTableVertexBufferEntryNVX * forUnmarshaling)8346 void unmarshal_VkObjectTableVertexBufferEntryNVX(
8347     VulkanStreamGuest* vkStream,
8348     VkObjectTableVertexBufferEntryNVX* forUnmarshaling)
8349 {
8350     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8351     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8352     uint64_t cgen_var_327;
8353     vkStream->read((uint64_t*)&cgen_var_327, 1 * 8);
8354     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_327, (VkBuffer*)&forUnmarshaling->buffer, 1);
8355 }
8356 
marshal_VkObjectTableIndexBufferEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTableIndexBufferEntryNVX * forMarshaling)8357 void marshal_VkObjectTableIndexBufferEntryNVX(
8358     VulkanStreamGuest* vkStream,
8359     const VkObjectTableIndexBufferEntryNVX* forMarshaling)
8360 {
8361     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8362     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8363     uint64_t cgen_var_328;
8364     vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_328, 1);
8365     vkStream->write((uint64_t*)&cgen_var_328, 1 * 8);
8366     vkStream->write((VkIndexType*)&forMarshaling->indexType, sizeof(VkIndexType));
8367 }
8368 
unmarshal_VkObjectTableIndexBufferEntryNVX(VulkanStreamGuest * vkStream,VkObjectTableIndexBufferEntryNVX * forUnmarshaling)8369 void unmarshal_VkObjectTableIndexBufferEntryNVX(
8370     VulkanStreamGuest* vkStream,
8371     VkObjectTableIndexBufferEntryNVX* forUnmarshaling)
8372 {
8373     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8374     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8375     uint64_t cgen_var_329;
8376     vkStream->read((uint64_t*)&cgen_var_329, 1 * 8);
8377     vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_329, (VkBuffer*)&forUnmarshaling->buffer, 1);
8378     vkStream->read((VkIndexType*)&forUnmarshaling->indexType, sizeof(VkIndexType));
8379 }
8380 
marshal_VkObjectTablePushConstantEntryNVX(VulkanStreamGuest * vkStream,const VkObjectTablePushConstantEntryNVX * forMarshaling)8381 void marshal_VkObjectTablePushConstantEntryNVX(
8382     VulkanStreamGuest* vkStream,
8383     const VkObjectTablePushConstantEntryNVX* forMarshaling)
8384 {
8385     vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX));
8386     vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8387     uint64_t cgen_var_330;
8388     vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_330, 1);
8389     vkStream->write((uint64_t*)&cgen_var_330, 1 * 8);
8390     vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags));
8391 }
8392 
unmarshal_VkObjectTablePushConstantEntryNVX(VulkanStreamGuest * vkStream,VkObjectTablePushConstantEntryNVX * forUnmarshaling)8393 void unmarshal_VkObjectTablePushConstantEntryNVX(
8394     VulkanStreamGuest* vkStream,
8395     VkObjectTablePushConstantEntryNVX* forUnmarshaling)
8396 {
8397     vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX));
8398     vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX));
8399     uint64_t cgen_var_331;
8400     vkStream->read((uint64_t*)&cgen_var_331, 1 * 8);
8401     vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_331, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1);
8402     vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags));
8403 }
8404 
8405 #endif
8406 #ifdef VK_NV_clip_space_w_scaling
marshal_VkViewportWScalingNV(VulkanStreamGuest * vkStream,const VkViewportWScalingNV * forMarshaling)8407 void marshal_VkViewportWScalingNV(
8408     VulkanStreamGuest* vkStream,
8409     const VkViewportWScalingNV* forMarshaling)
8410 {
8411     vkStream->write((float*)&forMarshaling->xcoeff, sizeof(float));
8412     vkStream->write((float*)&forMarshaling->ycoeff, sizeof(float));
8413 }
8414 
unmarshal_VkViewportWScalingNV(VulkanStreamGuest * vkStream,VkViewportWScalingNV * forUnmarshaling)8415 void unmarshal_VkViewportWScalingNV(
8416     VulkanStreamGuest* vkStream,
8417     VkViewportWScalingNV* forUnmarshaling)
8418 {
8419     vkStream->read((float*)&forUnmarshaling->xcoeff, sizeof(float));
8420     vkStream->read((float*)&forUnmarshaling->ycoeff, sizeof(float));
8421 }
8422 
marshal_VkPipelineViewportWScalingStateCreateInfoNV(VulkanStreamGuest * vkStream,const VkPipelineViewportWScalingStateCreateInfoNV * forMarshaling)8423 void marshal_VkPipelineViewportWScalingStateCreateInfoNV(
8424     VulkanStreamGuest* vkStream,
8425     const VkPipelineViewportWScalingStateCreateInfoNV* forMarshaling)
8426 {
8427     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8428     marshal_extension_struct(vkStream, forMarshaling->pNext);
8429     vkStream->write((VkBool32*)&forMarshaling->viewportWScalingEnable, sizeof(VkBool32));
8430     vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t));
8431     // WARNING PTR CHECK
8432     uint64_t cgen_var_332 = (uint64_t)(uintptr_t)forMarshaling->pViewportWScalings;
8433     vkStream->putBe64(cgen_var_332);
8434     if (forMarshaling->pViewportWScalings)
8435     {
8436         for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i)
8437         {
8438             marshal_VkViewportWScalingNV(vkStream, (const VkViewportWScalingNV*)(forMarshaling->pViewportWScalings + i));
8439         }
8440     }
8441 }
8442 
unmarshal_VkPipelineViewportWScalingStateCreateInfoNV(VulkanStreamGuest * vkStream,VkPipelineViewportWScalingStateCreateInfoNV * forUnmarshaling)8443 void unmarshal_VkPipelineViewportWScalingStateCreateInfoNV(
8444     VulkanStreamGuest* vkStream,
8445     VkPipelineViewportWScalingStateCreateInfoNV* forUnmarshaling)
8446 {
8447     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8448     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8449     vkStream->read((VkBool32*)&forUnmarshaling->viewportWScalingEnable, sizeof(VkBool32));
8450     vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t));
8451     // WARNING PTR CHECK
8452     const VkViewportWScalingNV* check_pViewportWScalings;
8453     check_pViewportWScalings = (const VkViewportWScalingNV*)(uintptr_t)vkStream->getBe64();
8454     if (forUnmarshaling->pViewportWScalings)
8455     {
8456         if (!(check_pViewportWScalings))
8457         {
8458             fprintf(stderr, "fatal: forUnmarshaling->pViewportWScalings inconsistent between guest and host\n");
8459         }
8460         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i)
8461         {
8462             unmarshal_VkViewportWScalingNV(vkStream, (VkViewportWScalingNV*)(forUnmarshaling->pViewportWScalings + i));
8463         }
8464     }
8465 }
8466 
8467 #endif
8468 #ifdef VK_EXT_direct_mode_display
8469 #endif
8470 #ifdef VK_EXT_acquire_xlib_display
8471 #endif
8472 #ifdef VK_EXT_display_surface_counter
marshal_VkSurfaceCapabilities2EXT(VulkanStreamGuest * vkStream,const VkSurfaceCapabilities2EXT * forMarshaling)8473 void marshal_VkSurfaceCapabilities2EXT(
8474     VulkanStreamGuest* vkStream,
8475     const VkSurfaceCapabilities2EXT* forMarshaling)
8476 {
8477     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8478     marshal_extension_struct(vkStream, forMarshaling->pNext);
8479     vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t));
8480     vkStream->write((uint32_t*)&forMarshaling->maxImageCount, sizeof(uint32_t));
8481     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->currentExtent));
8482     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minImageExtent));
8483     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxImageExtent));
8484     vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t));
8485     vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
8486     vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
8487     vkStream->write((VkCompositeAlphaFlagsKHR*)&forMarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR));
8488     vkStream->write((VkImageUsageFlags*)&forMarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags));
8489     vkStream->write((VkSurfaceCounterFlagsEXT*)&forMarshaling->supportedSurfaceCounters, sizeof(VkSurfaceCounterFlagsEXT));
8490 }
8491 
unmarshal_VkSurfaceCapabilities2EXT(VulkanStreamGuest * vkStream,VkSurfaceCapabilities2EXT * forUnmarshaling)8492 void unmarshal_VkSurfaceCapabilities2EXT(
8493     VulkanStreamGuest* vkStream,
8494     VkSurfaceCapabilities2EXT* forUnmarshaling)
8495 {
8496     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8497     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8498     vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t));
8499     vkStream->read((uint32_t*)&forUnmarshaling->maxImageCount, sizeof(uint32_t));
8500     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->currentExtent));
8501     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minImageExtent));
8502     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxImageExtent));
8503     vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t));
8504     vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR));
8505     vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR));
8506     vkStream->read((VkCompositeAlphaFlagsKHR*)&forUnmarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR));
8507     vkStream->read((VkImageUsageFlags*)&forUnmarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags));
8508     vkStream->read((VkSurfaceCounterFlagsEXT*)&forUnmarshaling->supportedSurfaceCounters, sizeof(VkSurfaceCounterFlagsEXT));
8509 }
8510 
8511 #endif
8512 #ifdef VK_EXT_display_control
marshal_VkDisplayPowerInfoEXT(VulkanStreamGuest * vkStream,const VkDisplayPowerInfoEXT * forMarshaling)8513 void marshal_VkDisplayPowerInfoEXT(
8514     VulkanStreamGuest* vkStream,
8515     const VkDisplayPowerInfoEXT* forMarshaling)
8516 {
8517     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8518     marshal_extension_struct(vkStream, forMarshaling->pNext);
8519     vkStream->write((VkDisplayPowerStateEXT*)&forMarshaling->powerState, sizeof(VkDisplayPowerStateEXT));
8520 }
8521 
unmarshal_VkDisplayPowerInfoEXT(VulkanStreamGuest * vkStream,VkDisplayPowerInfoEXT * forUnmarshaling)8522 void unmarshal_VkDisplayPowerInfoEXT(
8523     VulkanStreamGuest* vkStream,
8524     VkDisplayPowerInfoEXT* forUnmarshaling)
8525 {
8526     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8527     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8528     vkStream->read((VkDisplayPowerStateEXT*)&forUnmarshaling->powerState, sizeof(VkDisplayPowerStateEXT));
8529 }
8530 
marshal_VkDeviceEventInfoEXT(VulkanStreamGuest * vkStream,const VkDeviceEventInfoEXT * forMarshaling)8531 void marshal_VkDeviceEventInfoEXT(
8532     VulkanStreamGuest* vkStream,
8533     const VkDeviceEventInfoEXT* forMarshaling)
8534 {
8535     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8536     marshal_extension_struct(vkStream, forMarshaling->pNext);
8537     vkStream->write((VkDeviceEventTypeEXT*)&forMarshaling->deviceEvent, sizeof(VkDeviceEventTypeEXT));
8538 }
8539 
unmarshal_VkDeviceEventInfoEXT(VulkanStreamGuest * vkStream,VkDeviceEventInfoEXT * forUnmarshaling)8540 void unmarshal_VkDeviceEventInfoEXT(
8541     VulkanStreamGuest* vkStream,
8542     VkDeviceEventInfoEXT* forUnmarshaling)
8543 {
8544     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8545     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8546     vkStream->read((VkDeviceEventTypeEXT*)&forUnmarshaling->deviceEvent, sizeof(VkDeviceEventTypeEXT));
8547 }
8548 
marshal_VkDisplayEventInfoEXT(VulkanStreamGuest * vkStream,const VkDisplayEventInfoEXT * forMarshaling)8549 void marshal_VkDisplayEventInfoEXT(
8550     VulkanStreamGuest* vkStream,
8551     const VkDisplayEventInfoEXT* forMarshaling)
8552 {
8553     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8554     marshal_extension_struct(vkStream, forMarshaling->pNext);
8555     vkStream->write((VkDisplayEventTypeEXT*)&forMarshaling->displayEvent, sizeof(VkDisplayEventTypeEXT));
8556 }
8557 
unmarshal_VkDisplayEventInfoEXT(VulkanStreamGuest * vkStream,VkDisplayEventInfoEXT * forUnmarshaling)8558 void unmarshal_VkDisplayEventInfoEXT(
8559     VulkanStreamGuest* vkStream,
8560     VkDisplayEventInfoEXT* forUnmarshaling)
8561 {
8562     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8563     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8564     vkStream->read((VkDisplayEventTypeEXT*)&forUnmarshaling->displayEvent, sizeof(VkDisplayEventTypeEXT));
8565 }
8566 
marshal_VkSwapchainCounterCreateInfoEXT(VulkanStreamGuest * vkStream,const VkSwapchainCounterCreateInfoEXT * forMarshaling)8567 void marshal_VkSwapchainCounterCreateInfoEXT(
8568     VulkanStreamGuest* vkStream,
8569     const VkSwapchainCounterCreateInfoEXT* forMarshaling)
8570 {
8571     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8572     marshal_extension_struct(vkStream, forMarshaling->pNext);
8573     vkStream->write((VkSurfaceCounterFlagsEXT*)&forMarshaling->surfaceCounters, sizeof(VkSurfaceCounterFlagsEXT));
8574 }
8575 
unmarshal_VkSwapchainCounterCreateInfoEXT(VulkanStreamGuest * vkStream,VkSwapchainCounterCreateInfoEXT * forUnmarshaling)8576 void unmarshal_VkSwapchainCounterCreateInfoEXT(
8577     VulkanStreamGuest* vkStream,
8578     VkSwapchainCounterCreateInfoEXT* forUnmarshaling)
8579 {
8580     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8581     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8582     vkStream->read((VkSurfaceCounterFlagsEXT*)&forUnmarshaling->surfaceCounters, sizeof(VkSurfaceCounterFlagsEXT));
8583 }
8584 
8585 #endif
8586 #ifdef VK_GOOGLE_display_timing
marshal_VkRefreshCycleDurationGOOGLE(VulkanStreamGuest * vkStream,const VkRefreshCycleDurationGOOGLE * forMarshaling)8587 void marshal_VkRefreshCycleDurationGOOGLE(
8588     VulkanStreamGuest* vkStream,
8589     const VkRefreshCycleDurationGOOGLE* forMarshaling)
8590 {
8591     vkStream->write((uint64_t*)&forMarshaling->refreshDuration, sizeof(uint64_t));
8592 }
8593 
unmarshal_VkRefreshCycleDurationGOOGLE(VulkanStreamGuest * vkStream,VkRefreshCycleDurationGOOGLE * forUnmarshaling)8594 void unmarshal_VkRefreshCycleDurationGOOGLE(
8595     VulkanStreamGuest* vkStream,
8596     VkRefreshCycleDurationGOOGLE* forUnmarshaling)
8597 {
8598     vkStream->read((uint64_t*)&forUnmarshaling->refreshDuration, sizeof(uint64_t));
8599 }
8600 
marshal_VkPastPresentationTimingGOOGLE(VulkanStreamGuest * vkStream,const VkPastPresentationTimingGOOGLE * forMarshaling)8601 void marshal_VkPastPresentationTimingGOOGLE(
8602     VulkanStreamGuest* vkStream,
8603     const VkPastPresentationTimingGOOGLE* forMarshaling)
8604 {
8605     vkStream->write((uint32_t*)&forMarshaling->presentID, sizeof(uint32_t));
8606     vkStream->write((uint64_t*)&forMarshaling->desiredPresentTime, sizeof(uint64_t));
8607     vkStream->write((uint64_t*)&forMarshaling->actualPresentTime, sizeof(uint64_t));
8608     vkStream->write((uint64_t*)&forMarshaling->earliestPresentTime, sizeof(uint64_t));
8609     vkStream->write((uint64_t*)&forMarshaling->presentMargin, sizeof(uint64_t));
8610 }
8611 
unmarshal_VkPastPresentationTimingGOOGLE(VulkanStreamGuest * vkStream,VkPastPresentationTimingGOOGLE * forUnmarshaling)8612 void unmarshal_VkPastPresentationTimingGOOGLE(
8613     VulkanStreamGuest* vkStream,
8614     VkPastPresentationTimingGOOGLE* forUnmarshaling)
8615 {
8616     vkStream->read((uint32_t*)&forUnmarshaling->presentID, sizeof(uint32_t));
8617     vkStream->read((uint64_t*)&forUnmarshaling->desiredPresentTime, sizeof(uint64_t));
8618     vkStream->read((uint64_t*)&forUnmarshaling->actualPresentTime, sizeof(uint64_t));
8619     vkStream->read((uint64_t*)&forUnmarshaling->earliestPresentTime, sizeof(uint64_t));
8620     vkStream->read((uint64_t*)&forUnmarshaling->presentMargin, sizeof(uint64_t));
8621 }
8622 
marshal_VkPresentTimeGOOGLE(VulkanStreamGuest * vkStream,const VkPresentTimeGOOGLE * forMarshaling)8623 void marshal_VkPresentTimeGOOGLE(
8624     VulkanStreamGuest* vkStream,
8625     const VkPresentTimeGOOGLE* forMarshaling)
8626 {
8627     vkStream->write((uint32_t*)&forMarshaling->presentID, sizeof(uint32_t));
8628     vkStream->write((uint64_t*)&forMarshaling->desiredPresentTime, sizeof(uint64_t));
8629 }
8630 
unmarshal_VkPresentTimeGOOGLE(VulkanStreamGuest * vkStream,VkPresentTimeGOOGLE * forUnmarshaling)8631 void unmarshal_VkPresentTimeGOOGLE(
8632     VulkanStreamGuest* vkStream,
8633     VkPresentTimeGOOGLE* forUnmarshaling)
8634 {
8635     vkStream->read((uint32_t*)&forUnmarshaling->presentID, sizeof(uint32_t));
8636     vkStream->read((uint64_t*)&forUnmarshaling->desiredPresentTime, sizeof(uint64_t));
8637 }
8638 
marshal_VkPresentTimesInfoGOOGLE(VulkanStreamGuest * vkStream,const VkPresentTimesInfoGOOGLE * forMarshaling)8639 void marshal_VkPresentTimesInfoGOOGLE(
8640     VulkanStreamGuest* vkStream,
8641     const VkPresentTimesInfoGOOGLE* forMarshaling)
8642 {
8643     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8644     marshal_extension_struct(vkStream, forMarshaling->pNext);
8645     vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
8646     // WARNING PTR CHECK
8647     uint64_t cgen_var_334 = (uint64_t)(uintptr_t)forMarshaling->pTimes;
8648     vkStream->putBe64(cgen_var_334);
8649     if (forMarshaling->pTimes)
8650     {
8651         for (uint32_t i = 0; i < (uint32_t)forMarshaling->swapchainCount; ++i)
8652         {
8653             marshal_VkPresentTimeGOOGLE(vkStream, (const VkPresentTimeGOOGLE*)(forMarshaling->pTimes + i));
8654         }
8655     }
8656 }
8657 
unmarshal_VkPresentTimesInfoGOOGLE(VulkanStreamGuest * vkStream,VkPresentTimesInfoGOOGLE * forUnmarshaling)8658 void unmarshal_VkPresentTimesInfoGOOGLE(
8659     VulkanStreamGuest* vkStream,
8660     VkPresentTimesInfoGOOGLE* forUnmarshaling)
8661 {
8662     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8663     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8664     vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
8665     // WARNING PTR CHECK
8666     const VkPresentTimeGOOGLE* check_pTimes;
8667     check_pTimes = (const VkPresentTimeGOOGLE*)(uintptr_t)vkStream->getBe64();
8668     if (forUnmarshaling->pTimes)
8669     {
8670         if (!(check_pTimes))
8671         {
8672             fprintf(stderr, "fatal: forUnmarshaling->pTimes inconsistent between guest and host\n");
8673         }
8674         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->swapchainCount; ++i)
8675         {
8676             unmarshal_VkPresentTimeGOOGLE(vkStream, (VkPresentTimeGOOGLE*)(forUnmarshaling->pTimes + i));
8677         }
8678     }
8679 }
8680 
8681 #endif
8682 #ifdef VK_NV_sample_mask_override_coverage
8683 #endif
8684 #ifdef VK_NV_geometry_shader_passthrough
8685 #endif
8686 #ifdef VK_NV_viewport_array2
8687 #endif
8688 #ifdef VK_NVX_multiview_per_view_attributes
marshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(VulkanStreamGuest * vkStream,const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX * forMarshaling)8689 void marshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(
8690     VulkanStreamGuest* vkStream,
8691     const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* forMarshaling)
8692 {
8693     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8694     marshal_extension_struct(vkStream, forMarshaling->pNext);
8695     vkStream->write((VkBool32*)&forMarshaling->perViewPositionAllComponents, sizeof(VkBool32));
8696 }
8697 
unmarshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(VulkanStreamGuest * vkStream,VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX * forUnmarshaling)8698 void unmarshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(
8699     VulkanStreamGuest* vkStream,
8700     VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* forUnmarshaling)
8701 {
8702     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8703     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8704     vkStream->read((VkBool32*)&forUnmarshaling->perViewPositionAllComponents, sizeof(VkBool32));
8705 }
8706 
8707 #endif
8708 #ifdef VK_NV_viewport_swizzle
marshal_VkViewportSwizzleNV(VulkanStreamGuest * vkStream,const VkViewportSwizzleNV * forMarshaling)8709 void marshal_VkViewportSwizzleNV(
8710     VulkanStreamGuest* vkStream,
8711     const VkViewportSwizzleNV* forMarshaling)
8712 {
8713     vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->x, sizeof(VkViewportCoordinateSwizzleNV));
8714     vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->y, sizeof(VkViewportCoordinateSwizzleNV));
8715     vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->z, sizeof(VkViewportCoordinateSwizzleNV));
8716     vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->w, sizeof(VkViewportCoordinateSwizzleNV));
8717 }
8718 
unmarshal_VkViewportSwizzleNV(VulkanStreamGuest * vkStream,VkViewportSwizzleNV * forUnmarshaling)8719 void unmarshal_VkViewportSwizzleNV(
8720     VulkanStreamGuest* vkStream,
8721     VkViewportSwizzleNV* forUnmarshaling)
8722 {
8723     vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->x, sizeof(VkViewportCoordinateSwizzleNV));
8724     vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->y, sizeof(VkViewportCoordinateSwizzleNV));
8725     vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->z, sizeof(VkViewportCoordinateSwizzleNV));
8726     vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->w, sizeof(VkViewportCoordinateSwizzleNV));
8727 }
8728 
marshal_VkPipelineViewportSwizzleStateCreateInfoNV(VulkanStreamGuest * vkStream,const VkPipelineViewportSwizzleStateCreateInfoNV * forMarshaling)8729 void marshal_VkPipelineViewportSwizzleStateCreateInfoNV(
8730     VulkanStreamGuest* vkStream,
8731     const VkPipelineViewportSwizzleStateCreateInfoNV* forMarshaling)
8732 {
8733     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8734     marshal_extension_struct(vkStream, forMarshaling->pNext);
8735     vkStream->write((VkPipelineViewportSwizzleStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineViewportSwizzleStateCreateFlagsNV));
8736     vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t));
8737     // WARNING PTR CHECK
8738     uint64_t cgen_var_336 = (uint64_t)(uintptr_t)forMarshaling->pViewportSwizzles;
8739     vkStream->putBe64(cgen_var_336);
8740     if (forMarshaling->pViewportSwizzles)
8741     {
8742         for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i)
8743         {
8744             marshal_VkViewportSwizzleNV(vkStream, (const VkViewportSwizzleNV*)(forMarshaling->pViewportSwizzles + i));
8745         }
8746     }
8747 }
8748 
unmarshal_VkPipelineViewportSwizzleStateCreateInfoNV(VulkanStreamGuest * vkStream,VkPipelineViewportSwizzleStateCreateInfoNV * forUnmarshaling)8749 void unmarshal_VkPipelineViewportSwizzleStateCreateInfoNV(
8750     VulkanStreamGuest* vkStream,
8751     VkPipelineViewportSwizzleStateCreateInfoNV* forUnmarshaling)
8752 {
8753     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8754     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8755     vkStream->read((VkPipelineViewportSwizzleStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineViewportSwizzleStateCreateFlagsNV));
8756     vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t));
8757     // WARNING PTR CHECK
8758     const VkViewportSwizzleNV* check_pViewportSwizzles;
8759     check_pViewportSwizzles = (const VkViewportSwizzleNV*)(uintptr_t)vkStream->getBe64();
8760     if (forUnmarshaling->pViewportSwizzles)
8761     {
8762         if (!(check_pViewportSwizzles))
8763         {
8764             fprintf(stderr, "fatal: forUnmarshaling->pViewportSwizzles inconsistent between guest and host\n");
8765         }
8766         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i)
8767         {
8768             unmarshal_VkViewportSwizzleNV(vkStream, (VkViewportSwizzleNV*)(forUnmarshaling->pViewportSwizzles + i));
8769         }
8770     }
8771 }
8772 
8773 #endif
8774 #ifdef VK_EXT_discard_rectangles
marshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceDiscardRectanglePropertiesEXT * forMarshaling)8775 void marshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(
8776     VulkanStreamGuest* vkStream,
8777     const VkPhysicalDeviceDiscardRectanglePropertiesEXT* forMarshaling)
8778 {
8779     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8780     marshal_extension_struct(vkStream, forMarshaling->pNext);
8781     vkStream->write((uint32_t*)&forMarshaling->maxDiscardRectangles, sizeof(uint32_t));
8782 }
8783 
unmarshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceDiscardRectanglePropertiesEXT * forUnmarshaling)8784 void unmarshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(
8785     VulkanStreamGuest* vkStream,
8786     VkPhysicalDeviceDiscardRectanglePropertiesEXT* forUnmarshaling)
8787 {
8788     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8789     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8790     vkStream->read((uint32_t*)&forUnmarshaling->maxDiscardRectangles, sizeof(uint32_t));
8791 }
8792 
marshal_VkPipelineDiscardRectangleStateCreateInfoEXT(VulkanStreamGuest * vkStream,const VkPipelineDiscardRectangleStateCreateInfoEXT * forMarshaling)8793 void marshal_VkPipelineDiscardRectangleStateCreateInfoEXT(
8794     VulkanStreamGuest* vkStream,
8795     const VkPipelineDiscardRectangleStateCreateInfoEXT* forMarshaling)
8796 {
8797     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8798     marshal_extension_struct(vkStream, forMarshaling->pNext);
8799     vkStream->write((VkPipelineDiscardRectangleStateCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkPipelineDiscardRectangleStateCreateFlagsEXT));
8800     vkStream->write((VkDiscardRectangleModeEXT*)&forMarshaling->discardRectangleMode, sizeof(VkDiscardRectangleModeEXT));
8801     vkStream->write((uint32_t*)&forMarshaling->discardRectangleCount, sizeof(uint32_t));
8802     // WARNING PTR CHECK
8803     uint64_t cgen_var_338 = (uint64_t)(uintptr_t)forMarshaling->pDiscardRectangles;
8804     vkStream->putBe64(cgen_var_338);
8805     if (forMarshaling->pDiscardRectangles)
8806     {
8807         for (uint32_t i = 0; i < (uint32_t)forMarshaling->discardRectangleCount; ++i)
8808         {
8809             marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pDiscardRectangles + i));
8810         }
8811     }
8812 }
8813 
unmarshal_VkPipelineDiscardRectangleStateCreateInfoEXT(VulkanStreamGuest * vkStream,VkPipelineDiscardRectangleStateCreateInfoEXT * forUnmarshaling)8814 void unmarshal_VkPipelineDiscardRectangleStateCreateInfoEXT(
8815     VulkanStreamGuest* vkStream,
8816     VkPipelineDiscardRectangleStateCreateInfoEXT* forUnmarshaling)
8817 {
8818     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8819     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8820     vkStream->read((VkPipelineDiscardRectangleStateCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkPipelineDiscardRectangleStateCreateFlagsEXT));
8821     vkStream->read((VkDiscardRectangleModeEXT*)&forUnmarshaling->discardRectangleMode, sizeof(VkDiscardRectangleModeEXT));
8822     vkStream->read((uint32_t*)&forUnmarshaling->discardRectangleCount, sizeof(uint32_t));
8823     // WARNING PTR CHECK
8824     const VkRect2D* check_pDiscardRectangles;
8825     check_pDiscardRectangles = (const VkRect2D*)(uintptr_t)vkStream->getBe64();
8826     if (forUnmarshaling->pDiscardRectangles)
8827     {
8828         if (!(check_pDiscardRectangles))
8829         {
8830             fprintf(stderr, "fatal: forUnmarshaling->pDiscardRectangles inconsistent between guest and host\n");
8831         }
8832         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->discardRectangleCount; ++i)
8833         {
8834             unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pDiscardRectangles + i));
8835         }
8836     }
8837 }
8838 
8839 #endif
8840 #ifdef VK_EXT_conservative_rasterization
marshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceConservativeRasterizationPropertiesEXT * forMarshaling)8841 void marshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(
8842     VulkanStreamGuest* vkStream,
8843     const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* forMarshaling)
8844 {
8845     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8846     marshal_extension_struct(vkStream, forMarshaling->pNext);
8847     vkStream->write((float*)&forMarshaling->primitiveOverestimationSize, sizeof(float));
8848     vkStream->write((float*)&forMarshaling->maxExtraPrimitiveOverestimationSize, sizeof(float));
8849     vkStream->write((float*)&forMarshaling->extraPrimitiveOverestimationSizeGranularity, sizeof(float));
8850     vkStream->write((VkBool32*)&forMarshaling->primitiveUnderestimation, sizeof(VkBool32));
8851     vkStream->write((VkBool32*)&forMarshaling->conservativePointAndLineRasterization, sizeof(VkBool32));
8852     vkStream->write((VkBool32*)&forMarshaling->degenerateTrianglesRasterized, sizeof(VkBool32));
8853     vkStream->write((VkBool32*)&forMarshaling->degenerateLinesRasterized, sizeof(VkBool32));
8854     vkStream->write((VkBool32*)&forMarshaling->fullyCoveredFragmentShaderInputVariable, sizeof(VkBool32));
8855     vkStream->write((VkBool32*)&forMarshaling->conservativeRasterizationPostDepthCoverage, sizeof(VkBool32));
8856 }
8857 
unmarshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceConservativeRasterizationPropertiesEXT * forUnmarshaling)8858 void unmarshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(
8859     VulkanStreamGuest* vkStream,
8860     VkPhysicalDeviceConservativeRasterizationPropertiesEXT* forUnmarshaling)
8861 {
8862     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8863     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8864     vkStream->read((float*)&forUnmarshaling->primitiveOverestimationSize, sizeof(float));
8865     vkStream->read((float*)&forUnmarshaling->maxExtraPrimitiveOverestimationSize, sizeof(float));
8866     vkStream->read((float*)&forUnmarshaling->extraPrimitiveOverestimationSizeGranularity, sizeof(float));
8867     vkStream->read((VkBool32*)&forUnmarshaling->primitiveUnderestimation, sizeof(VkBool32));
8868     vkStream->read((VkBool32*)&forUnmarshaling->conservativePointAndLineRasterization, sizeof(VkBool32));
8869     vkStream->read((VkBool32*)&forUnmarshaling->degenerateTrianglesRasterized, sizeof(VkBool32));
8870     vkStream->read((VkBool32*)&forUnmarshaling->degenerateLinesRasterized, sizeof(VkBool32));
8871     vkStream->read((VkBool32*)&forUnmarshaling->fullyCoveredFragmentShaderInputVariable, sizeof(VkBool32));
8872     vkStream->read((VkBool32*)&forUnmarshaling->conservativeRasterizationPostDepthCoverage, sizeof(VkBool32));
8873 }
8874 
marshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(VulkanStreamGuest * vkStream,const VkPipelineRasterizationConservativeStateCreateInfoEXT * forMarshaling)8875 void marshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(
8876     VulkanStreamGuest* vkStream,
8877     const VkPipelineRasterizationConservativeStateCreateInfoEXT* forMarshaling)
8878 {
8879     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8880     marshal_extension_struct(vkStream, forMarshaling->pNext);
8881     vkStream->write((VkPipelineRasterizationConservativeStateCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkPipelineRasterizationConservativeStateCreateFlagsEXT));
8882     vkStream->write((VkConservativeRasterizationModeEXT*)&forMarshaling->conservativeRasterizationMode, sizeof(VkConservativeRasterizationModeEXT));
8883     vkStream->write((float*)&forMarshaling->extraPrimitiveOverestimationSize, sizeof(float));
8884 }
8885 
unmarshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(VulkanStreamGuest * vkStream,VkPipelineRasterizationConservativeStateCreateInfoEXT * forUnmarshaling)8886 void unmarshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(
8887     VulkanStreamGuest* vkStream,
8888     VkPipelineRasterizationConservativeStateCreateInfoEXT* forUnmarshaling)
8889 {
8890     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8891     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8892     vkStream->read((VkPipelineRasterizationConservativeStateCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkPipelineRasterizationConservativeStateCreateFlagsEXT));
8893     vkStream->read((VkConservativeRasterizationModeEXT*)&forUnmarshaling->conservativeRasterizationMode, sizeof(VkConservativeRasterizationModeEXT));
8894     vkStream->read((float*)&forUnmarshaling->extraPrimitiveOverestimationSize, sizeof(float));
8895 }
8896 
8897 #endif
8898 #ifdef VK_EXT_swapchain_colorspace
8899 #endif
8900 #ifdef VK_EXT_hdr_metadata
marshal_VkXYColorEXT(VulkanStreamGuest * vkStream,const VkXYColorEXT * forMarshaling)8901 void marshal_VkXYColorEXT(
8902     VulkanStreamGuest* vkStream,
8903     const VkXYColorEXT* forMarshaling)
8904 {
8905     vkStream->write((float*)&forMarshaling->x, sizeof(float));
8906     vkStream->write((float*)&forMarshaling->y, sizeof(float));
8907 }
8908 
unmarshal_VkXYColorEXT(VulkanStreamGuest * vkStream,VkXYColorEXT * forUnmarshaling)8909 void unmarshal_VkXYColorEXT(
8910     VulkanStreamGuest* vkStream,
8911     VkXYColorEXT* forUnmarshaling)
8912 {
8913     vkStream->read((float*)&forUnmarshaling->x, sizeof(float));
8914     vkStream->read((float*)&forUnmarshaling->y, sizeof(float));
8915 }
8916 
marshal_VkHdrMetadataEXT(VulkanStreamGuest * vkStream,const VkHdrMetadataEXT * forMarshaling)8917 void marshal_VkHdrMetadataEXT(
8918     VulkanStreamGuest* vkStream,
8919     const VkHdrMetadataEXT* forMarshaling)
8920 {
8921     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8922     marshal_extension_struct(vkStream, forMarshaling->pNext);
8923     marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryRed));
8924     marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryGreen));
8925     marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryBlue));
8926     marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->whitePoint));
8927     vkStream->write((float*)&forMarshaling->maxLuminance, sizeof(float));
8928     vkStream->write((float*)&forMarshaling->minLuminance, sizeof(float));
8929     vkStream->write((float*)&forMarshaling->maxContentLightLevel, sizeof(float));
8930     vkStream->write((float*)&forMarshaling->maxFrameAverageLightLevel, sizeof(float));
8931 }
8932 
unmarshal_VkHdrMetadataEXT(VulkanStreamGuest * vkStream,VkHdrMetadataEXT * forUnmarshaling)8933 void unmarshal_VkHdrMetadataEXT(
8934     VulkanStreamGuest* vkStream,
8935     VkHdrMetadataEXT* forUnmarshaling)
8936 {
8937     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8938     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8939     unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryRed));
8940     unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryGreen));
8941     unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryBlue));
8942     unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->whitePoint));
8943     vkStream->read((float*)&forUnmarshaling->maxLuminance, sizeof(float));
8944     vkStream->read((float*)&forUnmarshaling->minLuminance, sizeof(float));
8945     vkStream->read((float*)&forUnmarshaling->maxContentLightLevel, sizeof(float));
8946     vkStream->read((float*)&forUnmarshaling->maxFrameAverageLightLevel, sizeof(float));
8947 }
8948 
8949 #endif
8950 #ifdef VK_MVK_ios_surface
marshal_VkIOSSurfaceCreateInfoMVK(VulkanStreamGuest * vkStream,const VkIOSSurfaceCreateInfoMVK * forMarshaling)8951 void marshal_VkIOSSurfaceCreateInfoMVK(
8952     VulkanStreamGuest* vkStream,
8953     const VkIOSSurfaceCreateInfoMVK* forMarshaling)
8954 {
8955     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8956     marshal_extension_struct(vkStream, forMarshaling->pNext);
8957     vkStream->write((VkIOSSurfaceCreateFlagsMVK*)&forMarshaling->flags, sizeof(VkIOSSurfaceCreateFlagsMVK));
8958     // WARNING PTR CHECK
8959     uint64_t cgen_var_340 = (uint64_t)(uintptr_t)forMarshaling->pView;
8960     vkStream->putBe64(cgen_var_340);
8961     if (forMarshaling->pView)
8962     {
8963         vkStream->write((const void*)forMarshaling->pView, sizeof(const uint8_t));
8964     }
8965 }
8966 
unmarshal_VkIOSSurfaceCreateInfoMVK(VulkanStreamGuest * vkStream,VkIOSSurfaceCreateInfoMVK * forUnmarshaling)8967 void unmarshal_VkIOSSurfaceCreateInfoMVK(
8968     VulkanStreamGuest* vkStream,
8969     VkIOSSurfaceCreateInfoMVK* forUnmarshaling)
8970 {
8971     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
8972     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
8973     vkStream->read((VkIOSSurfaceCreateFlagsMVK*)&forUnmarshaling->flags, sizeof(VkIOSSurfaceCreateFlagsMVK));
8974     // WARNING PTR CHECK
8975     const void* check_pView;
8976     check_pView = (const void*)(uintptr_t)vkStream->getBe64();
8977     if (forUnmarshaling->pView)
8978     {
8979         if (!(check_pView))
8980         {
8981             fprintf(stderr, "fatal: forUnmarshaling->pView inconsistent between guest and host\n");
8982         }
8983         vkStream->read((void*)forUnmarshaling->pView, sizeof(const uint8_t));
8984     }
8985 }
8986 
8987 #endif
8988 #ifdef VK_MVK_macos_surface
marshal_VkMacOSSurfaceCreateInfoMVK(VulkanStreamGuest * vkStream,const VkMacOSSurfaceCreateInfoMVK * forMarshaling)8989 void marshal_VkMacOSSurfaceCreateInfoMVK(
8990     VulkanStreamGuest* vkStream,
8991     const VkMacOSSurfaceCreateInfoMVK* forMarshaling)
8992 {
8993     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
8994     marshal_extension_struct(vkStream, forMarshaling->pNext);
8995     vkStream->write((VkMacOSSurfaceCreateFlagsMVK*)&forMarshaling->flags, sizeof(VkMacOSSurfaceCreateFlagsMVK));
8996     // WARNING PTR CHECK
8997     uint64_t cgen_var_342 = (uint64_t)(uintptr_t)forMarshaling->pView;
8998     vkStream->putBe64(cgen_var_342);
8999     if (forMarshaling->pView)
9000     {
9001         vkStream->write((const void*)forMarshaling->pView, sizeof(const uint8_t));
9002     }
9003 }
9004 
unmarshal_VkMacOSSurfaceCreateInfoMVK(VulkanStreamGuest * vkStream,VkMacOSSurfaceCreateInfoMVK * forUnmarshaling)9005 void unmarshal_VkMacOSSurfaceCreateInfoMVK(
9006     VulkanStreamGuest* vkStream,
9007     VkMacOSSurfaceCreateInfoMVK* forUnmarshaling)
9008 {
9009     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9010     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9011     vkStream->read((VkMacOSSurfaceCreateFlagsMVK*)&forUnmarshaling->flags, sizeof(VkMacOSSurfaceCreateFlagsMVK));
9012     // WARNING PTR CHECK
9013     const void* check_pView;
9014     check_pView = (const void*)(uintptr_t)vkStream->getBe64();
9015     if (forUnmarshaling->pView)
9016     {
9017         if (!(check_pView))
9018         {
9019             fprintf(stderr, "fatal: forUnmarshaling->pView inconsistent between guest and host\n");
9020         }
9021         vkStream->read((void*)forUnmarshaling->pView, sizeof(const uint8_t));
9022     }
9023 }
9024 
9025 #endif
9026 #ifdef VK_EXT_external_memory_dma_buf
9027 #endif
9028 #ifdef VK_EXT_queue_family_foreign
9029 #endif
9030 #ifdef VK_EXT_debug_utils
marshal_VkDebugUtilsObjectNameInfoEXT(VulkanStreamGuest * vkStream,const VkDebugUtilsObjectNameInfoEXT * forMarshaling)9031 void marshal_VkDebugUtilsObjectNameInfoEXT(
9032     VulkanStreamGuest* vkStream,
9033     const VkDebugUtilsObjectNameInfoEXT* forMarshaling)
9034 {
9035     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9036     marshal_extension_struct(vkStream, forMarshaling->pNext);
9037     vkStream->write((VkObjectType*)&forMarshaling->objectType, sizeof(VkObjectType));
9038     vkStream->write((uint64_t*)&forMarshaling->objectHandle, sizeof(uint64_t));
9039     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
9040     {
9041         // WARNING PTR CHECK
9042         uint64_t cgen_var_344 = (uint64_t)(uintptr_t)forMarshaling->pObjectName;
9043         vkStream->putBe64(cgen_var_344);
9044         if (forMarshaling->pObjectName)
9045         {
9046             vkStream->putString(forMarshaling->pObjectName);
9047         }
9048     }
9049     else
9050     {
9051         vkStream->putString(forMarshaling->pObjectName);
9052     }
9053 }
9054 
unmarshal_VkDebugUtilsObjectNameInfoEXT(VulkanStreamGuest * vkStream,VkDebugUtilsObjectNameInfoEXT * forUnmarshaling)9055 void unmarshal_VkDebugUtilsObjectNameInfoEXT(
9056     VulkanStreamGuest* vkStream,
9057     VkDebugUtilsObjectNameInfoEXT* forUnmarshaling)
9058 {
9059     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9060     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9061     vkStream->read((VkObjectType*)&forUnmarshaling->objectType, sizeof(VkObjectType));
9062     vkStream->read((uint64_t*)&forUnmarshaling->objectHandle, sizeof(uint64_t));
9063     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
9064     {
9065         // WARNING PTR CHECK
9066         const char* check_pObjectName;
9067         check_pObjectName = (const char*)(uintptr_t)vkStream->getBe64();
9068         if (forUnmarshaling->pObjectName)
9069         {
9070             if (!(check_pObjectName))
9071             {
9072                 fprintf(stderr, "fatal: forUnmarshaling->pObjectName inconsistent between guest and host\n");
9073             }
9074             vkStream->loadStringInPlace((char**)&forUnmarshaling->pObjectName);
9075         }
9076     }
9077     else
9078     {
9079         vkStream->loadStringInPlace((char**)&forUnmarshaling->pObjectName);
9080     }
9081 }
9082 
marshal_VkDebugUtilsObjectTagInfoEXT(VulkanStreamGuest * vkStream,const VkDebugUtilsObjectTagInfoEXT * forMarshaling)9083 void marshal_VkDebugUtilsObjectTagInfoEXT(
9084     VulkanStreamGuest* vkStream,
9085     const VkDebugUtilsObjectTagInfoEXT* forMarshaling)
9086 {
9087     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9088     marshal_extension_struct(vkStream, forMarshaling->pNext);
9089     vkStream->write((VkObjectType*)&forMarshaling->objectType, sizeof(VkObjectType));
9090     vkStream->write((uint64_t*)&forMarshaling->objectHandle, sizeof(uint64_t));
9091     vkStream->write((uint64_t*)&forMarshaling->tagName, sizeof(uint64_t));
9092     uint64_t cgen_var_346 = (uint64_t)forMarshaling->tagSize;
9093     vkStream->putBe64(cgen_var_346);
9094     vkStream->write((const void*)forMarshaling->pTag, forMarshaling->tagSize * sizeof(const uint8_t));
9095 }
9096 
unmarshal_VkDebugUtilsObjectTagInfoEXT(VulkanStreamGuest * vkStream,VkDebugUtilsObjectTagInfoEXT * forUnmarshaling)9097 void unmarshal_VkDebugUtilsObjectTagInfoEXT(
9098     VulkanStreamGuest* vkStream,
9099     VkDebugUtilsObjectTagInfoEXT* forUnmarshaling)
9100 {
9101     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9102     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9103     vkStream->read((VkObjectType*)&forUnmarshaling->objectType, sizeof(VkObjectType));
9104     vkStream->read((uint64_t*)&forUnmarshaling->objectHandle, sizeof(uint64_t));
9105     vkStream->read((uint64_t*)&forUnmarshaling->tagName, sizeof(uint64_t));
9106     forUnmarshaling->tagSize = (size_t)vkStream->getBe64();
9107     vkStream->read((void*)forUnmarshaling->pTag, forUnmarshaling->tagSize * sizeof(const uint8_t));
9108 }
9109 
marshal_VkDebugUtilsLabelEXT(VulkanStreamGuest * vkStream,const VkDebugUtilsLabelEXT * forMarshaling)9110 void marshal_VkDebugUtilsLabelEXT(
9111     VulkanStreamGuest* vkStream,
9112     const VkDebugUtilsLabelEXT* forMarshaling)
9113 {
9114     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9115     marshal_extension_struct(vkStream, forMarshaling->pNext);
9116     vkStream->putString(forMarshaling->pLabelName);
9117     vkStream->write((float*)forMarshaling->color, 4 * sizeof(float));
9118 }
9119 
unmarshal_VkDebugUtilsLabelEXT(VulkanStreamGuest * vkStream,VkDebugUtilsLabelEXT * forUnmarshaling)9120 void unmarshal_VkDebugUtilsLabelEXT(
9121     VulkanStreamGuest* vkStream,
9122     VkDebugUtilsLabelEXT* forUnmarshaling)
9123 {
9124     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9125     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9126     vkStream->loadStringInPlace((char**)&forUnmarshaling->pLabelName);
9127     vkStream->read((float*)forUnmarshaling->color, 4 * sizeof(float));
9128 }
9129 
marshal_VkDebugUtilsMessengerCallbackDataEXT(VulkanStreamGuest * vkStream,const VkDebugUtilsMessengerCallbackDataEXT * forMarshaling)9130 void marshal_VkDebugUtilsMessengerCallbackDataEXT(
9131     VulkanStreamGuest* vkStream,
9132     const VkDebugUtilsMessengerCallbackDataEXT* forMarshaling)
9133 {
9134     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9135     marshal_extension_struct(vkStream, forMarshaling->pNext);
9136     vkStream->write((VkDebugUtilsMessengerCallbackDataFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugUtilsMessengerCallbackDataFlagsEXT));
9137     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
9138     {
9139         // WARNING PTR CHECK
9140         uint64_t cgen_var_348 = (uint64_t)(uintptr_t)forMarshaling->pMessageIdName;
9141         vkStream->putBe64(cgen_var_348);
9142         if (forMarshaling->pMessageIdName)
9143         {
9144             vkStream->putString(forMarshaling->pMessageIdName);
9145         }
9146     }
9147     else
9148     {
9149         vkStream->putString(forMarshaling->pMessageIdName);
9150     }
9151     vkStream->write((int32_t*)&forMarshaling->messageIdNumber, sizeof(int32_t));
9152     vkStream->putString(forMarshaling->pMessage);
9153     vkStream->write((uint32_t*)&forMarshaling->queueLabelCount, sizeof(uint32_t));
9154     // WARNING PTR CHECK
9155     uint64_t cgen_var_349 = (uint64_t)(uintptr_t)forMarshaling->pQueueLabels;
9156     vkStream->putBe64(cgen_var_349);
9157     if (forMarshaling->pQueueLabels)
9158     {
9159         for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueLabelCount; ++i)
9160         {
9161             marshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forMarshaling->pQueueLabels + i));
9162         }
9163     }
9164     vkStream->write((uint32_t*)&forMarshaling->cmdBufLabelCount, sizeof(uint32_t));
9165     // WARNING PTR CHECK
9166     uint64_t cgen_var_350 = (uint64_t)(uintptr_t)forMarshaling->pCmdBufLabels;
9167     vkStream->putBe64(cgen_var_350);
9168     if (forMarshaling->pCmdBufLabels)
9169     {
9170         for (uint32_t i = 0; i < (uint32_t)forMarshaling->cmdBufLabelCount; ++i)
9171         {
9172             marshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forMarshaling->pCmdBufLabels + i));
9173         }
9174     }
9175     vkStream->write((uint32_t*)&forMarshaling->objectCount, sizeof(uint32_t));
9176     // WARNING PTR CHECK
9177     uint64_t cgen_var_351 = (uint64_t)(uintptr_t)forMarshaling->pObjects;
9178     vkStream->putBe64(cgen_var_351);
9179     if (forMarshaling->pObjects)
9180     {
9181         for (uint32_t i = 0; i < (uint32_t)forMarshaling->objectCount; ++i)
9182         {
9183             marshal_VkDebugUtilsObjectNameInfoEXT(vkStream, (VkDebugUtilsObjectNameInfoEXT*)(forMarshaling->pObjects + i));
9184         }
9185     }
9186 }
9187 
unmarshal_VkDebugUtilsMessengerCallbackDataEXT(VulkanStreamGuest * vkStream,VkDebugUtilsMessengerCallbackDataEXT * forUnmarshaling)9188 void unmarshal_VkDebugUtilsMessengerCallbackDataEXT(
9189     VulkanStreamGuest* vkStream,
9190     VkDebugUtilsMessengerCallbackDataEXT* forUnmarshaling)
9191 {
9192     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9193     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9194     vkStream->read((VkDebugUtilsMessengerCallbackDataFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugUtilsMessengerCallbackDataFlagsEXT));
9195     if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
9196     {
9197         // WARNING PTR CHECK
9198         const char* check_pMessageIdName;
9199         check_pMessageIdName = (const char*)(uintptr_t)vkStream->getBe64();
9200         if (forUnmarshaling->pMessageIdName)
9201         {
9202             if (!(check_pMessageIdName))
9203             {
9204                 fprintf(stderr, "fatal: forUnmarshaling->pMessageIdName inconsistent between guest and host\n");
9205             }
9206             vkStream->loadStringInPlace((char**)&forUnmarshaling->pMessageIdName);
9207         }
9208     }
9209     else
9210     {
9211         vkStream->loadStringInPlace((char**)&forUnmarshaling->pMessageIdName);
9212     }
9213     vkStream->read((int32_t*)&forUnmarshaling->messageIdNumber, sizeof(int32_t));
9214     vkStream->loadStringInPlace((char**)&forUnmarshaling->pMessage);
9215     vkStream->read((uint32_t*)&forUnmarshaling->queueLabelCount, sizeof(uint32_t));
9216     // WARNING PTR CHECK
9217     VkDebugUtilsLabelEXT* check_pQueueLabels;
9218     check_pQueueLabels = (VkDebugUtilsLabelEXT*)(uintptr_t)vkStream->getBe64();
9219     if (forUnmarshaling->pQueueLabels)
9220     {
9221         if (!(check_pQueueLabels))
9222         {
9223             fprintf(stderr, "fatal: forUnmarshaling->pQueueLabels inconsistent between guest and host\n");
9224         }
9225         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueLabelCount; ++i)
9226         {
9227             unmarshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forUnmarshaling->pQueueLabels + i));
9228         }
9229     }
9230     vkStream->read((uint32_t*)&forUnmarshaling->cmdBufLabelCount, sizeof(uint32_t));
9231     // WARNING PTR CHECK
9232     VkDebugUtilsLabelEXT* check_pCmdBufLabels;
9233     check_pCmdBufLabels = (VkDebugUtilsLabelEXT*)(uintptr_t)vkStream->getBe64();
9234     if (forUnmarshaling->pCmdBufLabels)
9235     {
9236         if (!(check_pCmdBufLabels))
9237         {
9238             fprintf(stderr, "fatal: forUnmarshaling->pCmdBufLabels inconsistent between guest and host\n");
9239         }
9240         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->cmdBufLabelCount; ++i)
9241         {
9242             unmarshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forUnmarshaling->pCmdBufLabels + i));
9243         }
9244     }
9245     vkStream->read((uint32_t*)&forUnmarshaling->objectCount, sizeof(uint32_t));
9246     // WARNING PTR CHECK
9247     VkDebugUtilsObjectNameInfoEXT* check_pObjects;
9248     check_pObjects = (VkDebugUtilsObjectNameInfoEXT*)(uintptr_t)vkStream->getBe64();
9249     if (forUnmarshaling->pObjects)
9250     {
9251         if (!(check_pObjects))
9252         {
9253             fprintf(stderr, "fatal: forUnmarshaling->pObjects inconsistent between guest and host\n");
9254         }
9255         for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->objectCount; ++i)
9256         {
9257             unmarshal_VkDebugUtilsObjectNameInfoEXT(vkStream, (VkDebugUtilsObjectNameInfoEXT*)(forUnmarshaling->pObjects + i));
9258         }
9259     }
9260 }
9261 
marshal_VkDebugUtilsMessengerCreateInfoEXT(VulkanStreamGuest * vkStream,const VkDebugUtilsMessengerCreateInfoEXT * forMarshaling)9262 void marshal_VkDebugUtilsMessengerCreateInfoEXT(
9263     VulkanStreamGuest* vkStream,
9264     const VkDebugUtilsMessengerCreateInfoEXT* forMarshaling)
9265 {
9266     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9267     marshal_extension_struct(vkStream, forMarshaling->pNext);
9268     vkStream->write((VkDebugUtilsMessengerCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugUtilsMessengerCreateFlagsEXT));
9269     vkStream->write((VkDebugUtilsMessageSeverityFlagsEXT*)&forMarshaling->messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagsEXT));
9270     vkStream->write((VkDebugUtilsMessageTypeFlagsEXT*)&forMarshaling->messageType, sizeof(VkDebugUtilsMessageTypeFlagsEXT));
9271     uint64_t cgen_var_356 = (uint64_t)forMarshaling->pfnUserCallback;
9272     vkStream->putBe64(cgen_var_356);
9273     // WARNING PTR CHECK
9274     uint64_t cgen_var_357 = (uint64_t)(uintptr_t)forMarshaling->pUserData;
9275     vkStream->putBe64(cgen_var_357);
9276     if (forMarshaling->pUserData)
9277     {
9278         vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t));
9279     }
9280 }
9281 
unmarshal_VkDebugUtilsMessengerCreateInfoEXT(VulkanStreamGuest * vkStream,VkDebugUtilsMessengerCreateInfoEXT * forUnmarshaling)9282 void unmarshal_VkDebugUtilsMessengerCreateInfoEXT(
9283     VulkanStreamGuest* vkStream,
9284     VkDebugUtilsMessengerCreateInfoEXT* forUnmarshaling)
9285 {
9286     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9287     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9288     vkStream->read((VkDebugUtilsMessengerCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugUtilsMessengerCreateFlagsEXT));
9289     vkStream->read((VkDebugUtilsMessageSeverityFlagsEXT*)&forUnmarshaling->messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagsEXT));
9290     vkStream->read((VkDebugUtilsMessageTypeFlagsEXT*)&forUnmarshaling->messageType, sizeof(VkDebugUtilsMessageTypeFlagsEXT));
9291     forUnmarshaling->pfnUserCallback = (PFN_vkDebugUtilsMessengerCallbackEXT)vkStream->getBe64();
9292     // WARNING PTR CHECK
9293     void* check_pUserData;
9294     check_pUserData = (void*)(uintptr_t)vkStream->getBe64();
9295     if (forUnmarshaling->pUserData)
9296     {
9297         if (!(check_pUserData))
9298         {
9299             fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n");
9300         }
9301         vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t));
9302     }
9303 }
9304 
9305 #endif
9306 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
marshal_VkAndroidHardwareBufferUsageANDROID(VulkanStreamGuest * vkStream,const VkAndroidHardwareBufferUsageANDROID * forMarshaling)9307 void marshal_VkAndroidHardwareBufferUsageANDROID(
9308     VulkanStreamGuest* vkStream,
9309     const VkAndroidHardwareBufferUsageANDROID* forMarshaling)
9310 {
9311     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9312     marshal_extension_struct(vkStream, forMarshaling->pNext);
9313     vkStream->write((uint64_t*)&forMarshaling->androidHardwareBufferUsage, sizeof(uint64_t));
9314 }
9315 
unmarshal_VkAndroidHardwareBufferUsageANDROID(VulkanStreamGuest * vkStream,VkAndroidHardwareBufferUsageANDROID * forUnmarshaling)9316 void unmarshal_VkAndroidHardwareBufferUsageANDROID(
9317     VulkanStreamGuest* vkStream,
9318     VkAndroidHardwareBufferUsageANDROID* forUnmarshaling)
9319 {
9320     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9321     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9322     vkStream->read((uint64_t*)&forUnmarshaling->androidHardwareBufferUsage, sizeof(uint64_t));
9323 }
9324 
marshal_VkAndroidHardwareBufferPropertiesANDROID(VulkanStreamGuest * vkStream,const VkAndroidHardwareBufferPropertiesANDROID * forMarshaling)9325 void marshal_VkAndroidHardwareBufferPropertiesANDROID(
9326     VulkanStreamGuest* vkStream,
9327     const VkAndroidHardwareBufferPropertiesANDROID* forMarshaling)
9328 {
9329     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9330     marshal_extension_struct(vkStream, forMarshaling->pNext);
9331     vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize));
9332     vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
9333 }
9334 
unmarshal_VkAndroidHardwareBufferPropertiesANDROID(VulkanStreamGuest * vkStream,VkAndroidHardwareBufferPropertiesANDROID * forUnmarshaling)9335 void unmarshal_VkAndroidHardwareBufferPropertiesANDROID(
9336     VulkanStreamGuest* vkStream,
9337     VkAndroidHardwareBufferPropertiesANDROID* forUnmarshaling)
9338 {
9339     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9340     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9341     vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize));
9342     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
9343 }
9344 
marshal_VkAndroidHardwareBufferFormatPropertiesANDROID(VulkanStreamGuest * vkStream,const VkAndroidHardwareBufferFormatPropertiesANDROID * forMarshaling)9345 void marshal_VkAndroidHardwareBufferFormatPropertiesANDROID(
9346     VulkanStreamGuest* vkStream,
9347     const VkAndroidHardwareBufferFormatPropertiesANDROID* forMarshaling)
9348 {
9349     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9350     marshal_extension_struct(vkStream, forMarshaling->pNext);
9351     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
9352     vkStream->write((uint64_t*)&forMarshaling->externalFormat, sizeof(uint64_t));
9353     vkStream->write((VkFormatFeatureFlags*)&forMarshaling->formatFeatures, sizeof(VkFormatFeatureFlags));
9354     marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->samplerYcbcrConversionComponents));
9355     vkStream->write((VkSamplerYcbcrModelConversion*)&forMarshaling->suggestedYcbcrModel, sizeof(VkSamplerYcbcrModelConversion));
9356     vkStream->write((VkSamplerYcbcrRange*)&forMarshaling->suggestedYcbcrRange, sizeof(VkSamplerYcbcrRange));
9357     vkStream->write((VkChromaLocation*)&forMarshaling->suggestedXChromaOffset, sizeof(VkChromaLocation));
9358     vkStream->write((VkChromaLocation*)&forMarshaling->suggestedYChromaOffset, sizeof(VkChromaLocation));
9359 }
9360 
unmarshal_VkAndroidHardwareBufferFormatPropertiesANDROID(VulkanStreamGuest * vkStream,VkAndroidHardwareBufferFormatPropertiesANDROID * forUnmarshaling)9361 void unmarshal_VkAndroidHardwareBufferFormatPropertiesANDROID(
9362     VulkanStreamGuest* vkStream,
9363     VkAndroidHardwareBufferFormatPropertiesANDROID* forUnmarshaling)
9364 {
9365     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9366     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9367     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
9368     vkStream->read((uint64_t*)&forUnmarshaling->externalFormat, sizeof(uint64_t));
9369     vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->formatFeatures, sizeof(VkFormatFeatureFlags));
9370     unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->samplerYcbcrConversionComponents));
9371     vkStream->read((VkSamplerYcbcrModelConversion*)&forUnmarshaling->suggestedYcbcrModel, sizeof(VkSamplerYcbcrModelConversion));
9372     vkStream->read((VkSamplerYcbcrRange*)&forUnmarshaling->suggestedYcbcrRange, sizeof(VkSamplerYcbcrRange));
9373     vkStream->read((VkChromaLocation*)&forUnmarshaling->suggestedXChromaOffset, sizeof(VkChromaLocation));
9374     vkStream->read((VkChromaLocation*)&forUnmarshaling->suggestedYChromaOffset, sizeof(VkChromaLocation));
9375 }
9376 
marshal_VkImportAndroidHardwareBufferInfoANDROID(VulkanStreamGuest * vkStream,const VkImportAndroidHardwareBufferInfoANDROID * forMarshaling)9377 void marshal_VkImportAndroidHardwareBufferInfoANDROID(
9378     VulkanStreamGuest* vkStream,
9379     const VkImportAndroidHardwareBufferInfoANDROID* forMarshaling)
9380 {
9381     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9382     marshal_extension_struct(vkStream, forMarshaling->pNext);
9383     vkStream->write((AHardwareBuffer*)forMarshaling->buffer, sizeof(AHardwareBuffer));
9384 }
9385 
unmarshal_VkImportAndroidHardwareBufferInfoANDROID(VulkanStreamGuest * vkStream,VkImportAndroidHardwareBufferInfoANDROID * forUnmarshaling)9386 void unmarshal_VkImportAndroidHardwareBufferInfoANDROID(
9387     VulkanStreamGuest* vkStream,
9388     VkImportAndroidHardwareBufferInfoANDROID* forUnmarshaling)
9389 {
9390     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9391     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9392     vkStream->read((AHardwareBuffer*)forUnmarshaling->buffer, sizeof(AHardwareBuffer));
9393 }
9394 
marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(VulkanStreamGuest * vkStream,const VkMemoryGetAndroidHardwareBufferInfoANDROID * forMarshaling)9395 void marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(
9396     VulkanStreamGuest* vkStream,
9397     const VkMemoryGetAndroidHardwareBufferInfoANDROID* forMarshaling)
9398 {
9399     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9400     marshal_extension_struct(vkStream, forMarshaling->pNext);
9401     uint64_t cgen_var_360;
9402     vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_360, 1);
9403     vkStream->write((uint64_t*)&cgen_var_360, 1 * 8);
9404 }
9405 
unmarshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(VulkanStreamGuest * vkStream,VkMemoryGetAndroidHardwareBufferInfoANDROID * forUnmarshaling)9406 void unmarshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(
9407     VulkanStreamGuest* vkStream,
9408     VkMemoryGetAndroidHardwareBufferInfoANDROID* forUnmarshaling)
9409 {
9410     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9411     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9412     uint64_t cgen_var_361;
9413     vkStream->read((uint64_t*)&cgen_var_361, 1 * 8);
9414     vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_361, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
9415 }
9416 
marshal_VkExternalFormatANDROID(VulkanStreamGuest * vkStream,const VkExternalFormatANDROID * forMarshaling)9417 void marshal_VkExternalFormatANDROID(
9418     VulkanStreamGuest* vkStream,
9419     const VkExternalFormatANDROID* forMarshaling)
9420 {
9421     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9422     marshal_extension_struct(vkStream, forMarshaling->pNext);
9423     vkStream->write((uint64_t*)&forMarshaling->externalFormat, sizeof(uint64_t));
9424 }
9425 
unmarshal_VkExternalFormatANDROID(VulkanStreamGuest * vkStream,VkExternalFormatANDROID * forUnmarshaling)9426 void unmarshal_VkExternalFormatANDROID(
9427     VulkanStreamGuest* vkStream,
9428     VkExternalFormatANDROID* forUnmarshaling)
9429 {
9430     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9431     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9432     vkStream->read((uint64_t*)&forUnmarshaling->externalFormat, sizeof(uint64_t));
9433 }
9434 
9435 #endif
9436 #ifdef VK_EXT_sampler_filter_minmax
marshal_VkSamplerReductionModeCreateInfoEXT(VulkanStreamGuest * vkStream,const VkSamplerReductionModeCreateInfoEXT * forMarshaling)9437 void marshal_VkSamplerReductionModeCreateInfoEXT(
9438     VulkanStreamGuest* vkStream,
9439     const VkSamplerReductionModeCreateInfoEXT* forMarshaling)
9440 {
9441     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9442     marshal_extension_struct(vkStream, forMarshaling->pNext);
9443     vkStream->write((VkSamplerReductionModeEXT*)&forMarshaling->reductionMode, sizeof(VkSamplerReductionModeEXT));
9444 }
9445 
unmarshal_VkSamplerReductionModeCreateInfoEXT(VulkanStreamGuest * vkStream,VkSamplerReductionModeCreateInfoEXT * forUnmarshaling)9446 void unmarshal_VkSamplerReductionModeCreateInfoEXT(
9447     VulkanStreamGuest* vkStream,
9448     VkSamplerReductionModeCreateInfoEXT* forUnmarshaling)
9449 {
9450     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9451     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9452     vkStream->read((VkSamplerReductionModeEXT*)&forUnmarshaling->reductionMode, sizeof(VkSamplerReductionModeEXT));
9453 }
9454 
marshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT * forMarshaling)9455 void marshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(
9456     VulkanStreamGuest* vkStream,
9457     const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* forMarshaling)
9458 {
9459     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9460     marshal_extension_struct(vkStream, forMarshaling->pNext);
9461     vkStream->write((VkBool32*)&forMarshaling->filterMinmaxSingleComponentFormats, sizeof(VkBool32));
9462     vkStream->write((VkBool32*)&forMarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32));
9463 }
9464 
unmarshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT * forUnmarshaling)9465 void unmarshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(
9466     VulkanStreamGuest* vkStream,
9467     VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* forUnmarshaling)
9468 {
9469     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9470     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9471     vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxSingleComponentFormats, sizeof(VkBool32));
9472     vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32));
9473 }
9474 
9475 #endif
9476 #ifdef VK_AMD_gpu_shader_int16
9477 #endif
9478 #ifdef VK_AMD_mixed_attachment_samples
9479 #endif
9480 #ifdef VK_AMD_shader_fragment_mask
9481 #endif
9482 #ifdef VK_EXT_shader_stencil_export
9483 #endif
9484 #ifdef VK_EXT_sample_locations
marshal_VkSampleLocationEXT(VulkanStreamGuest * vkStream,const VkSampleLocationEXT * forMarshaling)9485 void marshal_VkSampleLocationEXT(
9486     VulkanStreamGuest* vkStream,
9487     const VkSampleLocationEXT* forMarshaling)
9488 {
9489     vkStream->write((float*)&forMarshaling->x, sizeof(float));
9490     vkStream->write((float*)&forMarshaling->y, sizeof(float));
9491 }
9492 
unmarshal_VkSampleLocationEXT(VulkanStreamGuest * vkStream,VkSampleLocationEXT * forUnmarshaling)9493 void unmarshal_VkSampleLocationEXT(
9494     VulkanStreamGuest* vkStream,
9495     VkSampleLocationEXT* forUnmarshaling)
9496 {
9497     vkStream->read((float*)&forUnmarshaling->x, sizeof(float));
9498     vkStream->read((float*)&forUnmarshaling->y, sizeof(float));
9499 }
9500 
marshal_VkSampleLocationsInfoEXT(VulkanStreamGuest * vkStream,const VkSampleLocationsInfoEXT * forMarshaling)9501 void marshal_VkSampleLocationsInfoEXT(
9502     VulkanStreamGuest* vkStream,
9503     const VkSampleLocationsInfoEXT* forMarshaling)
9504 {
9505     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9506     marshal_extension_struct(vkStream, forMarshaling->pNext);
9507     vkStream->write((VkSampleCountFlagBits*)&forMarshaling->sampleLocationsPerPixel, sizeof(VkSampleCountFlagBits));
9508     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->sampleLocationGridSize));
9509     vkStream->write((uint32_t*)&forMarshaling->sampleLocationsCount, sizeof(uint32_t));
9510     for (uint32_t i = 0; i < (uint32_t)forMarshaling->sampleLocationsCount; ++i)
9511     {
9512         marshal_VkSampleLocationEXT(vkStream, (const VkSampleLocationEXT*)(forMarshaling->pSampleLocations + i));
9513     }
9514 }
9515 
unmarshal_VkSampleLocationsInfoEXT(VulkanStreamGuest * vkStream,VkSampleLocationsInfoEXT * forUnmarshaling)9516 void unmarshal_VkSampleLocationsInfoEXT(
9517     VulkanStreamGuest* vkStream,
9518     VkSampleLocationsInfoEXT* forUnmarshaling)
9519 {
9520     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9521     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9522     vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->sampleLocationsPerPixel, sizeof(VkSampleCountFlagBits));
9523     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->sampleLocationGridSize));
9524     vkStream->read((uint32_t*)&forUnmarshaling->sampleLocationsCount, sizeof(uint32_t));
9525     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->sampleLocationsCount; ++i)
9526     {
9527         unmarshal_VkSampleLocationEXT(vkStream, (VkSampleLocationEXT*)(forUnmarshaling->pSampleLocations + i));
9528     }
9529 }
9530 
marshal_VkAttachmentSampleLocationsEXT(VulkanStreamGuest * vkStream,const VkAttachmentSampleLocationsEXT * forMarshaling)9531 void marshal_VkAttachmentSampleLocationsEXT(
9532     VulkanStreamGuest* vkStream,
9533     const VkAttachmentSampleLocationsEXT* forMarshaling)
9534 {
9535     vkStream->write((uint32_t*)&forMarshaling->attachmentIndex, sizeof(uint32_t));
9536     marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo));
9537 }
9538 
unmarshal_VkAttachmentSampleLocationsEXT(VulkanStreamGuest * vkStream,VkAttachmentSampleLocationsEXT * forUnmarshaling)9539 void unmarshal_VkAttachmentSampleLocationsEXT(
9540     VulkanStreamGuest* vkStream,
9541     VkAttachmentSampleLocationsEXT* forUnmarshaling)
9542 {
9543     vkStream->read((uint32_t*)&forUnmarshaling->attachmentIndex, sizeof(uint32_t));
9544     unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo));
9545 }
9546 
marshal_VkSubpassSampleLocationsEXT(VulkanStreamGuest * vkStream,const VkSubpassSampleLocationsEXT * forMarshaling)9547 void marshal_VkSubpassSampleLocationsEXT(
9548     VulkanStreamGuest* vkStream,
9549     const VkSubpassSampleLocationsEXT* forMarshaling)
9550 {
9551     vkStream->write((uint32_t*)&forMarshaling->subpassIndex, sizeof(uint32_t));
9552     marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo));
9553 }
9554 
unmarshal_VkSubpassSampleLocationsEXT(VulkanStreamGuest * vkStream,VkSubpassSampleLocationsEXT * forUnmarshaling)9555 void unmarshal_VkSubpassSampleLocationsEXT(
9556     VulkanStreamGuest* vkStream,
9557     VkSubpassSampleLocationsEXT* forUnmarshaling)
9558 {
9559     vkStream->read((uint32_t*)&forUnmarshaling->subpassIndex, sizeof(uint32_t));
9560     unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo));
9561 }
9562 
marshal_VkRenderPassSampleLocationsBeginInfoEXT(VulkanStreamGuest * vkStream,const VkRenderPassSampleLocationsBeginInfoEXT * forMarshaling)9563 void marshal_VkRenderPassSampleLocationsBeginInfoEXT(
9564     VulkanStreamGuest* vkStream,
9565     const VkRenderPassSampleLocationsBeginInfoEXT* forMarshaling)
9566 {
9567     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9568     marshal_extension_struct(vkStream, forMarshaling->pNext);
9569     vkStream->write((uint32_t*)&forMarshaling->attachmentInitialSampleLocationsCount, sizeof(uint32_t));
9570     for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentInitialSampleLocationsCount; ++i)
9571     {
9572         marshal_VkAttachmentSampleLocationsEXT(vkStream, (const VkAttachmentSampleLocationsEXT*)(forMarshaling->pAttachmentInitialSampleLocations + i));
9573     }
9574     vkStream->write((uint32_t*)&forMarshaling->postSubpassSampleLocationsCount, sizeof(uint32_t));
9575     for (uint32_t i = 0; i < (uint32_t)forMarshaling->postSubpassSampleLocationsCount; ++i)
9576     {
9577         marshal_VkSubpassSampleLocationsEXT(vkStream, (const VkSubpassSampleLocationsEXT*)(forMarshaling->pPostSubpassSampleLocations + i));
9578     }
9579 }
9580 
unmarshal_VkRenderPassSampleLocationsBeginInfoEXT(VulkanStreamGuest * vkStream,VkRenderPassSampleLocationsBeginInfoEXT * forUnmarshaling)9581 void unmarshal_VkRenderPassSampleLocationsBeginInfoEXT(
9582     VulkanStreamGuest* vkStream,
9583     VkRenderPassSampleLocationsBeginInfoEXT* forUnmarshaling)
9584 {
9585     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9586     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9587     vkStream->read((uint32_t*)&forUnmarshaling->attachmentInitialSampleLocationsCount, sizeof(uint32_t));
9588     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentInitialSampleLocationsCount; ++i)
9589     {
9590         unmarshal_VkAttachmentSampleLocationsEXT(vkStream, (VkAttachmentSampleLocationsEXT*)(forUnmarshaling->pAttachmentInitialSampleLocations + i));
9591     }
9592     vkStream->read((uint32_t*)&forUnmarshaling->postSubpassSampleLocationsCount, sizeof(uint32_t));
9593     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->postSubpassSampleLocationsCount; ++i)
9594     {
9595         unmarshal_VkSubpassSampleLocationsEXT(vkStream, (VkSubpassSampleLocationsEXT*)(forUnmarshaling->pPostSubpassSampleLocations + i));
9596     }
9597 }
9598 
marshal_VkPipelineSampleLocationsStateCreateInfoEXT(VulkanStreamGuest * vkStream,const VkPipelineSampleLocationsStateCreateInfoEXT * forMarshaling)9599 void marshal_VkPipelineSampleLocationsStateCreateInfoEXT(
9600     VulkanStreamGuest* vkStream,
9601     const VkPipelineSampleLocationsStateCreateInfoEXT* forMarshaling)
9602 {
9603     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9604     marshal_extension_struct(vkStream, forMarshaling->pNext);
9605     vkStream->write((VkBool32*)&forMarshaling->sampleLocationsEnable, sizeof(VkBool32));
9606     marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo));
9607 }
9608 
unmarshal_VkPipelineSampleLocationsStateCreateInfoEXT(VulkanStreamGuest * vkStream,VkPipelineSampleLocationsStateCreateInfoEXT * forUnmarshaling)9609 void unmarshal_VkPipelineSampleLocationsStateCreateInfoEXT(
9610     VulkanStreamGuest* vkStream,
9611     VkPipelineSampleLocationsStateCreateInfoEXT* forUnmarshaling)
9612 {
9613     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9614     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9615     vkStream->read((VkBool32*)&forUnmarshaling->sampleLocationsEnable, sizeof(VkBool32));
9616     unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo));
9617 }
9618 
marshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceSampleLocationsPropertiesEXT * forMarshaling)9619 void marshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(
9620     VulkanStreamGuest* vkStream,
9621     const VkPhysicalDeviceSampleLocationsPropertiesEXT* forMarshaling)
9622 {
9623     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9624     marshal_extension_struct(vkStream, forMarshaling->pNext);
9625     vkStream->write((VkSampleCountFlags*)&forMarshaling->sampleLocationSampleCounts, sizeof(VkSampleCountFlags));
9626     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSampleLocationGridSize));
9627     vkStream->write((float*)forMarshaling->sampleLocationCoordinateRange, 2 * sizeof(float));
9628     vkStream->write((uint32_t*)&forMarshaling->sampleLocationSubPixelBits, sizeof(uint32_t));
9629     vkStream->write((VkBool32*)&forMarshaling->variableSampleLocations, sizeof(VkBool32));
9630 }
9631 
unmarshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceSampleLocationsPropertiesEXT * forUnmarshaling)9632 void unmarshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(
9633     VulkanStreamGuest* vkStream,
9634     VkPhysicalDeviceSampleLocationsPropertiesEXT* forUnmarshaling)
9635 {
9636     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9637     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9638     vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampleLocationSampleCounts, sizeof(VkSampleCountFlags));
9639     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSampleLocationGridSize));
9640     vkStream->read((float*)forUnmarshaling->sampleLocationCoordinateRange, 2 * sizeof(float));
9641     vkStream->read((uint32_t*)&forUnmarshaling->sampleLocationSubPixelBits, sizeof(uint32_t));
9642     vkStream->read((VkBool32*)&forUnmarshaling->variableSampleLocations, sizeof(VkBool32));
9643 }
9644 
marshal_VkMultisamplePropertiesEXT(VulkanStreamGuest * vkStream,const VkMultisamplePropertiesEXT * forMarshaling)9645 void marshal_VkMultisamplePropertiesEXT(
9646     VulkanStreamGuest* vkStream,
9647     const VkMultisamplePropertiesEXT* forMarshaling)
9648 {
9649     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9650     marshal_extension_struct(vkStream, forMarshaling->pNext);
9651     marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSampleLocationGridSize));
9652 }
9653 
unmarshal_VkMultisamplePropertiesEXT(VulkanStreamGuest * vkStream,VkMultisamplePropertiesEXT * forUnmarshaling)9654 void unmarshal_VkMultisamplePropertiesEXT(
9655     VulkanStreamGuest* vkStream,
9656     VkMultisamplePropertiesEXT* forUnmarshaling)
9657 {
9658     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9659     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9660     unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSampleLocationGridSize));
9661 }
9662 
9663 #endif
9664 #ifdef VK_EXT_blend_operation_advanced
marshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT * forMarshaling)9665 void marshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(
9666     VulkanStreamGuest* vkStream,
9667     const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* forMarshaling)
9668 {
9669     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9670     marshal_extension_struct(vkStream, forMarshaling->pNext);
9671     vkStream->write((VkBool32*)&forMarshaling->advancedBlendCoherentOperations, sizeof(VkBool32));
9672 }
9673 
unmarshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT * forUnmarshaling)9674 void unmarshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(
9675     VulkanStreamGuest* vkStream,
9676     VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* forUnmarshaling)
9677 {
9678     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9679     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9680     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendCoherentOperations, sizeof(VkBool32));
9681 }
9682 
marshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT * forMarshaling)9683 void marshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(
9684     VulkanStreamGuest* vkStream,
9685     const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* forMarshaling)
9686 {
9687     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9688     marshal_extension_struct(vkStream, forMarshaling->pNext);
9689     vkStream->write((uint32_t*)&forMarshaling->advancedBlendMaxColorAttachments, sizeof(uint32_t));
9690     vkStream->write((VkBool32*)&forMarshaling->advancedBlendIndependentBlend, sizeof(VkBool32));
9691     vkStream->write((VkBool32*)&forMarshaling->advancedBlendNonPremultipliedSrcColor, sizeof(VkBool32));
9692     vkStream->write((VkBool32*)&forMarshaling->advancedBlendNonPremultipliedDstColor, sizeof(VkBool32));
9693     vkStream->write((VkBool32*)&forMarshaling->advancedBlendCorrelatedOverlap, sizeof(VkBool32));
9694     vkStream->write((VkBool32*)&forMarshaling->advancedBlendAllOperations, sizeof(VkBool32));
9695 }
9696 
unmarshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT * forUnmarshaling)9697 void unmarshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(
9698     VulkanStreamGuest* vkStream,
9699     VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* forUnmarshaling)
9700 {
9701     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9702     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9703     vkStream->read((uint32_t*)&forUnmarshaling->advancedBlendMaxColorAttachments, sizeof(uint32_t));
9704     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendIndependentBlend, sizeof(VkBool32));
9705     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendNonPremultipliedSrcColor, sizeof(VkBool32));
9706     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendNonPremultipliedDstColor, sizeof(VkBool32));
9707     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendCorrelatedOverlap, sizeof(VkBool32));
9708     vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendAllOperations, sizeof(VkBool32));
9709 }
9710 
marshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(VulkanStreamGuest * vkStream,const VkPipelineColorBlendAdvancedStateCreateInfoEXT * forMarshaling)9711 void marshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(
9712     VulkanStreamGuest* vkStream,
9713     const VkPipelineColorBlendAdvancedStateCreateInfoEXT* forMarshaling)
9714 {
9715     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9716     marshal_extension_struct(vkStream, forMarshaling->pNext);
9717     vkStream->write((VkBool32*)&forMarshaling->srcPremultiplied, sizeof(VkBool32));
9718     vkStream->write((VkBool32*)&forMarshaling->dstPremultiplied, sizeof(VkBool32));
9719     vkStream->write((VkBlendOverlapEXT*)&forMarshaling->blendOverlap, sizeof(VkBlendOverlapEXT));
9720 }
9721 
unmarshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(VulkanStreamGuest * vkStream,VkPipelineColorBlendAdvancedStateCreateInfoEXT * forUnmarshaling)9722 void unmarshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(
9723     VulkanStreamGuest* vkStream,
9724     VkPipelineColorBlendAdvancedStateCreateInfoEXT* forUnmarshaling)
9725 {
9726     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9727     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9728     vkStream->read((VkBool32*)&forUnmarshaling->srcPremultiplied, sizeof(VkBool32));
9729     vkStream->read((VkBool32*)&forUnmarshaling->dstPremultiplied, sizeof(VkBool32));
9730     vkStream->read((VkBlendOverlapEXT*)&forUnmarshaling->blendOverlap, sizeof(VkBlendOverlapEXT));
9731 }
9732 
9733 #endif
9734 #ifdef VK_NV_fragment_coverage_to_color
marshal_VkPipelineCoverageToColorStateCreateInfoNV(VulkanStreamGuest * vkStream,const VkPipelineCoverageToColorStateCreateInfoNV * forMarshaling)9735 void marshal_VkPipelineCoverageToColorStateCreateInfoNV(
9736     VulkanStreamGuest* vkStream,
9737     const VkPipelineCoverageToColorStateCreateInfoNV* forMarshaling)
9738 {
9739     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9740     marshal_extension_struct(vkStream, forMarshaling->pNext);
9741     vkStream->write((VkPipelineCoverageToColorStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineCoverageToColorStateCreateFlagsNV));
9742     vkStream->write((VkBool32*)&forMarshaling->coverageToColorEnable, sizeof(VkBool32));
9743     vkStream->write((uint32_t*)&forMarshaling->coverageToColorLocation, sizeof(uint32_t));
9744 }
9745 
unmarshal_VkPipelineCoverageToColorStateCreateInfoNV(VulkanStreamGuest * vkStream,VkPipelineCoverageToColorStateCreateInfoNV * forUnmarshaling)9746 void unmarshal_VkPipelineCoverageToColorStateCreateInfoNV(
9747     VulkanStreamGuest* vkStream,
9748     VkPipelineCoverageToColorStateCreateInfoNV* forUnmarshaling)
9749 {
9750     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9751     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9752     vkStream->read((VkPipelineCoverageToColorStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineCoverageToColorStateCreateFlagsNV));
9753     vkStream->read((VkBool32*)&forUnmarshaling->coverageToColorEnable, sizeof(VkBool32));
9754     vkStream->read((uint32_t*)&forUnmarshaling->coverageToColorLocation, sizeof(uint32_t));
9755 }
9756 
9757 #endif
9758 #ifdef VK_NV_framebuffer_mixed_samples
marshal_VkPipelineCoverageModulationStateCreateInfoNV(VulkanStreamGuest * vkStream,const VkPipelineCoverageModulationStateCreateInfoNV * forMarshaling)9759 void marshal_VkPipelineCoverageModulationStateCreateInfoNV(
9760     VulkanStreamGuest* vkStream,
9761     const VkPipelineCoverageModulationStateCreateInfoNV* forMarshaling)
9762 {
9763     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9764     marshal_extension_struct(vkStream, forMarshaling->pNext);
9765     vkStream->write((VkPipelineCoverageModulationStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineCoverageModulationStateCreateFlagsNV));
9766     vkStream->write((VkCoverageModulationModeNV*)&forMarshaling->coverageModulationMode, sizeof(VkCoverageModulationModeNV));
9767     vkStream->write((VkBool32*)&forMarshaling->coverageModulationTableEnable, sizeof(VkBool32));
9768     vkStream->write((uint32_t*)&forMarshaling->coverageModulationTableCount, sizeof(uint32_t));
9769     // WARNING PTR CHECK
9770     uint64_t cgen_var_362 = (uint64_t)(uintptr_t)forMarshaling->pCoverageModulationTable;
9771     vkStream->putBe64(cgen_var_362);
9772     if (forMarshaling->pCoverageModulationTable)
9773     {
9774         vkStream->write((const float*)forMarshaling->pCoverageModulationTable, forMarshaling->coverageModulationTableCount * sizeof(const float));
9775     }
9776 }
9777 
unmarshal_VkPipelineCoverageModulationStateCreateInfoNV(VulkanStreamGuest * vkStream,VkPipelineCoverageModulationStateCreateInfoNV * forUnmarshaling)9778 void unmarshal_VkPipelineCoverageModulationStateCreateInfoNV(
9779     VulkanStreamGuest* vkStream,
9780     VkPipelineCoverageModulationStateCreateInfoNV* forUnmarshaling)
9781 {
9782     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9783     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9784     vkStream->read((VkPipelineCoverageModulationStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineCoverageModulationStateCreateFlagsNV));
9785     vkStream->read((VkCoverageModulationModeNV*)&forUnmarshaling->coverageModulationMode, sizeof(VkCoverageModulationModeNV));
9786     vkStream->read((VkBool32*)&forUnmarshaling->coverageModulationTableEnable, sizeof(VkBool32));
9787     vkStream->read((uint32_t*)&forUnmarshaling->coverageModulationTableCount, sizeof(uint32_t));
9788     // WARNING PTR CHECK
9789     const float* check_pCoverageModulationTable;
9790     check_pCoverageModulationTable = (const float*)(uintptr_t)vkStream->getBe64();
9791     if (forUnmarshaling->pCoverageModulationTable)
9792     {
9793         if (!(check_pCoverageModulationTable))
9794         {
9795             fprintf(stderr, "fatal: forUnmarshaling->pCoverageModulationTable inconsistent between guest and host\n");
9796         }
9797         vkStream->read((float*)forUnmarshaling->pCoverageModulationTable, forUnmarshaling->coverageModulationTableCount * sizeof(const float));
9798     }
9799 }
9800 
9801 #endif
9802 #ifdef VK_NV_fill_rectangle
9803 #endif
9804 #ifdef VK_EXT_post_depth_coverage
9805 #endif
9806 #ifdef VK_EXT_validation_cache
marshal_VkValidationCacheCreateInfoEXT(VulkanStreamGuest * vkStream,const VkValidationCacheCreateInfoEXT * forMarshaling)9807 void marshal_VkValidationCacheCreateInfoEXT(
9808     VulkanStreamGuest* vkStream,
9809     const VkValidationCacheCreateInfoEXT* forMarshaling)
9810 {
9811     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9812     marshal_extension_struct(vkStream, forMarshaling->pNext);
9813     vkStream->write((VkValidationCacheCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkValidationCacheCreateFlagsEXT));
9814     uint64_t cgen_var_364 = (uint64_t)forMarshaling->initialDataSize;
9815     vkStream->putBe64(cgen_var_364);
9816     vkStream->write((const void*)forMarshaling->pInitialData, forMarshaling->initialDataSize * sizeof(const uint8_t));
9817 }
9818 
unmarshal_VkValidationCacheCreateInfoEXT(VulkanStreamGuest * vkStream,VkValidationCacheCreateInfoEXT * forUnmarshaling)9819 void unmarshal_VkValidationCacheCreateInfoEXT(
9820     VulkanStreamGuest* vkStream,
9821     VkValidationCacheCreateInfoEXT* forUnmarshaling)
9822 {
9823     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9824     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9825     vkStream->read((VkValidationCacheCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkValidationCacheCreateFlagsEXT));
9826     forUnmarshaling->initialDataSize = (size_t)vkStream->getBe64();
9827     vkStream->read((void*)forUnmarshaling->pInitialData, forUnmarshaling->initialDataSize * sizeof(const uint8_t));
9828 }
9829 
marshal_VkShaderModuleValidationCacheCreateInfoEXT(VulkanStreamGuest * vkStream,const VkShaderModuleValidationCacheCreateInfoEXT * forMarshaling)9830 void marshal_VkShaderModuleValidationCacheCreateInfoEXT(
9831     VulkanStreamGuest* vkStream,
9832     const VkShaderModuleValidationCacheCreateInfoEXT* forMarshaling)
9833 {
9834     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9835     marshal_extension_struct(vkStream, forMarshaling->pNext);
9836     uint64_t cgen_var_366;
9837     vkStream->handleMapping()->mapHandles_VkValidationCacheEXT_u64(&forMarshaling->validationCache, &cgen_var_366, 1);
9838     vkStream->write((uint64_t*)&cgen_var_366, 1 * 8);
9839 }
9840 
unmarshal_VkShaderModuleValidationCacheCreateInfoEXT(VulkanStreamGuest * vkStream,VkShaderModuleValidationCacheCreateInfoEXT * forUnmarshaling)9841 void unmarshal_VkShaderModuleValidationCacheCreateInfoEXT(
9842     VulkanStreamGuest* vkStream,
9843     VkShaderModuleValidationCacheCreateInfoEXT* forUnmarshaling)
9844 {
9845     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9846     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9847     uint64_t cgen_var_367;
9848     vkStream->read((uint64_t*)&cgen_var_367, 1 * 8);
9849     vkStream->handleMapping()->mapHandles_u64_VkValidationCacheEXT(&cgen_var_367, (VkValidationCacheEXT*)&forUnmarshaling->validationCache, 1);
9850 }
9851 
9852 #endif
9853 #ifdef VK_EXT_descriptor_indexing
marshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(VulkanStreamGuest * vkStream,const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT * forMarshaling)9854 void marshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(
9855     VulkanStreamGuest* vkStream,
9856     const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* forMarshaling)
9857 {
9858     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9859     marshal_extension_struct(vkStream, forMarshaling->pNext);
9860     vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t));
9861     vkStream->write((const VkDescriptorBindingFlagsEXT*)forMarshaling->pBindingFlags, forMarshaling->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT));
9862 }
9863 
unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(VulkanStreamGuest * vkStream,VkDescriptorSetLayoutBindingFlagsCreateInfoEXT * forUnmarshaling)9864 void unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(
9865     VulkanStreamGuest* vkStream,
9866     VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* forUnmarshaling)
9867 {
9868     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9869     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9870     vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t));
9871     vkStream->read((VkDescriptorBindingFlagsEXT*)forUnmarshaling->pBindingFlags, forUnmarshaling->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT));
9872 }
9873 
marshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceDescriptorIndexingFeaturesEXT * forMarshaling)9874 void marshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(
9875     VulkanStreamGuest* vkStream,
9876     const VkPhysicalDeviceDescriptorIndexingFeaturesEXT* forMarshaling)
9877 {
9878     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9879     marshal_extension_struct(vkStream, forMarshaling->pNext);
9880     vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayDynamicIndexing, sizeof(VkBool32));
9881     vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayDynamicIndexing, sizeof(VkBool32));
9882     vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayDynamicIndexing, sizeof(VkBool32));
9883     vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexing, sizeof(VkBool32));
9884     vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexing, sizeof(VkBool32));
9885     vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexing, sizeof(VkBool32));
9886     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexing, sizeof(VkBool32));
9887     vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexing, sizeof(VkBool32));
9888     vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayNonUniformIndexing, sizeof(VkBool32));
9889     vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayNonUniformIndexing, sizeof(VkBool32));
9890     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformBufferUpdateAfterBind, sizeof(VkBool32));
9891     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingSampledImageUpdateAfterBind, sizeof(VkBool32));
9892     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageImageUpdateAfterBind, sizeof(VkBool32));
9893     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageBufferUpdateAfterBind, sizeof(VkBool32));
9894     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind, sizeof(VkBool32));
9895     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind, sizeof(VkBool32));
9896     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUpdateUnusedWhilePending, sizeof(VkBool32));
9897     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
9898     vkStream->write((VkBool32*)&forMarshaling->descriptorBindingVariableDescriptorCount, sizeof(VkBool32));
9899     vkStream->write((VkBool32*)&forMarshaling->runtimeDescriptorArray, sizeof(VkBool32));
9900 }
9901 
unmarshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceDescriptorIndexingFeaturesEXT * forUnmarshaling)9902 void unmarshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(
9903     VulkanStreamGuest* vkStream,
9904     VkPhysicalDeviceDescriptorIndexingFeaturesEXT* forUnmarshaling)
9905 {
9906     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9907     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9908     vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayDynamicIndexing, sizeof(VkBool32));
9909     vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayDynamicIndexing, sizeof(VkBool32));
9910     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayDynamicIndexing, sizeof(VkBool32));
9911     vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexing, sizeof(VkBool32));
9912     vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexing, sizeof(VkBool32));
9913     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexing, sizeof(VkBool32));
9914     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexing, sizeof(VkBool32));
9915     vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexing, sizeof(VkBool32));
9916     vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayNonUniformIndexing, sizeof(VkBool32));
9917     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayNonUniformIndexing, sizeof(VkBool32));
9918     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformBufferUpdateAfterBind, sizeof(VkBool32));
9919     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingSampledImageUpdateAfterBind, sizeof(VkBool32));
9920     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageImageUpdateAfterBind, sizeof(VkBool32));
9921     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageBufferUpdateAfterBind, sizeof(VkBool32));
9922     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind, sizeof(VkBool32));
9923     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind, sizeof(VkBool32));
9924     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUpdateUnusedWhilePending, sizeof(VkBool32));
9925     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
9926     vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingVariableDescriptorCount, sizeof(VkBool32));
9927     vkStream->read((VkBool32*)&forUnmarshaling->runtimeDescriptorArray, sizeof(VkBool32));
9928 }
9929 
marshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceDescriptorIndexingPropertiesEXT * forMarshaling)9930 void marshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(
9931     VulkanStreamGuest* vkStream,
9932     const VkPhysicalDeviceDescriptorIndexingPropertiesEXT* forMarshaling)
9933 {
9934     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9935     marshal_extension_struct(vkStream, forMarshaling->pNext);
9936     vkStream->write((uint32_t*)&forMarshaling->maxUpdateAfterBindDescriptorsInAllPools, sizeof(uint32_t));
9937     vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexingNative, sizeof(VkBool32));
9938     vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexingNative, sizeof(VkBool32));
9939     vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexingNative, sizeof(VkBool32));
9940     vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexingNative, sizeof(VkBool32));
9941     vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexingNative, sizeof(VkBool32));
9942     vkStream->write((VkBool32*)&forMarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32));
9943     vkStream->write((VkBool32*)&forMarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
9944     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSamplers, sizeof(uint32_t));
9945     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers, sizeof(uint32_t));
9946     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers, sizeof(uint32_t));
9947     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages, sizeof(uint32_t));
9948     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages, sizeof(uint32_t));
9949     vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments, sizeof(uint32_t));
9950     vkStream->write((uint32_t*)&forMarshaling->maxPerStageUpdateAfterBindResources, sizeof(uint32_t));
9951     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSamplers, sizeof(uint32_t));
9952     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers, sizeof(uint32_t));
9953     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, sizeof(uint32_t));
9954     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers, sizeof(uint32_t));
9955     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, sizeof(uint32_t));
9956     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSampledImages, sizeof(uint32_t));
9957     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageImages, sizeof(uint32_t));
9958     vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindInputAttachments, sizeof(uint32_t));
9959 }
9960 
unmarshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceDescriptorIndexingPropertiesEXT * forUnmarshaling)9961 void unmarshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(
9962     VulkanStreamGuest* vkStream,
9963     VkPhysicalDeviceDescriptorIndexingPropertiesEXT* forUnmarshaling)
9964 {
9965     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
9966     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
9967     vkStream->read((uint32_t*)&forUnmarshaling->maxUpdateAfterBindDescriptorsInAllPools, sizeof(uint32_t));
9968     vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexingNative, sizeof(VkBool32));
9969     vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexingNative, sizeof(VkBool32));
9970     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexingNative, sizeof(VkBool32));
9971     vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexingNative, sizeof(VkBool32));
9972     vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexingNative, sizeof(VkBool32));
9973     vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32));
9974     vkStream->read((VkBool32*)&forUnmarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
9975     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSamplers, sizeof(uint32_t));
9976     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers, sizeof(uint32_t));
9977     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers, sizeof(uint32_t));
9978     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages, sizeof(uint32_t));
9979     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages, sizeof(uint32_t));
9980     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments, sizeof(uint32_t));
9981     vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageUpdateAfterBindResources, sizeof(uint32_t));
9982     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSamplers, sizeof(uint32_t));
9983     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers, sizeof(uint32_t));
9984     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, sizeof(uint32_t));
9985     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers, sizeof(uint32_t));
9986     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, sizeof(uint32_t));
9987     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSampledImages, sizeof(uint32_t));
9988     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageImages, sizeof(uint32_t));
9989     vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindInputAttachments, sizeof(uint32_t));
9990 }
9991 
marshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(VulkanStreamGuest * vkStream,const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT * forMarshaling)9992 void marshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(
9993     VulkanStreamGuest* vkStream,
9994     const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* forMarshaling)
9995 {
9996     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
9997     marshal_extension_struct(vkStream, forMarshaling->pNext);
9998     vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t));
9999     vkStream->write((const uint32_t*)forMarshaling->pDescriptorCounts, forMarshaling->descriptorSetCount * sizeof(const uint32_t));
10000 }
10001 
unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(VulkanStreamGuest * vkStream,VkDescriptorSetVariableDescriptorCountAllocateInfoEXT * forUnmarshaling)10002 void unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(
10003     VulkanStreamGuest* vkStream,
10004     VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* forUnmarshaling)
10005 {
10006     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10007     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10008     vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t));
10009     vkStream->read((uint32_t*)forUnmarshaling->pDescriptorCounts, forUnmarshaling->descriptorSetCount * sizeof(const uint32_t));
10010 }
10011 
marshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(VulkanStreamGuest * vkStream,const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT * forMarshaling)10012 void marshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(
10013     VulkanStreamGuest* vkStream,
10014     const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* forMarshaling)
10015 {
10016     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10017     marshal_extension_struct(vkStream, forMarshaling->pNext);
10018     vkStream->write((uint32_t*)&forMarshaling->maxVariableDescriptorCount, sizeof(uint32_t));
10019 }
10020 
unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(VulkanStreamGuest * vkStream,VkDescriptorSetVariableDescriptorCountLayoutSupportEXT * forUnmarshaling)10021 void unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(
10022     VulkanStreamGuest* vkStream,
10023     VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* forUnmarshaling)
10024 {
10025     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10026     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10027     vkStream->read((uint32_t*)&forUnmarshaling->maxVariableDescriptorCount, sizeof(uint32_t));
10028 }
10029 
10030 #endif
10031 #ifdef VK_EXT_shader_viewport_index_layer
10032 #endif
10033 #ifdef VK_EXT_global_priority
marshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(VulkanStreamGuest * vkStream,const VkDeviceQueueGlobalPriorityCreateInfoEXT * forMarshaling)10034 void marshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(
10035     VulkanStreamGuest* vkStream,
10036     const VkDeviceQueueGlobalPriorityCreateInfoEXT* forMarshaling)
10037 {
10038     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10039     marshal_extension_struct(vkStream, forMarshaling->pNext);
10040     vkStream->write((VkQueueGlobalPriorityEXT*)&forMarshaling->globalPriority, sizeof(VkQueueGlobalPriorityEXT));
10041 }
10042 
unmarshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(VulkanStreamGuest * vkStream,VkDeviceQueueGlobalPriorityCreateInfoEXT * forUnmarshaling)10043 void unmarshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(
10044     VulkanStreamGuest* vkStream,
10045     VkDeviceQueueGlobalPriorityCreateInfoEXT* forUnmarshaling)
10046 {
10047     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10048     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10049     vkStream->read((VkQueueGlobalPriorityEXT*)&forUnmarshaling->globalPriority, sizeof(VkQueueGlobalPriorityEXT));
10050 }
10051 
10052 #endif
10053 #ifdef VK_EXT_external_memory_host
marshal_VkImportMemoryHostPointerInfoEXT(VulkanStreamGuest * vkStream,const VkImportMemoryHostPointerInfoEXT * forMarshaling)10054 void marshal_VkImportMemoryHostPointerInfoEXT(
10055     VulkanStreamGuest* vkStream,
10056     const VkImportMemoryHostPointerInfoEXT* forMarshaling)
10057 {
10058     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10059     marshal_extension_struct(vkStream, forMarshaling->pNext);
10060     vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
10061     // WARNING PTR CHECK
10062     uint64_t cgen_var_368 = (uint64_t)(uintptr_t)forMarshaling->pHostPointer;
10063     vkStream->putBe64(cgen_var_368);
10064     if (forMarshaling->pHostPointer)
10065     {
10066         vkStream->write((void*)forMarshaling->pHostPointer, sizeof(uint8_t));
10067     }
10068 }
10069 
unmarshal_VkImportMemoryHostPointerInfoEXT(VulkanStreamGuest * vkStream,VkImportMemoryHostPointerInfoEXT * forUnmarshaling)10070 void unmarshal_VkImportMemoryHostPointerInfoEXT(
10071     VulkanStreamGuest* vkStream,
10072     VkImportMemoryHostPointerInfoEXT* forUnmarshaling)
10073 {
10074     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10075     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10076     vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
10077     // WARNING PTR CHECK
10078     void* check_pHostPointer;
10079     check_pHostPointer = (void*)(uintptr_t)vkStream->getBe64();
10080     if (forUnmarshaling->pHostPointer)
10081     {
10082         if (!(check_pHostPointer))
10083         {
10084             fprintf(stderr, "fatal: forUnmarshaling->pHostPointer inconsistent between guest and host\n");
10085         }
10086         vkStream->read((void*)forUnmarshaling->pHostPointer, sizeof(uint8_t));
10087     }
10088 }
10089 
marshal_VkMemoryHostPointerPropertiesEXT(VulkanStreamGuest * vkStream,const VkMemoryHostPointerPropertiesEXT * forMarshaling)10090 void marshal_VkMemoryHostPointerPropertiesEXT(
10091     VulkanStreamGuest* vkStream,
10092     const VkMemoryHostPointerPropertiesEXT* forMarshaling)
10093 {
10094     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10095     marshal_extension_struct(vkStream, forMarshaling->pNext);
10096     vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
10097 }
10098 
unmarshal_VkMemoryHostPointerPropertiesEXT(VulkanStreamGuest * vkStream,VkMemoryHostPointerPropertiesEXT * forUnmarshaling)10099 void unmarshal_VkMemoryHostPointerPropertiesEXT(
10100     VulkanStreamGuest* vkStream,
10101     VkMemoryHostPointerPropertiesEXT* forUnmarshaling)
10102 {
10103     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10104     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10105     vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
10106 }
10107 
marshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceExternalMemoryHostPropertiesEXT * forMarshaling)10108 void marshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
10109     VulkanStreamGuest* vkStream,
10110     const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* forMarshaling)
10111 {
10112     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10113     marshal_extension_struct(vkStream, forMarshaling->pNext);
10114     vkStream->write((VkDeviceSize*)&forMarshaling->minImportedHostPointerAlignment, sizeof(VkDeviceSize));
10115 }
10116 
unmarshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceExternalMemoryHostPropertiesEXT * forUnmarshaling)10117 void unmarshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(
10118     VulkanStreamGuest* vkStream,
10119     VkPhysicalDeviceExternalMemoryHostPropertiesEXT* forUnmarshaling)
10120 {
10121     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10122     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10123     vkStream->read((VkDeviceSize*)&forUnmarshaling->minImportedHostPointerAlignment, sizeof(VkDeviceSize));
10124 }
10125 
10126 #endif
10127 #ifdef VK_AMD_buffer_marker
10128 #endif
10129 #ifdef VK_AMD_shader_core_properties
marshal_VkPhysicalDeviceShaderCorePropertiesAMD(VulkanStreamGuest * vkStream,const VkPhysicalDeviceShaderCorePropertiesAMD * forMarshaling)10130 void marshal_VkPhysicalDeviceShaderCorePropertiesAMD(
10131     VulkanStreamGuest* vkStream,
10132     const VkPhysicalDeviceShaderCorePropertiesAMD* forMarshaling)
10133 {
10134     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10135     marshal_extension_struct(vkStream, forMarshaling->pNext);
10136     vkStream->write((uint32_t*)&forMarshaling->shaderEngineCount, sizeof(uint32_t));
10137     vkStream->write((uint32_t*)&forMarshaling->shaderArraysPerEngineCount, sizeof(uint32_t));
10138     vkStream->write((uint32_t*)&forMarshaling->computeUnitsPerShaderArray, sizeof(uint32_t));
10139     vkStream->write((uint32_t*)&forMarshaling->simdPerComputeUnit, sizeof(uint32_t));
10140     vkStream->write((uint32_t*)&forMarshaling->wavefrontsPerSimd, sizeof(uint32_t));
10141     vkStream->write((uint32_t*)&forMarshaling->wavefrontSize, sizeof(uint32_t));
10142     vkStream->write((uint32_t*)&forMarshaling->sgprsPerSimd, sizeof(uint32_t));
10143     vkStream->write((uint32_t*)&forMarshaling->minSgprAllocation, sizeof(uint32_t));
10144     vkStream->write((uint32_t*)&forMarshaling->maxSgprAllocation, sizeof(uint32_t));
10145     vkStream->write((uint32_t*)&forMarshaling->sgprAllocationGranularity, sizeof(uint32_t));
10146     vkStream->write((uint32_t*)&forMarshaling->vgprsPerSimd, sizeof(uint32_t));
10147     vkStream->write((uint32_t*)&forMarshaling->minVgprAllocation, sizeof(uint32_t));
10148     vkStream->write((uint32_t*)&forMarshaling->maxVgprAllocation, sizeof(uint32_t));
10149     vkStream->write((uint32_t*)&forMarshaling->vgprAllocationGranularity, sizeof(uint32_t));
10150 }
10151 
unmarshal_VkPhysicalDeviceShaderCorePropertiesAMD(VulkanStreamGuest * vkStream,VkPhysicalDeviceShaderCorePropertiesAMD * forUnmarshaling)10152 void unmarshal_VkPhysicalDeviceShaderCorePropertiesAMD(
10153     VulkanStreamGuest* vkStream,
10154     VkPhysicalDeviceShaderCorePropertiesAMD* forUnmarshaling)
10155 {
10156     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10157     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10158     vkStream->read((uint32_t*)&forUnmarshaling->shaderEngineCount, sizeof(uint32_t));
10159     vkStream->read((uint32_t*)&forUnmarshaling->shaderArraysPerEngineCount, sizeof(uint32_t));
10160     vkStream->read((uint32_t*)&forUnmarshaling->computeUnitsPerShaderArray, sizeof(uint32_t));
10161     vkStream->read((uint32_t*)&forUnmarshaling->simdPerComputeUnit, sizeof(uint32_t));
10162     vkStream->read((uint32_t*)&forUnmarshaling->wavefrontsPerSimd, sizeof(uint32_t));
10163     vkStream->read((uint32_t*)&forUnmarshaling->wavefrontSize, sizeof(uint32_t));
10164     vkStream->read((uint32_t*)&forUnmarshaling->sgprsPerSimd, sizeof(uint32_t));
10165     vkStream->read((uint32_t*)&forUnmarshaling->minSgprAllocation, sizeof(uint32_t));
10166     vkStream->read((uint32_t*)&forUnmarshaling->maxSgprAllocation, sizeof(uint32_t));
10167     vkStream->read((uint32_t*)&forUnmarshaling->sgprAllocationGranularity, sizeof(uint32_t));
10168     vkStream->read((uint32_t*)&forUnmarshaling->vgprsPerSimd, sizeof(uint32_t));
10169     vkStream->read((uint32_t*)&forUnmarshaling->minVgprAllocation, sizeof(uint32_t));
10170     vkStream->read((uint32_t*)&forUnmarshaling->maxVgprAllocation, sizeof(uint32_t));
10171     vkStream->read((uint32_t*)&forUnmarshaling->vgprAllocationGranularity, sizeof(uint32_t));
10172 }
10173 
10174 #endif
10175 #ifdef VK_EXT_vertex_attribute_divisor
marshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(VulkanStreamGuest * vkStream,const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * forMarshaling)10176 void marshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
10177     VulkanStreamGuest* vkStream,
10178     const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* forMarshaling)
10179 {
10180     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10181     marshal_extension_struct(vkStream, forMarshaling->pNext);
10182     vkStream->write((uint32_t*)&forMarshaling->maxVertexAttribDivisor, sizeof(uint32_t));
10183 }
10184 
unmarshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(VulkanStreamGuest * vkStream,VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT * forUnmarshaling)10185 void unmarshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(
10186     VulkanStreamGuest* vkStream,
10187     VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* forUnmarshaling)
10188 {
10189     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10190     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10191     vkStream->read((uint32_t*)&forUnmarshaling->maxVertexAttribDivisor, sizeof(uint32_t));
10192 }
10193 
marshal_VkVertexInputBindingDivisorDescriptionEXT(VulkanStreamGuest * vkStream,const VkVertexInputBindingDivisorDescriptionEXT * forMarshaling)10194 void marshal_VkVertexInputBindingDivisorDescriptionEXT(
10195     VulkanStreamGuest* vkStream,
10196     const VkVertexInputBindingDivisorDescriptionEXT* forMarshaling)
10197 {
10198     vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
10199     vkStream->write((uint32_t*)&forMarshaling->divisor, sizeof(uint32_t));
10200 }
10201 
unmarshal_VkVertexInputBindingDivisorDescriptionEXT(VulkanStreamGuest * vkStream,VkVertexInputBindingDivisorDescriptionEXT * forUnmarshaling)10202 void unmarshal_VkVertexInputBindingDivisorDescriptionEXT(
10203     VulkanStreamGuest* vkStream,
10204     VkVertexInputBindingDivisorDescriptionEXT* forUnmarshaling)
10205 {
10206     vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
10207     vkStream->read((uint32_t*)&forUnmarshaling->divisor, sizeof(uint32_t));
10208 }
10209 
marshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(VulkanStreamGuest * vkStream,const VkPipelineVertexInputDivisorStateCreateInfoEXT * forMarshaling)10210 void marshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(
10211     VulkanStreamGuest* vkStream,
10212     const VkPipelineVertexInputDivisorStateCreateInfoEXT* forMarshaling)
10213 {
10214     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10215     marshal_extension_struct(vkStream, forMarshaling->pNext);
10216     vkStream->write((uint32_t*)&forMarshaling->vertexBindingDivisorCount, sizeof(uint32_t));
10217     for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDivisorCount; ++i)
10218     {
10219         marshal_VkVertexInputBindingDivisorDescriptionEXT(vkStream, (const VkVertexInputBindingDivisorDescriptionEXT*)(forMarshaling->pVertexBindingDivisors + i));
10220     }
10221 }
10222 
unmarshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(VulkanStreamGuest * vkStream,VkPipelineVertexInputDivisorStateCreateInfoEXT * forUnmarshaling)10223 void unmarshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(
10224     VulkanStreamGuest* vkStream,
10225     VkPipelineVertexInputDivisorStateCreateInfoEXT* forUnmarshaling)
10226 {
10227     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10228     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10229     vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDivisorCount, sizeof(uint32_t));
10230     for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDivisorCount; ++i)
10231     {
10232         unmarshal_VkVertexInputBindingDivisorDescriptionEXT(vkStream, (VkVertexInputBindingDivisorDescriptionEXT*)(forUnmarshaling->pVertexBindingDivisors + i));
10233     }
10234 }
10235 
10236 #endif
10237 #ifdef VK_NV_shader_subgroup_partitioned
10238 #endif
10239 #ifdef VK_NV_device_diagnostic_checkpoints
marshal_VkQueueFamilyCheckpointPropertiesNV(VulkanStreamGuest * vkStream,const VkQueueFamilyCheckpointPropertiesNV * forMarshaling)10240 void marshal_VkQueueFamilyCheckpointPropertiesNV(
10241     VulkanStreamGuest* vkStream,
10242     const VkQueueFamilyCheckpointPropertiesNV* forMarshaling)
10243 {
10244     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10245     marshal_extension_struct(vkStream, forMarshaling->pNext);
10246     vkStream->write((VkPipelineStageFlags*)&forMarshaling->checkpointExecutionStageMask, sizeof(VkPipelineStageFlags));
10247 }
10248 
unmarshal_VkQueueFamilyCheckpointPropertiesNV(VulkanStreamGuest * vkStream,VkQueueFamilyCheckpointPropertiesNV * forUnmarshaling)10249 void unmarshal_VkQueueFamilyCheckpointPropertiesNV(
10250     VulkanStreamGuest* vkStream,
10251     VkQueueFamilyCheckpointPropertiesNV* forUnmarshaling)
10252 {
10253     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10254     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10255     vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->checkpointExecutionStageMask, sizeof(VkPipelineStageFlags));
10256 }
10257 
marshal_VkCheckpointDataNV(VulkanStreamGuest * vkStream,const VkCheckpointDataNV * forMarshaling)10258 void marshal_VkCheckpointDataNV(
10259     VulkanStreamGuest* vkStream,
10260     const VkCheckpointDataNV* forMarshaling)
10261 {
10262     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10263     marshal_extension_struct(vkStream, forMarshaling->pNext);
10264     vkStream->write((VkPipelineStageFlagBits*)&forMarshaling->stage, sizeof(VkPipelineStageFlagBits));
10265     // WARNING PTR CHECK
10266     uint64_t cgen_var_370 = (uint64_t)(uintptr_t)forMarshaling->pCheckpointMarker;
10267     vkStream->putBe64(cgen_var_370);
10268     if (forMarshaling->pCheckpointMarker)
10269     {
10270         vkStream->write((void*)forMarshaling->pCheckpointMarker, sizeof(uint8_t));
10271     }
10272 }
10273 
unmarshal_VkCheckpointDataNV(VulkanStreamGuest * vkStream,VkCheckpointDataNV * forUnmarshaling)10274 void unmarshal_VkCheckpointDataNV(
10275     VulkanStreamGuest* vkStream,
10276     VkCheckpointDataNV* forUnmarshaling)
10277 {
10278     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10279     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10280     vkStream->read((VkPipelineStageFlagBits*)&forUnmarshaling->stage, sizeof(VkPipelineStageFlagBits));
10281     // WARNING PTR CHECK
10282     void* check_pCheckpointMarker;
10283     check_pCheckpointMarker = (void*)(uintptr_t)vkStream->getBe64();
10284     if (forUnmarshaling->pCheckpointMarker)
10285     {
10286         if (!(check_pCheckpointMarker))
10287         {
10288             fprintf(stderr, "fatal: forUnmarshaling->pCheckpointMarker inconsistent between guest and host\n");
10289         }
10290         vkStream->read((void*)forUnmarshaling->pCheckpointMarker, sizeof(uint8_t));
10291     }
10292 }
10293 
10294 #endif
10295 #ifdef VK_GOOGLE_address_space
10296 #endif
10297 #ifdef VK_GOOGLE_color_buffer
marshal_VkImportColorBufferGOOGLE(VulkanStreamGuest * vkStream,const VkImportColorBufferGOOGLE * forMarshaling)10298 void marshal_VkImportColorBufferGOOGLE(
10299     VulkanStreamGuest* vkStream,
10300     const VkImportColorBufferGOOGLE* forMarshaling)
10301 {
10302     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10303     marshal_extension_struct(vkStream, forMarshaling->pNext);
10304     vkStream->write((uint32_t*)&forMarshaling->colorBuffer, sizeof(uint32_t));
10305 }
10306 
unmarshal_VkImportColorBufferGOOGLE(VulkanStreamGuest * vkStream,VkImportColorBufferGOOGLE * forUnmarshaling)10307 void unmarshal_VkImportColorBufferGOOGLE(
10308     VulkanStreamGuest* vkStream,
10309     VkImportColorBufferGOOGLE* forUnmarshaling)
10310 {
10311     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10312     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10313     vkStream->read((uint32_t*)&forUnmarshaling->colorBuffer, sizeof(uint32_t));
10314 }
10315 
marshal_VkImportBufferGOOGLE(VulkanStreamGuest * vkStream,const VkImportBufferGOOGLE * forMarshaling)10316 void marshal_VkImportBufferGOOGLE(
10317     VulkanStreamGuest* vkStream,
10318     const VkImportBufferGOOGLE* forMarshaling)
10319 {
10320     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10321     marshal_extension_struct(vkStream, forMarshaling->pNext);
10322     vkStream->write((uint32_t*)&forMarshaling->buffer, sizeof(uint32_t));
10323 }
10324 
unmarshal_VkImportBufferGOOGLE(VulkanStreamGuest * vkStream,VkImportBufferGOOGLE * forUnmarshaling)10325 void unmarshal_VkImportBufferGOOGLE(
10326     VulkanStreamGuest* vkStream,
10327     VkImportBufferGOOGLE* forUnmarshaling)
10328 {
10329     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10330     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10331     vkStream->read((uint32_t*)&forUnmarshaling->buffer, sizeof(uint32_t));
10332 }
10333 
marshal_VkImportPhysicalAddressGOOGLE(VulkanStreamGuest * vkStream,const VkImportPhysicalAddressGOOGLE * forMarshaling)10334 void marshal_VkImportPhysicalAddressGOOGLE(
10335     VulkanStreamGuest* vkStream,
10336     const VkImportPhysicalAddressGOOGLE* forMarshaling)
10337 {
10338     vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
10339     marshal_extension_struct(vkStream, forMarshaling->pNext);
10340     vkStream->write((uint64_t*)&forMarshaling->physicalAddress, sizeof(uint64_t));
10341     vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
10342     vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
10343     vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
10344     vkStream->write((uint32_t*)&forMarshaling->tilingParameter, sizeof(uint32_t));
10345 }
10346 
unmarshal_VkImportPhysicalAddressGOOGLE(VulkanStreamGuest * vkStream,VkImportPhysicalAddressGOOGLE * forUnmarshaling)10347 void unmarshal_VkImportPhysicalAddressGOOGLE(
10348     VulkanStreamGuest* vkStream,
10349     VkImportPhysicalAddressGOOGLE* forUnmarshaling)
10350 {
10351     vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
10352     unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
10353     vkStream->read((uint64_t*)&forUnmarshaling->physicalAddress, sizeof(uint64_t));
10354     vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
10355     vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
10356     vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
10357     vkStream->read((uint32_t*)&forUnmarshaling->tilingParameter, sizeof(uint32_t));
10358 }
10359 
10360 #endif
10361 #ifdef VK_GOOGLE_sized_descriptor_update_template
10362 #endif
10363 #ifdef VK_GOOGLE_async_command_buffers
10364 #endif
10365 #ifdef VK_GOOGLE_create_resources_with_requirements
10366 #endif
10367 #ifdef VK_GOOGLE_address_space_info
10368 #endif
10369 #ifdef VK_GOOGLE_free_memory_sync
10370 #endif
10371 #ifdef VK_GOOGLE_async_queue_submit
10372 #endif
marshal_extension_struct(VulkanStreamGuest * vkStream,const void * structExtension)10373 void marshal_extension_struct(
10374     VulkanStreamGuest* vkStream,
10375     const void* structExtension)
10376 {
10377     VkInstanceCreateInfo* structAccess = (VkInstanceCreateInfo*)(structExtension);
10378     size_t currExtSize = goldfish_vk_extension_struct_size_with_stream_features(vkStream->getFeatureBits(), structExtension);
10379     if (!currExtSize && structExtension)
10380     {
10381         // unknown struct extension; skip and call on its pNext field
10382         marshal_extension_struct(vkStream, (void*)structAccess->pNext);
10383         return;
10384     }
10385     else
10386     {
10387         // known or null extension struct
10388         vkStream->putBe32(currExtSize);
10389         if (!currExtSize)
10390         {
10391             // exit if this was a null extension struct (size == 0 in this branch)
10392             return;
10393         }
10394     }
10395     vkStream->write(structExtension, sizeof(VkStructureType));
10396     if (!structExtension)
10397     {
10398         return;
10399     }
10400     uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension);
10401     switch(structType)
10402     {
10403 #ifdef VK_VERSION_1_1
10404         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES:
10405         {
10406             marshal_VkPhysicalDeviceSubgroupProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceSubgroupProperties*>(structExtension));
10407             break;
10408         }
10409         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES:
10410         {
10411             marshal_VkPhysicalDevice16BitStorageFeatures(vkStream, reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(structExtension));
10412             break;
10413         }
10414         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS:
10415         {
10416             marshal_VkMemoryDedicatedRequirements(vkStream, reinterpret_cast<const VkMemoryDedicatedRequirements*>(structExtension));
10417             break;
10418         }
10419         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
10420         {
10421             marshal_VkMemoryDedicatedAllocateInfo(vkStream, reinterpret_cast<const VkMemoryDedicatedAllocateInfo*>(structExtension));
10422             break;
10423         }
10424         case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO:
10425         {
10426             marshal_VkMemoryAllocateFlagsInfo(vkStream, reinterpret_cast<const VkMemoryAllocateFlagsInfo*>(structExtension));
10427             break;
10428         }
10429         case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO:
10430         {
10431             marshal_VkDeviceGroupRenderPassBeginInfo(vkStream, reinterpret_cast<const VkDeviceGroupRenderPassBeginInfo*>(structExtension));
10432             break;
10433         }
10434         case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO:
10435         {
10436             marshal_VkDeviceGroupCommandBufferBeginInfo(vkStream, reinterpret_cast<const VkDeviceGroupCommandBufferBeginInfo*>(structExtension));
10437             break;
10438         }
10439         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO:
10440         {
10441             marshal_VkDeviceGroupSubmitInfo(vkStream, reinterpret_cast<const VkDeviceGroupSubmitInfo*>(structExtension));
10442             break;
10443         }
10444         case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO:
10445         {
10446             marshal_VkDeviceGroupBindSparseInfo(vkStream, reinterpret_cast<const VkDeviceGroupBindSparseInfo*>(structExtension));
10447             break;
10448         }
10449         case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO:
10450         {
10451             marshal_VkBindBufferMemoryDeviceGroupInfo(vkStream, reinterpret_cast<const VkBindBufferMemoryDeviceGroupInfo*>(structExtension));
10452             break;
10453         }
10454         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
10455         {
10456             marshal_VkBindImageMemoryDeviceGroupInfo(vkStream, reinterpret_cast<const VkBindImageMemoryDeviceGroupInfo*>(structExtension));
10457             break;
10458         }
10459         case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
10460         {
10461             marshal_VkDeviceGroupDeviceCreateInfo(vkStream, reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(structExtension));
10462             break;
10463         }
10464         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
10465         {
10466             marshal_VkPhysicalDeviceFeatures2(vkStream, reinterpret_cast<const VkPhysicalDeviceFeatures2*>(structExtension));
10467             break;
10468         }
10469         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
10470         {
10471             marshal_VkPhysicalDevicePointClippingProperties(vkStream, reinterpret_cast<const VkPhysicalDevicePointClippingProperties*>(structExtension));
10472             break;
10473         }
10474         case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO:
10475         {
10476             marshal_VkRenderPassInputAttachmentAspectCreateInfo(vkStream, reinterpret_cast<const VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension));
10477             break;
10478         }
10479         case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO:
10480         {
10481             marshal_VkImageViewUsageCreateInfo(vkStream, reinterpret_cast<const VkImageViewUsageCreateInfo*>(structExtension));
10482             break;
10483         }
10484         case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
10485         {
10486             marshal_VkPipelineTessellationDomainOriginStateCreateInfo(vkStream, reinterpret_cast<const VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension));
10487             break;
10488         }
10489         case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
10490         {
10491             marshal_VkRenderPassMultiviewCreateInfo(vkStream, reinterpret_cast<const VkRenderPassMultiviewCreateInfo*>(structExtension));
10492             break;
10493         }
10494         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
10495         {
10496             marshal_VkPhysicalDeviceMultiviewFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(structExtension));
10497             break;
10498         }
10499         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
10500         {
10501             marshal_VkPhysicalDeviceMultiviewProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewProperties*>(structExtension));
10502             break;
10503         }
10504         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES:
10505         {
10506             marshal_VkPhysicalDeviceVariablePointerFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceVariablePointerFeatures*>(structExtension));
10507             break;
10508         }
10509         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
10510         {
10511             marshal_VkPhysicalDeviceProtectedMemoryFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension));
10512             break;
10513         }
10514         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
10515         {
10516             marshal_VkPhysicalDeviceProtectedMemoryProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryProperties*>(structExtension));
10517             break;
10518         }
10519         case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO:
10520         {
10521             marshal_VkProtectedSubmitInfo(vkStream, reinterpret_cast<const VkProtectedSubmitInfo*>(structExtension));
10522             break;
10523         }
10524         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
10525         {
10526             marshal_VkSamplerYcbcrConversionInfo(vkStream, reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(structExtension));
10527             break;
10528         }
10529         case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
10530         {
10531             marshal_VkBindImagePlaneMemoryInfo(vkStream, reinterpret_cast<const VkBindImagePlaneMemoryInfo*>(structExtension));
10532             break;
10533         }
10534         case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
10535         {
10536             marshal_VkImagePlaneMemoryRequirementsInfo(vkStream, reinterpret_cast<const VkImagePlaneMemoryRequirementsInfo*>(structExtension));
10537             break;
10538         }
10539         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
10540         {
10541             marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension));
10542             break;
10543         }
10544         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES:
10545         {
10546             marshal_VkSamplerYcbcrConversionImageFormatProperties(vkStream, reinterpret_cast<const VkSamplerYcbcrConversionImageFormatProperties*>(structExtension));
10547             break;
10548         }
10549         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
10550         {
10551             marshal_VkPhysicalDeviceExternalImageFormatInfo(vkStream, reinterpret_cast<const VkPhysicalDeviceExternalImageFormatInfo*>(structExtension));
10552             break;
10553         }
10554         case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
10555         {
10556             marshal_VkExternalImageFormatProperties(vkStream, reinterpret_cast<const VkExternalImageFormatProperties*>(structExtension));
10557             break;
10558         }
10559         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
10560         {
10561             marshal_VkPhysicalDeviceIDProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceIDProperties*>(structExtension));
10562             break;
10563         }
10564         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
10565         {
10566             marshal_VkExternalMemoryImageCreateInfo(vkStream, reinterpret_cast<const VkExternalMemoryImageCreateInfo*>(structExtension));
10567             break;
10568         }
10569         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO:
10570         {
10571             marshal_VkExternalMemoryBufferCreateInfo(vkStream, reinterpret_cast<const VkExternalMemoryBufferCreateInfo*>(structExtension));
10572             break;
10573         }
10574         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO:
10575         {
10576             marshal_VkExportMemoryAllocateInfo(vkStream, reinterpret_cast<const VkExportMemoryAllocateInfo*>(structExtension));
10577             break;
10578         }
10579         case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
10580         {
10581             marshal_VkExportFenceCreateInfo(vkStream, reinterpret_cast<const VkExportFenceCreateInfo*>(structExtension));
10582             break;
10583         }
10584         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO:
10585         {
10586             marshal_VkExportSemaphoreCreateInfo(vkStream, reinterpret_cast<const VkExportSemaphoreCreateInfo*>(structExtension));
10587             break;
10588         }
10589         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
10590         {
10591             marshal_VkPhysicalDeviceMaintenance3Properties(vkStream, reinterpret_cast<const VkPhysicalDeviceMaintenance3Properties*>(structExtension));
10592             break;
10593         }
10594         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES:
10595         {
10596             marshal_VkPhysicalDeviceShaderDrawParameterFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension));
10597             break;
10598         }
10599 #endif
10600 #ifdef VK_KHR_swapchain
10601         case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
10602         {
10603             marshal_VkImageSwapchainCreateInfoKHR(vkStream, reinterpret_cast<const VkImageSwapchainCreateInfoKHR*>(structExtension));
10604             break;
10605         }
10606         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR:
10607         {
10608             marshal_VkBindImageMemorySwapchainInfoKHR(vkStream, reinterpret_cast<const VkBindImageMemorySwapchainInfoKHR*>(structExtension));
10609             break;
10610         }
10611         case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR:
10612         {
10613             marshal_VkDeviceGroupPresentInfoKHR(vkStream, reinterpret_cast<const VkDeviceGroupPresentInfoKHR*>(structExtension));
10614             break;
10615         }
10616         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR:
10617         {
10618             marshal_VkDeviceGroupSwapchainCreateInfoKHR(vkStream, reinterpret_cast<const VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension));
10619             break;
10620         }
10621 #endif
10622 #ifdef VK_KHR_display_swapchain
10623         case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR:
10624         {
10625             marshal_VkDisplayPresentInfoKHR(vkStream, reinterpret_cast<const VkDisplayPresentInfoKHR*>(structExtension));
10626             break;
10627         }
10628 #endif
10629 #ifdef VK_KHR_external_memory_win32
10630         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
10631         {
10632             marshal_VkImportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkImportMemoryWin32HandleInfoKHR*>(structExtension));
10633             break;
10634         }
10635         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
10636         {
10637             marshal_VkExportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportMemoryWin32HandleInfoKHR*>(structExtension));
10638             break;
10639         }
10640 #endif
10641 #ifdef VK_KHR_external_memory_fd
10642         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR:
10643         {
10644             marshal_VkImportMemoryFdInfoKHR(vkStream, reinterpret_cast<const VkImportMemoryFdInfoKHR*>(structExtension));
10645             break;
10646         }
10647 #endif
10648 #ifdef VK_KHR_win32_keyed_mutex
10649         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR:
10650         {
10651             marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(vkStream, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension));
10652             break;
10653         }
10654 #endif
10655 #ifdef VK_KHR_external_semaphore_win32
10656         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
10657         {
10658             marshal_VkExportSemaphoreWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportSemaphoreWin32HandleInfoKHR*>(structExtension));
10659             break;
10660         }
10661         case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR:
10662         {
10663             marshal_VkD3D12FenceSubmitInfoKHR(vkStream, reinterpret_cast<const VkD3D12FenceSubmitInfoKHR*>(structExtension));
10664             break;
10665         }
10666 #endif
10667 #ifdef VK_KHR_push_descriptor
10668         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR:
10669         {
10670             marshal_VkPhysicalDevicePushDescriptorPropertiesKHR(vkStream, reinterpret_cast<const VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension));
10671             break;
10672         }
10673 #endif
10674 #ifdef VK_KHR_incremental_present
10675         case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
10676         {
10677             marshal_VkPresentRegionsKHR(vkStream, reinterpret_cast<const VkPresentRegionsKHR*>(structExtension));
10678             break;
10679         }
10680 #endif
10681 #ifdef VK_KHR_shared_presentable_image
10682         case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR:
10683         {
10684             marshal_VkSharedPresentSurfaceCapabilitiesKHR(vkStream, reinterpret_cast<const VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension));
10685             break;
10686         }
10687 #endif
10688 #ifdef VK_KHR_external_fence_win32
10689         case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR:
10690         {
10691             marshal_VkExportFenceWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportFenceWin32HandleInfoKHR*>(structExtension));
10692             break;
10693         }
10694 #endif
10695 #ifdef VK_KHR_image_format_list
10696         case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR:
10697         {
10698             marshal_VkImageFormatListCreateInfoKHR(vkStream, reinterpret_cast<const VkImageFormatListCreateInfoKHR*>(structExtension));
10699             break;
10700         }
10701 #endif
10702 #ifdef VK_KHR_8bit_storage
10703         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR:
10704         {
10705             marshal_VkPhysicalDevice8BitStorageFeaturesKHR(vkStream, reinterpret_cast<const VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension));
10706             break;
10707         }
10708 #endif
10709 #ifdef VK_KHR_shader_float16_int8
10710         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES:
10711         {
10712             marshal_VkPhysicalDeviceShaderFloat16Int8Features(vkStream, reinterpret_cast<const VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension));
10713             break;
10714         }
10715 #endif
10716 #ifdef VK_ANDROID_native_buffer
10717         case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID:
10718         {
10719             marshal_VkNativeBufferANDROID(vkStream, reinterpret_cast<const VkNativeBufferANDROID*>(structExtension));
10720             break;
10721         }
10722 #endif
10723 #ifdef VK_EXT_debug_report
10724         case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT:
10725         {
10726             marshal_VkDebugReportCallbackCreateInfoEXT(vkStream, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(structExtension));
10727             break;
10728         }
10729 #endif
10730 #ifdef VK_AMD_rasterization_order
10731         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD:
10732         {
10733             marshal_VkPipelineRasterizationStateRasterizationOrderAMD(vkStream, reinterpret_cast<const VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension));
10734             break;
10735         }
10736 #endif
10737 #ifdef VK_NV_dedicated_allocation
10738         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV:
10739         {
10740             marshal_VkDedicatedAllocationImageCreateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationImageCreateInfoNV*>(structExtension));
10741             break;
10742         }
10743         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV:
10744         {
10745             marshal_VkDedicatedAllocationBufferCreateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationBufferCreateInfoNV*>(structExtension));
10746             break;
10747         }
10748         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV:
10749         {
10750             marshal_VkDedicatedAllocationMemoryAllocateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension));
10751             break;
10752         }
10753 #endif
10754 #ifdef VK_AMD_texture_gather_bias_lod
10755         case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD:
10756         {
10757             marshal_VkTextureLODGatherFormatPropertiesAMD(vkStream, reinterpret_cast<const VkTextureLODGatherFormatPropertiesAMD*>(structExtension));
10758             break;
10759         }
10760 #endif
10761 #ifdef VK_NV_external_memory
10762         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV:
10763         {
10764             marshal_VkExternalMemoryImageCreateInfoNV(vkStream, reinterpret_cast<const VkExternalMemoryImageCreateInfoNV*>(structExtension));
10765             break;
10766         }
10767         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV:
10768         {
10769             marshal_VkExportMemoryAllocateInfoNV(vkStream, reinterpret_cast<const VkExportMemoryAllocateInfoNV*>(structExtension));
10770             break;
10771         }
10772 #endif
10773 #ifdef VK_NV_external_memory_win32
10774         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV:
10775         {
10776             marshal_VkImportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<const VkImportMemoryWin32HandleInfoNV*>(structExtension));
10777             break;
10778         }
10779         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV:
10780         {
10781             marshal_VkExportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<const VkExportMemoryWin32HandleInfoNV*>(structExtension));
10782             break;
10783         }
10784 #endif
10785 #ifdef VK_NV_win32_keyed_mutex
10786         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV:
10787         {
10788             marshal_VkWin32KeyedMutexAcquireReleaseInfoNV(vkStream, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension));
10789             break;
10790         }
10791 #endif
10792 #ifdef VK_EXT_validation_flags
10793         case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT:
10794         {
10795             marshal_VkValidationFlagsEXT(vkStream, reinterpret_cast<const VkValidationFlagsEXT*>(structExtension));
10796             break;
10797         }
10798 #endif
10799 #ifdef VK_EXT_conditional_rendering
10800         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT:
10801         {
10802             marshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension));
10803             break;
10804         }
10805         case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT:
10806         {
10807             marshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(vkStream, reinterpret_cast<const VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension));
10808             break;
10809         }
10810 #endif
10811 #ifdef VK_NV_clip_space_w_scaling
10812         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV:
10813         {
10814             marshal_VkPipelineViewportWScalingStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension));
10815             break;
10816         }
10817 #endif
10818 #ifdef VK_EXT_display_control
10819         case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT:
10820         {
10821             marshal_VkSwapchainCounterCreateInfoEXT(vkStream, reinterpret_cast<const VkSwapchainCounterCreateInfoEXT*>(structExtension));
10822             break;
10823         }
10824 #endif
10825 #ifdef VK_GOOGLE_display_timing
10826         case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE:
10827         {
10828             marshal_VkPresentTimesInfoGOOGLE(vkStream, reinterpret_cast<const VkPresentTimesInfoGOOGLE*>(structExtension));
10829             break;
10830         }
10831 #endif
10832 #ifdef VK_NVX_multiview_per_view_attributes
10833         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX:
10834         {
10835             marshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension));
10836             break;
10837         }
10838 #endif
10839 #ifdef VK_NV_viewport_swizzle
10840         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV:
10841         {
10842             marshal_VkPipelineViewportSwizzleStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension));
10843             break;
10844         }
10845 #endif
10846 #ifdef VK_EXT_discard_rectangles
10847         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT:
10848         {
10849             marshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension));
10850             break;
10851         }
10852         case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT:
10853         {
10854             marshal_VkPipelineDiscardRectangleStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension));
10855             break;
10856         }
10857 #endif
10858 #ifdef VK_EXT_conservative_rasterization
10859         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT:
10860         {
10861             marshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension));
10862             break;
10863         }
10864         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT:
10865         {
10866             marshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension));
10867             break;
10868         }
10869 #endif
10870 #ifdef VK_EXT_debug_utils
10871         case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT:
10872         {
10873             marshal_VkDebugUtilsMessengerCreateInfoEXT(vkStream, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(structExtension));
10874             break;
10875         }
10876 #endif
10877 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
10878         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID:
10879         {
10880             marshal_VkAndroidHardwareBufferUsageANDROID(vkStream, reinterpret_cast<const VkAndroidHardwareBufferUsageANDROID*>(structExtension));
10881             break;
10882         }
10883         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID:
10884         {
10885             marshal_VkAndroidHardwareBufferFormatPropertiesANDROID(vkStream, reinterpret_cast<const VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension));
10886             break;
10887         }
10888         case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
10889         {
10890             marshal_VkImportAndroidHardwareBufferInfoANDROID(vkStream, reinterpret_cast<const VkImportAndroidHardwareBufferInfoANDROID*>(structExtension));
10891             break;
10892         }
10893         case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID:
10894         {
10895             marshal_VkExternalFormatANDROID(vkStream, reinterpret_cast<const VkExternalFormatANDROID*>(structExtension));
10896             break;
10897         }
10898 #endif
10899 #ifdef VK_EXT_sampler_filter_minmax
10900         case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT:
10901         {
10902             marshal_VkSamplerReductionModeCreateInfoEXT(vkStream, reinterpret_cast<const VkSamplerReductionModeCreateInfoEXT*>(structExtension));
10903             break;
10904         }
10905         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT:
10906         {
10907             marshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension));
10908             break;
10909         }
10910 #endif
10911 #ifdef VK_EXT_sample_locations
10912         case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT:
10913         {
10914             marshal_VkSampleLocationsInfoEXT(vkStream, reinterpret_cast<const VkSampleLocationsInfoEXT*>(structExtension));
10915             break;
10916         }
10917         case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT:
10918         {
10919             marshal_VkRenderPassSampleLocationsBeginInfoEXT(vkStream, reinterpret_cast<const VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension));
10920             break;
10921         }
10922         case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT:
10923         {
10924             marshal_VkPipelineSampleLocationsStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension));
10925             break;
10926         }
10927         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT:
10928         {
10929             marshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension));
10930             break;
10931         }
10932 #endif
10933 #ifdef VK_EXT_blend_operation_advanced
10934         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT:
10935         {
10936             marshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension));
10937             break;
10938         }
10939         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT:
10940         {
10941             marshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension));
10942             break;
10943         }
10944         case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT:
10945         {
10946             marshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension));
10947             break;
10948         }
10949 #endif
10950 #ifdef VK_NV_fragment_coverage_to_color
10951         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV:
10952         {
10953             marshal_VkPipelineCoverageToColorStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension));
10954             break;
10955         }
10956 #endif
10957 #ifdef VK_NV_framebuffer_mixed_samples
10958         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV:
10959         {
10960             marshal_VkPipelineCoverageModulationStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension));
10961             break;
10962         }
10963 #endif
10964 #ifdef VK_EXT_validation_cache
10965         case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT:
10966         {
10967             marshal_VkShaderModuleValidationCacheCreateInfoEXT(vkStream, reinterpret_cast<const VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension));
10968             break;
10969         }
10970 #endif
10971 #ifdef VK_EXT_descriptor_indexing
10972         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT:
10973         {
10974             marshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(vkStream, reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension));
10975             break;
10976         }
10977         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT:
10978         {
10979             marshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension));
10980             break;
10981         }
10982         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT:
10983         {
10984             marshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension));
10985             break;
10986         }
10987         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT:
10988         {
10989             marshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(vkStream, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension));
10990             break;
10991         }
10992         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT:
10993         {
10994             marshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(vkStream, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension));
10995             break;
10996         }
10997 #endif
10998 #ifdef VK_EXT_global_priority
10999         case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT:
11000         {
11001             marshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(vkStream, reinterpret_cast<const VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension));
11002             break;
11003         }
11004 #endif
11005 #ifdef VK_EXT_external_memory_host
11006         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT:
11007         {
11008             marshal_VkImportMemoryHostPointerInfoEXT(vkStream, reinterpret_cast<const VkImportMemoryHostPointerInfoEXT*>(structExtension));
11009             break;
11010         }
11011         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT:
11012         {
11013             marshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension));
11014             break;
11015         }
11016 #endif
11017 #ifdef VK_AMD_shader_core_properties
11018         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD:
11019         {
11020             marshal_VkPhysicalDeviceShaderCorePropertiesAMD(vkStream, reinterpret_cast<const VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension));
11021             break;
11022         }
11023 #endif
11024 #ifdef VK_EXT_vertex_attribute_divisor
11025         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
11026         {
11027             marshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension));
11028             break;
11029         }
11030         case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
11031         {
11032             marshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension));
11033             break;
11034         }
11035 #endif
11036 #ifdef VK_NV_device_diagnostic_checkpoints
11037         case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV:
11038         {
11039             marshal_VkQueueFamilyCheckpointPropertiesNV(vkStream, reinterpret_cast<const VkQueueFamilyCheckpointPropertiesNV*>(structExtension));
11040             break;
11041         }
11042 #endif
11043 #ifdef VK_GOOGLE_color_buffer
11044         case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE:
11045         {
11046             marshal_VkImportColorBufferGOOGLE(vkStream, reinterpret_cast<const VkImportColorBufferGOOGLE*>(structExtension));
11047             break;
11048         }
11049         case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE:
11050         {
11051             marshal_VkImportBufferGOOGLE(vkStream, reinterpret_cast<const VkImportBufferGOOGLE*>(structExtension));
11052             break;
11053         }
11054         case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE:
11055         {
11056             marshal_VkImportPhysicalAddressGOOGLE(vkStream, reinterpret_cast<const VkImportPhysicalAddressGOOGLE*>(structExtension));
11057             break;
11058         }
11059 #endif
11060         default:
11061         {
11062             // fatal; the switch is only taken if the extension struct is known
11063             abort();
11064         }
11065     }
11066 }
11067 
unmarshal_extension_struct(VulkanStreamGuest * vkStream,void * structExtension_out)11068 void unmarshal_extension_struct(
11069     VulkanStreamGuest* vkStream,
11070     void* structExtension_out)
11071 {
11072     VkInstanceCreateInfo* structAccess = (VkInstanceCreateInfo*)(structExtension_out);
11073     size_t currExtSize = goldfish_vk_extension_struct_size_with_stream_features(vkStream->getFeatureBits(), structExtension_out);
11074     if (!currExtSize && structExtension_out)
11075     {
11076         // unknown struct extension; skip and call on its pNext field
11077         unmarshal_extension_struct(vkStream, (void*)structAccess->pNext);
11078         return;
11079     }
11080     else
11081     {
11082         // known or null extension struct
11083         vkStream->getBe32();
11084         if (!currExtSize)
11085         {
11086             // exit if this was a null extension struct (size == 0 in this branch)
11087             return;
11088         }
11089     }
11090     uint64_t pNext_placeholder;
11091     vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType));
11092     (void)pNext_placeholder;
11093     if (!structExtension_out)
11094     {
11095         return;
11096     }
11097     uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension_out);
11098     switch(structType)
11099     {
11100 #ifdef VK_VERSION_1_1
11101         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES:
11102         {
11103             unmarshal_VkPhysicalDeviceSubgroupProperties(vkStream, reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(structExtension_out));
11104             break;
11105         }
11106         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES:
11107         {
11108             unmarshal_VkPhysicalDevice16BitStorageFeatures(vkStream, reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(structExtension_out));
11109             break;
11110         }
11111         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS:
11112         {
11113             unmarshal_VkMemoryDedicatedRequirements(vkStream, reinterpret_cast<VkMemoryDedicatedRequirements*>(structExtension_out));
11114             break;
11115         }
11116         case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO:
11117         {
11118             unmarshal_VkMemoryDedicatedAllocateInfo(vkStream, reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(structExtension_out));
11119             break;
11120         }
11121         case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO:
11122         {
11123             unmarshal_VkMemoryAllocateFlagsInfo(vkStream, reinterpret_cast<VkMemoryAllocateFlagsInfo*>(structExtension_out));
11124             break;
11125         }
11126         case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO:
11127         {
11128             unmarshal_VkDeviceGroupRenderPassBeginInfo(vkStream, reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(structExtension_out));
11129             break;
11130         }
11131         case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO:
11132         {
11133             unmarshal_VkDeviceGroupCommandBufferBeginInfo(vkStream, reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(structExtension_out));
11134             break;
11135         }
11136         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO:
11137         {
11138             unmarshal_VkDeviceGroupSubmitInfo(vkStream, reinterpret_cast<VkDeviceGroupSubmitInfo*>(structExtension_out));
11139             break;
11140         }
11141         case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO:
11142         {
11143             unmarshal_VkDeviceGroupBindSparseInfo(vkStream, reinterpret_cast<VkDeviceGroupBindSparseInfo*>(structExtension_out));
11144             break;
11145         }
11146         case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO:
11147         {
11148             unmarshal_VkBindBufferMemoryDeviceGroupInfo(vkStream, reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(structExtension_out));
11149             break;
11150         }
11151         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO:
11152         {
11153             unmarshal_VkBindImageMemoryDeviceGroupInfo(vkStream, reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(structExtension_out));
11154             break;
11155         }
11156         case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
11157         {
11158             unmarshal_VkDeviceGroupDeviceCreateInfo(vkStream, reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(structExtension_out));
11159             break;
11160         }
11161         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2:
11162         {
11163             unmarshal_VkPhysicalDeviceFeatures2(vkStream, reinterpret_cast<VkPhysicalDeviceFeatures2*>(structExtension_out));
11164             break;
11165         }
11166         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES:
11167         {
11168             unmarshal_VkPhysicalDevicePointClippingProperties(vkStream, reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(structExtension_out));
11169             break;
11170         }
11171         case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO:
11172         {
11173             unmarshal_VkRenderPassInputAttachmentAspectCreateInfo(vkStream, reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension_out));
11174             break;
11175         }
11176         case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO:
11177         {
11178             unmarshal_VkImageViewUsageCreateInfo(vkStream, reinterpret_cast<VkImageViewUsageCreateInfo*>(structExtension_out));
11179             break;
11180         }
11181         case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO:
11182         {
11183             unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo(vkStream, reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension_out));
11184             break;
11185         }
11186         case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO:
11187         {
11188             unmarshal_VkRenderPassMultiviewCreateInfo(vkStream, reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(structExtension_out));
11189             break;
11190         }
11191         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES:
11192         {
11193             unmarshal_VkPhysicalDeviceMultiviewFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(structExtension_out));
11194             break;
11195         }
11196         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES:
11197         {
11198             unmarshal_VkPhysicalDeviceMultiviewProperties(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(structExtension_out));
11199             break;
11200         }
11201         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES:
11202         {
11203             unmarshal_VkPhysicalDeviceVariablePointerFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceVariablePointerFeatures*>(structExtension_out));
11204             break;
11205         }
11206         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES:
11207         {
11208             unmarshal_VkPhysicalDeviceProtectedMemoryFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension_out));
11209             break;
11210         }
11211         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES:
11212         {
11213             unmarshal_VkPhysicalDeviceProtectedMemoryProperties(vkStream, reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(structExtension_out));
11214             break;
11215         }
11216         case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO:
11217         {
11218             unmarshal_VkProtectedSubmitInfo(vkStream, reinterpret_cast<VkProtectedSubmitInfo*>(structExtension_out));
11219             break;
11220         }
11221         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO:
11222         {
11223             unmarshal_VkSamplerYcbcrConversionInfo(vkStream, reinterpret_cast<VkSamplerYcbcrConversionInfo*>(structExtension_out));
11224             break;
11225         }
11226         case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO:
11227         {
11228             unmarshal_VkBindImagePlaneMemoryInfo(vkStream, reinterpret_cast<VkBindImagePlaneMemoryInfo*>(structExtension_out));
11229             break;
11230         }
11231         case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO:
11232         {
11233             unmarshal_VkImagePlaneMemoryRequirementsInfo(vkStream, reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(structExtension_out));
11234             break;
11235         }
11236         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES:
11237         {
11238             unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension_out));
11239             break;
11240         }
11241         case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES:
11242         {
11243             unmarshal_VkSamplerYcbcrConversionImageFormatProperties(vkStream, reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(structExtension_out));
11244             break;
11245         }
11246         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO:
11247         {
11248             unmarshal_VkPhysicalDeviceExternalImageFormatInfo(vkStream, reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(structExtension_out));
11249             break;
11250         }
11251         case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES:
11252         {
11253             unmarshal_VkExternalImageFormatProperties(vkStream, reinterpret_cast<VkExternalImageFormatProperties*>(structExtension_out));
11254             break;
11255         }
11256         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES:
11257         {
11258             unmarshal_VkPhysicalDeviceIDProperties(vkStream, reinterpret_cast<VkPhysicalDeviceIDProperties*>(structExtension_out));
11259             break;
11260         }
11261         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO:
11262         {
11263             unmarshal_VkExternalMemoryImageCreateInfo(vkStream, reinterpret_cast<VkExternalMemoryImageCreateInfo*>(structExtension_out));
11264             break;
11265         }
11266         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO:
11267         {
11268             unmarshal_VkExternalMemoryBufferCreateInfo(vkStream, reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(structExtension_out));
11269             break;
11270         }
11271         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO:
11272         {
11273             unmarshal_VkExportMemoryAllocateInfo(vkStream, reinterpret_cast<VkExportMemoryAllocateInfo*>(structExtension_out));
11274             break;
11275         }
11276         case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO:
11277         {
11278             unmarshal_VkExportFenceCreateInfo(vkStream, reinterpret_cast<VkExportFenceCreateInfo*>(structExtension_out));
11279             break;
11280         }
11281         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO:
11282         {
11283             unmarshal_VkExportSemaphoreCreateInfo(vkStream, reinterpret_cast<VkExportSemaphoreCreateInfo*>(structExtension_out));
11284             break;
11285         }
11286         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES:
11287         {
11288             unmarshal_VkPhysicalDeviceMaintenance3Properties(vkStream, reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(structExtension_out));
11289             break;
11290         }
11291         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES:
11292         {
11293             unmarshal_VkPhysicalDeviceShaderDrawParameterFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension_out));
11294             break;
11295         }
11296 #endif
11297 #ifdef VK_KHR_swapchain
11298         case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR:
11299         {
11300             unmarshal_VkImageSwapchainCreateInfoKHR(vkStream, reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(structExtension_out));
11301             break;
11302         }
11303         case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR:
11304         {
11305             unmarshal_VkBindImageMemorySwapchainInfoKHR(vkStream, reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(structExtension_out));
11306             break;
11307         }
11308         case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR:
11309         {
11310             unmarshal_VkDeviceGroupPresentInfoKHR(vkStream, reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(structExtension_out));
11311             break;
11312         }
11313         case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR:
11314         {
11315             unmarshal_VkDeviceGroupSwapchainCreateInfoKHR(vkStream, reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension_out));
11316             break;
11317         }
11318 #endif
11319 #ifdef VK_KHR_display_swapchain
11320         case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR:
11321         {
11322             unmarshal_VkDisplayPresentInfoKHR(vkStream, reinterpret_cast<VkDisplayPresentInfoKHR*>(structExtension_out));
11323             break;
11324         }
11325 #endif
11326 #ifdef VK_KHR_external_memory_win32
11327         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
11328         {
11329             unmarshal_VkImportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(structExtension_out));
11330             break;
11331         }
11332         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR:
11333         {
11334             unmarshal_VkExportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(structExtension_out));
11335             break;
11336         }
11337 #endif
11338 #ifdef VK_KHR_external_memory_fd
11339         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR:
11340         {
11341             unmarshal_VkImportMemoryFdInfoKHR(vkStream, reinterpret_cast<VkImportMemoryFdInfoKHR*>(structExtension_out));
11342             break;
11343         }
11344 #endif
11345 #ifdef VK_KHR_win32_keyed_mutex
11346         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR:
11347         {
11348             unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(vkStream, reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension_out));
11349             break;
11350         }
11351 #endif
11352 #ifdef VK_KHR_external_semaphore_win32
11353         case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR:
11354         {
11355             unmarshal_VkExportSemaphoreWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(structExtension_out));
11356             break;
11357         }
11358         case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR:
11359         {
11360             unmarshal_VkD3D12FenceSubmitInfoKHR(vkStream, reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(structExtension_out));
11361             break;
11362         }
11363 #endif
11364 #ifdef VK_KHR_push_descriptor
11365         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR:
11366         {
11367             unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR(vkStream, reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension_out));
11368             break;
11369         }
11370 #endif
11371 #ifdef VK_KHR_incremental_present
11372         case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR:
11373         {
11374             unmarshal_VkPresentRegionsKHR(vkStream, reinterpret_cast<VkPresentRegionsKHR*>(structExtension_out));
11375             break;
11376         }
11377 #endif
11378 #ifdef VK_KHR_shared_presentable_image
11379         case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR:
11380         {
11381             unmarshal_VkSharedPresentSurfaceCapabilitiesKHR(vkStream, reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension_out));
11382             break;
11383         }
11384 #endif
11385 #ifdef VK_KHR_external_fence_win32
11386         case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR:
11387         {
11388             unmarshal_VkExportFenceWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(structExtension_out));
11389             break;
11390         }
11391 #endif
11392 #ifdef VK_KHR_image_format_list
11393         case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR:
11394         {
11395             unmarshal_VkImageFormatListCreateInfoKHR(vkStream, reinterpret_cast<VkImageFormatListCreateInfoKHR*>(structExtension_out));
11396             break;
11397         }
11398 #endif
11399 #ifdef VK_KHR_8bit_storage
11400         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR:
11401         {
11402             unmarshal_VkPhysicalDevice8BitStorageFeaturesKHR(vkStream, reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension_out));
11403             break;
11404         }
11405 #endif
11406 #ifdef VK_KHR_shader_float16_int8
11407         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES:
11408         {
11409             unmarshal_VkPhysicalDeviceShaderFloat16Int8Features(vkStream, reinterpret_cast<VkPhysicalDeviceShaderFloat16Int8Features*>(structExtension_out));
11410             break;
11411         }
11412 #endif
11413 #ifdef VK_ANDROID_native_buffer
11414         case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID:
11415         {
11416             unmarshal_VkNativeBufferANDROID(vkStream, reinterpret_cast<VkNativeBufferANDROID*>(structExtension_out));
11417             break;
11418         }
11419 #endif
11420 #ifdef VK_EXT_debug_report
11421         case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT:
11422         {
11423             unmarshal_VkDebugReportCallbackCreateInfoEXT(vkStream, reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(structExtension_out));
11424             break;
11425         }
11426 #endif
11427 #ifdef VK_AMD_rasterization_order
11428         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD:
11429         {
11430             unmarshal_VkPipelineRasterizationStateRasterizationOrderAMD(vkStream, reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension_out));
11431             break;
11432         }
11433 #endif
11434 #ifdef VK_NV_dedicated_allocation
11435         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV:
11436         {
11437             unmarshal_VkDedicatedAllocationImageCreateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(structExtension_out));
11438             break;
11439         }
11440         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV:
11441         {
11442             unmarshal_VkDedicatedAllocationBufferCreateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(structExtension_out));
11443             break;
11444         }
11445         case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV:
11446         {
11447             unmarshal_VkDedicatedAllocationMemoryAllocateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension_out));
11448             break;
11449         }
11450 #endif
11451 #ifdef VK_AMD_texture_gather_bias_lod
11452         case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD:
11453         {
11454             unmarshal_VkTextureLODGatherFormatPropertiesAMD(vkStream, reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(structExtension_out));
11455             break;
11456         }
11457 #endif
11458 #ifdef VK_NV_external_memory
11459         case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV:
11460         {
11461             unmarshal_VkExternalMemoryImageCreateInfoNV(vkStream, reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(structExtension_out));
11462             break;
11463         }
11464         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV:
11465         {
11466             unmarshal_VkExportMemoryAllocateInfoNV(vkStream, reinterpret_cast<VkExportMemoryAllocateInfoNV*>(structExtension_out));
11467             break;
11468         }
11469 #endif
11470 #ifdef VK_NV_external_memory_win32
11471         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV:
11472         {
11473             unmarshal_VkImportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(structExtension_out));
11474             break;
11475         }
11476         case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV:
11477         {
11478             unmarshal_VkExportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(structExtension_out));
11479             break;
11480         }
11481 #endif
11482 #ifdef VK_NV_win32_keyed_mutex
11483         case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV:
11484         {
11485             unmarshal_VkWin32KeyedMutexAcquireReleaseInfoNV(vkStream, reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension_out));
11486             break;
11487         }
11488 #endif
11489 #ifdef VK_EXT_validation_flags
11490         case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT:
11491         {
11492             unmarshal_VkValidationFlagsEXT(vkStream, reinterpret_cast<VkValidationFlagsEXT*>(structExtension_out));
11493             break;
11494         }
11495 #endif
11496 #ifdef VK_EXT_conditional_rendering
11497         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT:
11498         {
11499             unmarshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension_out));
11500             break;
11501         }
11502         case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT:
11503         {
11504             unmarshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(vkStream, reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension_out));
11505             break;
11506         }
11507 #endif
11508 #ifdef VK_NV_clip_space_w_scaling
11509         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV:
11510         {
11511             unmarshal_VkPipelineViewportWScalingStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension_out));
11512             break;
11513         }
11514 #endif
11515 #ifdef VK_EXT_display_control
11516         case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT:
11517         {
11518             unmarshal_VkSwapchainCounterCreateInfoEXT(vkStream, reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(structExtension_out));
11519             break;
11520         }
11521 #endif
11522 #ifdef VK_GOOGLE_display_timing
11523         case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE:
11524         {
11525             unmarshal_VkPresentTimesInfoGOOGLE(vkStream, reinterpret_cast<VkPresentTimesInfoGOOGLE*>(structExtension_out));
11526             break;
11527         }
11528 #endif
11529 #ifdef VK_NVX_multiview_per_view_attributes
11530         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX:
11531         {
11532             unmarshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension_out));
11533             break;
11534         }
11535 #endif
11536 #ifdef VK_NV_viewport_swizzle
11537         case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV:
11538         {
11539             unmarshal_VkPipelineViewportSwizzleStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension_out));
11540             break;
11541         }
11542 #endif
11543 #ifdef VK_EXT_discard_rectangles
11544         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT:
11545         {
11546             unmarshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension_out));
11547             break;
11548         }
11549         case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT:
11550         {
11551             unmarshal_VkPipelineDiscardRectangleStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension_out));
11552             break;
11553         }
11554 #endif
11555 #ifdef VK_EXT_conservative_rasterization
11556         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT:
11557         {
11558             unmarshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension_out));
11559             break;
11560         }
11561         case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT:
11562         {
11563             unmarshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension_out));
11564             break;
11565         }
11566 #endif
11567 #ifdef VK_EXT_debug_utils
11568         case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT:
11569         {
11570             unmarshal_VkDebugUtilsMessengerCreateInfoEXT(vkStream, reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(structExtension_out));
11571             break;
11572         }
11573 #endif
11574 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
11575         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID:
11576         {
11577             unmarshal_VkAndroidHardwareBufferUsageANDROID(vkStream, reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(structExtension_out));
11578             break;
11579         }
11580         case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID:
11581         {
11582             unmarshal_VkAndroidHardwareBufferFormatPropertiesANDROID(vkStream, reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension_out));
11583             break;
11584         }
11585         case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID:
11586         {
11587             unmarshal_VkImportAndroidHardwareBufferInfoANDROID(vkStream, reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(structExtension_out));
11588             break;
11589         }
11590         case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID:
11591         {
11592             unmarshal_VkExternalFormatANDROID(vkStream, reinterpret_cast<VkExternalFormatANDROID*>(structExtension_out));
11593             break;
11594         }
11595 #endif
11596 #ifdef VK_EXT_sampler_filter_minmax
11597         case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT:
11598         {
11599             unmarshal_VkSamplerReductionModeCreateInfoEXT(vkStream, reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(structExtension_out));
11600             break;
11601         }
11602         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT:
11603         {
11604             unmarshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension_out));
11605             break;
11606         }
11607 #endif
11608 #ifdef VK_EXT_sample_locations
11609         case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT:
11610         {
11611             unmarshal_VkSampleLocationsInfoEXT(vkStream, reinterpret_cast<VkSampleLocationsInfoEXT*>(structExtension_out));
11612             break;
11613         }
11614         case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT:
11615         {
11616             unmarshal_VkRenderPassSampleLocationsBeginInfoEXT(vkStream, reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension_out));
11617             break;
11618         }
11619         case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT:
11620         {
11621             unmarshal_VkPipelineSampleLocationsStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension_out));
11622             break;
11623         }
11624         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT:
11625         {
11626             unmarshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension_out));
11627             break;
11628         }
11629 #endif
11630 #ifdef VK_EXT_blend_operation_advanced
11631         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT:
11632         {
11633             unmarshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension_out));
11634             break;
11635         }
11636         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT:
11637         {
11638             unmarshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension_out));
11639             break;
11640         }
11641         case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT:
11642         {
11643             unmarshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension_out));
11644             break;
11645         }
11646 #endif
11647 #ifdef VK_NV_fragment_coverage_to_color
11648         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV:
11649         {
11650             unmarshal_VkPipelineCoverageToColorStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension_out));
11651             break;
11652         }
11653 #endif
11654 #ifdef VK_NV_framebuffer_mixed_samples
11655         case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV:
11656         {
11657             unmarshal_VkPipelineCoverageModulationStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension_out));
11658             break;
11659         }
11660 #endif
11661 #ifdef VK_EXT_validation_cache
11662         case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT:
11663         {
11664             unmarshal_VkShaderModuleValidationCacheCreateInfoEXT(vkStream, reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension_out));
11665             break;
11666         }
11667 #endif
11668 #ifdef VK_EXT_descriptor_indexing
11669         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT:
11670         {
11671             unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(vkStream, reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension_out));
11672             break;
11673         }
11674         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT:
11675         {
11676             unmarshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension_out));
11677             break;
11678         }
11679         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT:
11680         {
11681             unmarshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension_out));
11682             break;
11683         }
11684         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT:
11685         {
11686             unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(vkStream, reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension_out));
11687             break;
11688         }
11689         case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT:
11690         {
11691             unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(vkStream, reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension_out));
11692             break;
11693         }
11694 #endif
11695 #ifdef VK_EXT_global_priority
11696         case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT:
11697         {
11698             unmarshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(vkStream, reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension_out));
11699             break;
11700         }
11701 #endif
11702 #ifdef VK_EXT_external_memory_host
11703         case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT:
11704         {
11705             unmarshal_VkImportMemoryHostPointerInfoEXT(vkStream, reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(structExtension_out));
11706             break;
11707         }
11708         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT:
11709         {
11710             unmarshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension_out));
11711             break;
11712         }
11713 #endif
11714 #ifdef VK_AMD_shader_core_properties
11715         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD:
11716         {
11717             unmarshal_VkPhysicalDeviceShaderCorePropertiesAMD(vkStream, reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension_out));
11718             break;
11719         }
11720 #endif
11721 #ifdef VK_EXT_vertex_attribute_divisor
11722         case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT:
11723         {
11724             unmarshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension_out));
11725             break;
11726         }
11727         case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT:
11728         {
11729             unmarshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension_out));
11730             break;
11731         }
11732 #endif
11733 #ifdef VK_NV_device_diagnostic_checkpoints
11734         case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV:
11735         {
11736             unmarshal_VkQueueFamilyCheckpointPropertiesNV(vkStream, reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(structExtension_out));
11737             break;
11738         }
11739 #endif
11740 #ifdef VK_GOOGLE_color_buffer
11741         case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE:
11742         {
11743             unmarshal_VkImportColorBufferGOOGLE(vkStream, reinterpret_cast<VkImportColorBufferGOOGLE*>(structExtension_out));
11744             break;
11745         }
11746         case VK_STRUCTURE_TYPE_IMPORT_BUFFER_GOOGLE:
11747         {
11748             unmarshal_VkImportBufferGOOGLE(vkStream, reinterpret_cast<VkImportBufferGOOGLE*>(structExtension_out));
11749             break;
11750         }
11751         case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE:
11752         {
11753             unmarshal_VkImportPhysicalAddressGOOGLE(vkStream, reinterpret_cast<VkImportPhysicalAddressGOOGLE*>(structExtension_out));
11754             break;
11755         }
11756 #endif
11757         default:
11758         {
11759             // fatal; the switch is only taken if the extension struct is known
11760             abort();
11761         }
11762     }
11763 }
11764 
api_opcode_to_string(const uint32_t opcode)11765 const char* api_opcode_to_string(
11766     const uint32_t opcode)
11767 {
11768     switch(opcode)
11769     {
11770 #ifdef VK_VERSION_1_0
11771         case OP_vkCreateInstance:
11772         {
11773             return "OP_vkCreateInstance";
11774         }
11775         case OP_vkDestroyInstance:
11776         {
11777             return "OP_vkDestroyInstance";
11778         }
11779         case OP_vkEnumeratePhysicalDevices:
11780         {
11781             return "OP_vkEnumeratePhysicalDevices";
11782         }
11783         case OP_vkGetPhysicalDeviceFeatures:
11784         {
11785             return "OP_vkGetPhysicalDeviceFeatures";
11786         }
11787         case OP_vkGetPhysicalDeviceFormatProperties:
11788         {
11789             return "OP_vkGetPhysicalDeviceFormatProperties";
11790         }
11791         case OP_vkGetPhysicalDeviceImageFormatProperties:
11792         {
11793             return "OP_vkGetPhysicalDeviceImageFormatProperties";
11794         }
11795         case OP_vkGetPhysicalDeviceProperties:
11796         {
11797             return "OP_vkGetPhysicalDeviceProperties";
11798         }
11799         case OP_vkGetPhysicalDeviceQueueFamilyProperties:
11800         {
11801             return "OP_vkGetPhysicalDeviceQueueFamilyProperties";
11802         }
11803         case OP_vkGetPhysicalDeviceMemoryProperties:
11804         {
11805             return "OP_vkGetPhysicalDeviceMemoryProperties";
11806         }
11807         case OP_vkGetInstanceProcAddr:
11808         {
11809             return "OP_vkGetInstanceProcAddr";
11810         }
11811         case OP_vkGetDeviceProcAddr:
11812         {
11813             return "OP_vkGetDeviceProcAddr";
11814         }
11815         case OP_vkCreateDevice:
11816         {
11817             return "OP_vkCreateDevice";
11818         }
11819         case OP_vkDestroyDevice:
11820         {
11821             return "OP_vkDestroyDevice";
11822         }
11823         case OP_vkEnumerateInstanceExtensionProperties:
11824         {
11825             return "OP_vkEnumerateInstanceExtensionProperties";
11826         }
11827         case OP_vkEnumerateDeviceExtensionProperties:
11828         {
11829             return "OP_vkEnumerateDeviceExtensionProperties";
11830         }
11831         case OP_vkEnumerateInstanceLayerProperties:
11832         {
11833             return "OP_vkEnumerateInstanceLayerProperties";
11834         }
11835         case OP_vkEnumerateDeviceLayerProperties:
11836         {
11837             return "OP_vkEnumerateDeviceLayerProperties";
11838         }
11839         case OP_vkGetDeviceQueue:
11840         {
11841             return "OP_vkGetDeviceQueue";
11842         }
11843         case OP_vkQueueSubmit:
11844         {
11845             return "OP_vkQueueSubmit";
11846         }
11847         case OP_vkQueueWaitIdle:
11848         {
11849             return "OP_vkQueueWaitIdle";
11850         }
11851         case OP_vkDeviceWaitIdle:
11852         {
11853             return "OP_vkDeviceWaitIdle";
11854         }
11855         case OP_vkAllocateMemory:
11856         {
11857             return "OP_vkAllocateMemory";
11858         }
11859         case OP_vkFreeMemory:
11860         {
11861             return "OP_vkFreeMemory";
11862         }
11863         case OP_vkMapMemory:
11864         {
11865             return "OP_vkMapMemory";
11866         }
11867         case OP_vkUnmapMemory:
11868         {
11869             return "OP_vkUnmapMemory";
11870         }
11871         case OP_vkFlushMappedMemoryRanges:
11872         {
11873             return "OP_vkFlushMappedMemoryRanges";
11874         }
11875         case OP_vkInvalidateMappedMemoryRanges:
11876         {
11877             return "OP_vkInvalidateMappedMemoryRanges";
11878         }
11879         case OP_vkGetDeviceMemoryCommitment:
11880         {
11881             return "OP_vkGetDeviceMemoryCommitment";
11882         }
11883         case OP_vkBindBufferMemory:
11884         {
11885             return "OP_vkBindBufferMemory";
11886         }
11887         case OP_vkBindImageMemory:
11888         {
11889             return "OP_vkBindImageMemory";
11890         }
11891         case OP_vkGetBufferMemoryRequirements:
11892         {
11893             return "OP_vkGetBufferMemoryRequirements";
11894         }
11895         case OP_vkGetImageMemoryRequirements:
11896         {
11897             return "OP_vkGetImageMemoryRequirements";
11898         }
11899         case OP_vkGetImageSparseMemoryRequirements:
11900         {
11901             return "OP_vkGetImageSparseMemoryRequirements";
11902         }
11903         case OP_vkGetPhysicalDeviceSparseImageFormatProperties:
11904         {
11905             return "OP_vkGetPhysicalDeviceSparseImageFormatProperties";
11906         }
11907         case OP_vkQueueBindSparse:
11908         {
11909             return "OP_vkQueueBindSparse";
11910         }
11911         case OP_vkCreateFence:
11912         {
11913             return "OP_vkCreateFence";
11914         }
11915         case OP_vkDestroyFence:
11916         {
11917             return "OP_vkDestroyFence";
11918         }
11919         case OP_vkResetFences:
11920         {
11921             return "OP_vkResetFences";
11922         }
11923         case OP_vkGetFenceStatus:
11924         {
11925             return "OP_vkGetFenceStatus";
11926         }
11927         case OP_vkWaitForFences:
11928         {
11929             return "OP_vkWaitForFences";
11930         }
11931         case OP_vkCreateSemaphore:
11932         {
11933             return "OP_vkCreateSemaphore";
11934         }
11935         case OP_vkDestroySemaphore:
11936         {
11937             return "OP_vkDestroySemaphore";
11938         }
11939         case OP_vkCreateEvent:
11940         {
11941             return "OP_vkCreateEvent";
11942         }
11943         case OP_vkDestroyEvent:
11944         {
11945             return "OP_vkDestroyEvent";
11946         }
11947         case OP_vkGetEventStatus:
11948         {
11949             return "OP_vkGetEventStatus";
11950         }
11951         case OP_vkSetEvent:
11952         {
11953             return "OP_vkSetEvent";
11954         }
11955         case OP_vkResetEvent:
11956         {
11957             return "OP_vkResetEvent";
11958         }
11959         case OP_vkCreateQueryPool:
11960         {
11961             return "OP_vkCreateQueryPool";
11962         }
11963         case OP_vkDestroyQueryPool:
11964         {
11965             return "OP_vkDestroyQueryPool";
11966         }
11967         case OP_vkGetQueryPoolResults:
11968         {
11969             return "OP_vkGetQueryPoolResults";
11970         }
11971         case OP_vkCreateBuffer:
11972         {
11973             return "OP_vkCreateBuffer";
11974         }
11975         case OP_vkDestroyBuffer:
11976         {
11977             return "OP_vkDestroyBuffer";
11978         }
11979         case OP_vkCreateBufferView:
11980         {
11981             return "OP_vkCreateBufferView";
11982         }
11983         case OP_vkDestroyBufferView:
11984         {
11985             return "OP_vkDestroyBufferView";
11986         }
11987         case OP_vkCreateImage:
11988         {
11989             return "OP_vkCreateImage";
11990         }
11991         case OP_vkDestroyImage:
11992         {
11993             return "OP_vkDestroyImage";
11994         }
11995         case OP_vkGetImageSubresourceLayout:
11996         {
11997             return "OP_vkGetImageSubresourceLayout";
11998         }
11999         case OP_vkCreateImageView:
12000         {
12001             return "OP_vkCreateImageView";
12002         }
12003         case OP_vkDestroyImageView:
12004         {
12005             return "OP_vkDestroyImageView";
12006         }
12007         case OP_vkCreateShaderModule:
12008         {
12009             return "OP_vkCreateShaderModule";
12010         }
12011         case OP_vkDestroyShaderModule:
12012         {
12013             return "OP_vkDestroyShaderModule";
12014         }
12015         case OP_vkCreatePipelineCache:
12016         {
12017             return "OP_vkCreatePipelineCache";
12018         }
12019         case OP_vkDestroyPipelineCache:
12020         {
12021             return "OP_vkDestroyPipelineCache";
12022         }
12023         case OP_vkGetPipelineCacheData:
12024         {
12025             return "OP_vkGetPipelineCacheData";
12026         }
12027         case OP_vkMergePipelineCaches:
12028         {
12029             return "OP_vkMergePipelineCaches";
12030         }
12031         case OP_vkCreateGraphicsPipelines:
12032         {
12033             return "OP_vkCreateGraphicsPipelines";
12034         }
12035         case OP_vkCreateComputePipelines:
12036         {
12037             return "OP_vkCreateComputePipelines";
12038         }
12039         case OP_vkDestroyPipeline:
12040         {
12041             return "OP_vkDestroyPipeline";
12042         }
12043         case OP_vkCreatePipelineLayout:
12044         {
12045             return "OP_vkCreatePipelineLayout";
12046         }
12047         case OP_vkDestroyPipelineLayout:
12048         {
12049             return "OP_vkDestroyPipelineLayout";
12050         }
12051         case OP_vkCreateSampler:
12052         {
12053             return "OP_vkCreateSampler";
12054         }
12055         case OP_vkDestroySampler:
12056         {
12057             return "OP_vkDestroySampler";
12058         }
12059         case OP_vkCreateDescriptorSetLayout:
12060         {
12061             return "OP_vkCreateDescriptorSetLayout";
12062         }
12063         case OP_vkDestroyDescriptorSetLayout:
12064         {
12065             return "OP_vkDestroyDescriptorSetLayout";
12066         }
12067         case OP_vkCreateDescriptorPool:
12068         {
12069             return "OP_vkCreateDescriptorPool";
12070         }
12071         case OP_vkDestroyDescriptorPool:
12072         {
12073             return "OP_vkDestroyDescriptorPool";
12074         }
12075         case OP_vkResetDescriptorPool:
12076         {
12077             return "OP_vkResetDescriptorPool";
12078         }
12079         case OP_vkAllocateDescriptorSets:
12080         {
12081             return "OP_vkAllocateDescriptorSets";
12082         }
12083         case OP_vkFreeDescriptorSets:
12084         {
12085             return "OP_vkFreeDescriptorSets";
12086         }
12087         case OP_vkUpdateDescriptorSets:
12088         {
12089             return "OP_vkUpdateDescriptorSets";
12090         }
12091         case OP_vkCreateFramebuffer:
12092         {
12093             return "OP_vkCreateFramebuffer";
12094         }
12095         case OP_vkDestroyFramebuffer:
12096         {
12097             return "OP_vkDestroyFramebuffer";
12098         }
12099         case OP_vkCreateRenderPass:
12100         {
12101             return "OP_vkCreateRenderPass";
12102         }
12103         case OP_vkDestroyRenderPass:
12104         {
12105             return "OP_vkDestroyRenderPass";
12106         }
12107         case OP_vkGetRenderAreaGranularity:
12108         {
12109             return "OP_vkGetRenderAreaGranularity";
12110         }
12111         case OP_vkCreateCommandPool:
12112         {
12113             return "OP_vkCreateCommandPool";
12114         }
12115         case OP_vkDestroyCommandPool:
12116         {
12117             return "OP_vkDestroyCommandPool";
12118         }
12119         case OP_vkResetCommandPool:
12120         {
12121             return "OP_vkResetCommandPool";
12122         }
12123         case OP_vkAllocateCommandBuffers:
12124         {
12125             return "OP_vkAllocateCommandBuffers";
12126         }
12127         case OP_vkFreeCommandBuffers:
12128         {
12129             return "OP_vkFreeCommandBuffers";
12130         }
12131         case OP_vkBeginCommandBuffer:
12132         {
12133             return "OP_vkBeginCommandBuffer";
12134         }
12135         case OP_vkEndCommandBuffer:
12136         {
12137             return "OP_vkEndCommandBuffer";
12138         }
12139         case OP_vkResetCommandBuffer:
12140         {
12141             return "OP_vkResetCommandBuffer";
12142         }
12143         case OP_vkCmdBindPipeline:
12144         {
12145             return "OP_vkCmdBindPipeline";
12146         }
12147         case OP_vkCmdSetViewport:
12148         {
12149             return "OP_vkCmdSetViewport";
12150         }
12151         case OP_vkCmdSetScissor:
12152         {
12153             return "OP_vkCmdSetScissor";
12154         }
12155         case OP_vkCmdSetLineWidth:
12156         {
12157             return "OP_vkCmdSetLineWidth";
12158         }
12159         case OP_vkCmdSetDepthBias:
12160         {
12161             return "OP_vkCmdSetDepthBias";
12162         }
12163         case OP_vkCmdSetBlendConstants:
12164         {
12165             return "OP_vkCmdSetBlendConstants";
12166         }
12167         case OP_vkCmdSetDepthBounds:
12168         {
12169             return "OP_vkCmdSetDepthBounds";
12170         }
12171         case OP_vkCmdSetStencilCompareMask:
12172         {
12173             return "OP_vkCmdSetStencilCompareMask";
12174         }
12175         case OP_vkCmdSetStencilWriteMask:
12176         {
12177             return "OP_vkCmdSetStencilWriteMask";
12178         }
12179         case OP_vkCmdSetStencilReference:
12180         {
12181             return "OP_vkCmdSetStencilReference";
12182         }
12183         case OP_vkCmdBindDescriptorSets:
12184         {
12185             return "OP_vkCmdBindDescriptorSets";
12186         }
12187         case OP_vkCmdBindIndexBuffer:
12188         {
12189             return "OP_vkCmdBindIndexBuffer";
12190         }
12191         case OP_vkCmdBindVertexBuffers:
12192         {
12193             return "OP_vkCmdBindVertexBuffers";
12194         }
12195         case OP_vkCmdDraw:
12196         {
12197             return "OP_vkCmdDraw";
12198         }
12199         case OP_vkCmdDrawIndexed:
12200         {
12201             return "OP_vkCmdDrawIndexed";
12202         }
12203         case OP_vkCmdDrawIndirect:
12204         {
12205             return "OP_vkCmdDrawIndirect";
12206         }
12207         case OP_vkCmdDrawIndexedIndirect:
12208         {
12209             return "OP_vkCmdDrawIndexedIndirect";
12210         }
12211         case OP_vkCmdDispatch:
12212         {
12213             return "OP_vkCmdDispatch";
12214         }
12215         case OP_vkCmdDispatchIndirect:
12216         {
12217             return "OP_vkCmdDispatchIndirect";
12218         }
12219         case OP_vkCmdCopyBuffer:
12220         {
12221             return "OP_vkCmdCopyBuffer";
12222         }
12223         case OP_vkCmdCopyImage:
12224         {
12225             return "OP_vkCmdCopyImage";
12226         }
12227         case OP_vkCmdBlitImage:
12228         {
12229             return "OP_vkCmdBlitImage";
12230         }
12231         case OP_vkCmdCopyBufferToImage:
12232         {
12233             return "OP_vkCmdCopyBufferToImage";
12234         }
12235         case OP_vkCmdCopyImageToBuffer:
12236         {
12237             return "OP_vkCmdCopyImageToBuffer";
12238         }
12239         case OP_vkCmdUpdateBuffer:
12240         {
12241             return "OP_vkCmdUpdateBuffer";
12242         }
12243         case OP_vkCmdFillBuffer:
12244         {
12245             return "OP_vkCmdFillBuffer";
12246         }
12247         case OP_vkCmdClearColorImage:
12248         {
12249             return "OP_vkCmdClearColorImage";
12250         }
12251         case OP_vkCmdClearDepthStencilImage:
12252         {
12253             return "OP_vkCmdClearDepthStencilImage";
12254         }
12255         case OP_vkCmdClearAttachments:
12256         {
12257             return "OP_vkCmdClearAttachments";
12258         }
12259         case OP_vkCmdResolveImage:
12260         {
12261             return "OP_vkCmdResolveImage";
12262         }
12263         case OP_vkCmdSetEvent:
12264         {
12265             return "OP_vkCmdSetEvent";
12266         }
12267         case OP_vkCmdResetEvent:
12268         {
12269             return "OP_vkCmdResetEvent";
12270         }
12271         case OP_vkCmdWaitEvents:
12272         {
12273             return "OP_vkCmdWaitEvents";
12274         }
12275         case OP_vkCmdPipelineBarrier:
12276         {
12277             return "OP_vkCmdPipelineBarrier";
12278         }
12279         case OP_vkCmdBeginQuery:
12280         {
12281             return "OP_vkCmdBeginQuery";
12282         }
12283         case OP_vkCmdEndQuery:
12284         {
12285             return "OP_vkCmdEndQuery";
12286         }
12287         case OP_vkCmdResetQueryPool:
12288         {
12289             return "OP_vkCmdResetQueryPool";
12290         }
12291         case OP_vkCmdWriteTimestamp:
12292         {
12293             return "OP_vkCmdWriteTimestamp";
12294         }
12295         case OP_vkCmdCopyQueryPoolResults:
12296         {
12297             return "OP_vkCmdCopyQueryPoolResults";
12298         }
12299         case OP_vkCmdPushConstants:
12300         {
12301             return "OP_vkCmdPushConstants";
12302         }
12303         case OP_vkCmdBeginRenderPass:
12304         {
12305             return "OP_vkCmdBeginRenderPass";
12306         }
12307         case OP_vkCmdNextSubpass:
12308         {
12309             return "OP_vkCmdNextSubpass";
12310         }
12311         case OP_vkCmdEndRenderPass:
12312         {
12313             return "OP_vkCmdEndRenderPass";
12314         }
12315         case OP_vkCmdExecuteCommands:
12316         {
12317             return "OP_vkCmdExecuteCommands";
12318         }
12319 #endif
12320 #ifdef VK_VERSION_1_1
12321         case OP_vkEnumerateInstanceVersion:
12322         {
12323             return "OP_vkEnumerateInstanceVersion";
12324         }
12325         case OP_vkBindBufferMemory2:
12326         {
12327             return "OP_vkBindBufferMemory2";
12328         }
12329         case OP_vkBindImageMemory2:
12330         {
12331             return "OP_vkBindImageMemory2";
12332         }
12333         case OP_vkGetDeviceGroupPeerMemoryFeatures:
12334         {
12335             return "OP_vkGetDeviceGroupPeerMemoryFeatures";
12336         }
12337         case OP_vkCmdSetDeviceMask:
12338         {
12339             return "OP_vkCmdSetDeviceMask";
12340         }
12341         case OP_vkCmdDispatchBase:
12342         {
12343             return "OP_vkCmdDispatchBase";
12344         }
12345         case OP_vkEnumeratePhysicalDeviceGroups:
12346         {
12347             return "OP_vkEnumeratePhysicalDeviceGroups";
12348         }
12349         case OP_vkGetImageMemoryRequirements2:
12350         {
12351             return "OP_vkGetImageMemoryRequirements2";
12352         }
12353         case OP_vkGetBufferMemoryRequirements2:
12354         {
12355             return "OP_vkGetBufferMemoryRequirements2";
12356         }
12357         case OP_vkGetImageSparseMemoryRequirements2:
12358         {
12359             return "OP_vkGetImageSparseMemoryRequirements2";
12360         }
12361         case OP_vkGetPhysicalDeviceFeatures2:
12362         {
12363             return "OP_vkGetPhysicalDeviceFeatures2";
12364         }
12365         case OP_vkGetPhysicalDeviceProperties2:
12366         {
12367             return "OP_vkGetPhysicalDeviceProperties2";
12368         }
12369         case OP_vkGetPhysicalDeviceFormatProperties2:
12370         {
12371             return "OP_vkGetPhysicalDeviceFormatProperties2";
12372         }
12373         case OP_vkGetPhysicalDeviceImageFormatProperties2:
12374         {
12375             return "OP_vkGetPhysicalDeviceImageFormatProperties2";
12376         }
12377         case OP_vkGetPhysicalDeviceQueueFamilyProperties2:
12378         {
12379             return "OP_vkGetPhysicalDeviceQueueFamilyProperties2";
12380         }
12381         case OP_vkGetPhysicalDeviceMemoryProperties2:
12382         {
12383             return "OP_vkGetPhysicalDeviceMemoryProperties2";
12384         }
12385         case OP_vkGetPhysicalDeviceSparseImageFormatProperties2:
12386         {
12387             return "OP_vkGetPhysicalDeviceSparseImageFormatProperties2";
12388         }
12389         case OP_vkTrimCommandPool:
12390         {
12391             return "OP_vkTrimCommandPool";
12392         }
12393         case OP_vkGetDeviceQueue2:
12394         {
12395             return "OP_vkGetDeviceQueue2";
12396         }
12397         case OP_vkCreateSamplerYcbcrConversion:
12398         {
12399             return "OP_vkCreateSamplerYcbcrConversion";
12400         }
12401         case OP_vkDestroySamplerYcbcrConversion:
12402         {
12403             return "OP_vkDestroySamplerYcbcrConversion";
12404         }
12405         case OP_vkCreateDescriptorUpdateTemplate:
12406         {
12407             return "OP_vkCreateDescriptorUpdateTemplate";
12408         }
12409         case OP_vkDestroyDescriptorUpdateTemplate:
12410         {
12411             return "OP_vkDestroyDescriptorUpdateTemplate";
12412         }
12413         case OP_vkUpdateDescriptorSetWithTemplate:
12414         {
12415             return "OP_vkUpdateDescriptorSetWithTemplate";
12416         }
12417         case OP_vkGetPhysicalDeviceExternalBufferProperties:
12418         {
12419             return "OP_vkGetPhysicalDeviceExternalBufferProperties";
12420         }
12421         case OP_vkGetPhysicalDeviceExternalFenceProperties:
12422         {
12423             return "OP_vkGetPhysicalDeviceExternalFenceProperties";
12424         }
12425         case OP_vkGetPhysicalDeviceExternalSemaphoreProperties:
12426         {
12427             return "OP_vkGetPhysicalDeviceExternalSemaphoreProperties";
12428         }
12429         case OP_vkGetDescriptorSetLayoutSupport:
12430         {
12431             return "OP_vkGetDescriptorSetLayoutSupport";
12432         }
12433 #endif
12434 #ifdef VK_KHR_surface
12435         case OP_vkDestroySurfaceKHR:
12436         {
12437             return "OP_vkDestroySurfaceKHR";
12438         }
12439         case OP_vkGetPhysicalDeviceSurfaceSupportKHR:
12440         {
12441             return "OP_vkGetPhysicalDeviceSurfaceSupportKHR";
12442         }
12443         case OP_vkGetPhysicalDeviceSurfaceCapabilitiesKHR:
12444         {
12445             return "OP_vkGetPhysicalDeviceSurfaceCapabilitiesKHR";
12446         }
12447         case OP_vkGetPhysicalDeviceSurfaceFormatsKHR:
12448         {
12449             return "OP_vkGetPhysicalDeviceSurfaceFormatsKHR";
12450         }
12451         case OP_vkGetPhysicalDeviceSurfacePresentModesKHR:
12452         {
12453             return "OP_vkGetPhysicalDeviceSurfacePresentModesKHR";
12454         }
12455 #endif
12456 #ifdef VK_KHR_swapchain
12457         case OP_vkCreateSwapchainKHR:
12458         {
12459             return "OP_vkCreateSwapchainKHR";
12460         }
12461         case OP_vkDestroySwapchainKHR:
12462         {
12463             return "OP_vkDestroySwapchainKHR";
12464         }
12465         case OP_vkGetSwapchainImagesKHR:
12466         {
12467             return "OP_vkGetSwapchainImagesKHR";
12468         }
12469         case OP_vkAcquireNextImageKHR:
12470         {
12471             return "OP_vkAcquireNextImageKHR";
12472         }
12473         case OP_vkQueuePresentKHR:
12474         {
12475             return "OP_vkQueuePresentKHR";
12476         }
12477         case OP_vkGetDeviceGroupPresentCapabilitiesKHR:
12478         {
12479             return "OP_vkGetDeviceGroupPresentCapabilitiesKHR";
12480         }
12481         case OP_vkGetDeviceGroupSurfacePresentModesKHR:
12482         {
12483             return "OP_vkGetDeviceGroupSurfacePresentModesKHR";
12484         }
12485         case OP_vkGetPhysicalDevicePresentRectanglesKHR:
12486         {
12487             return "OP_vkGetPhysicalDevicePresentRectanglesKHR";
12488         }
12489         case OP_vkAcquireNextImage2KHR:
12490         {
12491             return "OP_vkAcquireNextImage2KHR";
12492         }
12493 #endif
12494 #ifdef VK_KHR_display
12495         case OP_vkGetPhysicalDeviceDisplayPropertiesKHR:
12496         {
12497             return "OP_vkGetPhysicalDeviceDisplayPropertiesKHR";
12498         }
12499         case OP_vkGetPhysicalDeviceDisplayPlanePropertiesKHR:
12500         {
12501             return "OP_vkGetPhysicalDeviceDisplayPlanePropertiesKHR";
12502         }
12503         case OP_vkGetDisplayPlaneSupportedDisplaysKHR:
12504         {
12505             return "OP_vkGetDisplayPlaneSupportedDisplaysKHR";
12506         }
12507         case OP_vkGetDisplayModePropertiesKHR:
12508         {
12509             return "OP_vkGetDisplayModePropertiesKHR";
12510         }
12511         case OP_vkCreateDisplayModeKHR:
12512         {
12513             return "OP_vkCreateDisplayModeKHR";
12514         }
12515         case OP_vkGetDisplayPlaneCapabilitiesKHR:
12516         {
12517             return "OP_vkGetDisplayPlaneCapabilitiesKHR";
12518         }
12519         case OP_vkCreateDisplayPlaneSurfaceKHR:
12520         {
12521             return "OP_vkCreateDisplayPlaneSurfaceKHR";
12522         }
12523 #endif
12524 #ifdef VK_KHR_display_swapchain
12525         case OP_vkCreateSharedSwapchainsKHR:
12526         {
12527             return "OP_vkCreateSharedSwapchainsKHR";
12528         }
12529 #endif
12530 #ifdef VK_KHR_xlib_surface
12531         case OP_vkCreateXlibSurfaceKHR:
12532         {
12533             return "OP_vkCreateXlibSurfaceKHR";
12534         }
12535         case OP_vkGetPhysicalDeviceXlibPresentationSupportKHR:
12536         {
12537             return "OP_vkGetPhysicalDeviceXlibPresentationSupportKHR";
12538         }
12539 #endif
12540 #ifdef VK_KHR_xcb_surface
12541         case OP_vkCreateXcbSurfaceKHR:
12542         {
12543             return "OP_vkCreateXcbSurfaceKHR";
12544         }
12545         case OP_vkGetPhysicalDeviceXcbPresentationSupportKHR:
12546         {
12547             return "OP_vkGetPhysicalDeviceXcbPresentationSupportKHR";
12548         }
12549 #endif
12550 #ifdef VK_KHR_wayland_surface
12551         case OP_vkCreateWaylandSurfaceKHR:
12552         {
12553             return "OP_vkCreateWaylandSurfaceKHR";
12554         }
12555         case OP_vkGetPhysicalDeviceWaylandPresentationSupportKHR:
12556         {
12557             return "OP_vkGetPhysicalDeviceWaylandPresentationSupportKHR";
12558         }
12559 #endif
12560 #ifdef VK_KHR_mir_surface
12561         case OP_vkCreateMirSurfaceKHR:
12562         {
12563             return "OP_vkCreateMirSurfaceKHR";
12564         }
12565         case OP_vkGetPhysicalDeviceMirPresentationSupportKHR:
12566         {
12567             return "OP_vkGetPhysicalDeviceMirPresentationSupportKHR";
12568         }
12569 #endif
12570 #ifdef VK_KHR_android_surface
12571         case OP_vkCreateAndroidSurfaceKHR:
12572         {
12573             return "OP_vkCreateAndroidSurfaceKHR";
12574         }
12575 #endif
12576 #ifdef VK_KHR_win32_surface
12577         case OP_vkCreateWin32SurfaceKHR:
12578         {
12579             return "OP_vkCreateWin32SurfaceKHR";
12580         }
12581         case OP_vkGetPhysicalDeviceWin32PresentationSupportKHR:
12582         {
12583             return "OP_vkGetPhysicalDeviceWin32PresentationSupportKHR";
12584         }
12585 #endif
12586 #ifdef VK_KHR_get_physical_device_properties2
12587         case OP_vkGetPhysicalDeviceFeatures2KHR:
12588         {
12589             return "OP_vkGetPhysicalDeviceFeatures2KHR";
12590         }
12591         case OP_vkGetPhysicalDeviceProperties2KHR:
12592         {
12593             return "OP_vkGetPhysicalDeviceProperties2KHR";
12594         }
12595         case OP_vkGetPhysicalDeviceFormatProperties2KHR:
12596         {
12597             return "OP_vkGetPhysicalDeviceFormatProperties2KHR";
12598         }
12599         case OP_vkGetPhysicalDeviceImageFormatProperties2KHR:
12600         {
12601             return "OP_vkGetPhysicalDeviceImageFormatProperties2KHR";
12602         }
12603         case OP_vkGetPhysicalDeviceQueueFamilyProperties2KHR:
12604         {
12605             return "OP_vkGetPhysicalDeviceQueueFamilyProperties2KHR";
12606         }
12607         case OP_vkGetPhysicalDeviceMemoryProperties2KHR:
12608         {
12609             return "OP_vkGetPhysicalDeviceMemoryProperties2KHR";
12610         }
12611         case OP_vkGetPhysicalDeviceSparseImageFormatProperties2KHR:
12612         {
12613             return "OP_vkGetPhysicalDeviceSparseImageFormatProperties2KHR";
12614         }
12615 #endif
12616 #ifdef VK_KHR_device_group
12617         case OP_vkGetDeviceGroupPeerMemoryFeaturesKHR:
12618         {
12619             return "OP_vkGetDeviceGroupPeerMemoryFeaturesKHR";
12620         }
12621         case OP_vkCmdSetDeviceMaskKHR:
12622         {
12623             return "OP_vkCmdSetDeviceMaskKHR";
12624         }
12625         case OP_vkCmdDispatchBaseKHR:
12626         {
12627             return "OP_vkCmdDispatchBaseKHR";
12628         }
12629 #endif
12630 #ifdef VK_KHR_maintenance1
12631         case OP_vkTrimCommandPoolKHR:
12632         {
12633             return "OP_vkTrimCommandPoolKHR";
12634         }
12635 #endif
12636 #ifdef VK_KHR_device_group_creation
12637         case OP_vkEnumeratePhysicalDeviceGroupsKHR:
12638         {
12639             return "OP_vkEnumeratePhysicalDeviceGroupsKHR";
12640         }
12641 #endif
12642 #ifdef VK_KHR_external_memory_capabilities
12643         case OP_vkGetPhysicalDeviceExternalBufferPropertiesKHR:
12644         {
12645             return "OP_vkGetPhysicalDeviceExternalBufferPropertiesKHR";
12646         }
12647 #endif
12648 #ifdef VK_KHR_external_memory_win32
12649         case OP_vkGetMemoryWin32HandleKHR:
12650         {
12651             return "OP_vkGetMemoryWin32HandleKHR";
12652         }
12653         case OP_vkGetMemoryWin32HandlePropertiesKHR:
12654         {
12655             return "OP_vkGetMemoryWin32HandlePropertiesKHR";
12656         }
12657 #endif
12658 #ifdef VK_KHR_external_memory_fd
12659         case OP_vkGetMemoryFdKHR:
12660         {
12661             return "OP_vkGetMemoryFdKHR";
12662         }
12663         case OP_vkGetMemoryFdPropertiesKHR:
12664         {
12665             return "OP_vkGetMemoryFdPropertiesKHR";
12666         }
12667 #endif
12668 #ifdef VK_KHR_external_semaphore_capabilities
12669         case OP_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR:
12670         {
12671             return "OP_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR";
12672         }
12673 #endif
12674 #ifdef VK_KHR_external_semaphore_win32
12675         case OP_vkImportSemaphoreWin32HandleKHR:
12676         {
12677             return "OP_vkImportSemaphoreWin32HandleKHR";
12678         }
12679         case OP_vkGetSemaphoreWin32HandleKHR:
12680         {
12681             return "OP_vkGetSemaphoreWin32HandleKHR";
12682         }
12683 #endif
12684 #ifdef VK_KHR_external_semaphore_fd
12685         case OP_vkImportSemaphoreFdKHR:
12686         {
12687             return "OP_vkImportSemaphoreFdKHR";
12688         }
12689         case OP_vkGetSemaphoreFdKHR:
12690         {
12691             return "OP_vkGetSemaphoreFdKHR";
12692         }
12693 #endif
12694 #ifdef VK_KHR_push_descriptor
12695         case OP_vkCmdPushDescriptorSetKHR:
12696         {
12697             return "OP_vkCmdPushDescriptorSetKHR";
12698         }
12699         case OP_vkCmdPushDescriptorSetWithTemplateKHR:
12700         {
12701             return "OP_vkCmdPushDescriptorSetWithTemplateKHR";
12702         }
12703 #endif
12704 #ifdef VK_KHR_descriptor_update_template
12705         case OP_vkCreateDescriptorUpdateTemplateKHR:
12706         {
12707             return "OP_vkCreateDescriptorUpdateTemplateKHR";
12708         }
12709         case OP_vkDestroyDescriptorUpdateTemplateKHR:
12710         {
12711             return "OP_vkDestroyDescriptorUpdateTemplateKHR";
12712         }
12713         case OP_vkUpdateDescriptorSetWithTemplateKHR:
12714         {
12715             return "OP_vkUpdateDescriptorSetWithTemplateKHR";
12716         }
12717 #endif
12718 #ifdef VK_KHR_create_renderpass2
12719         case OP_vkCreateRenderPass2KHR:
12720         {
12721             return "OP_vkCreateRenderPass2KHR";
12722         }
12723         case OP_vkCmdBeginRenderPass2KHR:
12724         {
12725             return "OP_vkCmdBeginRenderPass2KHR";
12726         }
12727         case OP_vkCmdNextSubpass2KHR:
12728         {
12729             return "OP_vkCmdNextSubpass2KHR";
12730         }
12731         case OP_vkCmdEndRenderPass2KHR:
12732         {
12733             return "OP_vkCmdEndRenderPass2KHR";
12734         }
12735 #endif
12736 #ifdef VK_KHR_shared_presentable_image
12737         case OP_vkGetSwapchainStatusKHR:
12738         {
12739             return "OP_vkGetSwapchainStatusKHR";
12740         }
12741 #endif
12742 #ifdef VK_KHR_external_fence_capabilities
12743         case OP_vkGetPhysicalDeviceExternalFencePropertiesKHR:
12744         {
12745             return "OP_vkGetPhysicalDeviceExternalFencePropertiesKHR";
12746         }
12747 #endif
12748 #ifdef VK_KHR_external_fence_win32
12749         case OP_vkImportFenceWin32HandleKHR:
12750         {
12751             return "OP_vkImportFenceWin32HandleKHR";
12752         }
12753         case OP_vkGetFenceWin32HandleKHR:
12754         {
12755             return "OP_vkGetFenceWin32HandleKHR";
12756         }
12757 #endif
12758 #ifdef VK_KHR_external_fence_fd
12759         case OP_vkImportFenceFdKHR:
12760         {
12761             return "OP_vkImportFenceFdKHR";
12762         }
12763         case OP_vkGetFenceFdKHR:
12764         {
12765             return "OP_vkGetFenceFdKHR";
12766         }
12767 #endif
12768 #ifdef VK_KHR_get_surface_capabilities2
12769         case OP_vkGetPhysicalDeviceSurfaceCapabilities2KHR:
12770         {
12771             return "OP_vkGetPhysicalDeviceSurfaceCapabilities2KHR";
12772         }
12773         case OP_vkGetPhysicalDeviceSurfaceFormats2KHR:
12774         {
12775             return "OP_vkGetPhysicalDeviceSurfaceFormats2KHR";
12776         }
12777 #endif
12778 #ifdef VK_KHR_get_display_properties2
12779         case OP_vkGetPhysicalDeviceDisplayProperties2KHR:
12780         {
12781             return "OP_vkGetPhysicalDeviceDisplayProperties2KHR";
12782         }
12783         case OP_vkGetPhysicalDeviceDisplayPlaneProperties2KHR:
12784         {
12785             return "OP_vkGetPhysicalDeviceDisplayPlaneProperties2KHR";
12786         }
12787         case OP_vkGetDisplayModeProperties2KHR:
12788         {
12789             return "OP_vkGetDisplayModeProperties2KHR";
12790         }
12791         case OP_vkGetDisplayPlaneCapabilities2KHR:
12792         {
12793             return "OP_vkGetDisplayPlaneCapabilities2KHR";
12794         }
12795 #endif
12796 #ifdef VK_KHR_get_memory_requirements2
12797         case OP_vkGetImageMemoryRequirements2KHR:
12798         {
12799             return "OP_vkGetImageMemoryRequirements2KHR";
12800         }
12801         case OP_vkGetBufferMemoryRequirements2KHR:
12802         {
12803             return "OP_vkGetBufferMemoryRequirements2KHR";
12804         }
12805         case OP_vkGetImageSparseMemoryRequirements2KHR:
12806         {
12807             return "OP_vkGetImageSparseMemoryRequirements2KHR";
12808         }
12809 #endif
12810 #ifdef VK_KHR_sampler_ycbcr_conversion
12811         case OP_vkCreateSamplerYcbcrConversionKHR:
12812         {
12813             return "OP_vkCreateSamplerYcbcrConversionKHR";
12814         }
12815         case OP_vkDestroySamplerYcbcrConversionKHR:
12816         {
12817             return "OP_vkDestroySamplerYcbcrConversionKHR";
12818         }
12819 #endif
12820 #ifdef VK_KHR_bind_memory2
12821         case OP_vkBindBufferMemory2KHR:
12822         {
12823             return "OP_vkBindBufferMemory2KHR";
12824         }
12825         case OP_vkBindImageMemory2KHR:
12826         {
12827             return "OP_vkBindImageMemory2KHR";
12828         }
12829 #endif
12830 #ifdef VK_KHR_maintenance3
12831         case OP_vkGetDescriptorSetLayoutSupportKHR:
12832         {
12833             return "OP_vkGetDescriptorSetLayoutSupportKHR";
12834         }
12835 #endif
12836 #ifdef VK_KHR_draw_indirect_count
12837         case OP_vkCmdDrawIndirectCountKHR:
12838         {
12839             return "OP_vkCmdDrawIndirectCountKHR";
12840         }
12841         case OP_vkCmdDrawIndexedIndirectCountKHR:
12842         {
12843             return "OP_vkCmdDrawIndexedIndirectCountKHR";
12844         }
12845 #endif
12846 #ifdef VK_ANDROID_native_buffer
12847         case OP_vkGetSwapchainGrallocUsageANDROID:
12848         {
12849             return "OP_vkGetSwapchainGrallocUsageANDROID";
12850         }
12851         case OP_vkAcquireImageANDROID:
12852         {
12853             return "OP_vkAcquireImageANDROID";
12854         }
12855         case OP_vkQueueSignalReleaseImageANDROID:
12856         {
12857             return "OP_vkQueueSignalReleaseImageANDROID";
12858         }
12859 #endif
12860 #ifdef VK_EXT_debug_report
12861         case OP_vkCreateDebugReportCallbackEXT:
12862         {
12863             return "OP_vkCreateDebugReportCallbackEXT";
12864         }
12865         case OP_vkDestroyDebugReportCallbackEXT:
12866         {
12867             return "OP_vkDestroyDebugReportCallbackEXT";
12868         }
12869         case OP_vkDebugReportMessageEXT:
12870         {
12871             return "OP_vkDebugReportMessageEXT";
12872         }
12873 #endif
12874 #ifdef VK_EXT_debug_marker
12875         case OP_vkDebugMarkerSetObjectTagEXT:
12876         {
12877             return "OP_vkDebugMarkerSetObjectTagEXT";
12878         }
12879         case OP_vkDebugMarkerSetObjectNameEXT:
12880         {
12881             return "OP_vkDebugMarkerSetObjectNameEXT";
12882         }
12883         case OP_vkCmdDebugMarkerBeginEXT:
12884         {
12885             return "OP_vkCmdDebugMarkerBeginEXT";
12886         }
12887         case OP_vkCmdDebugMarkerEndEXT:
12888         {
12889             return "OP_vkCmdDebugMarkerEndEXT";
12890         }
12891         case OP_vkCmdDebugMarkerInsertEXT:
12892         {
12893             return "OP_vkCmdDebugMarkerInsertEXT";
12894         }
12895 #endif
12896 #ifdef VK_AMD_draw_indirect_count
12897         case OP_vkCmdDrawIndirectCountAMD:
12898         {
12899             return "OP_vkCmdDrawIndirectCountAMD";
12900         }
12901         case OP_vkCmdDrawIndexedIndirectCountAMD:
12902         {
12903             return "OP_vkCmdDrawIndexedIndirectCountAMD";
12904         }
12905 #endif
12906 #ifdef VK_AMD_shader_info
12907         case OP_vkGetShaderInfoAMD:
12908         {
12909             return "OP_vkGetShaderInfoAMD";
12910         }
12911 #endif
12912 #ifdef VK_NV_external_memory_capabilities
12913         case OP_vkGetPhysicalDeviceExternalImageFormatPropertiesNV:
12914         {
12915             return "OP_vkGetPhysicalDeviceExternalImageFormatPropertiesNV";
12916         }
12917 #endif
12918 #ifdef VK_NV_external_memory_win32
12919         case OP_vkGetMemoryWin32HandleNV:
12920         {
12921             return "OP_vkGetMemoryWin32HandleNV";
12922         }
12923 #endif
12924 #ifdef VK_NN_vi_surface
12925         case OP_vkCreateViSurfaceNN:
12926         {
12927             return "OP_vkCreateViSurfaceNN";
12928         }
12929 #endif
12930 #ifdef VK_EXT_conditional_rendering
12931         case OP_vkCmdBeginConditionalRenderingEXT:
12932         {
12933             return "OP_vkCmdBeginConditionalRenderingEXT";
12934         }
12935         case OP_vkCmdEndConditionalRenderingEXT:
12936         {
12937             return "OP_vkCmdEndConditionalRenderingEXT";
12938         }
12939 #endif
12940 #ifdef VK_NVX_device_generated_commands
12941         case OP_vkCmdProcessCommandsNVX:
12942         {
12943             return "OP_vkCmdProcessCommandsNVX";
12944         }
12945         case OP_vkCmdReserveSpaceForCommandsNVX:
12946         {
12947             return "OP_vkCmdReserveSpaceForCommandsNVX";
12948         }
12949         case OP_vkCreateIndirectCommandsLayoutNVX:
12950         {
12951             return "OP_vkCreateIndirectCommandsLayoutNVX";
12952         }
12953         case OP_vkDestroyIndirectCommandsLayoutNVX:
12954         {
12955             return "OP_vkDestroyIndirectCommandsLayoutNVX";
12956         }
12957         case OP_vkCreateObjectTableNVX:
12958         {
12959             return "OP_vkCreateObjectTableNVX";
12960         }
12961         case OP_vkDestroyObjectTableNVX:
12962         {
12963             return "OP_vkDestroyObjectTableNVX";
12964         }
12965         case OP_vkRegisterObjectsNVX:
12966         {
12967             return "OP_vkRegisterObjectsNVX";
12968         }
12969         case OP_vkUnregisterObjectsNVX:
12970         {
12971             return "OP_vkUnregisterObjectsNVX";
12972         }
12973         case OP_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX:
12974         {
12975             return "OP_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX";
12976         }
12977 #endif
12978 #ifdef VK_NV_clip_space_w_scaling
12979         case OP_vkCmdSetViewportWScalingNV:
12980         {
12981             return "OP_vkCmdSetViewportWScalingNV";
12982         }
12983 #endif
12984 #ifdef VK_EXT_direct_mode_display
12985         case OP_vkReleaseDisplayEXT:
12986         {
12987             return "OP_vkReleaseDisplayEXT";
12988         }
12989 #endif
12990 #ifdef VK_EXT_acquire_xlib_display
12991         case OP_vkAcquireXlibDisplayEXT:
12992         {
12993             return "OP_vkAcquireXlibDisplayEXT";
12994         }
12995         case OP_vkGetRandROutputDisplayEXT:
12996         {
12997             return "OP_vkGetRandROutputDisplayEXT";
12998         }
12999 #endif
13000 #ifdef VK_EXT_display_surface_counter
13001         case OP_vkGetPhysicalDeviceSurfaceCapabilities2EXT:
13002         {
13003             return "OP_vkGetPhysicalDeviceSurfaceCapabilities2EXT";
13004         }
13005 #endif
13006 #ifdef VK_EXT_display_control
13007         case OP_vkDisplayPowerControlEXT:
13008         {
13009             return "OP_vkDisplayPowerControlEXT";
13010         }
13011         case OP_vkRegisterDeviceEventEXT:
13012         {
13013             return "OP_vkRegisterDeviceEventEXT";
13014         }
13015         case OP_vkRegisterDisplayEventEXT:
13016         {
13017             return "OP_vkRegisterDisplayEventEXT";
13018         }
13019         case OP_vkGetSwapchainCounterEXT:
13020         {
13021             return "OP_vkGetSwapchainCounterEXT";
13022         }
13023 #endif
13024 #ifdef VK_GOOGLE_display_timing
13025         case OP_vkGetRefreshCycleDurationGOOGLE:
13026         {
13027             return "OP_vkGetRefreshCycleDurationGOOGLE";
13028         }
13029         case OP_vkGetPastPresentationTimingGOOGLE:
13030         {
13031             return "OP_vkGetPastPresentationTimingGOOGLE";
13032         }
13033 #endif
13034 #ifdef VK_EXT_discard_rectangles
13035         case OP_vkCmdSetDiscardRectangleEXT:
13036         {
13037             return "OP_vkCmdSetDiscardRectangleEXT";
13038         }
13039 #endif
13040 #ifdef VK_EXT_hdr_metadata
13041         case OP_vkSetHdrMetadataEXT:
13042         {
13043             return "OP_vkSetHdrMetadataEXT";
13044         }
13045 #endif
13046 #ifdef VK_MVK_ios_surface
13047         case OP_vkCreateIOSSurfaceMVK:
13048         {
13049             return "OP_vkCreateIOSSurfaceMVK";
13050         }
13051 #endif
13052 #ifdef VK_MVK_macos_surface
13053         case OP_vkCreateMacOSSurfaceMVK:
13054         {
13055             return "OP_vkCreateMacOSSurfaceMVK";
13056         }
13057 #endif
13058 #ifdef VK_EXT_debug_utils
13059         case OP_vkSetDebugUtilsObjectNameEXT:
13060         {
13061             return "OP_vkSetDebugUtilsObjectNameEXT";
13062         }
13063         case OP_vkSetDebugUtilsObjectTagEXT:
13064         {
13065             return "OP_vkSetDebugUtilsObjectTagEXT";
13066         }
13067         case OP_vkQueueBeginDebugUtilsLabelEXT:
13068         {
13069             return "OP_vkQueueBeginDebugUtilsLabelEXT";
13070         }
13071         case OP_vkQueueEndDebugUtilsLabelEXT:
13072         {
13073             return "OP_vkQueueEndDebugUtilsLabelEXT";
13074         }
13075         case OP_vkQueueInsertDebugUtilsLabelEXT:
13076         {
13077             return "OP_vkQueueInsertDebugUtilsLabelEXT";
13078         }
13079         case OP_vkCmdBeginDebugUtilsLabelEXT:
13080         {
13081             return "OP_vkCmdBeginDebugUtilsLabelEXT";
13082         }
13083         case OP_vkCmdEndDebugUtilsLabelEXT:
13084         {
13085             return "OP_vkCmdEndDebugUtilsLabelEXT";
13086         }
13087         case OP_vkCmdInsertDebugUtilsLabelEXT:
13088         {
13089             return "OP_vkCmdInsertDebugUtilsLabelEXT";
13090         }
13091         case OP_vkCreateDebugUtilsMessengerEXT:
13092         {
13093             return "OP_vkCreateDebugUtilsMessengerEXT";
13094         }
13095         case OP_vkDestroyDebugUtilsMessengerEXT:
13096         {
13097             return "OP_vkDestroyDebugUtilsMessengerEXT";
13098         }
13099         case OP_vkSubmitDebugUtilsMessageEXT:
13100         {
13101             return "OP_vkSubmitDebugUtilsMessageEXT";
13102         }
13103 #endif
13104 #ifdef VK_ANDROID_external_memory_android_hardware_buffer
13105         case OP_vkGetAndroidHardwareBufferPropertiesANDROID:
13106         {
13107             return "OP_vkGetAndroidHardwareBufferPropertiesANDROID";
13108         }
13109         case OP_vkGetMemoryAndroidHardwareBufferANDROID:
13110         {
13111             return "OP_vkGetMemoryAndroidHardwareBufferANDROID";
13112         }
13113 #endif
13114 #ifdef VK_EXT_sample_locations
13115         case OP_vkCmdSetSampleLocationsEXT:
13116         {
13117             return "OP_vkCmdSetSampleLocationsEXT";
13118         }
13119         case OP_vkGetPhysicalDeviceMultisamplePropertiesEXT:
13120         {
13121             return "OP_vkGetPhysicalDeviceMultisamplePropertiesEXT";
13122         }
13123 #endif
13124 #ifdef VK_EXT_validation_cache
13125         case OP_vkCreateValidationCacheEXT:
13126         {
13127             return "OP_vkCreateValidationCacheEXT";
13128         }
13129         case OP_vkDestroyValidationCacheEXT:
13130         {
13131             return "OP_vkDestroyValidationCacheEXT";
13132         }
13133         case OP_vkMergeValidationCachesEXT:
13134         {
13135             return "OP_vkMergeValidationCachesEXT";
13136         }
13137         case OP_vkGetValidationCacheDataEXT:
13138         {
13139             return "OP_vkGetValidationCacheDataEXT";
13140         }
13141 #endif
13142 #ifdef VK_EXT_external_memory_host
13143         case OP_vkGetMemoryHostPointerPropertiesEXT:
13144         {
13145             return "OP_vkGetMemoryHostPointerPropertiesEXT";
13146         }
13147 #endif
13148 #ifdef VK_AMD_buffer_marker
13149         case OP_vkCmdWriteBufferMarkerAMD:
13150         {
13151             return "OP_vkCmdWriteBufferMarkerAMD";
13152         }
13153 #endif
13154 #ifdef VK_NV_device_diagnostic_checkpoints
13155         case OP_vkCmdSetCheckpointNV:
13156         {
13157             return "OP_vkCmdSetCheckpointNV";
13158         }
13159         case OP_vkGetQueueCheckpointDataNV:
13160         {
13161             return "OP_vkGetQueueCheckpointDataNV";
13162         }
13163 #endif
13164 #ifdef VK_GOOGLE_address_space
13165         case OP_vkMapMemoryIntoAddressSpaceGOOGLE:
13166         {
13167             return "OP_vkMapMemoryIntoAddressSpaceGOOGLE";
13168         }
13169 #endif
13170 #ifdef VK_GOOGLE_color_buffer
13171         case OP_vkRegisterImageColorBufferGOOGLE:
13172         {
13173             return "OP_vkRegisterImageColorBufferGOOGLE";
13174         }
13175         case OP_vkRegisterBufferColorBufferGOOGLE:
13176         {
13177             return "OP_vkRegisterBufferColorBufferGOOGLE";
13178         }
13179 #endif
13180 #ifdef VK_GOOGLE_sized_descriptor_update_template
13181         case OP_vkUpdateDescriptorSetWithTemplateSizedGOOGLE:
13182         {
13183             return "OP_vkUpdateDescriptorSetWithTemplateSizedGOOGLE";
13184         }
13185 #endif
13186 #ifdef VK_GOOGLE_async_command_buffers
13187         case OP_vkBeginCommandBufferAsyncGOOGLE:
13188         {
13189             return "OP_vkBeginCommandBufferAsyncGOOGLE";
13190         }
13191         case OP_vkEndCommandBufferAsyncGOOGLE:
13192         {
13193             return "OP_vkEndCommandBufferAsyncGOOGLE";
13194         }
13195         case OP_vkResetCommandBufferAsyncGOOGLE:
13196         {
13197             return "OP_vkResetCommandBufferAsyncGOOGLE";
13198         }
13199         case OP_vkCommandBufferHostSyncGOOGLE:
13200         {
13201             return "OP_vkCommandBufferHostSyncGOOGLE";
13202         }
13203 #endif
13204 #ifdef VK_GOOGLE_create_resources_with_requirements
13205         case OP_vkCreateImageWithRequirementsGOOGLE:
13206         {
13207             return "OP_vkCreateImageWithRequirementsGOOGLE";
13208         }
13209         case OP_vkCreateBufferWithRequirementsGOOGLE:
13210         {
13211             return "OP_vkCreateBufferWithRequirementsGOOGLE";
13212         }
13213 #endif
13214 #ifdef VK_GOOGLE_address_space_info
13215         case OP_vkGetMemoryHostAddressInfoGOOGLE:
13216         {
13217             return "OP_vkGetMemoryHostAddressInfoGOOGLE";
13218         }
13219 #endif
13220 #ifdef VK_GOOGLE_free_memory_sync
13221         case OP_vkFreeMemorySyncGOOGLE:
13222         {
13223             return "OP_vkFreeMemorySyncGOOGLE";
13224         }
13225 #endif
13226 #ifdef VK_GOOGLE_async_queue_submit
13227         case OP_vkQueueHostSyncGOOGLE:
13228         {
13229             return "OP_vkQueueHostSyncGOOGLE";
13230         }
13231         case OP_vkQueueSubmitAsyncGOOGLE:
13232         {
13233             return "OP_vkQueueSubmitAsyncGOOGLE";
13234         }
13235         case OP_vkQueueWaitIdleAsyncGOOGLE:
13236         {
13237             return "OP_vkQueueWaitIdleAsyncGOOGLE";
13238         }
13239         case OP_vkQueueBindSparseAsyncGOOGLE:
13240         {
13241             return "OP_vkQueueBindSparseAsyncGOOGLE";
13242         }
13243 #endif
13244         default:
13245         {
13246             return "OP_UNKNOWN_API_CALL";
13247         }
13248     }
13249 }
13250 
13251 
13252 } // namespace goldfish_vk
13253