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 43 void marshal_VkApplicationInfo( 44 VulkanStreamGuest* vkStream, 45 const VkApplicationInfo* forMarshaling) 46 { 47 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 48 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 49 vkStream->putBe32(pNext_size); 50 if (pNext_size) 51 { 52 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 53 marshal_extension_struct(vkStream, forMarshaling->pNext); 54 } 55 vkStream->putString(forMarshaling->pApplicationName); 56 vkStream->write((uint32_t*)&forMarshaling->applicationVersion, sizeof(uint32_t)); 57 vkStream->putString(forMarshaling->pEngineName); 58 vkStream->write((uint32_t*)&forMarshaling->engineVersion, sizeof(uint32_t)); 59 vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t)); 60 } 61 62 void unmarshal_VkApplicationInfo( 63 VulkanStreamGuest* vkStream, 64 VkApplicationInfo* forUnmarshaling) 65 { 66 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 67 size_t pNext_size; 68 pNext_size = vkStream->getBe32(); 69 if (pNext_size) 70 { 71 uint64_t pNext_placeholder; 72 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 73 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 74 } 75 vkStream->loadStringInPlace((char**)&forUnmarshaling->pApplicationName); 76 vkStream->read((uint32_t*)&forUnmarshaling->applicationVersion, sizeof(uint32_t)); 77 vkStream->loadStringInPlace((char**)&forUnmarshaling->pEngineName); 78 vkStream->read((uint32_t*)&forUnmarshaling->engineVersion, sizeof(uint32_t)); 79 vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t)); 80 } 81 82 void marshal_VkInstanceCreateInfo( 83 VulkanStreamGuest* vkStream, 84 const VkInstanceCreateInfo* forMarshaling) 85 { 86 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 87 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 88 vkStream->putBe32(pNext_size); 89 if (pNext_size) 90 { 91 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 92 marshal_extension_struct(vkStream, forMarshaling->pNext); 93 } 94 vkStream->write((VkInstanceCreateFlags*)&forMarshaling->flags, sizeof(VkInstanceCreateFlags)); 95 // WARNING PTR CHECK 96 uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationInfo; 97 vkStream->putBe64(cgen_var_0); 98 if (forMarshaling->pApplicationInfo) 99 { 100 marshal_VkApplicationInfo(vkStream, (const VkApplicationInfo*)(forMarshaling->pApplicationInfo)); 101 } 102 vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t)); 103 saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount); 104 vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t)); 105 saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount); 106 } 107 108 void unmarshal_VkInstanceCreateInfo( 109 VulkanStreamGuest* vkStream, 110 VkInstanceCreateInfo* forUnmarshaling) 111 { 112 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 113 size_t pNext_size; 114 pNext_size = vkStream->getBe32(); 115 if (pNext_size) 116 { 117 uint64_t pNext_placeholder; 118 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 119 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 120 } 121 vkStream->read((VkInstanceCreateFlags*)&forUnmarshaling->flags, sizeof(VkInstanceCreateFlags)); 122 // WARNING PTR CHECK 123 const VkApplicationInfo* check_pApplicationInfo; 124 check_pApplicationInfo = (const VkApplicationInfo*)(uintptr_t)vkStream->getBe64(); 125 if (forUnmarshaling->pApplicationInfo) 126 { 127 if (!(check_pApplicationInfo)) 128 { 129 fprintf(stderr, "fatal: forUnmarshaling->pApplicationInfo inconsistent between guest and host\n"); 130 } 131 unmarshal_VkApplicationInfo(vkStream, (VkApplicationInfo*)(forUnmarshaling->pApplicationInfo)); 132 } 133 vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t)); 134 vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames); 135 vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t)); 136 vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames); 137 } 138 139 void marshal_VkAllocationCallbacks( 140 VulkanStreamGuest* vkStream, 141 const VkAllocationCallbacks* forMarshaling) 142 { 143 // WARNING PTR CHECK 144 uint64_t cgen_var_2 = (uint64_t)(uintptr_t)forMarshaling->pUserData; 145 vkStream->putBe64(cgen_var_2); 146 if (forMarshaling->pUserData) 147 { 148 vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t)); 149 } 150 uint64_t cgen_var_3 = (uint64_t)forMarshaling->pfnAllocation; 151 vkStream->putBe64(cgen_var_3); 152 uint64_t cgen_var_4 = (uint64_t)forMarshaling->pfnReallocation; 153 vkStream->putBe64(cgen_var_4); 154 uint64_t cgen_var_5 = (uint64_t)forMarshaling->pfnFree; 155 vkStream->putBe64(cgen_var_5); 156 uint64_t cgen_var_6 = (uint64_t)forMarshaling->pfnInternalAllocation; 157 vkStream->putBe64(cgen_var_6); 158 uint64_t cgen_var_7 = (uint64_t)forMarshaling->pfnInternalFree; 159 vkStream->putBe64(cgen_var_7); 160 } 161 162 void unmarshal_VkAllocationCallbacks( 163 VulkanStreamGuest* vkStream, 164 VkAllocationCallbacks* forUnmarshaling) 165 { 166 // WARNING PTR CHECK 167 void* check_pUserData; 168 check_pUserData = (void*)(uintptr_t)vkStream->getBe64(); 169 if (forUnmarshaling->pUserData) 170 { 171 if (!(check_pUserData)) 172 { 173 fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n"); 174 } 175 vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t)); 176 } 177 forUnmarshaling->pfnAllocation = (PFN_vkAllocationFunction)vkStream->getBe64(); 178 forUnmarshaling->pfnReallocation = (PFN_vkReallocationFunction)vkStream->getBe64(); 179 forUnmarshaling->pfnFree = (PFN_vkFreeFunction)vkStream->getBe64(); 180 forUnmarshaling->pfnInternalAllocation = (PFN_vkInternalAllocationNotification)vkStream->getBe64(); 181 forUnmarshaling->pfnInternalFree = (PFN_vkInternalFreeNotification)vkStream->getBe64(); 182 } 183 184 void marshal_VkPhysicalDeviceFeatures( 185 VulkanStreamGuest* vkStream, 186 const VkPhysicalDeviceFeatures* forMarshaling) 187 { 188 vkStream->write((VkBool32*)&forMarshaling->robustBufferAccess, sizeof(VkBool32)); 189 vkStream->write((VkBool32*)&forMarshaling->fullDrawIndexUint32, sizeof(VkBool32)); 190 vkStream->write((VkBool32*)&forMarshaling->imageCubeArray, sizeof(VkBool32)); 191 vkStream->write((VkBool32*)&forMarshaling->independentBlend, sizeof(VkBool32)); 192 vkStream->write((VkBool32*)&forMarshaling->geometryShader, sizeof(VkBool32)); 193 vkStream->write((VkBool32*)&forMarshaling->tessellationShader, sizeof(VkBool32)); 194 vkStream->write((VkBool32*)&forMarshaling->sampleRateShading, sizeof(VkBool32)); 195 vkStream->write((VkBool32*)&forMarshaling->dualSrcBlend, sizeof(VkBool32)); 196 vkStream->write((VkBool32*)&forMarshaling->logicOp, sizeof(VkBool32)); 197 vkStream->write((VkBool32*)&forMarshaling->multiDrawIndirect, sizeof(VkBool32)); 198 vkStream->write((VkBool32*)&forMarshaling->drawIndirectFirstInstance, sizeof(VkBool32)); 199 vkStream->write((VkBool32*)&forMarshaling->depthClamp, sizeof(VkBool32)); 200 vkStream->write((VkBool32*)&forMarshaling->depthBiasClamp, sizeof(VkBool32)); 201 vkStream->write((VkBool32*)&forMarshaling->fillModeNonSolid, sizeof(VkBool32)); 202 vkStream->write((VkBool32*)&forMarshaling->depthBounds, sizeof(VkBool32)); 203 vkStream->write((VkBool32*)&forMarshaling->wideLines, sizeof(VkBool32)); 204 vkStream->write((VkBool32*)&forMarshaling->largePoints, sizeof(VkBool32)); 205 vkStream->write((VkBool32*)&forMarshaling->alphaToOne, sizeof(VkBool32)); 206 vkStream->write((VkBool32*)&forMarshaling->multiViewport, sizeof(VkBool32)); 207 vkStream->write((VkBool32*)&forMarshaling->samplerAnisotropy, sizeof(VkBool32)); 208 vkStream->write((VkBool32*)&forMarshaling->textureCompressionETC2, sizeof(VkBool32)); 209 vkStream->write((VkBool32*)&forMarshaling->textureCompressionASTC_LDR, sizeof(VkBool32)); 210 vkStream->write((VkBool32*)&forMarshaling->textureCompressionBC, sizeof(VkBool32)); 211 vkStream->write((VkBool32*)&forMarshaling->occlusionQueryPrecise, sizeof(VkBool32)); 212 vkStream->write((VkBool32*)&forMarshaling->pipelineStatisticsQuery, sizeof(VkBool32)); 213 vkStream->write((VkBool32*)&forMarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32)); 214 vkStream->write((VkBool32*)&forMarshaling->fragmentStoresAndAtomics, sizeof(VkBool32)); 215 vkStream->write((VkBool32*)&forMarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32)); 216 vkStream->write((VkBool32*)&forMarshaling->shaderImageGatherExtended, sizeof(VkBool32)); 217 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32)); 218 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageMultisample, sizeof(VkBool32)); 219 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32)); 220 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32)); 221 vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32)); 222 vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32)); 223 vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32)); 224 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32)); 225 vkStream->write((VkBool32*)&forMarshaling->shaderClipDistance, sizeof(VkBool32)); 226 vkStream->write((VkBool32*)&forMarshaling->shaderCullDistance, sizeof(VkBool32)); 227 vkStream->write((VkBool32*)&forMarshaling->shaderFloat64, sizeof(VkBool32)); 228 vkStream->write((VkBool32*)&forMarshaling->shaderInt64, sizeof(VkBool32)); 229 vkStream->write((VkBool32*)&forMarshaling->shaderInt16, sizeof(VkBool32)); 230 vkStream->write((VkBool32*)&forMarshaling->shaderResourceResidency, sizeof(VkBool32)); 231 vkStream->write((VkBool32*)&forMarshaling->shaderResourceMinLod, sizeof(VkBool32)); 232 vkStream->write((VkBool32*)&forMarshaling->sparseBinding, sizeof(VkBool32)); 233 vkStream->write((VkBool32*)&forMarshaling->sparseResidencyBuffer, sizeof(VkBool32)); 234 vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage2D, sizeof(VkBool32)); 235 vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage3D, sizeof(VkBool32)); 236 vkStream->write((VkBool32*)&forMarshaling->sparseResidency2Samples, sizeof(VkBool32)); 237 vkStream->write((VkBool32*)&forMarshaling->sparseResidency4Samples, sizeof(VkBool32)); 238 vkStream->write((VkBool32*)&forMarshaling->sparseResidency8Samples, sizeof(VkBool32)); 239 vkStream->write((VkBool32*)&forMarshaling->sparseResidency16Samples, sizeof(VkBool32)); 240 vkStream->write((VkBool32*)&forMarshaling->sparseResidencyAliased, sizeof(VkBool32)); 241 vkStream->write((VkBool32*)&forMarshaling->variableMultisampleRate, sizeof(VkBool32)); 242 vkStream->write((VkBool32*)&forMarshaling->inheritedQueries, sizeof(VkBool32)); 243 } 244 245 void unmarshal_VkPhysicalDeviceFeatures( 246 VulkanStreamGuest* vkStream, 247 VkPhysicalDeviceFeatures* forUnmarshaling) 248 { 249 vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccess, sizeof(VkBool32)); 250 vkStream->read((VkBool32*)&forUnmarshaling->fullDrawIndexUint32, sizeof(VkBool32)); 251 vkStream->read((VkBool32*)&forUnmarshaling->imageCubeArray, sizeof(VkBool32)); 252 vkStream->read((VkBool32*)&forUnmarshaling->independentBlend, sizeof(VkBool32)); 253 vkStream->read((VkBool32*)&forUnmarshaling->geometryShader, sizeof(VkBool32)); 254 vkStream->read((VkBool32*)&forUnmarshaling->tessellationShader, sizeof(VkBool32)); 255 vkStream->read((VkBool32*)&forUnmarshaling->sampleRateShading, sizeof(VkBool32)); 256 vkStream->read((VkBool32*)&forUnmarshaling->dualSrcBlend, sizeof(VkBool32)); 257 vkStream->read((VkBool32*)&forUnmarshaling->logicOp, sizeof(VkBool32)); 258 vkStream->read((VkBool32*)&forUnmarshaling->multiDrawIndirect, sizeof(VkBool32)); 259 vkStream->read((VkBool32*)&forUnmarshaling->drawIndirectFirstInstance, sizeof(VkBool32)); 260 vkStream->read((VkBool32*)&forUnmarshaling->depthClamp, sizeof(VkBool32)); 261 vkStream->read((VkBool32*)&forUnmarshaling->depthBiasClamp, sizeof(VkBool32)); 262 vkStream->read((VkBool32*)&forUnmarshaling->fillModeNonSolid, sizeof(VkBool32)); 263 vkStream->read((VkBool32*)&forUnmarshaling->depthBounds, sizeof(VkBool32)); 264 vkStream->read((VkBool32*)&forUnmarshaling->wideLines, sizeof(VkBool32)); 265 vkStream->read((VkBool32*)&forUnmarshaling->largePoints, sizeof(VkBool32)); 266 vkStream->read((VkBool32*)&forUnmarshaling->alphaToOne, sizeof(VkBool32)); 267 vkStream->read((VkBool32*)&forUnmarshaling->multiViewport, sizeof(VkBool32)); 268 vkStream->read((VkBool32*)&forUnmarshaling->samplerAnisotropy, sizeof(VkBool32)); 269 vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionETC2, sizeof(VkBool32)); 270 vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionASTC_LDR, sizeof(VkBool32)); 271 vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionBC, sizeof(VkBool32)); 272 vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryPrecise, sizeof(VkBool32)); 273 vkStream->read((VkBool32*)&forUnmarshaling->pipelineStatisticsQuery, sizeof(VkBool32)); 274 vkStream->read((VkBool32*)&forUnmarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32)); 275 vkStream->read((VkBool32*)&forUnmarshaling->fragmentStoresAndAtomics, sizeof(VkBool32)); 276 vkStream->read((VkBool32*)&forUnmarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32)); 277 vkStream->read((VkBool32*)&forUnmarshaling->shaderImageGatherExtended, sizeof(VkBool32)); 278 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32)); 279 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageMultisample, sizeof(VkBool32)); 280 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32)); 281 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32)); 282 vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32)); 283 vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32)); 284 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32)); 285 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32)); 286 vkStream->read((VkBool32*)&forUnmarshaling->shaderClipDistance, sizeof(VkBool32)); 287 vkStream->read((VkBool32*)&forUnmarshaling->shaderCullDistance, sizeof(VkBool32)); 288 vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat64, sizeof(VkBool32)); 289 vkStream->read((VkBool32*)&forUnmarshaling->shaderInt64, sizeof(VkBool32)); 290 vkStream->read((VkBool32*)&forUnmarshaling->shaderInt16, sizeof(VkBool32)); 291 vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceResidency, sizeof(VkBool32)); 292 vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceMinLod, sizeof(VkBool32)); 293 vkStream->read((VkBool32*)&forUnmarshaling->sparseBinding, sizeof(VkBool32)); 294 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyBuffer, sizeof(VkBool32)); 295 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage2D, sizeof(VkBool32)); 296 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage3D, sizeof(VkBool32)); 297 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency2Samples, sizeof(VkBool32)); 298 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency4Samples, sizeof(VkBool32)); 299 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency8Samples, sizeof(VkBool32)); 300 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency16Samples, sizeof(VkBool32)); 301 vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyAliased, sizeof(VkBool32)); 302 vkStream->read((VkBool32*)&forUnmarshaling->variableMultisampleRate, sizeof(VkBool32)); 303 vkStream->read((VkBool32*)&forUnmarshaling->inheritedQueries, sizeof(VkBool32)); 304 } 305 306 void marshal_VkFormatProperties( 307 VulkanStreamGuest* vkStream, 308 const VkFormatProperties* forMarshaling) 309 { 310 vkStream->write((VkFormatFeatureFlags*)&forMarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags)); 311 vkStream->write((VkFormatFeatureFlags*)&forMarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags)); 312 vkStream->write((VkFormatFeatureFlags*)&forMarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags)); 313 } 314 315 void unmarshal_VkFormatProperties( 316 VulkanStreamGuest* vkStream, 317 VkFormatProperties* forUnmarshaling) 318 { 319 vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags)); 320 vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags)); 321 vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags)); 322 } 323 324 void marshal_VkExtent3D( 325 VulkanStreamGuest* vkStream, 326 const VkExtent3D* forMarshaling) 327 { 328 vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t)); 329 vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t)); 330 vkStream->write((uint32_t*)&forMarshaling->depth, sizeof(uint32_t)); 331 } 332 333 void unmarshal_VkExtent3D( 334 VulkanStreamGuest* vkStream, 335 VkExtent3D* forUnmarshaling) 336 { 337 vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t)); 338 vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t)); 339 vkStream->read((uint32_t*)&forUnmarshaling->depth, sizeof(uint32_t)); 340 } 341 342 void marshal_VkImageFormatProperties( 343 VulkanStreamGuest* vkStream, 344 const VkImageFormatProperties* forMarshaling) 345 { 346 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->maxExtent)); 347 vkStream->write((uint32_t*)&forMarshaling->maxMipLevels, sizeof(uint32_t)); 348 vkStream->write((uint32_t*)&forMarshaling->maxArrayLayers, sizeof(uint32_t)); 349 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampleCounts, sizeof(VkSampleCountFlags)); 350 vkStream->write((VkDeviceSize*)&forMarshaling->maxResourceSize, sizeof(VkDeviceSize)); 351 } 352 353 void unmarshal_VkImageFormatProperties( 354 VulkanStreamGuest* vkStream, 355 VkImageFormatProperties* forUnmarshaling) 356 { 357 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->maxExtent)); 358 vkStream->read((uint32_t*)&forUnmarshaling->maxMipLevels, sizeof(uint32_t)); 359 vkStream->read((uint32_t*)&forUnmarshaling->maxArrayLayers, sizeof(uint32_t)); 360 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampleCounts, sizeof(VkSampleCountFlags)); 361 vkStream->read((VkDeviceSize*)&forUnmarshaling->maxResourceSize, sizeof(VkDeviceSize)); 362 } 363 364 void marshal_VkPhysicalDeviceLimits( 365 VulkanStreamGuest* vkStream, 366 const VkPhysicalDeviceLimits* forMarshaling) 367 { 368 vkStream->write((uint32_t*)&forMarshaling->maxImageDimension1D, sizeof(uint32_t)); 369 vkStream->write((uint32_t*)&forMarshaling->maxImageDimension2D, sizeof(uint32_t)); 370 vkStream->write((uint32_t*)&forMarshaling->maxImageDimension3D, sizeof(uint32_t)); 371 vkStream->write((uint32_t*)&forMarshaling->maxImageDimensionCube, sizeof(uint32_t)); 372 vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t)); 373 vkStream->write((uint32_t*)&forMarshaling->maxTexelBufferElements, sizeof(uint32_t)); 374 vkStream->write((uint32_t*)&forMarshaling->maxUniformBufferRange, sizeof(uint32_t)); 375 vkStream->write((uint32_t*)&forMarshaling->maxStorageBufferRange, sizeof(uint32_t)); 376 vkStream->write((uint32_t*)&forMarshaling->maxPushConstantsSize, sizeof(uint32_t)); 377 vkStream->write((uint32_t*)&forMarshaling->maxMemoryAllocationCount, sizeof(uint32_t)); 378 vkStream->write((uint32_t*)&forMarshaling->maxSamplerAllocationCount, sizeof(uint32_t)); 379 vkStream->write((VkDeviceSize*)&forMarshaling->bufferImageGranularity, sizeof(VkDeviceSize)); 380 vkStream->write((VkDeviceSize*)&forMarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize)); 381 vkStream->write((uint32_t*)&forMarshaling->maxBoundDescriptorSets, sizeof(uint32_t)); 382 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t)); 383 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t)); 384 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t)); 385 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t)); 386 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t)); 387 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t)); 388 vkStream->write((uint32_t*)&forMarshaling->maxPerStageResources, sizeof(uint32_t)); 389 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSamplers, sizeof(uint32_t)); 390 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t)); 391 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t)); 392 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t)); 393 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t)); 394 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t)); 395 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t)); 396 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t)); 397 vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributes, sizeof(uint32_t)); 398 vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindings, sizeof(uint32_t)); 399 vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t)); 400 vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindingStride, sizeof(uint32_t)); 401 vkStream->write((uint32_t*)&forMarshaling->maxVertexOutputComponents, sizeof(uint32_t)); 402 vkStream->write((uint32_t*)&forMarshaling->maxTessellationGenerationLevel, sizeof(uint32_t)); 403 vkStream->write((uint32_t*)&forMarshaling->maxTessellationPatchSize, sizeof(uint32_t)); 404 vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t)); 405 vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t)); 406 vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t)); 407 vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t)); 408 vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t)); 409 vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t)); 410 vkStream->write((uint32_t*)&forMarshaling->maxGeometryShaderInvocations, sizeof(uint32_t)); 411 vkStream->write((uint32_t*)&forMarshaling->maxGeometryInputComponents, sizeof(uint32_t)); 412 vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputComponents, sizeof(uint32_t)); 413 vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputVertices, sizeof(uint32_t)); 414 vkStream->write((uint32_t*)&forMarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t)); 415 vkStream->write((uint32_t*)&forMarshaling->maxFragmentInputComponents, sizeof(uint32_t)); 416 vkStream->write((uint32_t*)&forMarshaling->maxFragmentOutputAttachments, sizeof(uint32_t)); 417 vkStream->write((uint32_t*)&forMarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t)); 418 vkStream->write((uint32_t*)&forMarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t)); 419 vkStream->write((uint32_t*)&forMarshaling->maxComputeSharedMemorySize, sizeof(uint32_t)); 420 vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t)); 421 vkStream->write((uint32_t*)&forMarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t)); 422 vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t)); 423 vkStream->write((uint32_t*)&forMarshaling->subPixelPrecisionBits, sizeof(uint32_t)); 424 vkStream->write((uint32_t*)&forMarshaling->subTexelPrecisionBits, sizeof(uint32_t)); 425 vkStream->write((uint32_t*)&forMarshaling->mipmapPrecisionBits, sizeof(uint32_t)); 426 vkStream->write((uint32_t*)&forMarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t)); 427 vkStream->write((uint32_t*)&forMarshaling->maxDrawIndirectCount, sizeof(uint32_t)); 428 vkStream->write((float*)&forMarshaling->maxSamplerLodBias, sizeof(float)); 429 vkStream->write((float*)&forMarshaling->maxSamplerAnisotropy, sizeof(float)); 430 vkStream->write((uint32_t*)&forMarshaling->maxViewports, sizeof(uint32_t)); 431 vkStream->write((uint32_t*)forMarshaling->maxViewportDimensions, 2 * sizeof(uint32_t)); 432 vkStream->write((float*)forMarshaling->viewportBoundsRange, 2 * sizeof(float)); 433 vkStream->write((uint32_t*)&forMarshaling->viewportSubPixelBits, sizeof(uint32_t)); 434 uint64_t cgen_var_14 = (uint64_t)forMarshaling->minMemoryMapAlignment; 435 vkStream->putBe64(cgen_var_14); 436 vkStream->write((VkDeviceSize*)&forMarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize)); 437 vkStream->write((VkDeviceSize*)&forMarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize)); 438 vkStream->write((VkDeviceSize*)&forMarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize)); 439 vkStream->write((int32_t*)&forMarshaling->minTexelOffset, sizeof(int32_t)); 440 vkStream->write((uint32_t*)&forMarshaling->maxTexelOffset, sizeof(uint32_t)); 441 vkStream->write((int32_t*)&forMarshaling->minTexelGatherOffset, sizeof(int32_t)); 442 vkStream->write((uint32_t*)&forMarshaling->maxTexelGatherOffset, sizeof(uint32_t)); 443 vkStream->write((float*)&forMarshaling->minInterpolationOffset, sizeof(float)); 444 vkStream->write((float*)&forMarshaling->maxInterpolationOffset, sizeof(float)); 445 vkStream->write((uint32_t*)&forMarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t)); 446 vkStream->write((uint32_t*)&forMarshaling->maxFramebufferWidth, sizeof(uint32_t)); 447 vkStream->write((uint32_t*)&forMarshaling->maxFramebufferHeight, sizeof(uint32_t)); 448 vkStream->write((uint32_t*)&forMarshaling->maxFramebufferLayers, sizeof(uint32_t)); 449 vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags)); 450 vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags)); 451 vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags)); 452 vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags)); 453 vkStream->write((uint32_t*)&forMarshaling->maxColorAttachments, sizeof(uint32_t)); 454 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags)); 455 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags)); 456 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags)); 457 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags)); 458 vkStream->write((VkSampleCountFlags*)&forMarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags)); 459 vkStream->write((uint32_t*)&forMarshaling->maxSampleMaskWords, sizeof(uint32_t)); 460 vkStream->write((VkBool32*)&forMarshaling->timestampComputeAndGraphics, sizeof(VkBool32)); 461 vkStream->write((float*)&forMarshaling->timestampPeriod, sizeof(float)); 462 vkStream->write((uint32_t*)&forMarshaling->maxClipDistances, sizeof(uint32_t)); 463 vkStream->write((uint32_t*)&forMarshaling->maxCullDistances, sizeof(uint32_t)); 464 vkStream->write((uint32_t*)&forMarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t)); 465 vkStream->write((uint32_t*)&forMarshaling->discreteQueuePriorities, sizeof(uint32_t)); 466 vkStream->write((float*)forMarshaling->pointSizeRange, 2 * sizeof(float)); 467 vkStream->write((float*)forMarshaling->lineWidthRange, 2 * sizeof(float)); 468 vkStream->write((float*)&forMarshaling->pointSizeGranularity, sizeof(float)); 469 vkStream->write((float*)&forMarshaling->lineWidthGranularity, sizeof(float)); 470 vkStream->write((VkBool32*)&forMarshaling->strictLines, sizeof(VkBool32)); 471 vkStream->write((VkBool32*)&forMarshaling->standardSampleLocations, sizeof(VkBool32)); 472 vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize)); 473 vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize)); 474 vkStream->write((VkDeviceSize*)&forMarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize)); 475 } 476 477 void unmarshal_VkPhysicalDeviceLimits( 478 VulkanStreamGuest* vkStream, 479 VkPhysicalDeviceLimits* forUnmarshaling) 480 { 481 vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension1D, sizeof(uint32_t)); 482 vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension2D, sizeof(uint32_t)); 483 vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension3D, sizeof(uint32_t)); 484 vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimensionCube, sizeof(uint32_t)); 485 vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t)); 486 vkStream->read((uint32_t*)&forUnmarshaling->maxTexelBufferElements, sizeof(uint32_t)); 487 vkStream->read((uint32_t*)&forUnmarshaling->maxUniformBufferRange, sizeof(uint32_t)); 488 vkStream->read((uint32_t*)&forUnmarshaling->maxStorageBufferRange, sizeof(uint32_t)); 489 vkStream->read((uint32_t*)&forUnmarshaling->maxPushConstantsSize, sizeof(uint32_t)); 490 vkStream->read((uint32_t*)&forUnmarshaling->maxMemoryAllocationCount, sizeof(uint32_t)); 491 vkStream->read((uint32_t*)&forUnmarshaling->maxSamplerAllocationCount, sizeof(uint32_t)); 492 vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferImageGranularity, sizeof(VkDeviceSize)); 493 vkStream->read((VkDeviceSize*)&forUnmarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize)); 494 vkStream->read((uint32_t*)&forUnmarshaling->maxBoundDescriptorSets, sizeof(uint32_t)); 495 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t)); 496 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t)); 497 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t)); 498 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t)); 499 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t)); 500 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t)); 501 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageResources, sizeof(uint32_t)); 502 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSamplers, sizeof(uint32_t)); 503 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t)); 504 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t)); 505 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t)); 506 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t)); 507 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t)); 508 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t)); 509 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t)); 510 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributes, sizeof(uint32_t)); 511 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindings, sizeof(uint32_t)); 512 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t)); 513 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindingStride, sizeof(uint32_t)); 514 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexOutputComponents, sizeof(uint32_t)); 515 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationGenerationLevel, sizeof(uint32_t)); 516 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationPatchSize, sizeof(uint32_t)); 517 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t)); 518 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t)); 519 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t)); 520 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t)); 521 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t)); 522 vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t)); 523 vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryShaderInvocations, sizeof(uint32_t)); 524 vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryInputComponents, sizeof(uint32_t)); 525 vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputComponents, sizeof(uint32_t)); 526 vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputVertices, sizeof(uint32_t)); 527 vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t)); 528 vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentInputComponents, sizeof(uint32_t)); 529 vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentOutputAttachments, sizeof(uint32_t)); 530 vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t)); 531 vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t)); 532 vkStream->read((uint32_t*)&forUnmarshaling->maxComputeSharedMemorySize, sizeof(uint32_t)); 533 vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t)); 534 vkStream->read((uint32_t*)&forUnmarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t)); 535 vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t)); 536 vkStream->read((uint32_t*)&forUnmarshaling->subPixelPrecisionBits, sizeof(uint32_t)); 537 vkStream->read((uint32_t*)&forUnmarshaling->subTexelPrecisionBits, sizeof(uint32_t)); 538 vkStream->read((uint32_t*)&forUnmarshaling->mipmapPrecisionBits, sizeof(uint32_t)); 539 vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t)); 540 vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndirectCount, sizeof(uint32_t)); 541 vkStream->read((float*)&forUnmarshaling->maxSamplerLodBias, sizeof(float)); 542 vkStream->read((float*)&forUnmarshaling->maxSamplerAnisotropy, sizeof(float)); 543 vkStream->read((uint32_t*)&forUnmarshaling->maxViewports, sizeof(uint32_t)); 544 vkStream->read((uint32_t*)forUnmarshaling->maxViewportDimensions, 2 * sizeof(uint32_t)); 545 vkStream->read((float*)forUnmarshaling->viewportBoundsRange, 2 * sizeof(float)); 546 vkStream->read((uint32_t*)&forUnmarshaling->viewportSubPixelBits, sizeof(uint32_t)); 547 forUnmarshaling->minMemoryMapAlignment = (size_t)vkStream->getBe64(); 548 vkStream->read((VkDeviceSize*)&forUnmarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize)); 549 vkStream->read((VkDeviceSize*)&forUnmarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize)); 550 vkStream->read((VkDeviceSize*)&forUnmarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize)); 551 vkStream->read((int32_t*)&forUnmarshaling->minTexelOffset, sizeof(int32_t)); 552 vkStream->read((uint32_t*)&forUnmarshaling->maxTexelOffset, sizeof(uint32_t)); 553 vkStream->read((int32_t*)&forUnmarshaling->minTexelGatherOffset, sizeof(int32_t)); 554 vkStream->read((uint32_t*)&forUnmarshaling->maxTexelGatherOffset, sizeof(uint32_t)); 555 vkStream->read((float*)&forUnmarshaling->minInterpolationOffset, sizeof(float)); 556 vkStream->read((float*)&forUnmarshaling->maxInterpolationOffset, sizeof(float)); 557 vkStream->read((uint32_t*)&forUnmarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t)); 558 vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferWidth, sizeof(uint32_t)); 559 vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferHeight, sizeof(uint32_t)); 560 vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferLayers, sizeof(uint32_t)); 561 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags)); 562 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags)); 563 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags)); 564 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags)); 565 vkStream->read((uint32_t*)&forUnmarshaling->maxColorAttachments, sizeof(uint32_t)); 566 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags)); 567 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags)); 568 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags)); 569 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags)); 570 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags)); 571 vkStream->read((uint32_t*)&forUnmarshaling->maxSampleMaskWords, sizeof(uint32_t)); 572 vkStream->read((VkBool32*)&forUnmarshaling->timestampComputeAndGraphics, sizeof(VkBool32)); 573 vkStream->read((float*)&forUnmarshaling->timestampPeriod, sizeof(float)); 574 vkStream->read((uint32_t*)&forUnmarshaling->maxClipDistances, sizeof(uint32_t)); 575 vkStream->read((uint32_t*)&forUnmarshaling->maxCullDistances, sizeof(uint32_t)); 576 vkStream->read((uint32_t*)&forUnmarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t)); 577 vkStream->read((uint32_t*)&forUnmarshaling->discreteQueuePriorities, sizeof(uint32_t)); 578 vkStream->read((float*)forUnmarshaling->pointSizeRange, 2 * sizeof(float)); 579 vkStream->read((float*)forUnmarshaling->lineWidthRange, 2 * sizeof(float)); 580 vkStream->read((float*)&forUnmarshaling->pointSizeGranularity, sizeof(float)); 581 vkStream->read((float*)&forUnmarshaling->lineWidthGranularity, sizeof(float)); 582 vkStream->read((VkBool32*)&forUnmarshaling->strictLines, sizeof(VkBool32)); 583 vkStream->read((VkBool32*)&forUnmarshaling->standardSampleLocations, sizeof(VkBool32)); 584 vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize)); 585 vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize)); 586 vkStream->read((VkDeviceSize*)&forUnmarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize)); 587 } 588 589 void marshal_VkPhysicalDeviceSparseProperties( 590 VulkanStreamGuest* vkStream, 591 const VkPhysicalDeviceSparseProperties* forMarshaling) 592 { 593 vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DBlockShape, sizeof(VkBool32)); 594 vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32)); 595 vkStream->write((VkBool32*)&forMarshaling->residencyStandard3DBlockShape, sizeof(VkBool32)); 596 vkStream->write((VkBool32*)&forMarshaling->residencyAlignedMipSize, sizeof(VkBool32)); 597 vkStream->write((VkBool32*)&forMarshaling->residencyNonResidentStrict, sizeof(VkBool32)); 598 } 599 600 void unmarshal_VkPhysicalDeviceSparseProperties( 601 VulkanStreamGuest* vkStream, 602 VkPhysicalDeviceSparseProperties* forUnmarshaling) 603 { 604 vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DBlockShape, sizeof(VkBool32)); 605 vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32)); 606 vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard3DBlockShape, sizeof(VkBool32)); 607 vkStream->read((VkBool32*)&forUnmarshaling->residencyAlignedMipSize, sizeof(VkBool32)); 608 vkStream->read((VkBool32*)&forUnmarshaling->residencyNonResidentStrict, sizeof(VkBool32)); 609 } 610 611 void marshal_VkPhysicalDeviceProperties( 612 VulkanStreamGuest* vkStream, 613 const VkPhysicalDeviceProperties* forMarshaling) 614 { 615 vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t)); 616 vkStream->write((uint32_t*)&forMarshaling->driverVersion, sizeof(uint32_t)); 617 vkStream->write((uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t)); 618 vkStream->write((uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t)); 619 vkStream->write((VkPhysicalDeviceType*)&forMarshaling->deviceType, sizeof(VkPhysicalDeviceType)); 620 vkStream->write((char*)forMarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char)); 621 vkStream->write((uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t)); 622 marshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forMarshaling->limits)); 623 marshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forMarshaling->sparseProperties)); 624 } 625 626 void unmarshal_VkPhysicalDeviceProperties( 627 VulkanStreamGuest* vkStream, 628 VkPhysicalDeviceProperties* forUnmarshaling) 629 { 630 vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t)); 631 vkStream->read((uint32_t*)&forUnmarshaling->driverVersion, sizeof(uint32_t)); 632 vkStream->read((uint32_t*)&forUnmarshaling->vendorID, sizeof(uint32_t)); 633 vkStream->read((uint32_t*)&forUnmarshaling->deviceID, sizeof(uint32_t)); 634 vkStream->read((VkPhysicalDeviceType*)&forUnmarshaling->deviceType, sizeof(VkPhysicalDeviceType)); 635 vkStream->read((char*)forUnmarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char)); 636 vkStream->read((uint8_t*)forUnmarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t)); 637 unmarshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forUnmarshaling->limits)); 638 unmarshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forUnmarshaling->sparseProperties)); 639 } 640 641 void marshal_VkQueueFamilyProperties( 642 VulkanStreamGuest* vkStream, 643 const VkQueueFamilyProperties* forMarshaling) 644 { 645 vkStream->write((VkQueueFlags*)&forMarshaling->queueFlags, sizeof(VkQueueFlags)); 646 vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t)); 647 vkStream->write((uint32_t*)&forMarshaling->timestampValidBits, sizeof(uint32_t)); 648 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->minImageTransferGranularity)); 649 } 650 651 void unmarshal_VkQueueFamilyProperties( 652 VulkanStreamGuest* vkStream, 653 VkQueueFamilyProperties* forUnmarshaling) 654 { 655 vkStream->read((VkQueueFlags*)&forUnmarshaling->queueFlags, sizeof(VkQueueFlags)); 656 vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t)); 657 vkStream->read((uint32_t*)&forUnmarshaling->timestampValidBits, sizeof(uint32_t)); 658 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->minImageTransferGranularity)); 659 } 660 661 void marshal_VkMemoryType( 662 VulkanStreamGuest* vkStream, 663 const VkMemoryType* forMarshaling) 664 { 665 vkStream->write((VkMemoryPropertyFlags*)&forMarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags)); 666 vkStream->write((uint32_t*)&forMarshaling->heapIndex, sizeof(uint32_t)); 667 } 668 669 void unmarshal_VkMemoryType( 670 VulkanStreamGuest* vkStream, 671 VkMemoryType* forUnmarshaling) 672 { 673 vkStream->read((VkMemoryPropertyFlags*)&forUnmarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags)); 674 vkStream->read((uint32_t*)&forUnmarshaling->heapIndex, sizeof(uint32_t)); 675 } 676 677 void marshal_VkMemoryHeap( 678 VulkanStreamGuest* vkStream, 679 const VkMemoryHeap* forMarshaling) 680 { 681 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 682 vkStream->write((VkMemoryHeapFlags*)&forMarshaling->flags, sizeof(VkMemoryHeapFlags)); 683 } 684 685 void unmarshal_VkMemoryHeap( 686 VulkanStreamGuest* vkStream, 687 VkMemoryHeap* forUnmarshaling) 688 { 689 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 690 vkStream->read((VkMemoryHeapFlags*)&forUnmarshaling->flags, sizeof(VkMemoryHeapFlags)); 691 } 692 693 void marshal_VkPhysicalDeviceMemoryProperties( 694 VulkanStreamGuest* vkStream, 695 const VkPhysicalDeviceMemoryProperties* forMarshaling) 696 { 697 vkStream->write((uint32_t*)&forMarshaling->memoryTypeCount, sizeof(uint32_t)); 698 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i) 699 { 700 marshal_VkMemoryType(vkStream, (VkMemoryType*)(forMarshaling->memoryTypes + i)); 701 } 702 vkStream->write((uint32_t*)&forMarshaling->memoryHeapCount, sizeof(uint32_t)); 703 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i) 704 { 705 marshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forMarshaling->memoryHeaps + i)); 706 } 707 } 708 709 void unmarshal_VkPhysicalDeviceMemoryProperties( 710 VulkanStreamGuest* vkStream, 711 VkPhysicalDeviceMemoryProperties* forUnmarshaling) 712 { 713 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeCount, sizeof(uint32_t)); 714 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i) 715 { 716 unmarshal_VkMemoryType(vkStream, (VkMemoryType*)(forUnmarshaling->memoryTypes + i)); 717 } 718 vkStream->read((uint32_t*)&forUnmarshaling->memoryHeapCount, sizeof(uint32_t)); 719 for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i) 720 { 721 unmarshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forUnmarshaling->memoryHeaps + i)); 722 } 723 } 724 725 void marshal_VkDeviceQueueCreateInfo( 726 VulkanStreamGuest* vkStream, 727 const VkDeviceQueueCreateInfo* forMarshaling) 728 { 729 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 730 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 731 vkStream->putBe32(pNext_size); 732 if (pNext_size) 733 { 734 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 735 marshal_extension_struct(vkStream, forMarshaling->pNext); 736 } 737 vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceQueueCreateFlags)); 738 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t)); 739 vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t)); 740 vkStream->write((const float*)forMarshaling->pQueuePriorities, forMarshaling->queueCount * sizeof(const float)); 741 } 742 743 void unmarshal_VkDeviceQueueCreateInfo( 744 VulkanStreamGuest* vkStream, 745 VkDeviceQueueCreateInfo* forUnmarshaling) 746 { 747 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 748 size_t pNext_size; 749 pNext_size = vkStream->getBe32(); 750 if (pNext_size) 751 { 752 uint64_t pNext_placeholder; 753 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 754 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 755 } 756 vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceQueueCreateFlags)); 757 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t)); 758 vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t)); 759 vkStream->read((float*)forUnmarshaling->pQueuePriorities, forUnmarshaling->queueCount * sizeof(const float)); 760 } 761 762 void marshal_VkDeviceCreateInfo( 763 VulkanStreamGuest* vkStream, 764 const VkDeviceCreateInfo* forMarshaling) 765 { 766 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 767 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 768 vkStream->putBe32(pNext_size); 769 if (pNext_size) 770 { 771 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 772 marshal_extension_struct(vkStream, forMarshaling->pNext); 773 } 774 vkStream->write((VkDeviceCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceCreateFlags)); 775 vkStream->write((uint32_t*)&forMarshaling->queueCreateInfoCount, sizeof(uint32_t)); 776 for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueCreateInfoCount; ++i) 777 { 778 marshal_VkDeviceQueueCreateInfo(vkStream, (const VkDeviceQueueCreateInfo*)(forMarshaling->pQueueCreateInfos + i)); 779 } 780 vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t)); 781 saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount); 782 vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t)); 783 saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount); 784 // WARNING PTR CHECK 785 uint64_t cgen_var_16 = (uint64_t)(uintptr_t)forMarshaling->pEnabledFeatures; 786 vkStream->putBe64(cgen_var_16); 787 if (forMarshaling->pEnabledFeatures) 788 { 789 marshal_VkPhysicalDeviceFeatures(vkStream, (const VkPhysicalDeviceFeatures*)(forMarshaling->pEnabledFeatures)); 790 } 791 } 792 793 void unmarshal_VkDeviceCreateInfo( 794 VulkanStreamGuest* vkStream, 795 VkDeviceCreateInfo* forUnmarshaling) 796 { 797 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 798 size_t pNext_size; 799 pNext_size = vkStream->getBe32(); 800 if (pNext_size) 801 { 802 uint64_t pNext_placeholder; 803 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 804 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 805 } 806 vkStream->read((VkDeviceCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceCreateFlags)); 807 vkStream->read((uint32_t*)&forUnmarshaling->queueCreateInfoCount, sizeof(uint32_t)); 808 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueCreateInfoCount; ++i) 809 { 810 unmarshal_VkDeviceQueueCreateInfo(vkStream, (VkDeviceQueueCreateInfo*)(forUnmarshaling->pQueueCreateInfos + i)); 811 } 812 vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t)); 813 vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames); 814 vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t)); 815 vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames); 816 // WARNING PTR CHECK 817 const VkPhysicalDeviceFeatures* check_pEnabledFeatures; 818 check_pEnabledFeatures = (const VkPhysicalDeviceFeatures*)(uintptr_t)vkStream->getBe64(); 819 if (forUnmarshaling->pEnabledFeatures) 820 { 821 if (!(check_pEnabledFeatures)) 822 { 823 fprintf(stderr, "fatal: forUnmarshaling->pEnabledFeatures inconsistent between guest and host\n"); 824 } 825 unmarshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(forUnmarshaling->pEnabledFeatures)); 826 } 827 } 828 829 void marshal_VkExtensionProperties( 830 VulkanStreamGuest* vkStream, 831 const VkExtensionProperties* forMarshaling) 832 { 833 vkStream->write((char*)forMarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); 834 vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t)); 835 } 836 837 void unmarshal_VkExtensionProperties( 838 VulkanStreamGuest* vkStream, 839 VkExtensionProperties* forUnmarshaling) 840 { 841 vkStream->read((char*)forUnmarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); 842 vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t)); 843 } 844 845 void marshal_VkLayerProperties( 846 VulkanStreamGuest* vkStream, 847 const VkLayerProperties* forMarshaling) 848 { 849 vkStream->write((char*)forMarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); 850 vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t)); 851 vkStream->write((uint32_t*)&forMarshaling->implementationVersion, sizeof(uint32_t)); 852 vkStream->write((char*)forMarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char)); 853 } 854 855 void unmarshal_VkLayerProperties( 856 VulkanStreamGuest* vkStream, 857 VkLayerProperties* forUnmarshaling) 858 { 859 vkStream->read((char*)forUnmarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char)); 860 vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t)); 861 vkStream->read((uint32_t*)&forUnmarshaling->implementationVersion, sizeof(uint32_t)); 862 vkStream->read((char*)forUnmarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char)); 863 } 864 865 void marshal_VkSubmitInfo( 866 VulkanStreamGuest* vkStream, 867 const VkSubmitInfo* forMarshaling) 868 { 869 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 870 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 871 vkStream->putBe32(pNext_size); 872 if (pNext_size) 873 { 874 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 875 marshal_extension_struct(vkStream, forMarshaling->pNext); 876 } 877 vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); 878 if (forMarshaling->waitSemaphoreCount) 879 { 880 uint64_t* cgen_var_18; 881 vkStream->alloc((void**)&cgen_var_18, forMarshaling->waitSemaphoreCount * 8); 882 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_18, forMarshaling->waitSemaphoreCount); 883 vkStream->write((uint64_t*)cgen_var_18, forMarshaling->waitSemaphoreCount * 8); 884 } 885 vkStream->write((const VkPipelineStageFlags*)forMarshaling->pWaitDstStageMask, forMarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags)); 886 vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t)); 887 if (forMarshaling->commandBufferCount) 888 { 889 uint64_t* cgen_var_19; 890 vkStream->alloc((void**)&cgen_var_19, forMarshaling->commandBufferCount * 8); 891 vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(forMarshaling->pCommandBuffers, cgen_var_19, forMarshaling->commandBufferCount); 892 vkStream->write((uint64_t*)cgen_var_19, forMarshaling->commandBufferCount * 8); 893 } 894 vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t)); 895 if (forMarshaling->signalSemaphoreCount) 896 { 897 uint64_t* cgen_var_20; 898 vkStream->alloc((void**)&cgen_var_20, forMarshaling->signalSemaphoreCount * 8); 899 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_20, forMarshaling->signalSemaphoreCount); 900 vkStream->write((uint64_t*)cgen_var_20, forMarshaling->signalSemaphoreCount * 8); 901 } 902 } 903 904 void unmarshal_VkSubmitInfo( 905 VulkanStreamGuest* vkStream, 906 VkSubmitInfo* forUnmarshaling) 907 { 908 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 909 size_t pNext_size; 910 pNext_size = vkStream->getBe32(); 911 if (pNext_size) 912 { 913 uint64_t pNext_placeholder; 914 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 915 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 916 } 917 vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t)); 918 if (forUnmarshaling->waitSemaphoreCount) 919 { 920 uint64_t* cgen_var_21; 921 vkStream->alloc((void**)&cgen_var_21, forUnmarshaling->waitSemaphoreCount * 8); 922 vkStream->read((uint64_t*)cgen_var_21, forUnmarshaling->waitSemaphoreCount * 8); 923 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_21, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount); 924 } 925 vkStream->read((VkPipelineStageFlags*)forUnmarshaling->pWaitDstStageMask, forUnmarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags)); 926 vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t)); 927 if (forUnmarshaling->commandBufferCount) 928 { 929 uint64_t* cgen_var_22; 930 vkStream->alloc((void**)&cgen_var_22, forUnmarshaling->commandBufferCount * 8); 931 vkStream->read((uint64_t*)cgen_var_22, forUnmarshaling->commandBufferCount * 8); 932 vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(cgen_var_22, (VkCommandBuffer*)forUnmarshaling->pCommandBuffers, forUnmarshaling->commandBufferCount); 933 } 934 vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t)); 935 if (forUnmarshaling->signalSemaphoreCount) 936 { 937 uint64_t* cgen_var_23; 938 vkStream->alloc((void**)&cgen_var_23, forUnmarshaling->signalSemaphoreCount * 8); 939 vkStream->read((uint64_t*)cgen_var_23, forUnmarshaling->signalSemaphoreCount * 8); 940 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_23, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount); 941 } 942 } 943 944 void marshal_VkMemoryAllocateInfo( 945 VulkanStreamGuest* vkStream, 946 const VkMemoryAllocateInfo* forMarshaling) 947 { 948 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 949 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 950 vkStream->putBe32(pNext_size); 951 if (pNext_size) 952 { 953 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 954 marshal_extension_struct(vkStream, forMarshaling->pNext); 955 } 956 vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize)); 957 vkStream->write((uint32_t*)&forMarshaling->memoryTypeIndex, sizeof(uint32_t)); 958 } 959 960 void unmarshal_VkMemoryAllocateInfo( 961 VulkanStreamGuest* vkStream, 962 VkMemoryAllocateInfo* forUnmarshaling) 963 { 964 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 965 size_t pNext_size; 966 pNext_size = vkStream->getBe32(); 967 if (pNext_size) 968 { 969 uint64_t pNext_placeholder; 970 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 971 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 972 } 973 vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize)); 974 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeIndex, sizeof(uint32_t)); 975 } 976 977 void marshal_VkMappedMemoryRange( 978 VulkanStreamGuest* vkStream, 979 const VkMappedMemoryRange* forMarshaling) 980 { 981 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 982 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 983 vkStream->putBe32(pNext_size); 984 if (pNext_size) 985 { 986 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 987 marshal_extension_struct(vkStream, forMarshaling->pNext); 988 } 989 uint64_t cgen_var_24; 990 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_24, 1); 991 vkStream->write((uint64_t*)&cgen_var_24, 1 * 8); 992 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 993 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 994 } 995 996 void unmarshal_VkMappedMemoryRange( 997 VulkanStreamGuest* vkStream, 998 VkMappedMemoryRange* forUnmarshaling) 999 { 1000 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1001 size_t pNext_size; 1002 pNext_size = vkStream->getBe32(); 1003 if (pNext_size) 1004 { 1005 uint64_t pNext_placeholder; 1006 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1007 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1008 } 1009 uint64_t cgen_var_25; 1010 vkStream->read((uint64_t*)&cgen_var_25, 1 * 8); 1011 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_25, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 1012 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 1013 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 1014 } 1015 1016 void marshal_VkMemoryRequirements( 1017 VulkanStreamGuest* vkStream, 1018 const VkMemoryRequirements* forMarshaling) 1019 { 1020 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 1021 vkStream->write((VkDeviceSize*)&forMarshaling->alignment, sizeof(VkDeviceSize)); 1022 vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); 1023 } 1024 1025 void unmarshal_VkMemoryRequirements( 1026 VulkanStreamGuest* vkStream, 1027 VkMemoryRequirements* forUnmarshaling) 1028 { 1029 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 1030 vkStream->read((VkDeviceSize*)&forUnmarshaling->alignment, sizeof(VkDeviceSize)); 1031 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t)); 1032 } 1033 1034 void marshal_VkSparseImageFormatProperties( 1035 VulkanStreamGuest* vkStream, 1036 const VkSparseImageFormatProperties* forMarshaling) 1037 { 1038 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1039 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->imageGranularity)); 1040 vkStream->write((VkSparseImageFormatFlags*)&forMarshaling->flags, sizeof(VkSparseImageFormatFlags)); 1041 } 1042 1043 void unmarshal_VkSparseImageFormatProperties( 1044 VulkanStreamGuest* vkStream, 1045 VkSparseImageFormatProperties* forUnmarshaling) 1046 { 1047 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1048 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->imageGranularity)); 1049 vkStream->read((VkSparseImageFormatFlags*)&forUnmarshaling->flags, sizeof(VkSparseImageFormatFlags)); 1050 } 1051 1052 void marshal_VkSparseImageMemoryRequirements( 1053 VulkanStreamGuest* vkStream, 1054 const VkSparseImageMemoryRequirements* forMarshaling) 1055 { 1056 marshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forMarshaling->formatProperties)); 1057 vkStream->write((uint32_t*)&forMarshaling->imageMipTailFirstLod, sizeof(uint32_t)); 1058 vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailSize, sizeof(VkDeviceSize)); 1059 vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailOffset, sizeof(VkDeviceSize)); 1060 vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailStride, sizeof(VkDeviceSize)); 1061 } 1062 1063 void unmarshal_VkSparseImageMemoryRequirements( 1064 VulkanStreamGuest* vkStream, 1065 VkSparseImageMemoryRequirements* forUnmarshaling) 1066 { 1067 unmarshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forUnmarshaling->formatProperties)); 1068 vkStream->read((uint32_t*)&forUnmarshaling->imageMipTailFirstLod, sizeof(uint32_t)); 1069 vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailSize, sizeof(VkDeviceSize)); 1070 vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailOffset, sizeof(VkDeviceSize)); 1071 vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailStride, sizeof(VkDeviceSize)); 1072 } 1073 1074 void marshal_VkSparseMemoryBind( 1075 VulkanStreamGuest* vkStream, 1076 const VkSparseMemoryBind* forMarshaling) 1077 { 1078 vkStream->write((VkDeviceSize*)&forMarshaling->resourceOffset, sizeof(VkDeviceSize)); 1079 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 1080 uint64_t cgen_var_26; 1081 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_26, 1); 1082 vkStream->write((uint64_t*)&cgen_var_26, 1 * 8); 1083 vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); 1084 vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags)); 1085 } 1086 1087 void unmarshal_VkSparseMemoryBind( 1088 VulkanStreamGuest* vkStream, 1089 VkSparseMemoryBind* forUnmarshaling) 1090 { 1091 vkStream->read((VkDeviceSize*)&forUnmarshaling->resourceOffset, sizeof(VkDeviceSize)); 1092 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 1093 uint64_t cgen_var_27; 1094 vkStream->read((uint64_t*)&cgen_var_27, 1 * 8); 1095 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_27, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 1096 vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize)); 1097 vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags)); 1098 } 1099 1100 void marshal_VkSparseBufferMemoryBindInfo( 1101 VulkanStreamGuest* vkStream, 1102 const VkSparseBufferMemoryBindInfo* forMarshaling) 1103 { 1104 uint64_t cgen_var_28; 1105 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_28, 1); 1106 vkStream->write((uint64_t*)&cgen_var_28, 1 * 8); 1107 vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); 1108 for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) 1109 { 1110 marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i)); 1111 } 1112 } 1113 1114 void unmarshal_VkSparseBufferMemoryBindInfo( 1115 VulkanStreamGuest* vkStream, 1116 VkSparseBufferMemoryBindInfo* forUnmarshaling) 1117 { 1118 uint64_t cgen_var_29; 1119 vkStream->read((uint64_t*)&cgen_var_29, 1 * 8); 1120 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_29, (VkBuffer*)&forUnmarshaling->buffer, 1); 1121 vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t)); 1122 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) 1123 { 1124 unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i)); 1125 } 1126 } 1127 1128 void marshal_VkSparseImageOpaqueMemoryBindInfo( 1129 VulkanStreamGuest* vkStream, 1130 const VkSparseImageOpaqueMemoryBindInfo* forMarshaling) 1131 { 1132 uint64_t cgen_var_30; 1133 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_30, 1); 1134 vkStream->write((uint64_t*)&cgen_var_30, 1 * 8); 1135 vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); 1136 for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) 1137 { 1138 marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i)); 1139 } 1140 } 1141 1142 void unmarshal_VkSparseImageOpaqueMemoryBindInfo( 1143 VulkanStreamGuest* vkStream, 1144 VkSparseImageOpaqueMemoryBindInfo* forUnmarshaling) 1145 { 1146 uint64_t cgen_var_31; 1147 vkStream->read((uint64_t*)&cgen_var_31, 1 * 8); 1148 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_31, (VkImage*)&forUnmarshaling->image, 1); 1149 vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t)); 1150 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) 1151 { 1152 unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i)); 1153 } 1154 } 1155 1156 void marshal_VkImageSubresource( 1157 VulkanStreamGuest* vkStream, 1158 const VkImageSubresource* forMarshaling) 1159 { 1160 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1161 vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t)); 1162 vkStream->write((uint32_t*)&forMarshaling->arrayLayer, sizeof(uint32_t)); 1163 } 1164 1165 void unmarshal_VkImageSubresource( 1166 VulkanStreamGuest* vkStream, 1167 VkImageSubresource* forUnmarshaling) 1168 { 1169 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1170 vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t)); 1171 vkStream->read((uint32_t*)&forUnmarshaling->arrayLayer, sizeof(uint32_t)); 1172 } 1173 1174 void marshal_VkOffset3D( 1175 VulkanStreamGuest* vkStream, 1176 const VkOffset3D* forMarshaling) 1177 { 1178 vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t)); 1179 vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t)); 1180 vkStream->write((int32_t*)&forMarshaling->z, sizeof(int32_t)); 1181 } 1182 1183 void unmarshal_VkOffset3D( 1184 VulkanStreamGuest* vkStream, 1185 VkOffset3D* forUnmarshaling) 1186 { 1187 vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t)); 1188 vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t)); 1189 vkStream->read((int32_t*)&forUnmarshaling->z, sizeof(int32_t)); 1190 } 1191 1192 void marshal_VkSparseImageMemoryBind( 1193 VulkanStreamGuest* vkStream, 1194 const VkSparseImageMemoryBind* forMarshaling) 1195 { 1196 marshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forMarshaling->subresource)); 1197 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->offset)); 1198 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent)); 1199 uint64_t cgen_var_32; 1200 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_32, 1); 1201 vkStream->write((uint64_t*)&cgen_var_32, 1 * 8); 1202 vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); 1203 vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags)); 1204 } 1205 1206 void unmarshal_VkSparseImageMemoryBind( 1207 VulkanStreamGuest* vkStream, 1208 VkSparseImageMemoryBind* forUnmarshaling) 1209 { 1210 unmarshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forUnmarshaling->subresource)); 1211 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->offset)); 1212 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent)); 1213 uint64_t cgen_var_33; 1214 vkStream->read((uint64_t*)&cgen_var_33, 1 * 8); 1215 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_33, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 1216 vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize)); 1217 vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags)); 1218 } 1219 1220 void marshal_VkSparseImageMemoryBindInfo( 1221 VulkanStreamGuest* vkStream, 1222 const VkSparseImageMemoryBindInfo* forMarshaling) 1223 { 1224 uint64_t cgen_var_34; 1225 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_34, 1); 1226 vkStream->write((uint64_t*)&cgen_var_34, 1 * 8); 1227 vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t)); 1228 for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) 1229 { 1230 marshal_VkSparseImageMemoryBind(vkStream, (const VkSparseImageMemoryBind*)(forMarshaling->pBinds + i)); 1231 } 1232 } 1233 1234 void unmarshal_VkSparseImageMemoryBindInfo( 1235 VulkanStreamGuest* vkStream, 1236 VkSparseImageMemoryBindInfo* forUnmarshaling) 1237 { 1238 uint64_t cgen_var_35; 1239 vkStream->read((uint64_t*)&cgen_var_35, 1 * 8); 1240 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_35, (VkImage*)&forUnmarshaling->image, 1); 1241 vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t)); 1242 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) 1243 { 1244 unmarshal_VkSparseImageMemoryBind(vkStream, (VkSparseImageMemoryBind*)(forUnmarshaling->pBinds + i)); 1245 } 1246 } 1247 1248 void marshal_VkBindSparseInfo( 1249 VulkanStreamGuest* vkStream, 1250 const VkBindSparseInfo* forMarshaling) 1251 { 1252 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1253 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1254 vkStream->putBe32(pNext_size); 1255 if (pNext_size) 1256 { 1257 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1258 marshal_extension_struct(vkStream, forMarshaling->pNext); 1259 } 1260 vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); 1261 if (forMarshaling->waitSemaphoreCount) 1262 { 1263 uint64_t* cgen_var_36; 1264 vkStream->alloc((void**)&cgen_var_36, forMarshaling->waitSemaphoreCount * 8); 1265 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_36, forMarshaling->waitSemaphoreCount); 1266 vkStream->write((uint64_t*)cgen_var_36, forMarshaling->waitSemaphoreCount * 8); 1267 } 1268 vkStream->write((uint32_t*)&forMarshaling->bufferBindCount, sizeof(uint32_t)); 1269 for (uint32_t i = 0; i < (uint32_t)forMarshaling->bufferBindCount; ++i) 1270 { 1271 marshal_VkSparseBufferMemoryBindInfo(vkStream, (const VkSparseBufferMemoryBindInfo*)(forMarshaling->pBufferBinds + i)); 1272 } 1273 vkStream->write((uint32_t*)&forMarshaling->imageOpaqueBindCount, sizeof(uint32_t)); 1274 for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageOpaqueBindCount; ++i) 1275 { 1276 marshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (const VkSparseImageOpaqueMemoryBindInfo*)(forMarshaling->pImageOpaqueBinds + i)); 1277 } 1278 vkStream->write((uint32_t*)&forMarshaling->imageBindCount, sizeof(uint32_t)); 1279 for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageBindCount; ++i) 1280 { 1281 marshal_VkSparseImageMemoryBindInfo(vkStream, (const VkSparseImageMemoryBindInfo*)(forMarshaling->pImageBinds + i)); 1282 } 1283 vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t)); 1284 if (forMarshaling->signalSemaphoreCount) 1285 { 1286 uint64_t* cgen_var_37; 1287 vkStream->alloc((void**)&cgen_var_37, forMarshaling->signalSemaphoreCount * 8); 1288 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_37, forMarshaling->signalSemaphoreCount); 1289 vkStream->write((uint64_t*)cgen_var_37, forMarshaling->signalSemaphoreCount * 8); 1290 } 1291 } 1292 1293 void unmarshal_VkBindSparseInfo( 1294 VulkanStreamGuest* vkStream, 1295 VkBindSparseInfo* forUnmarshaling) 1296 { 1297 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1298 size_t pNext_size; 1299 pNext_size = vkStream->getBe32(); 1300 if (pNext_size) 1301 { 1302 uint64_t pNext_placeholder; 1303 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1304 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1305 } 1306 vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t)); 1307 if (forUnmarshaling->waitSemaphoreCount) 1308 { 1309 uint64_t* cgen_var_38; 1310 vkStream->alloc((void**)&cgen_var_38, forUnmarshaling->waitSemaphoreCount * 8); 1311 vkStream->read((uint64_t*)cgen_var_38, forUnmarshaling->waitSemaphoreCount * 8); 1312 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_38, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount); 1313 } 1314 vkStream->read((uint32_t*)&forUnmarshaling->bufferBindCount, sizeof(uint32_t)); 1315 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bufferBindCount; ++i) 1316 { 1317 unmarshal_VkSparseBufferMemoryBindInfo(vkStream, (VkSparseBufferMemoryBindInfo*)(forUnmarshaling->pBufferBinds + i)); 1318 } 1319 vkStream->read((uint32_t*)&forUnmarshaling->imageOpaqueBindCount, sizeof(uint32_t)); 1320 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageOpaqueBindCount; ++i) 1321 { 1322 unmarshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (VkSparseImageOpaqueMemoryBindInfo*)(forUnmarshaling->pImageOpaqueBinds + i)); 1323 } 1324 vkStream->read((uint32_t*)&forUnmarshaling->imageBindCount, sizeof(uint32_t)); 1325 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageBindCount; ++i) 1326 { 1327 unmarshal_VkSparseImageMemoryBindInfo(vkStream, (VkSparseImageMemoryBindInfo*)(forUnmarshaling->pImageBinds + i)); 1328 } 1329 vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t)); 1330 if (forUnmarshaling->signalSemaphoreCount) 1331 { 1332 uint64_t* cgen_var_39; 1333 vkStream->alloc((void**)&cgen_var_39, forUnmarshaling->signalSemaphoreCount * 8); 1334 vkStream->read((uint64_t*)cgen_var_39, forUnmarshaling->signalSemaphoreCount * 8); 1335 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_39, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount); 1336 } 1337 } 1338 1339 void marshal_VkFenceCreateInfo( 1340 VulkanStreamGuest* vkStream, 1341 const VkFenceCreateInfo* forMarshaling) 1342 { 1343 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1344 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1345 vkStream->putBe32(pNext_size); 1346 if (pNext_size) 1347 { 1348 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1349 marshal_extension_struct(vkStream, forMarshaling->pNext); 1350 } 1351 vkStream->write((VkFenceCreateFlags*)&forMarshaling->flags, sizeof(VkFenceCreateFlags)); 1352 } 1353 1354 void unmarshal_VkFenceCreateInfo( 1355 VulkanStreamGuest* vkStream, 1356 VkFenceCreateInfo* forUnmarshaling) 1357 { 1358 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1359 size_t pNext_size; 1360 pNext_size = vkStream->getBe32(); 1361 if (pNext_size) 1362 { 1363 uint64_t pNext_placeholder; 1364 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1365 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1366 } 1367 vkStream->read((VkFenceCreateFlags*)&forUnmarshaling->flags, sizeof(VkFenceCreateFlags)); 1368 } 1369 1370 void marshal_VkSemaphoreCreateInfo( 1371 VulkanStreamGuest* vkStream, 1372 const VkSemaphoreCreateInfo* forMarshaling) 1373 { 1374 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1375 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1376 vkStream->putBe32(pNext_size); 1377 if (pNext_size) 1378 { 1379 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1380 marshal_extension_struct(vkStream, forMarshaling->pNext); 1381 } 1382 vkStream->write((VkSemaphoreCreateFlags*)&forMarshaling->flags, sizeof(VkSemaphoreCreateFlags)); 1383 } 1384 1385 void unmarshal_VkSemaphoreCreateInfo( 1386 VulkanStreamGuest* vkStream, 1387 VkSemaphoreCreateInfo* forUnmarshaling) 1388 { 1389 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1390 size_t pNext_size; 1391 pNext_size = vkStream->getBe32(); 1392 if (pNext_size) 1393 { 1394 uint64_t pNext_placeholder; 1395 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1396 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1397 } 1398 vkStream->read((VkSemaphoreCreateFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreCreateFlags)); 1399 } 1400 1401 void marshal_VkEventCreateInfo( 1402 VulkanStreamGuest* vkStream, 1403 const VkEventCreateInfo* forMarshaling) 1404 { 1405 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1406 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1407 vkStream->putBe32(pNext_size); 1408 if (pNext_size) 1409 { 1410 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1411 marshal_extension_struct(vkStream, forMarshaling->pNext); 1412 } 1413 vkStream->write((VkEventCreateFlags*)&forMarshaling->flags, sizeof(VkEventCreateFlags)); 1414 } 1415 1416 void unmarshal_VkEventCreateInfo( 1417 VulkanStreamGuest* vkStream, 1418 VkEventCreateInfo* forUnmarshaling) 1419 { 1420 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1421 size_t pNext_size; 1422 pNext_size = vkStream->getBe32(); 1423 if (pNext_size) 1424 { 1425 uint64_t pNext_placeholder; 1426 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1427 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1428 } 1429 vkStream->read((VkEventCreateFlags*)&forUnmarshaling->flags, sizeof(VkEventCreateFlags)); 1430 } 1431 1432 void marshal_VkQueryPoolCreateInfo( 1433 VulkanStreamGuest* vkStream, 1434 const VkQueryPoolCreateInfo* forMarshaling) 1435 { 1436 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1437 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1438 vkStream->putBe32(pNext_size); 1439 if (pNext_size) 1440 { 1441 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1442 marshal_extension_struct(vkStream, forMarshaling->pNext); 1443 } 1444 vkStream->write((VkQueryPoolCreateFlags*)&forMarshaling->flags, sizeof(VkQueryPoolCreateFlags)); 1445 vkStream->write((VkQueryType*)&forMarshaling->queryType, sizeof(VkQueryType)); 1446 vkStream->write((uint32_t*)&forMarshaling->queryCount, sizeof(uint32_t)); 1447 vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags)); 1448 } 1449 1450 void unmarshal_VkQueryPoolCreateInfo( 1451 VulkanStreamGuest* vkStream, 1452 VkQueryPoolCreateInfo* forUnmarshaling) 1453 { 1454 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1455 size_t pNext_size; 1456 pNext_size = vkStream->getBe32(); 1457 if (pNext_size) 1458 { 1459 uint64_t pNext_placeholder; 1460 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1461 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1462 } 1463 vkStream->read((VkQueryPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkQueryPoolCreateFlags)); 1464 vkStream->read((VkQueryType*)&forUnmarshaling->queryType, sizeof(VkQueryType)); 1465 vkStream->read((uint32_t*)&forUnmarshaling->queryCount, sizeof(uint32_t)); 1466 vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags)); 1467 } 1468 1469 void marshal_VkBufferCreateInfo( 1470 VulkanStreamGuest* vkStream, 1471 const VkBufferCreateInfo* forMarshaling) 1472 { 1473 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1474 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1475 vkStream->putBe32(pNext_size); 1476 if (pNext_size) 1477 { 1478 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1479 marshal_extension_struct(vkStream, forMarshaling->pNext); 1480 } 1481 vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags)); 1482 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 1483 vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags)); 1484 vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode)); 1485 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 1486 // WARNING PTR CHECK 1487 uint64_t cgen_var_40 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices; 1488 vkStream->putBe64(cgen_var_40); 1489 if (forMarshaling->pQueueFamilyIndices) 1490 { 1491 vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 1492 } 1493 } 1494 1495 void unmarshal_VkBufferCreateInfo( 1496 VulkanStreamGuest* vkStream, 1497 VkBufferCreateInfo* forUnmarshaling) 1498 { 1499 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1500 size_t pNext_size; 1501 pNext_size = vkStream->getBe32(); 1502 if (pNext_size) 1503 { 1504 uint64_t pNext_placeholder; 1505 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1506 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1507 } 1508 vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags)); 1509 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 1510 vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags)); 1511 vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode)); 1512 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 1513 // WARNING PTR CHECK 1514 const uint32_t* check_pQueueFamilyIndices; 1515 check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64(); 1516 if (forUnmarshaling->pQueueFamilyIndices) 1517 { 1518 if (!(check_pQueueFamilyIndices)) 1519 { 1520 fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n"); 1521 } 1522 vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 1523 } 1524 } 1525 1526 void marshal_VkBufferViewCreateInfo( 1527 VulkanStreamGuest* vkStream, 1528 const VkBufferViewCreateInfo* forMarshaling) 1529 { 1530 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1531 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1532 vkStream->putBe32(pNext_size); 1533 if (pNext_size) 1534 { 1535 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1536 marshal_extension_struct(vkStream, forMarshaling->pNext); 1537 } 1538 vkStream->write((VkBufferViewCreateFlags*)&forMarshaling->flags, sizeof(VkBufferViewCreateFlags)); 1539 uint64_t cgen_var_42; 1540 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_42, 1); 1541 vkStream->write((uint64_t*)&cgen_var_42, 1 * 8); 1542 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 1543 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 1544 vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize)); 1545 } 1546 1547 void unmarshal_VkBufferViewCreateInfo( 1548 VulkanStreamGuest* vkStream, 1549 VkBufferViewCreateInfo* forUnmarshaling) 1550 { 1551 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1552 size_t pNext_size; 1553 pNext_size = vkStream->getBe32(); 1554 if (pNext_size) 1555 { 1556 uint64_t pNext_placeholder; 1557 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1558 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1559 } 1560 vkStream->read((VkBufferViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferViewCreateFlags)); 1561 uint64_t cgen_var_43; 1562 vkStream->read((uint64_t*)&cgen_var_43, 1 * 8); 1563 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_43, (VkBuffer*)&forUnmarshaling->buffer, 1); 1564 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 1565 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 1566 vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize)); 1567 } 1568 1569 void marshal_VkImageCreateInfo( 1570 VulkanStreamGuest* vkStream, 1571 const VkImageCreateInfo* forMarshaling) 1572 { 1573 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1574 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1575 vkStream->putBe32(pNext_size); 1576 if (pNext_size) 1577 { 1578 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1579 marshal_extension_struct(vkStream, forMarshaling->pNext); 1580 } 1581 vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags)); 1582 vkStream->write((VkImageType*)&forMarshaling->imageType, sizeof(VkImageType)); 1583 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 1584 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent)); 1585 vkStream->write((uint32_t*)&forMarshaling->mipLevels, sizeof(uint32_t)); 1586 vkStream->write((uint32_t*)&forMarshaling->arrayLayers, sizeof(uint32_t)); 1587 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits)); 1588 vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling)); 1589 vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags)); 1590 vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode)); 1591 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 1592 // WARNING PTR CHECK 1593 uint64_t cgen_var_44 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices; 1594 vkStream->putBe64(cgen_var_44); 1595 if (forMarshaling->pQueueFamilyIndices) 1596 { 1597 vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 1598 } 1599 vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout)); 1600 } 1601 1602 void unmarshal_VkImageCreateInfo( 1603 VulkanStreamGuest* vkStream, 1604 VkImageCreateInfo* forUnmarshaling) 1605 { 1606 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1607 size_t pNext_size; 1608 pNext_size = vkStream->getBe32(); 1609 if (pNext_size) 1610 { 1611 uint64_t pNext_placeholder; 1612 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1613 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1614 } 1615 vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags)); 1616 vkStream->read((VkImageType*)&forUnmarshaling->imageType, sizeof(VkImageType)); 1617 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 1618 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent)); 1619 vkStream->read((uint32_t*)&forUnmarshaling->mipLevels, sizeof(uint32_t)); 1620 vkStream->read((uint32_t*)&forUnmarshaling->arrayLayers, sizeof(uint32_t)); 1621 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits)); 1622 vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling)); 1623 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags)); 1624 vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode)); 1625 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 1626 // WARNING PTR CHECK 1627 const uint32_t* check_pQueueFamilyIndices; 1628 check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64(); 1629 if (forUnmarshaling->pQueueFamilyIndices) 1630 { 1631 if (!(check_pQueueFamilyIndices)) 1632 { 1633 fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n"); 1634 } 1635 vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 1636 } 1637 vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout)); 1638 } 1639 1640 void marshal_VkSubresourceLayout( 1641 VulkanStreamGuest* vkStream, 1642 const VkSubresourceLayout* forMarshaling) 1643 { 1644 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 1645 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 1646 vkStream->write((VkDeviceSize*)&forMarshaling->rowPitch, sizeof(VkDeviceSize)); 1647 vkStream->write((VkDeviceSize*)&forMarshaling->arrayPitch, sizeof(VkDeviceSize)); 1648 vkStream->write((VkDeviceSize*)&forMarshaling->depthPitch, sizeof(VkDeviceSize)); 1649 } 1650 1651 void unmarshal_VkSubresourceLayout( 1652 VulkanStreamGuest* vkStream, 1653 VkSubresourceLayout* forUnmarshaling) 1654 { 1655 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 1656 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 1657 vkStream->read((VkDeviceSize*)&forUnmarshaling->rowPitch, sizeof(VkDeviceSize)); 1658 vkStream->read((VkDeviceSize*)&forUnmarshaling->arrayPitch, sizeof(VkDeviceSize)); 1659 vkStream->read((VkDeviceSize*)&forUnmarshaling->depthPitch, sizeof(VkDeviceSize)); 1660 } 1661 1662 void marshal_VkComponentMapping( 1663 VulkanStreamGuest* vkStream, 1664 const VkComponentMapping* forMarshaling) 1665 { 1666 vkStream->write((VkComponentSwizzle*)&forMarshaling->r, sizeof(VkComponentSwizzle)); 1667 vkStream->write((VkComponentSwizzle*)&forMarshaling->g, sizeof(VkComponentSwizzle)); 1668 vkStream->write((VkComponentSwizzle*)&forMarshaling->b, sizeof(VkComponentSwizzle)); 1669 vkStream->write((VkComponentSwizzle*)&forMarshaling->a, sizeof(VkComponentSwizzle)); 1670 } 1671 1672 void unmarshal_VkComponentMapping( 1673 VulkanStreamGuest* vkStream, 1674 VkComponentMapping* forUnmarshaling) 1675 { 1676 vkStream->read((VkComponentSwizzle*)&forUnmarshaling->r, sizeof(VkComponentSwizzle)); 1677 vkStream->read((VkComponentSwizzle*)&forUnmarshaling->g, sizeof(VkComponentSwizzle)); 1678 vkStream->read((VkComponentSwizzle*)&forUnmarshaling->b, sizeof(VkComponentSwizzle)); 1679 vkStream->read((VkComponentSwizzle*)&forUnmarshaling->a, sizeof(VkComponentSwizzle)); 1680 } 1681 1682 void marshal_VkImageSubresourceRange( 1683 VulkanStreamGuest* vkStream, 1684 const VkImageSubresourceRange* forMarshaling) 1685 { 1686 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1687 vkStream->write((uint32_t*)&forMarshaling->baseMipLevel, sizeof(uint32_t)); 1688 vkStream->write((uint32_t*)&forMarshaling->levelCount, sizeof(uint32_t)); 1689 vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t)); 1690 vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t)); 1691 } 1692 1693 void unmarshal_VkImageSubresourceRange( 1694 VulkanStreamGuest* vkStream, 1695 VkImageSubresourceRange* forUnmarshaling) 1696 { 1697 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 1698 vkStream->read((uint32_t*)&forUnmarshaling->baseMipLevel, sizeof(uint32_t)); 1699 vkStream->read((uint32_t*)&forUnmarshaling->levelCount, sizeof(uint32_t)); 1700 vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t)); 1701 vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t)); 1702 } 1703 1704 void marshal_VkImageViewCreateInfo( 1705 VulkanStreamGuest* vkStream, 1706 const VkImageViewCreateInfo* forMarshaling) 1707 { 1708 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1709 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1710 vkStream->putBe32(pNext_size); 1711 if (pNext_size) 1712 { 1713 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1714 marshal_extension_struct(vkStream, forMarshaling->pNext); 1715 } 1716 vkStream->write((VkImageViewCreateFlags*)&forMarshaling->flags, sizeof(VkImageViewCreateFlags)); 1717 uint64_t cgen_var_46; 1718 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_46, 1); 1719 vkStream->write((uint64_t*)&cgen_var_46, 1 * 8); 1720 vkStream->write((VkImageViewType*)&forMarshaling->viewType, sizeof(VkImageViewType)); 1721 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 1722 marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->components)); 1723 marshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange)); 1724 } 1725 1726 void unmarshal_VkImageViewCreateInfo( 1727 VulkanStreamGuest* vkStream, 1728 VkImageViewCreateInfo* forUnmarshaling) 1729 { 1730 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1731 size_t pNext_size; 1732 pNext_size = vkStream->getBe32(); 1733 if (pNext_size) 1734 { 1735 uint64_t pNext_placeholder; 1736 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1737 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1738 } 1739 vkStream->read((VkImageViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageViewCreateFlags)); 1740 uint64_t cgen_var_47; 1741 vkStream->read((uint64_t*)&cgen_var_47, 1 * 8); 1742 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_47, (VkImage*)&forUnmarshaling->image, 1); 1743 vkStream->read((VkImageViewType*)&forUnmarshaling->viewType, sizeof(VkImageViewType)); 1744 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 1745 unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->components)); 1746 unmarshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange)); 1747 } 1748 1749 void marshal_VkShaderModuleCreateInfo( 1750 VulkanStreamGuest* vkStream, 1751 const VkShaderModuleCreateInfo* forMarshaling) 1752 { 1753 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1754 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1755 vkStream->putBe32(pNext_size); 1756 if (pNext_size) 1757 { 1758 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1759 marshal_extension_struct(vkStream, forMarshaling->pNext); 1760 } 1761 vkStream->write((VkShaderModuleCreateFlags*)&forMarshaling->flags, sizeof(VkShaderModuleCreateFlags)); 1762 uint64_t cgen_var_48 = (uint64_t)forMarshaling->codeSize; 1763 vkStream->putBe64(cgen_var_48); 1764 vkStream->write((const uint32_t*)forMarshaling->pCode, (forMarshaling->codeSize / 4) * sizeof(const uint32_t)); 1765 } 1766 1767 void unmarshal_VkShaderModuleCreateInfo( 1768 VulkanStreamGuest* vkStream, 1769 VkShaderModuleCreateInfo* forUnmarshaling) 1770 { 1771 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1772 size_t pNext_size; 1773 pNext_size = vkStream->getBe32(); 1774 if (pNext_size) 1775 { 1776 uint64_t pNext_placeholder; 1777 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1778 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1779 } 1780 vkStream->read((VkShaderModuleCreateFlags*)&forUnmarshaling->flags, sizeof(VkShaderModuleCreateFlags)); 1781 forUnmarshaling->codeSize = (size_t)vkStream->getBe64(); 1782 vkStream->read((uint32_t*)forUnmarshaling->pCode, (forUnmarshaling->codeSize / 4) * sizeof(const uint32_t)); 1783 } 1784 1785 void marshal_VkPipelineCacheCreateInfo( 1786 VulkanStreamGuest* vkStream, 1787 const VkPipelineCacheCreateInfo* forMarshaling) 1788 { 1789 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1790 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1791 vkStream->putBe32(pNext_size); 1792 if (pNext_size) 1793 { 1794 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1795 marshal_extension_struct(vkStream, forMarshaling->pNext); 1796 } 1797 vkStream->write((VkPipelineCacheCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCacheCreateFlags)); 1798 uint64_t cgen_var_50 = (uint64_t)forMarshaling->initialDataSize; 1799 vkStream->putBe64(cgen_var_50); 1800 vkStream->write((const void*)forMarshaling->pInitialData, forMarshaling->initialDataSize * sizeof(const uint8_t)); 1801 } 1802 1803 void unmarshal_VkPipelineCacheCreateInfo( 1804 VulkanStreamGuest* vkStream, 1805 VkPipelineCacheCreateInfo* forUnmarshaling) 1806 { 1807 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1808 size_t pNext_size; 1809 pNext_size = vkStream->getBe32(); 1810 if (pNext_size) 1811 { 1812 uint64_t pNext_placeholder; 1813 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1814 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1815 } 1816 vkStream->read((VkPipelineCacheCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCacheCreateFlags)); 1817 forUnmarshaling->initialDataSize = (size_t)vkStream->getBe64(); 1818 vkStream->read((void*)forUnmarshaling->pInitialData, forUnmarshaling->initialDataSize * sizeof(const uint8_t)); 1819 } 1820 1821 void marshal_VkSpecializationMapEntry( 1822 VulkanStreamGuest* vkStream, 1823 const VkSpecializationMapEntry* forMarshaling) 1824 { 1825 vkStream->write((uint32_t*)&forMarshaling->constantID, sizeof(uint32_t)); 1826 vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t)); 1827 uint64_t cgen_var_52 = (uint64_t)forMarshaling->size; 1828 vkStream->putBe64(cgen_var_52); 1829 } 1830 1831 void unmarshal_VkSpecializationMapEntry( 1832 VulkanStreamGuest* vkStream, 1833 VkSpecializationMapEntry* forUnmarshaling) 1834 { 1835 vkStream->read((uint32_t*)&forUnmarshaling->constantID, sizeof(uint32_t)); 1836 vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t)); 1837 forUnmarshaling->size = (size_t)vkStream->getBe64(); 1838 } 1839 1840 void marshal_VkSpecializationInfo( 1841 VulkanStreamGuest* vkStream, 1842 const VkSpecializationInfo* forMarshaling) 1843 { 1844 vkStream->write((uint32_t*)&forMarshaling->mapEntryCount, sizeof(uint32_t)); 1845 for (uint32_t i = 0; i < (uint32_t)forMarshaling->mapEntryCount; ++i) 1846 { 1847 marshal_VkSpecializationMapEntry(vkStream, (const VkSpecializationMapEntry*)(forMarshaling->pMapEntries + i)); 1848 } 1849 uint64_t cgen_var_54 = (uint64_t)forMarshaling->dataSize; 1850 vkStream->putBe64(cgen_var_54); 1851 vkStream->write((const void*)forMarshaling->pData, forMarshaling->dataSize * sizeof(const uint8_t)); 1852 } 1853 1854 void unmarshal_VkSpecializationInfo( 1855 VulkanStreamGuest* vkStream, 1856 VkSpecializationInfo* forUnmarshaling) 1857 { 1858 vkStream->read((uint32_t*)&forUnmarshaling->mapEntryCount, sizeof(uint32_t)); 1859 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->mapEntryCount; ++i) 1860 { 1861 unmarshal_VkSpecializationMapEntry(vkStream, (VkSpecializationMapEntry*)(forUnmarshaling->pMapEntries + i)); 1862 } 1863 forUnmarshaling->dataSize = (size_t)vkStream->getBe64(); 1864 vkStream->read((void*)forUnmarshaling->pData, forUnmarshaling->dataSize * sizeof(const uint8_t)); 1865 } 1866 1867 void marshal_VkPipelineShaderStageCreateInfo( 1868 VulkanStreamGuest* vkStream, 1869 const VkPipelineShaderStageCreateInfo* forMarshaling) 1870 { 1871 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1872 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1873 vkStream->putBe32(pNext_size); 1874 if (pNext_size) 1875 { 1876 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1877 marshal_extension_struct(vkStream, forMarshaling->pNext); 1878 } 1879 vkStream->write((VkPipelineShaderStageCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags)); 1880 vkStream->write((VkShaderStageFlagBits*)&forMarshaling->stage, sizeof(VkShaderStageFlagBits)); 1881 uint64_t cgen_var_56; 1882 vkStream->handleMapping()->mapHandles_VkShaderModule_u64(&forMarshaling->module, &cgen_var_56, 1); 1883 vkStream->write((uint64_t*)&cgen_var_56, 1 * 8); 1884 vkStream->putString(forMarshaling->pName); 1885 // WARNING PTR CHECK 1886 uint64_t cgen_var_57 = (uint64_t)(uintptr_t)forMarshaling->pSpecializationInfo; 1887 vkStream->putBe64(cgen_var_57); 1888 if (forMarshaling->pSpecializationInfo) 1889 { 1890 marshal_VkSpecializationInfo(vkStream, (const VkSpecializationInfo*)(forMarshaling->pSpecializationInfo)); 1891 } 1892 } 1893 1894 void unmarshal_VkPipelineShaderStageCreateInfo( 1895 VulkanStreamGuest* vkStream, 1896 VkPipelineShaderStageCreateInfo* forUnmarshaling) 1897 { 1898 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1899 size_t pNext_size; 1900 pNext_size = vkStream->getBe32(); 1901 if (pNext_size) 1902 { 1903 uint64_t pNext_placeholder; 1904 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 1905 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 1906 } 1907 vkStream->read((VkPipelineShaderStageCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags)); 1908 vkStream->read((VkShaderStageFlagBits*)&forUnmarshaling->stage, sizeof(VkShaderStageFlagBits)); 1909 uint64_t cgen_var_58; 1910 vkStream->read((uint64_t*)&cgen_var_58, 1 * 8); 1911 vkStream->handleMapping()->mapHandles_u64_VkShaderModule(&cgen_var_58, (VkShaderModule*)&forUnmarshaling->module, 1); 1912 vkStream->loadStringInPlace((char**)&forUnmarshaling->pName); 1913 // WARNING PTR CHECK 1914 const VkSpecializationInfo* check_pSpecializationInfo; 1915 check_pSpecializationInfo = (const VkSpecializationInfo*)(uintptr_t)vkStream->getBe64(); 1916 if (forUnmarshaling->pSpecializationInfo) 1917 { 1918 if (!(check_pSpecializationInfo)) 1919 { 1920 fprintf(stderr, "fatal: forUnmarshaling->pSpecializationInfo inconsistent between guest and host\n"); 1921 } 1922 unmarshal_VkSpecializationInfo(vkStream, (VkSpecializationInfo*)(forUnmarshaling->pSpecializationInfo)); 1923 } 1924 } 1925 1926 void marshal_VkVertexInputBindingDescription( 1927 VulkanStreamGuest* vkStream, 1928 const VkVertexInputBindingDescription* forMarshaling) 1929 { 1930 vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); 1931 vkStream->write((uint32_t*)&forMarshaling->stride, sizeof(uint32_t)); 1932 vkStream->write((VkVertexInputRate*)&forMarshaling->inputRate, sizeof(VkVertexInputRate)); 1933 } 1934 1935 void unmarshal_VkVertexInputBindingDescription( 1936 VulkanStreamGuest* vkStream, 1937 VkVertexInputBindingDescription* forUnmarshaling) 1938 { 1939 vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t)); 1940 vkStream->read((uint32_t*)&forUnmarshaling->stride, sizeof(uint32_t)); 1941 vkStream->read((VkVertexInputRate*)&forUnmarshaling->inputRate, sizeof(VkVertexInputRate)); 1942 } 1943 1944 void marshal_VkVertexInputAttributeDescription( 1945 VulkanStreamGuest* vkStream, 1946 const VkVertexInputAttributeDescription* forMarshaling) 1947 { 1948 vkStream->write((uint32_t*)&forMarshaling->location, sizeof(uint32_t)); 1949 vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); 1950 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 1951 vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t)); 1952 } 1953 1954 void unmarshal_VkVertexInputAttributeDescription( 1955 VulkanStreamGuest* vkStream, 1956 VkVertexInputAttributeDescription* forUnmarshaling) 1957 { 1958 vkStream->read((uint32_t*)&forUnmarshaling->location, sizeof(uint32_t)); 1959 vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t)); 1960 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 1961 vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t)); 1962 } 1963 1964 void marshal_VkPipelineVertexInputStateCreateInfo( 1965 VulkanStreamGuest* vkStream, 1966 const VkPipelineVertexInputStateCreateInfo* forMarshaling) 1967 { 1968 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 1969 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 1970 vkStream->putBe32(pNext_size); 1971 if (pNext_size) 1972 { 1973 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 1974 marshal_extension_struct(vkStream, forMarshaling->pNext); 1975 } 1976 vkStream->write((VkPipelineVertexInputStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags)); 1977 vkStream->write((uint32_t*)&forMarshaling->vertexBindingDescriptionCount, sizeof(uint32_t)); 1978 for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDescriptionCount; ++i) 1979 { 1980 marshal_VkVertexInputBindingDescription(vkStream, (const VkVertexInputBindingDescription*)(forMarshaling->pVertexBindingDescriptions + i)); 1981 } 1982 vkStream->write((uint32_t*)&forMarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t)); 1983 for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexAttributeDescriptionCount; ++i) 1984 { 1985 marshal_VkVertexInputAttributeDescription(vkStream, (const VkVertexInputAttributeDescription*)(forMarshaling->pVertexAttributeDescriptions + i)); 1986 } 1987 } 1988 1989 void unmarshal_VkPipelineVertexInputStateCreateInfo( 1990 VulkanStreamGuest* vkStream, 1991 VkPipelineVertexInputStateCreateInfo* forUnmarshaling) 1992 { 1993 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 1994 size_t pNext_size; 1995 pNext_size = vkStream->getBe32(); 1996 if (pNext_size) 1997 { 1998 uint64_t pNext_placeholder; 1999 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2000 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2001 } 2002 vkStream->read((VkPipelineVertexInputStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags)); 2003 vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDescriptionCount, sizeof(uint32_t)); 2004 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDescriptionCount; ++i) 2005 { 2006 unmarshal_VkVertexInputBindingDescription(vkStream, (VkVertexInputBindingDescription*)(forUnmarshaling->pVertexBindingDescriptions + i)); 2007 } 2008 vkStream->read((uint32_t*)&forUnmarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t)); 2009 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexAttributeDescriptionCount; ++i) 2010 { 2011 unmarshal_VkVertexInputAttributeDescription(vkStream, (VkVertexInputAttributeDescription*)(forUnmarshaling->pVertexAttributeDescriptions + i)); 2012 } 2013 } 2014 2015 void marshal_VkPipelineInputAssemblyStateCreateInfo( 2016 VulkanStreamGuest* vkStream, 2017 const VkPipelineInputAssemblyStateCreateInfo* forMarshaling) 2018 { 2019 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2020 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2021 vkStream->putBe32(pNext_size); 2022 if (pNext_size) 2023 { 2024 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2025 marshal_extension_struct(vkStream, forMarshaling->pNext); 2026 } 2027 vkStream->write((VkPipelineInputAssemblyStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags)); 2028 vkStream->write((VkPrimitiveTopology*)&forMarshaling->topology, sizeof(VkPrimitiveTopology)); 2029 vkStream->write((VkBool32*)&forMarshaling->primitiveRestartEnable, sizeof(VkBool32)); 2030 } 2031 2032 void unmarshal_VkPipelineInputAssemblyStateCreateInfo( 2033 VulkanStreamGuest* vkStream, 2034 VkPipelineInputAssemblyStateCreateInfo* forUnmarshaling) 2035 { 2036 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2037 size_t pNext_size; 2038 pNext_size = vkStream->getBe32(); 2039 if (pNext_size) 2040 { 2041 uint64_t pNext_placeholder; 2042 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2043 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2044 } 2045 vkStream->read((VkPipelineInputAssemblyStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags)); 2046 vkStream->read((VkPrimitiveTopology*)&forUnmarshaling->topology, sizeof(VkPrimitiveTopology)); 2047 vkStream->read((VkBool32*)&forUnmarshaling->primitiveRestartEnable, sizeof(VkBool32)); 2048 } 2049 2050 void marshal_VkPipelineTessellationStateCreateInfo( 2051 VulkanStreamGuest* vkStream, 2052 const VkPipelineTessellationStateCreateInfo* forMarshaling) 2053 { 2054 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2055 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2056 vkStream->putBe32(pNext_size); 2057 if (pNext_size) 2058 { 2059 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2060 marshal_extension_struct(vkStream, forMarshaling->pNext); 2061 } 2062 vkStream->write((VkPipelineTessellationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags)); 2063 vkStream->write((uint32_t*)&forMarshaling->patchControlPoints, sizeof(uint32_t)); 2064 } 2065 2066 void unmarshal_VkPipelineTessellationStateCreateInfo( 2067 VulkanStreamGuest* vkStream, 2068 VkPipelineTessellationStateCreateInfo* forUnmarshaling) 2069 { 2070 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2071 size_t pNext_size; 2072 pNext_size = vkStream->getBe32(); 2073 if (pNext_size) 2074 { 2075 uint64_t pNext_placeholder; 2076 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2077 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2078 } 2079 vkStream->read((VkPipelineTessellationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags)); 2080 vkStream->read((uint32_t*)&forUnmarshaling->patchControlPoints, sizeof(uint32_t)); 2081 } 2082 2083 void marshal_VkViewport( 2084 VulkanStreamGuest* vkStream, 2085 const VkViewport* forMarshaling) 2086 { 2087 vkStream->write((float*)&forMarshaling->x, sizeof(float)); 2088 vkStream->write((float*)&forMarshaling->y, sizeof(float)); 2089 vkStream->write((float*)&forMarshaling->width, sizeof(float)); 2090 vkStream->write((float*)&forMarshaling->height, sizeof(float)); 2091 vkStream->write((float*)&forMarshaling->minDepth, sizeof(float)); 2092 vkStream->write((float*)&forMarshaling->maxDepth, sizeof(float)); 2093 } 2094 2095 void unmarshal_VkViewport( 2096 VulkanStreamGuest* vkStream, 2097 VkViewport* forUnmarshaling) 2098 { 2099 vkStream->read((float*)&forUnmarshaling->x, sizeof(float)); 2100 vkStream->read((float*)&forUnmarshaling->y, sizeof(float)); 2101 vkStream->read((float*)&forUnmarshaling->width, sizeof(float)); 2102 vkStream->read((float*)&forUnmarshaling->height, sizeof(float)); 2103 vkStream->read((float*)&forUnmarshaling->minDepth, sizeof(float)); 2104 vkStream->read((float*)&forUnmarshaling->maxDepth, sizeof(float)); 2105 } 2106 2107 void marshal_VkOffset2D( 2108 VulkanStreamGuest* vkStream, 2109 const VkOffset2D* forMarshaling) 2110 { 2111 vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t)); 2112 vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t)); 2113 } 2114 2115 void unmarshal_VkOffset2D( 2116 VulkanStreamGuest* vkStream, 2117 VkOffset2D* forUnmarshaling) 2118 { 2119 vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t)); 2120 vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t)); 2121 } 2122 2123 void marshal_VkExtent2D( 2124 VulkanStreamGuest* vkStream, 2125 const VkExtent2D* forMarshaling) 2126 { 2127 vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t)); 2128 vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t)); 2129 } 2130 2131 void unmarshal_VkExtent2D( 2132 VulkanStreamGuest* vkStream, 2133 VkExtent2D* forUnmarshaling) 2134 { 2135 vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t)); 2136 vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t)); 2137 } 2138 2139 void marshal_VkRect2D( 2140 VulkanStreamGuest* vkStream, 2141 const VkRect2D* forMarshaling) 2142 { 2143 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->offset)); 2144 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->extent)); 2145 } 2146 2147 void unmarshal_VkRect2D( 2148 VulkanStreamGuest* vkStream, 2149 VkRect2D* forUnmarshaling) 2150 { 2151 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->offset)); 2152 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->extent)); 2153 } 2154 2155 void marshal_VkPipelineViewportStateCreateInfo( 2156 VulkanStreamGuest* vkStream, 2157 const VkPipelineViewportStateCreateInfo* forMarshaling) 2158 { 2159 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2160 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2161 vkStream->putBe32(pNext_size); 2162 if (pNext_size) 2163 { 2164 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2165 marshal_extension_struct(vkStream, forMarshaling->pNext); 2166 } 2167 vkStream->write((VkPipelineViewportStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags)); 2168 vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t)); 2169 // WARNING PTR CHECK 2170 uint64_t cgen_var_60 = (uint64_t)(uintptr_t)forMarshaling->pViewports; 2171 vkStream->putBe64(cgen_var_60); 2172 if (forMarshaling->pViewports) 2173 { 2174 for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i) 2175 { 2176 marshal_VkViewport(vkStream, (const VkViewport*)(forMarshaling->pViewports + i)); 2177 } 2178 } 2179 vkStream->write((uint32_t*)&forMarshaling->scissorCount, sizeof(uint32_t)); 2180 // WARNING PTR CHECK 2181 uint64_t cgen_var_61 = (uint64_t)(uintptr_t)forMarshaling->pScissors; 2182 vkStream->putBe64(cgen_var_61); 2183 if (forMarshaling->pScissors) 2184 { 2185 for (uint32_t i = 0; i < (uint32_t)forMarshaling->scissorCount; ++i) 2186 { 2187 marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pScissors + i)); 2188 } 2189 } 2190 } 2191 2192 void unmarshal_VkPipelineViewportStateCreateInfo( 2193 VulkanStreamGuest* vkStream, 2194 VkPipelineViewportStateCreateInfo* forUnmarshaling) 2195 { 2196 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2197 size_t pNext_size; 2198 pNext_size = vkStream->getBe32(); 2199 if (pNext_size) 2200 { 2201 uint64_t pNext_placeholder; 2202 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2203 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2204 } 2205 vkStream->read((VkPipelineViewportStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags)); 2206 vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t)); 2207 // WARNING PTR CHECK 2208 const VkViewport* check_pViewports; 2209 check_pViewports = (const VkViewport*)(uintptr_t)vkStream->getBe64(); 2210 if (forUnmarshaling->pViewports) 2211 { 2212 if (!(check_pViewports)) 2213 { 2214 fprintf(stderr, "fatal: forUnmarshaling->pViewports inconsistent between guest and host\n"); 2215 } 2216 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i) 2217 { 2218 unmarshal_VkViewport(vkStream, (VkViewport*)(forUnmarshaling->pViewports + i)); 2219 } 2220 } 2221 vkStream->read((uint32_t*)&forUnmarshaling->scissorCount, sizeof(uint32_t)); 2222 // WARNING PTR CHECK 2223 const VkRect2D* check_pScissors; 2224 check_pScissors = (const VkRect2D*)(uintptr_t)vkStream->getBe64(); 2225 if (forUnmarshaling->pScissors) 2226 { 2227 if (!(check_pScissors)) 2228 { 2229 fprintf(stderr, "fatal: forUnmarshaling->pScissors inconsistent between guest and host\n"); 2230 } 2231 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->scissorCount; ++i) 2232 { 2233 unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pScissors + i)); 2234 } 2235 } 2236 } 2237 2238 void marshal_VkPipelineRasterizationStateCreateInfo( 2239 VulkanStreamGuest* vkStream, 2240 const VkPipelineRasterizationStateCreateInfo* forMarshaling) 2241 { 2242 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2243 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2244 vkStream->putBe32(pNext_size); 2245 if (pNext_size) 2246 { 2247 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2248 marshal_extension_struct(vkStream, forMarshaling->pNext); 2249 } 2250 vkStream->write((VkPipelineRasterizationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags)); 2251 vkStream->write((VkBool32*)&forMarshaling->depthClampEnable, sizeof(VkBool32)); 2252 vkStream->write((VkBool32*)&forMarshaling->rasterizerDiscardEnable, sizeof(VkBool32)); 2253 vkStream->write((VkPolygonMode*)&forMarshaling->polygonMode, sizeof(VkPolygonMode)); 2254 vkStream->write((VkCullModeFlags*)&forMarshaling->cullMode, sizeof(VkCullModeFlags)); 2255 vkStream->write((VkFrontFace*)&forMarshaling->frontFace, sizeof(VkFrontFace)); 2256 vkStream->write((VkBool32*)&forMarshaling->depthBiasEnable, sizeof(VkBool32)); 2257 vkStream->write((float*)&forMarshaling->depthBiasConstantFactor, sizeof(float)); 2258 vkStream->write((float*)&forMarshaling->depthBiasClamp, sizeof(float)); 2259 vkStream->write((float*)&forMarshaling->depthBiasSlopeFactor, sizeof(float)); 2260 vkStream->write((float*)&forMarshaling->lineWidth, sizeof(float)); 2261 } 2262 2263 void unmarshal_VkPipelineRasterizationStateCreateInfo( 2264 VulkanStreamGuest* vkStream, 2265 VkPipelineRasterizationStateCreateInfo* forUnmarshaling) 2266 { 2267 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2268 size_t pNext_size; 2269 pNext_size = vkStream->getBe32(); 2270 if (pNext_size) 2271 { 2272 uint64_t pNext_placeholder; 2273 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2274 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2275 } 2276 vkStream->read((VkPipelineRasterizationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags)); 2277 vkStream->read((VkBool32*)&forUnmarshaling->depthClampEnable, sizeof(VkBool32)); 2278 vkStream->read((VkBool32*)&forUnmarshaling->rasterizerDiscardEnable, sizeof(VkBool32)); 2279 vkStream->read((VkPolygonMode*)&forUnmarshaling->polygonMode, sizeof(VkPolygonMode)); 2280 vkStream->read((VkCullModeFlags*)&forUnmarshaling->cullMode, sizeof(VkCullModeFlags)); 2281 vkStream->read((VkFrontFace*)&forUnmarshaling->frontFace, sizeof(VkFrontFace)); 2282 vkStream->read((VkBool32*)&forUnmarshaling->depthBiasEnable, sizeof(VkBool32)); 2283 vkStream->read((float*)&forUnmarshaling->depthBiasConstantFactor, sizeof(float)); 2284 vkStream->read((float*)&forUnmarshaling->depthBiasClamp, sizeof(float)); 2285 vkStream->read((float*)&forUnmarshaling->depthBiasSlopeFactor, sizeof(float)); 2286 vkStream->read((float*)&forUnmarshaling->lineWidth, sizeof(float)); 2287 } 2288 2289 void marshal_VkPipelineMultisampleStateCreateInfo( 2290 VulkanStreamGuest* vkStream, 2291 const VkPipelineMultisampleStateCreateInfo* forMarshaling) 2292 { 2293 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2294 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2295 vkStream->putBe32(pNext_size); 2296 if (pNext_size) 2297 { 2298 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2299 marshal_extension_struct(vkStream, forMarshaling->pNext); 2300 } 2301 vkStream->write((VkPipelineMultisampleStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags)); 2302 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->rasterizationSamples, sizeof(VkSampleCountFlagBits)); 2303 vkStream->write((VkBool32*)&forMarshaling->sampleShadingEnable, sizeof(VkBool32)); 2304 vkStream->write((float*)&forMarshaling->minSampleShading, sizeof(float)); 2305 // WARNING PTR CHECK 2306 uint64_t cgen_var_64 = (uint64_t)(uintptr_t)forMarshaling->pSampleMask; 2307 vkStream->putBe64(cgen_var_64); 2308 if (forMarshaling->pSampleMask) 2309 { 2310 vkStream->write((const VkSampleMask*)forMarshaling->pSampleMask, (((forMarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask)); 2311 } 2312 vkStream->write((VkBool32*)&forMarshaling->alphaToCoverageEnable, sizeof(VkBool32)); 2313 vkStream->write((VkBool32*)&forMarshaling->alphaToOneEnable, sizeof(VkBool32)); 2314 } 2315 2316 void unmarshal_VkPipelineMultisampleStateCreateInfo( 2317 VulkanStreamGuest* vkStream, 2318 VkPipelineMultisampleStateCreateInfo* forUnmarshaling) 2319 { 2320 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2321 size_t pNext_size; 2322 pNext_size = vkStream->getBe32(); 2323 if (pNext_size) 2324 { 2325 uint64_t pNext_placeholder; 2326 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2327 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2328 } 2329 vkStream->read((VkPipelineMultisampleStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags)); 2330 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->rasterizationSamples, sizeof(VkSampleCountFlagBits)); 2331 vkStream->read((VkBool32*)&forUnmarshaling->sampleShadingEnable, sizeof(VkBool32)); 2332 vkStream->read((float*)&forUnmarshaling->minSampleShading, sizeof(float)); 2333 // WARNING PTR CHECK 2334 const VkSampleMask* check_pSampleMask; 2335 check_pSampleMask = (const VkSampleMask*)(uintptr_t)vkStream->getBe64(); 2336 if (forUnmarshaling->pSampleMask) 2337 { 2338 if (!(check_pSampleMask)) 2339 { 2340 fprintf(stderr, "fatal: forUnmarshaling->pSampleMask inconsistent between guest and host\n"); 2341 } 2342 vkStream->read((VkSampleMask*)forUnmarshaling->pSampleMask, (((forUnmarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask)); 2343 } 2344 vkStream->read((VkBool32*)&forUnmarshaling->alphaToCoverageEnable, sizeof(VkBool32)); 2345 vkStream->read((VkBool32*)&forUnmarshaling->alphaToOneEnable, sizeof(VkBool32)); 2346 } 2347 2348 void marshal_VkStencilOpState( 2349 VulkanStreamGuest* vkStream, 2350 const VkStencilOpState* forMarshaling) 2351 { 2352 vkStream->write((VkStencilOp*)&forMarshaling->failOp, sizeof(VkStencilOp)); 2353 vkStream->write((VkStencilOp*)&forMarshaling->passOp, sizeof(VkStencilOp)); 2354 vkStream->write((VkStencilOp*)&forMarshaling->depthFailOp, sizeof(VkStencilOp)); 2355 vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp)); 2356 vkStream->write((uint32_t*)&forMarshaling->compareMask, sizeof(uint32_t)); 2357 vkStream->write((uint32_t*)&forMarshaling->writeMask, sizeof(uint32_t)); 2358 vkStream->write((uint32_t*)&forMarshaling->reference, sizeof(uint32_t)); 2359 } 2360 2361 void unmarshal_VkStencilOpState( 2362 VulkanStreamGuest* vkStream, 2363 VkStencilOpState* forUnmarshaling) 2364 { 2365 vkStream->read((VkStencilOp*)&forUnmarshaling->failOp, sizeof(VkStencilOp)); 2366 vkStream->read((VkStencilOp*)&forUnmarshaling->passOp, sizeof(VkStencilOp)); 2367 vkStream->read((VkStencilOp*)&forUnmarshaling->depthFailOp, sizeof(VkStencilOp)); 2368 vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp)); 2369 vkStream->read((uint32_t*)&forUnmarshaling->compareMask, sizeof(uint32_t)); 2370 vkStream->read((uint32_t*)&forUnmarshaling->writeMask, sizeof(uint32_t)); 2371 vkStream->read((uint32_t*)&forUnmarshaling->reference, sizeof(uint32_t)); 2372 } 2373 2374 void marshal_VkPipelineDepthStencilStateCreateInfo( 2375 VulkanStreamGuest* vkStream, 2376 const VkPipelineDepthStencilStateCreateInfo* forMarshaling) 2377 { 2378 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2379 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2380 vkStream->putBe32(pNext_size); 2381 if (pNext_size) 2382 { 2383 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2384 marshal_extension_struct(vkStream, forMarshaling->pNext); 2385 } 2386 vkStream->write((VkPipelineDepthStencilStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineDepthStencilStateCreateFlags)); 2387 vkStream->write((VkBool32*)&forMarshaling->depthTestEnable, sizeof(VkBool32)); 2388 vkStream->write((VkBool32*)&forMarshaling->depthWriteEnable, sizeof(VkBool32)); 2389 vkStream->write((VkCompareOp*)&forMarshaling->depthCompareOp, sizeof(VkCompareOp)); 2390 vkStream->write((VkBool32*)&forMarshaling->depthBoundsTestEnable, sizeof(VkBool32)); 2391 vkStream->write((VkBool32*)&forMarshaling->stencilTestEnable, sizeof(VkBool32)); 2392 marshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forMarshaling->front)); 2393 marshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forMarshaling->back)); 2394 vkStream->write((float*)&forMarshaling->minDepthBounds, sizeof(float)); 2395 vkStream->write((float*)&forMarshaling->maxDepthBounds, sizeof(float)); 2396 } 2397 2398 void unmarshal_VkPipelineDepthStencilStateCreateInfo( 2399 VulkanStreamGuest* vkStream, 2400 VkPipelineDepthStencilStateCreateInfo* forUnmarshaling) 2401 { 2402 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2403 size_t pNext_size; 2404 pNext_size = vkStream->getBe32(); 2405 if (pNext_size) 2406 { 2407 uint64_t pNext_placeholder; 2408 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2409 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2410 } 2411 vkStream->read((VkPipelineDepthStencilStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineDepthStencilStateCreateFlags)); 2412 vkStream->read((VkBool32*)&forUnmarshaling->depthTestEnable, sizeof(VkBool32)); 2413 vkStream->read((VkBool32*)&forUnmarshaling->depthWriteEnable, sizeof(VkBool32)); 2414 vkStream->read((VkCompareOp*)&forUnmarshaling->depthCompareOp, sizeof(VkCompareOp)); 2415 vkStream->read((VkBool32*)&forUnmarshaling->depthBoundsTestEnable, sizeof(VkBool32)); 2416 vkStream->read((VkBool32*)&forUnmarshaling->stencilTestEnable, sizeof(VkBool32)); 2417 unmarshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forUnmarshaling->front)); 2418 unmarshal_VkStencilOpState(vkStream, (VkStencilOpState*)(&forUnmarshaling->back)); 2419 vkStream->read((float*)&forUnmarshaling->minDepthBounds, sizeof(float)); 2420 vkStream->read((float*)&forUnmarshaling->maxDepthBounds, sizeof(float)); 2421 } 2422 2423 void marshal_VkPipelineColorBlendAttachmentState( 2424 VulkanStreamGuest* vkStream, 2425 const VkPipelineColorBlendAttachmentState* forMarshaling) 2426 { 2427 vkStream->write((VkBool32*)&forMarshaling->blendEnable, sizeof(VkBool32)); 2428 vkStream->write((VkBlendFactor*)&forMarshaling->srcColorBlendFactor, sizeof(VkBlendFactor)); 2429 vkStream->write((VkBlendFactor*)&forMarshaling->dstColorBlendFactor, sizeof(VkBlendFactor)); 2430 vkStream->write((VkBlendOp*)&forMarshaling->colorBlendOp, sizeof(VkBlendOp)); 2431 vkStream->write((VkBlendFactor*)&forMarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor)); 2432 vkStream->write((VkBlendFactor*)&forMarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor)); 2433 vkStream->write((VkBlendOp*)&forMarshaling->alphaBlendOp, sizeof(VkBlendOp)); 2434 vkStream->write((VkColorComponentFlags*)&forMarshaling->colorWriteMask, sizeof(VkColorComponentFlags)); 2435 } 2436 2437 void unmarshal_VkPipelineColorBlendAttachmentState( 2438 VulkanStreamGuest* vkStream, 2439 VkPipelineColorBlendAttachmentState* forUnmarshaling) 2440 { 2441 vkStream->read((VkBool32*)&forUnmarshaling->blendEnable, sizeof(VkBool32)); 2442 vkStream->read((VkBlendFactor*)&forUnmarshaling->srcColorBlendFactor, sizeof(VkBlendFactor)); 2443 vkStream->read((VkBlendFactor*)&forUnmarshaling->dstColorBlendFactor, sizeof(VkBlendFactor)); 2444 vkStream->read((VkBlendOp*)&forUnmarshaling->colorBlendOp, sizeof(VkBlendOp)); 2445 vkStream->read((VkBlendFactor*)&forUnmarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor)); 2446 vkStream->read((VkBlendFactor*)&forUnmarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor)); 2447 vkStream->read((VkBlendOp*)&forUnmarshaling->alphaBlendOp, sizeof(VkBlendOp)); 2448 vkStream->read((VkColorComponentFlags*)&forUnmarshaling->colorWriteMask, sizeof(VkColorComponentFlags)); 2449 } 2450 2451 void marshal_VkPipelineColorBlendStateCreateInfo( 2452 VulkanStreamGuest* vkStream, 2453 const VkPipelineColorBlendStateCreateInfo* forMarshaling) 2454 { 2455 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2456 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2457 vkStream->putBe32(pNext_size); 2458 if (pNext_size) 2459 { 2460 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2461 marshal_extension_struct(vkStream, forMarshaling->pNext); 2462 } 2463 vkStream->write((VkPipelineColorBlendStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineColorBlendStateCreateFlags)); 2464 vkStream->write((VkBool32*)&forMarshaling->logicOpEnable, sizeof(VkBool32)); 2465 vkStream->write((VkLogicOp*)&forMarshaling->logicOp, sizeof(VkLogicOp)); 2466 vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t)); 2467 for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) 2468 { 2469 marshal_VkPipelineColorBlendAttachmentState(vkStream, (const VkPipelineColorBlendAttachmentState*)(forMarshaling->pAttachments + i)); 2470 } 2471 vkStream->write((float*)forMarshaling->blendConstants, 4 * sizeof(float)); 2472 } 2473 2474 void unmarshal_VkPipelineColorBlendStateCreateInfo( 2475 VulkanStreamGuest* vkStream, 2476 VkPipelineColorBlendStateCreateInfo* forUnmarshaling) 2477 { 2478 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2479 size_t pNext_size; 2480 pNext_size = vkStream->getBe32(); 2481 if (pNext_size) 2482 { 2483 uint64_t pNext_placeholder; 2484 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2485 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2486 } 2487 vkStream->read((VkPipelineColorBlendStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineColorBlendStateCreateFlags)); 2488 vkStream->read((VkBool32*)&forUnmarshaling->logicOpEnable, sizeof(VkBool32)); 2489 vkStream->read((VkLogicOp*)&forUnmarshaling->logicOp, sizeof(VkLogicOp)); 2490 vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t)); 2491 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) 2492 { 2493 unmarshal_VkPipelineColorBlendAttachmentState(vkStream, (VkPipelineColorBlendAttachmentState*)(forUnmarshaling->pAttachments + i)); 2494 } 2495 vkStream->read((float*)forUnmarshaling->blendConstants, 4 * sizeof(float)); 2496 } 2497 2498 void marshal_VkPipelineDynamicStateCreateInfo( 2499 VulkanStreamGuest* vkStream, 2500 const VkPipelineDynamicStateCreateInfo* forMarshaling) 2501 { 2502 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2503 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2504 vkStream->putBe32(pNext_size); 2505 if (pNext_size) 2506 { 2507 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2508 marshal_extension_struct(vkStream, forMarshaling->pNext); 2509 } 2510 vkStream->write((VkPipelineDynamicStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineDynamicStateCreateFlags)); 2511 vkStream->write((uint32_t*)&forMarshaling->dynamicStateCount, sizeof(uint32_t)); 2512 vkStream->write((const VkDynamicState*)forMarshaling->pDynamicStates, forMarshaling->dynamicStateCount * sizeof(const VkDynamicState)); 2513 } 2514 2515 void unmarshal_VkPipelineDynamicStateCreateInfo( 2516 VulkanStreamGuest* vkStream, 2517 VkPipelineDynamicStateCreateInfo* forUnmarshaling) 2518 { 2519 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2520 size_t pNext_size; 2521 pNext_size = vkStream->getBe32(); 2522 if (pNext_size) 2523 { 2524 uint64_t pNext_placeholder; 2525 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2526 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2527 } 2528 vkStream->read((VkPipelineDynamicStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineDynamicStateCreateFlags)); 2529 vkStream->read((uint32_t*)&forUnmarshaling->dynamicStateCount, sizeof(uint32_t)); 2530 vkStream->read((VkDynamicState*)forUnmarshaling->pDynamicStates, forUnmarshaling->dynamicStateCount * sizeof(const VkDynamicState)); 2531 } 2532 2533 void marshal_VkGraphicsPipelineCreateInfo( 2534 VulkanStreamGuest* vkStream, 2535 const VkGraphicsPipelineCreateInfo* forMarshaling) 2536 { 2537 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2538 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2539 vkStream->putBe32(pNext_size); 2540 if (pNext_size) 2541 { 2542 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2543 marshal_extension_struct(vkStream, forMarshaling->pNext); 2544 } 2545 vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags)); 2546 vkStream->write((uint32_t*)&forMarshaling->stageCount, sizeof(uint32_t)); 2547 for (uint32_t i = 0; i < (uint32_t)forMarshaling->stageCount; ++i) 2548 { 2549 marshal_VkPipelineShaderStageCreateInfo(vkStream, (const VkPipelineShaderStageCreateInfo*)(forMarshaling->pStages + i)); 2550 } 2551 marshal_VkPipelineVertexInputStateCreateInfo(vkStream, (const VkPipelineVertexInputStateCreateInfo*)(forMarshaling->pVertexInputState)); 2552 marshal_VkPipelineInputAssemblyStateCreateInfo(vkStream, (const VkPipelineInputAssemblyStateCreateInfo*)(forMarshaling->pInputAssemblyState)); 2553 // WARNING PTR CHECK 2554 uint64_t cgen_var_66 = (uint64_t)(uintptr_t)forMarshaling->pTessellationState; 2555 vkStream->putBe64(cgen_var_66); 2556 if (forMarshaling->pTessellationState) 2557 { 2558 marshal_VkPipelineTessellationStateCreateInfo(vkStream, (const VkPipelineTessellationStateCreateInfo*)(forMarshaling->pTessellationState)); 2559 } 2560 // WARNING PTR CHECK 2561 uint64_t cgen_var_67 = (uint64_t)(uintptr_t)forMarshaling->pViewportState; 2562 vkStream->putBe64(cgen_var_67); 2563 if (forMarshaling->pViewportState) 2564 { 2565 marshal_VkPipelineViewportStateCreateInfo(vkStream, (const VkPipelineViewportStateCreateInfo*)(forMarshaling->pViewportState)); 2566 } 2567 marshal_VkPipelineRasterizationStateCreateInfo(vkStream, (const VkPipelineRasterizationStateCreateInfo*)(forMarshaling->pRasterizationState)); 2568 // WARNING PTR CHECK 2569 uint64_t cgen_var_68 = (uint64_t)(uintptr_t)forMarshaling->pMultisampleState; 2570 vkStream->putBe64(cgen_var_68); 2571 if (forMarshaling->pMultisampleState) 2572 { 2573 marshal_VkPipelineMultisampleStateCreateInfo(vkStream, (const VkPipelineMultisampleStateCreateInfo*)(forMarshaling->pMultisampleState)); 2574 } 2575 // WARNING PTR CHECK 2576 uint64_t cgen_var_69 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilState; 2577 vkStream->putBe64(cgen_var_69); 2578 if (forMarshaling->pDepthStencilState) 2579 { 2580 marshal_VkPipelineDepthStencilStateCreateInfo(vkStream, (const VkPipelineDepthStencilStateCreateInfo*)(forMarshaling->pDepthStencilState)); 2581 } 2582 // WARNING PTR CHECK 2583 uint64_t cgen_var_70 = (uint64_t)(uintptr_t)forMarshaling->pColorBlendState; 2584 vkStream->putBe64(cgen_var_70); 2585 if (forMarshaling->pColorBlendState) 2586 { 2587 marshal_VkPipelineColorBlendStateCreateInfo(vkStream, (const VkPipelineColorBlendStateCreateInfo*)(forMarshaling->pColorBlendState)); 2588 } 2589 // WARNING PTR CHECK 2590 uint64_t cgen_var_71 = (uint64_t)(uintptr_t)forMarshaling->pDynamicState; 2591 vkStream->putBe64(cgen_var_71); 2592 if (forMarshaling->pDynamicState) 2593 { 2594 marshal_VkPipelineDynamicStateCreateInfo(vkStream, (const VkPipelineDynamicStateCreateInfo*)(forMarshaling->pDynamicState)); 2595 } 2596 uint64_t cgen_var_72; 2597 vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_72, 1); 2598 vkStream->write((uint64_t*)&cgen_var_72, 1 * 8); 2599 uint64_t cgen_var_73; 2600 vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_73, 1); 2601 vkStream->write((uint64_t*)&cgen_var_73, 1 * 8); 2602 vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t)); 2603 uint64_t cgen_var_74; 2604 vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle, &cgen_var_74, 1); 2605 vkStream->write((uint64_t*)&cgen_var_74, 1 * 8); 2606 vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t)); 2607 } 2608 2609 void unmarshal_VkGraphicsPipelineCreateInfo( 2610 VulkanStreamGuest* vkStream, 2611 VkGraphicsPipelineCreateInfo* forUnmarshaling) 2612 { 2613 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2614 size_t pNext_size; 2615 pNext_size = vkStream->getBe32(); 2616 if (pNext_size) 2617 { 2618 uint64_t pNext_placeholder; 2619 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2620 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2621 } 2622 vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags)); 2623 vkStream->read((uint32_t*)&forUnmarshaling->stageCount, sizeof(uint32_t)); 2624 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->stageCount; ++i) 2625 { 2626 unmarshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(forUnmarshaling->pStages + i)); 2627 } 2628 unmarshal_VkPipelineVertexInputStateCreateInfo(vkStream, (VkPipelineVertexInputStateCreateInfo*)(forUnmarshaling->pVertexInputState)); 2629 unmarshal_VkPipelineInputAssemblyStateCreateInfo(vkStream, (VkPipelineInputAssemblyStateCreateInfo*)(forUnmarshaling->pInputAssemblyState)); 2630 // WARNING PTR CHECK 2631 const VkPipelineTessellationStateCreateInfo* check_pTessellationState; 2632 check_pTessellationState = (const VkPipelineTessellationStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2633 if (forUnmarshaling->pTessellationState) 2634 { 2635 if (!(check_pTessellationState)) 2636 { 2637 fprintf(stderr, "fatal: forUnmarshaling->pTessellationState inconsistent between guest and host\n"); 2638 } 2639 unmarshal_VkPipelineTessellationStateCreateInfo(vkStream, (VkPipelineTessellationStateCreateInfo*)(forUnmarshaling->pTessellationState)); 2640 } 2641 // WARNING PTR CHECK 2642 const VkPipelineViewportStateCreateInfo* check_pViewportState; 2643 check_pViewportState = (const VkPipelineViewportStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2644 if (forUnmarshaling->pViewportState) 2645 { 2646 if (!(check_pViewportState)) 2647 { 2648 fprintf(stderr, "fatal: forUnmarshaling->pViewportState inconsistent between guest and host\n"); 2649 } 2650 unmarshal_VkPipelineViewportStateCreateInfo(vkStream, (VkPipelineViewportStateCreateInfo*)(forUnmarshaling->pViewportState)); 2651 } 2652 unmarshal_VkPipelineRasterizationStateCreateInfo(vkStream, (VkPipelineRasterizationStateCreateInfo*)(forUnmarshaling->pRasterizationState)); 2653 // WARNING PTR CHECK 2654 const VkPipelineMultisampleStateCreateInfo* check_pMultisampleState; 2655 check_pMultisampleState = (const VkPipelineMultisampleStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2656 if (forUnmarshaling->pMultisampleState) 2657 { 2658 if (!(check_pMultisampleState)) 2659 { 2660 fprintf(stderr, "fatal: forUnmarshaling->pMultisampleState inconsistent between guest and host\n"); 2661 } 2662 unmarshal_VkPipelineMultisampleStateCreateInfo(vkStream, (VkPipelineMultisampleStateCreateInfo*)(forUnmarshaling->pMultisampleState)); 2663 } 2664 // WARNING PTR CHECK 2665 const VkPipelineDepthStencilStateCreateInfo* check_pDepthStencilState; 2666 check_pDepthStencilState = (const VkPipelineDepthStencilStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2667 if (forUnmarshaling->pDepthStencilState) 2668 { 2669 if (!(check_pDepthStencilState)) 2670 { 2671 fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilState inconsistent between guest and host\n"); 2672 } 2673 unmarshal_VkPipelineDepthStencilStateCreateInfo(vkStream, (VkPipelineDepthStencilStateCreateInfo*)(forUnmarshaling->pDepthStencilState)); 2674 } 2675 // WARNING PTR CHECK 2676 const VkPipelineColorBlendStateCreateInfo* check_pColorBlendState; 2677 check_pColorBlendState = (const VkPipelineColorBlendStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2678 if (forUnmarshaling->pColorBlendState) 2679 { 2680 if (!(check_pColorBlendState)) 2681 { 2682 fprintf(stderr, "fatal: forUnmarshaling->pColorBlendState inconsistent between guest and host\n"); 2683 } 2684 unmarshal_VkPipelineColorBlendStateCreateInfo(vkStream, (VkPipelineColorBlendStateCreateInfo*)(forUnmarshaling->pColorBlendState)); 2685 } 2686 // WARNING PTR CHECK 2687 const VkPipelineDynamicStateCreateInfo* check_pDynamicState; 2688 check_pDynamicState = (const VkPipelineDynamicStateCreateInfo*)(uintptr_t)vkStream->getBe64(); 2689 if (forUnmarshaling->pDynamicState) 2690 { 2691 if (!(check_pDynamicState)) 2692 { 2693 fprintf(stderr, "fatal: forUnmarshaling->pDynamicState inconsistent between guest and host\n"); 2694 } 2695 unmarshal_VkPipelineDynamicStateCreateInfo(vkStream, (VkPipelineDynamicStateCreateInfo*)(forUnmarshaling->pDynamicState)); 2696 } 2697 uint64_t cgen_var_81; 2698 vkStream->read((uint64_t*)&cgen_var_81, 1 * 8); 2699 vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_81, (VkPipelineLayout*)&forUnmarshaling->layout, 1); 2700 uint64_t cgen_var_82; 2701 vkStream->read((uint64_t*)&cgen_var_82, 1 * 8); 2702 vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_82, (VkRenderPass*)&forUnmarshaling->renderPass, 1); 2703 vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t)); 2704 uint64_t cgen_var_83; 2705 vkStream->read((uint64_t*)&cgen_var_83, 1 * 8); 2706 vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_83, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1); 2707 vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t)); 2708 } 2709 2710 void marshal_VkComputePipelineCreateInfo( 2711 VulkanStreamGuest* vkStream, 2712 const VkComputePipelineCreateInfo* forMarshaling) 2713 { 2714 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2715 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2716 vkStream->putBe32(pNext_size); 2717 if (pNext_size) 2718 { 2719 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2720 marshal_extension_struct(vkStream, forMarshaling->pNext); 2721 } 2722 vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags)); 2723 marshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(&forMarshaling->stage)); 2724 uint64_t cgen_var_84; 2725 vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_84, 1); 2726 vkStream->write((uint64_t*)&cgen_var_84, 1 * 8); 2727 uint64_t cgen_var_85; 2728 vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle, &cgen_var_85, 1); 2729 vkStream->write((uint64_t*)&cgen_var_85, 1 * 8); 2730 vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t)); 2731 } 2732 2733 void unmarshal_VkComputePipelineCreateInfo( 2734 VulkanStreamGuest* vkStream, 2735 VkComputePipelineCreateInfo* forUnmarshaling) 2736 { 2737 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2738 size_t pNext_size; 2739 pNext_size = vkStream->getBe32(); 2740 if (pNext_size) 2741 { 2742 uint64_t pNext_placeholder; 2743 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2744 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2745 } 2746 vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags)); 2747 unmarshal_VkPipelineShaderStageCreateInfo(vkStream, (VkPipelineShaderStageCreateInfo*)(&forUnmarshaling->stage)); 2748 uint64_t cgen_var_86; 2749 vkStream->read((uint64_t*)&cgen_var_86, 1 * 8); 2750 vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_86, (VkPipelineLayout*)&forUnmarshaling->layout, 1); 2751 uint64_t cgen_var_87; 2752 vkStream->read((uint64_t*)&cgen_var_87, 1 * 8); 2753 vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_87, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1); 2754 vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t)); 2755 } 2756 2757 void marshal_VkPushConstantRange( 2758 VulkanStreamGuest* vkStream, 2759 const VkPushConstantRange* forMarshaling) 2760 { 2761 vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags)); 2762 vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t)); 2763 vkStream->write((uint32_t*)&forMarshaling->size, sizeof(uint32_t)); 2764 } 2765 2766 void unmarshal_VkPushConstantRange( 2767 VulkanStreamGuest* vkStream, 2768 VkPushConstantRange* forUnmarshaling) 2769 { 2770 vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags)); 2771 vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t)); 2772 vkStream->read((uint32_t*)&forUnmarshaling->size, sizeof(uint32_t)); 2773 } 2774 2775 void marshal_VkPipelineLayoutCreateInfo( 2776 VulkanStreamGuest* vkStream, 2777 const VkPipelineLayoutCreateInfo* forMarshaling) 2778 { 2779 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2780 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2781 vkStream->putBe32(pNext_size); 2782 if (pNext_size) 2783 { 2784 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2785 marshal_extension_struct(vkStream, forMarshaling->pNext); 2786 } 2787 vkStream->write((VkPipelineLayoutCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineLayoutCreateFlags)); 2788 vkStream->write((uint32_t*)&forMarshaling->setLayoutCount, sizeof(uint32_t)); 2789 if (forMarshaling->setLayoutCount) 2790 { 2791 uint64_t* cgen_var_88; 2792 vkStream->alloc((void**)&cgen_var_88, forMarshaling->setLayoutCount * 8); 2793 vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(forMarshaling->pSetLayouts, cgen_var_88, forMarshaling->setLayoutCount); 2794 vkStream->write((uint64_t*)cgen_var_88, forMarshaling->setLayoutCount * 8); 2795 } 2796 vkStream->write((uint32_t*)&forMarshaling->pushConstantRangeCount, sizeof(uint32_t)); 2797 for (uint32_t i = 0; i < (uint32_t)forMarshaling->pushConstantRangeCount; ++i) 2798 { 2799 marshal_VkPushConstantRange(vkStream, (const VkPushConstantRange*)(forMarshaling->pPushConstantRanges + i)); 2800 } 2801 } 2802 2803 void unmarshal_VkPipelineLayoutCreateInfo( 2804 VulkanStreamGuest* vkStream, 2805 VkPipelineLayoutCreateInfo* forUnmarshaling) 2806 { 2807 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2808 size_t pNext_size; 2809 pNext_size = vkStream->getBe32(); 2810 if (pNext_size) 2811 { 2812 uint64_t pNext_placeholder; 2813 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2814 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2815 } 2816 vkStream->read((VkPipelineLayoutCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineLayoutCreateFlags)); 2817 vkStream->read((uint32_t*)&forUnmarshaling->setLayoutCount, sizeof(uint32_t)); 2818 if (forUnmarshaling->setLayoutCount) 2819 { 2820 uint64_t* cgen_var_89; 2821 vkStream->alloc((void**)&cgen_var_89, forUnmarshaling->setLayoutCount * 8); 2822 vkStream->read((uint64_t*)cgen_var_89, forUnmarshaling->setLayoutCount * 8); 2823 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(cgen_var_89, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts, forUnmarshaling->setLayoutCount); 2824 } 2825 vkStream->read((uint32_t*)&forUnmarshaling->pushConstantRangeCount, sizeof(uint32_t)); 2826 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->pushConstantRangeCount; ++i) 2827 { 2828 unmarshal_VkPushConstantRange(vkStream, (VkPushConstantRange*)(forUnmarshaling->pPushConstantRanges + i)); 2829 } 2830 } 2831 2832 void marshal_VkSamplerCreateInfo( 2833 VulkanStreamGuest* vkStream, 2834 const VkSamplerCreateInfo* forMarshaling) 2835 { 2836 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2837 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2838 vkStream->putBe32(pNext_size); 2839 if (pNext_size) 2840 { 2841 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2842 marshal_extension_struct(vkStream, forMarshaling->pNext); 2843 } 2844 vkStream->write((VkSamplerCreateFlags*)&forMarshaling->flags, sizeof(VkSamplerCreateFlags)); 2845 vkStream->write((VkFilter*)&forMarshaling->magFilter, sizeof(VkFilter)); 2846 vkStream->write((VkFilter*)&forMarshaling->minFilter, sizeof(VkFilter)); 2847 vkStream->write((VkSamplerMipmapMode*)&forMarshaling->mipmapMode, sizeof(VkSamplerMipmapMode)); 2848 vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeU, sizeof(VkSamplerAddressMode)); 2849 vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeV, sizeof(VkSamplerAddressMode)); 2850 vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeW, sizeof(VkSamplerAddressMode)); 2851 vkStream->write((float*)&forMarshaling->mipLodBias, sizeof(float)); 2852 vkStream->write((VkBool32*)&forMarshaling->anisotropyEnable, sizeof(VkBool32)); 2853 vkStream->write((float*)&forMarshaling->maxAnisotropy, sizeof(float)); 2854 vkStream->write((VkBool32*)&forMarshaling->compareEnable, sizeof(VkBool32)); 2855 vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp)); 2856 vkStream->write((float*)&forMarshaling->minLod, sizeof(float)); 2857 vkStream->write((float*)&forMarshaling->maxLod, sizeof(float)); 2858 vkStream->write((VkBorderColor*)&forMarshaling->borderColor, sizeof(VkBorderColor)); 2859 vkStream->write((VkBool32*)&forMarshaling->unnormalizedCoordinates, sizeof(VkBool32)); 2860 } 2861 2862 void unmarshal_VkSamplerCreateInfo( 2863 VulkanStreamGuest* vkStream, 2864 VkSamplerCreateInfo* forUnmarshaling) 2865 { 2866 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2867 size_t pNext_size; 2868 pNext_size = vkStream->getBe32(); 2869 if (pNext_size) 2870 { 2871 uint64_t pNext_placeholder; 2872 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2873 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2874 } 2875 vkStream->read((VkSamplerCreateFlags*)&forUnmarshaling->flags, sizeof(VkSamplerCreateFlags)); 2876 vkStream->read((VkFilter*)&forUnmarshaling->magFilter, sizeof(VkFilter)); 2877 vkStream->read((VkFilter*)&forUnmarshaling->minFilter, sizeof(VkFilter)); 2878 vkStream->read((VkSamplerMipmapMode*)&forUnmarshaling->mipmapMode, sizeof(VkSamplerMipmapMode)); 2879 vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeU, sizeof(VkSamplerAddressMode)); 2880 vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeV, sizeof(VkSamplerAddressMode)); 2881 vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeW, sizeof(VkSamplerAddressMode)); 2882 vkStream->read((float*)&forUnmarshaling->mipLodBias, sizeof(float)); 2883 vkStream->read((VkBool32*)&forUnmarshaling->anisotropyEnable, sizeof(VkBool32)); 2884 vkStream->read((float*)&forUnmarshaling->maxAnisotropy, sizeof(float)); 2885 vkStream->read((VkBool32*)&forUnmarshaling->compareEnable, sizeof(VkBool32)); 2886 vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp)); 2887 vkStream->read((float*)&forUnmarshaling->minLod, sizeof(float)); 2888 vkStream->read((float*)&forUnmarshaling->maxLod, sizeof(float)); 2889 vkStream->read((VkBorderColor*)&forUnmarshaling->borderColor, sizeof(VkBorderColor)); 2890 vkStream->read((VkBool32*)&forUnmarshaling->unnormalizedCoordinates, sizeof(VkBool32)); 2891 } 2892 2893 void marshal_VkDescriptorSetLayoutBinding( 2894 VulkanStreamGuest* vkStream, 2895 const VkDescriptorSetLayoutBinding* forMarshaling) 2896 { 2897 vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); 2898 vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType)); 2899 vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t)); 2900 vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags)); 2901 // WARNING PTR CHECK 2902 uint64_t cgen_var_90 = (uint64_t)(uintptr_t)forMarshaling->pImmutableSamplers; 2903 vkStream->putBe64(cgen_var_90); 2904 if (forMarshaling->pImmutableSamplers) 2905 { 2906 if (forMarshaling->descriptorCount) 2907 { 2908 uint64_t* cgen_var_91; 2909 vkStream->alloc((void**)&cgen_var_91, forMarshaling->descriptorCount * 8); 2910 vkStream->handleMapping()->mapHandles_VkSampler_u64(forMarshaling->pImmutableSamplers, cgen_var_91, forMarshaling->descriptorCount); 2911 vkStream->write((uint64_t*)cgen_var_91, forMarshaling->descriptorCount * 8); 2912 } 2913 } 2914 } 2915 2916 void unmarshal_VkDescriptorSetLayoutBinding( 2917 VulkanStreamGuest* vkStream, 2918 VkDescriptorSetLayoutBinding* forUnmarshaling) 2919 { 2920 vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t)); 2921 vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType)); 2922 vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t)); 2923 vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags)); 2924 // WARNING PTR CHECK 2925 const VkSampler* check_pImmutableSamplers; 2926 check_pImmutableSamplers = (const VkSampler*)(uintptr_t)vkStream->getBe64(); 2927 if (forUnmarshaling->pImmutableSamplers) 2928 { 2929 if (!(check_pImmutableSamplers)) 2930 { 2931 fprintf(stderr, "fatal: forUnmarshaling->pImmutableSamplers inconsistent between guest and host\n"); 2932 } 2933 if (forUnmarshaling->descriptorCount) 2934 { 2935 uint64_t* cgen_var_93; 2936 vkStream->alloc((void**)&cgen_var_93, forUnmarshaling->descriptorCount * 8); 2937 vkStream->read((uint64_t*)cgen_var_93, forUnmarshaling->descriptorCount * 8); 2938 vkStream->handleMapping()->mapHandles_u64_VkSampler(cgen_var_93, (VkSampler*)forUnmarshaling->pImmutableSamplers, forUnmarshaling->descriptorCount); 2939 } 2940 } 2941 } 2942 2943 void marshal_VkDescriptorSetLayoutCreateInfo( 2944 VulkanStreamGuest* vkStream, 2945 const VkDescriptorSetLayoutCreateInfo* forMarshaling) 2946 { 2947 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 2948 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 2949 vkStream->putBe32(pNext_size); 2950 if (pNext_size) 2951 { 2952 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 2953 marshal_extension_struct(vkStream, forMarshaling->pNext); 2954 } 2955 vkStream->write((VkDescriptorSetLayoutCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorSetLayoutCreateFlags)); 2956 vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t)); 2957 for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindingCount; ++i) 2958 { 2959 marshal_VkDescriptorSetLayoutBinding(vkStream, (const VkDescriptorSetLayoutBinding*)(forMarshaling->pBindings + i)); 2960 } 2961 } 2962 2963 void unmarshal_VkDescriptorSetLayoutCreateInfo( 2964 VulkanStreamGuest* vkStream, 2965 VkDescriptorSetLayoutCreateInfo* forUnmarshaling) 2966 { 2967 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 2968 size_t pNext_size; 2969 pNext_size = vkStream->getBe32(); 2970 if (pNext_size) 2971 { 2972 uint64_t pNext_placeholder; 2973 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 2974 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 2975 } 2976 vkStream->read((VkDescriptorSetLayoutCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorSetLayoutCreateFlags)); 2977 vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t)); 2978 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindingCount; ++i) 2979 { 2980 unmarshal_VkDescriptorSetLayoutBinding(vkStream, (VkDescriptorSetLayoutBinding*)(forUnmarshaling->pBindings + i)); 2981 } 2982 } 2983 2984 void marshal_VkDescriptorPoolSize( 2985 VulkanStreamGuest* vkStream, 2986 const VkDescriptorPoolSize* forMarshaling) 2987 { 2988 vkStream->write((VkDescriptorType*)&forMarshaling->type, sizeof(VkDescriptorType)); 2989 vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t)); 2990 } 2991 2992 void unmarshal_VkDescriptorPoolSize( 2993 VulkanStreamGuest* vkStream, 2994 VkDescriptorPoolSize* forUnmarshaling) 2995 { 2996 vkStream->read((VkDescriptorType*)&forUnmarshaling->type, sizeof(VkDescriptorType)); 2997 vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t)); 2998 } 2999 3000 void marshal_VkDescriptorPoolCreateInfo( 3001 VulkanStreamGuest* vkStream, 3002 const VkDescriptorPoolCreateInfo* forMarshaling) 3003 { 3004 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3005 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3006 vkStream->putBe32(pNext_size); 3007 if (pNext_size) 3008 { 3009 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3010 marshal_extension_struct(vkStream, forMarshaling->pNext); 3011 } 3012 vkStream->write((VkDescriptorPoolCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorPoolCreateFlags)); 3013 vkStream->write((uint32_t*)&forMarshaling->maxSets, sizeof(uint32_t)); 3014 vkStream->write((uint32_t*)&forMarshaling->poolSizeCount, sizeof(uint32_t)); 3015 for (uint32_t i = 0; i < (uint32_t)forMarshaling->poolSizeCount; ++i) 3016 { 3017 marshal_VkDescriptorPoolSize(vkStream, (const VkDescriptorPoolSize*)(forMarshaling->pPoolSizes + i)); 3018 } 3019 } 3020 3021 void unmarshal_VkDescriptorPoolCreateInfo( 3022 VulkanStreamGuest* vkStream, 3023 VkDescriptorPoolCreateInfo* forUnmarshaling) 3024 { 3025 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3026 size_t pNext_size; 3027 pNext_size = vkStream->getBe32(); 3028 if (pNext_size) 3029 { 3030 uint64_t pNext_placeholder; 3031 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3032 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3033 } 3034 vkStream->read((VkDescriptorPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorPoolCreateFlags)); 3035 vkStream->read((uint32_t*)&forUnmarshaling->maxSets, sizeof(uint32_t)); 3036 vkStream->read((uint32_t*)&forUnmarshaling->poolSizeCount, sizeof(uint32_t)); 3037 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->poolSizeCount; ++i) 3038 { 3039 unmarshal_VkDescriptorPoolSize(vkStream, (VkDescriptorPoolSize*)(forUnmarshaling->pPoolSizes + i)); 3040 } 3041 } 3042 3043 void marshal_VkDescriptorSetAllocateInfo( 3044 VulkanStreamGuest* vkStream, 3045 const VkDescriptorSetAllocateInfo* forMarshaling) 3046 { 3047 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3048 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3049 vkStream->putBe32(pNext_size); 3050 if (pNext_size) 3051 { 3052 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3053 marshal_extension_struct(vkStream, forMarshaling->pNext); 3054 } 3055 uint64_t cgen_var_94; 3056 vkStream->handleMapping()->mapHandles_VkDescriptorPool_u64(&forMarshaling->descriptorPool, &cgen_var_94, 1); 3057 vkStream->write((uint64_t*)&cgen_var_94, 1 * 8); 3058 vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t)); 3059 if (forMarshaling->descriptorSetCount) 3060 { 3061 uint64_t* cgen_var_95; 3062 vkStream->alloc((void**)&cgen_var_95, forMarshaling->descriptorSetCount * 8); 3063 vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(forMarshaling->pSetLayouts, cgen_var_95, forMarshaling->descriptorSetCount); 3064 vkStream->write((uint64_t*)cgen_var_95, forMarshaling->descriptorSetCount * 8); 3065 } 3066 } 3067 3068 void unmarshal_VkDescriptorSetAllocateInfo( 3069 VulkanStreamGuest* vkStream, 3070 VkDescriptorSetAllocateInfo* forUnmarshaling) 3071 { 3072 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3073 size_t pNext_size; 3074 pNext_size = vkStream->getBe32(); 3075 if (pNext_size) 3076 { 3077 uint64_t pNext_placeholder; 3078 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3079 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3080 } 3081 uint64_t cgen_var_96; 3082 vkStream->read((uint64_t*)&cgen_var_96, 1 * 8); 3083 vkStream->handleMapping()->mapHandles_u64_VkDescriptorPool(&cgen_var_96, (VkDescriptorPool*)&forUnmarshaling->descriptorPool, 1); 3084 vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t)); 3085 if (forUnmarshaling->descriptorSetCount) 3086 { 3087 uint64_t* cgen_var_97; 3088 vkStream->alloc((void**)&cgen_var_97, forUnmarshaling->descriptorSetCount * 8); 3089 vkStream->read((uint64_t*)cgen_var_97, forUnmarshaling->descriptorSetCount * 8); 3090 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(cgen_var_97, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts, forUnmarshaling->descriptorSetCount); 3091 } 3092 } 3093 3094 void marshal_VkDescriptorImageInfo( 3095 VulkanStreamGuest* vkStream, 3096 const VkDescriptorImageInfo* forMarshaling) 3097 { 3098 uint64_t cgen_var_98; 3099 vkStream->handleMapping()->mapHandles_VkSampler_u64(&forMarshaling->sampler, &cgen_var_98, 1); 3100 vkStream->write((uint64_t*)&cgen_var_98, 1 * 8); 3101 uint64_t cgen_var_99; 3102 vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_99, 1); 3103 vkStream->write((uint64_t*)&cgen_var_99, 1 * 8); 3104 vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout)); 3105 } 3106 3107 void unmarshal_VkDescriptorImageInfo( 3108 VulkanStreamGuest* vkStream, 3109 VkDescriptorImageInfo* forUnmarshaling) 3110 { 3111 uint64_t cgen_var_100; 3112 vkStream->read((uint64_t*)&cgen_var_100, 1 * 8); 3113 vkStream->handleMapping()->mapHandles_u64_VkSampler(&cgen_var_100, (VkSampler*)&forUnmarshaling->sampler, 1); 3114 uint64_t cgen_var_101; 3115 vkStream->read((uint64_t*)&cgen_var_101, 1 * 8); 3116 vkStream->handleMapping()->mapHandles_u64_VkImageView(&cgen_var_101, (VkImageView*)&forUnmarshaling->imageView, 1); 3117 vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout)); 3118 } 3119 3120 void marshal_VkDescriptorBufferInfo( 3121 VulkanStreamGuest* vkStream, 3122 const VkDescriptorBufferInfo* forMarshaling) 3123 { 3124 uint64_t cgen_var_102; 3125 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_102, 1); 3126 vkStream->write((uint64_t*)&cgen_var_102, 1 * 8); 3127 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 3128 vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize)); 3129 } 3130 3131 void unmarshal_VkDescriptorBufferInfo( 3132 VulkanStreamGuest* vkStream, 3133 VkDescriptorBufferInfo* forUnmarshaling) 3134 { 3135 uint64_t cgen_var_103; 3136 vkStream->read((uint64_t*)&cgen_var_103, 1 * 8); 3137 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_103, (VkBuffer*)&forUnmarshaling->buffer, 1); 3138 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 3139 vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize)); 3140 } 3141 3142 void marshal_VkWriteDescriptorSet( 3143 VulkanStreamGuest* vkStream, 3144 const VkWriteDescriptorSet* forMarshaling) 3145 { 3146 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3147 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3148 vkStream->putBe32(pNext_size); 3149 if (pNext_size) 3150 { 3151 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3152 marshal_extension_struct(vkStream, forMarshaling->pNext); 3153 } 3154 uint64_t cgen_var_104; 3155 vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_104, 1); 3156 vkStream->write((uint64_t*)&cgen_var_104, 1 * 8); 3157 vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t)); 3158 vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t)); 3159 vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t)); 3160 vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType)); 3161 // WARNING PTR CHECK 3162 uint64_t cgen_var_105 = (uint64_t)(uintptr_t)forMarshaling->pImageInfo; 3163 vkStream->putBe64(cgen_var_105); 3164 if (forMarshaling->pImageInfo) 3165 { 3166 for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i) 3167 { 3168 marshal_VkDescriptorImageInfo(vkStream, (const VkDescriptorImageInfo*)(forMarshaling->pImageInfo + i)); 3169 } 3170 } 3171 // WARNING PTR CHECK 3172 uint64_t cgen_var_106 = (uint64_t)(uintptr_t)forMarshaling->pBufferInfo; 3173 vkStream->putBe64(cgen_var_106); 3174 if (forMarshaling->pBufferInfo) 3175 { 3176 for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i) 3177 { 3178 marshal_VkDescriptorBufferInfo(vkStream, (const VkDescriptorBufferInfo*)(forMarshaling->pBufferInfo + i)); 3179 } 3180 } 3181 // WARNING PTR CHECK 3182 uint64_t cgen_var_107 = (uint64_t)(uintptr_t)forMarshaling->pTexelBufferView; 3183 vkStream->putBe64(cgen_var_107); 3184 if (forMarshaling->pTexelBufferView) 3185 { 3186 if (forMarshaling->descriptorCount) 3187 { 3188 uint64_t* cgen_var_108; 3189 vkStream->alloc((void**)&cgen_var_108, forMarshaling->descriptorCount * 8); 3190 vkStream->handleMapping()->mapHandles_VkBufferView_u64(forMarshaling->pTexelBufferView, cgen_var_108, forMarshaling->descriptorCount); 3191 vkStream->write((uint64_t*)cgen_var_108, forMarshaling->descriptorCount * 8); 3192 } 3193 } 3194 } 3195 3196 void unmarshal_VkWriteDescriptorSet( 3197 VulkanStreamGuest* vkStream, 3198 VkWriteDescriptorSet* forUnmarshaling) 3199 { 3200 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3201 size_t pNext_size; 3202 pNext_size = vkStream->getBe32(); 3203 if (pNext_size) 3204 { 3205 uint64_t pNext_placeholder; 3206 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3207 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3208 } 3209 uint64_t cgen_var_109; 3210 vkStream->read((uint64_t*)&cgen_var_109, 1 * 8); 3211 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_109, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1); 3212 vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t)); 3213 vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t)); 3214 vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t)); 3215 vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType)); 3216 // WARNING PTR CHECK 3217 const VkDescriptorImageInfo* check_pImageInfo; 3218 check_pImageInfo = (const VkDescriptorImageInfo*)(uintptr_t)vkStream->getBe64(); 3219 if (forUnmarshaling->pImageInfo) 3220 { 3221 if (!(check_pImageInfo)) 3222 { 3223 fprintf(stderr, "fatal: forUnmarshaling->pImageInfo inconsistent between guest and host\n"); 3224 } 3225 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i) 3226 { 3227 unmarshal_VkDescriptorImageInfo(vkStream, (VkDescriptorImageInfo*)(forUnmarshaling->pImageInfo + i)); 3228 } 3229 } 3230 // WARNING PTR CHECK 3231 const VkDescriptorBufferInfo* check_pBufferInfo; 3232 check_pBufferInfo = (const VkDescriptorBufferInfo*)(uintptr_t)vkStream->getBe64(); 3233 if (forUnmarshaling->pBufferInfo) 3234 { 3235 if (!(check_pBufferInfo)) 3236 { 3237 fprintf(stderr, "fatal: forUnmarshaling->pBufferInfo inconsistent between guest and host\n"); 3238 } 3239 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i) 3240 { 3241 unmarshal_VkDescriptorBufferInfo(vkStream, (VkDescriptorBufferInfo*)(forUnmarshaling->pBufferInfo + i)); 3242 } 3243 } 3244 // WARNING PTR CHECK 3245 const VkBufferView* check_pTexelBufferView; 3246 check_pTexelBufferView = (const VkBufferView*)(uintptr_t)vkStream->getBe64(); 3247 if (forUnmarshaling->pTexelBufferView) 3248 { 3249 if (!(check_pTexelBufferView)) 3250 { 3251 fprintf(stderr, "fatal: forUnmarshaling->pTexelBufferView inconsistent between guest and host\n"); 3252 } 3253 if (forUnmarshaling->descriptorCount) 3254 { 3255 uint64_t* cgen_var_113; 3256 vkStream->alloc((void**)&cgen_var_113, forUnmarshaling->descriptorCount * 8); 3257 vkStream->read((uint64_t*)cgen_var_113, forUnmarshaling->descriptorCount * 8); 3258 vkStream->handleMapping()->mapHandles_u64_VkBufferView(cgen_var_113, (VkBufferView*)forUnmarshaling->pTexelBufferView, forUnmarshaling->descriptorCount); 3259 } 3260 } 3261 } 3262 3263 void marshal_VkCopyDescriptorSet( 3264 VulkanStreamGuest* vkStream, 3265 const VkCopyDescriptorSet* forMarshaling) 3266 { 3267 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3268 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3269 vkStream->putBe32(pNext_size); 3270 if (pNext_size) 3271 { 3272 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3273 marshal_extension_struct(vkStream, forMarshaling->pNext); 3274 } 3275 uint64_t cgen_var_114; 3276 vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->srcSet, &cgen_var_114, 1); 3277 vkStream->write((uint64_t*)&cgen_var_114, 1 * 8); 3278 vkStream->write((uint32_t*)&forMarshaling->srcBinding, sizeof(uint32_t)); 3279 vkStream->write((uint32_t*)&forMarshaling->srcArrayElement, sizeof(uint32_t)); 3280 uint64_t cgen_var_115; 3281 vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_115, 1); 3282 vkStream->write((uint64_t*)&cgen_var_115, 1 * 8); 3283 vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t)); 3284 vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t)); 3285 vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t)); 3286 } 3287 3288 void unmarshal_VkCopyDescriptorSet( 3289 VulkanStreamGuest* vkStream, 3290 VkCopyDescriptorSet* forUnmarshaling) 3291 { 3292 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3293 size_t pNext_size; 3294 pNext_size = vkStream->getBe32(); 3295 if (pNext_size) 3296 { 3297 uint64_t pNext_placeholder; 3298 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3299 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3300 } 3301 uint64_t cgen_var_116; 3302 vkStream->read((uint64_t*)&cgen_var_116, 1 * 8); 3303 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_116, (VkDescriptorSet*)&forUnmarshaling->srcSet, 1); 3304 vkStream->read((uint32_t*)&forUnmarshaling->srcBinding, sizeof(uint32_t)); 3305 vkStream->read((uint32_t*)&forUnmarshaling->srcArrayElement, sizeof(uint32_t)); 3306 uint64_t cgen_var_117; 3307 vkStream->read((uint64_t*)&cgen_var_117, 1 * 8); 3308 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_117, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1); 3309 vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t)); 3310 vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t)); 3311 vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t)); 3312 } 3313 3314 void marshal_VkFramebufferCreateInfo( 3315 VulkanStreamGuest* vkStream, 3316 const VkFramebufferCreateInfo* forMarshaling) 3317 { 3318 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3319 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3320 vkStream->putBe32(pNext_size); 3321 if (pNext_size) 3322 { 3323 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3324 marshal_extension_struct(vkStream, forMarshaling->pNext); 3325 } 3326 vkStream->write((VkFramebufferCreateFlags*)&forMarshaling->flags, sizeof(VkFramebufferCreateFlags)); 3327 uint64_t cgen_var_118; 3328 vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_118, 1); 3329 vkStream->write((uint64_t*)&cgen_var_118, 1 * 8); 3330 vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t)); 3331 if (forMarshaling->attachmentCount) 3332 { 3333 uint64_t* cgen_var_119; 3334 vkStream->alloc((void**)&cgen_var_119, forMarshaling->attachmentCount * 8); 3335 vkStream->handleMapping()->mapHandles_VkImageView_u64(forMarshaling->pAttachments, cgen_var_119, forMarshaling->attachmentCount); 3336 vkStream->write((uint64_t*)cgen_var_119, forMarshaling->attachmentCount * 8); 3337 } 3338 vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t)); 3339 vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t)); 3340 vkStream->write((uint32_t*)&forMarshaling->layers, sizeof(uint32_t)); 3341 } 3342 3343 void unmarshal_VkFramebufferCreateInfo( 3344 VulkanStreamGuest* vkStream, 3345 VkFramebufferCreateInfo* forUnmarshaling) 3346 { 3347 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3348 size_t pNext_size; 3349 pNext_size = vkStream->getBe32(); 3350 if (pNext_size) 3351 { 3352 uint64_t pNext_placeholder; 3353 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3354 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3355 } 3356 vkStream->read((VkFramebufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkFramebufferCreateFlags)); 3357 uint64_t cgen_var_120; 3358 vkStream->read((uint64_t*)&cgen_var_120, 1 * 8); 3359 vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_120, (VkRenderPass*)&forUnmarshaling->renderPass, 1); 3360 vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t)); 3361 if (forUnmarshaling->attachmentCount) 3362 { 3363 uint64_t* cgen_var_121; 3364 vkStream->alloc((void**)&cgen_var_121, forUnmarshaling->attachmentCount * 8); 3365 vkStream->read((uint64_t*)cgen_var_121, forUnmarshaling->attachmentCount * 8); 3366 vkStream->handleMapping()->mapHandles_u64_VkImageView(cgen_var_121, (VkImageView*)forUnmarshaling->pAttachments, forUnmarshaling->attachmentCount); 3367 } 3368 vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t)); 3369 vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t)); 3370 vkStream->read((uint32_t*)&forUnmarshaling->layers, sizeof(uint32_t)); 3371 } 3372 3373 void marshal_VkAttachmentDescription( 3374 VulkanStreamGuest* vkStream, 3375 const VkAttachmentDescription* forMarshaling) 3376 { 3377 vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags, sizeof(VkAttachmentDescriptionFlags)); 3378 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 3379 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits)); 3380 vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp)); 3381 vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp)); 3382 vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp)); 3383 vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp)); 3384 vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout)); 3385 vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout)); 3386 } 3387 3388 void unmarshal_VkAttachmentDescription( 3389 VulkanStreamGuest* vkStream, 3390 VkAttachmentDescription* forUnmarshaling) 3391 { 3392 vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkAttachmentDescriptionFlags)); 3393 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 3394 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits)); 3395 vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp)); 3396 vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp)); 3397 vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp)); 3398 vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp)); 3399 vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout)); 3400 vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout)); 3401 } 3402 3403 void marshal_VkAttachmentReference( 3404 VulkanStreamGuest* vkStream, 3405 const VkAttachmentReference* forMarshaling) 3406 { 3407 vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t)); 3408 vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout)); 3409 } 3410 3411 void unmarshal_VkAttachmentReference( 3412 VulkanStreamGuest* vkStream, 3413 VkAttachmentReference* forUnmarshaling) 3414 { 3415 vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t)); 3416 vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout)); 3417 } 3418 3419 void marshal_VkSubpassDescription( 3420 VulkanStreamGuest* vkStream, 3421 const VkSubpassDescription* forMarshaling) 3422 { 3423 vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags, sizeof(VkSubpassDescriptionFlags)); 3424 vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 3425 vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t)); 3426 for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i) 3427 { 3428 marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pInputAttachments + i)); 3429 } 3430 vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t)); 3431 for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) 3432 { 3433 marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pColorAttachments + i)); 3434 } 3435 // WARNING PTR CHECK 3436 uint64_t cgen_var_122 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments; 3437 vkStream->putBe64(cgen_var_122); 3438 if (forMarshaling->pResolveAttachments) 3439 { 3440 for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) 3441 { 3442 marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pResolveAttachments + i)); 3443 } 3444 } 3445 // WARNING PTR CHECK 3446 uint64_t cgen_var_123 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment; 3447 vkStream->putBe64(cgen_var_123); 3448 if (forMarshaling->pDepthStencilAttachment) 3449 { 3450 marshal_VkAttachmentReference(vkStream, (const VkAttachmentReference*)(forMarshaling->pDepthStencilAttachment)); 3451 } 3452 vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t)); 3453 vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments, forMarshaling->preserveAttachmentCount * sizeof(const uint32_t)); 3454 } 3455 3456 void unmarshal_VkSubpassDescription( 3457 VulkanStreamGuest* vkStream, 3458 VkSubpassDescription* forUnmarshaling) 3459 { 3460 vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkSubpassDescriptionFlags)); 3461 vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 3462 vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t)); 3463 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i) 3464 { 3465 unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pInputAttachments + i)); 3466 } 3467 vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t)); 3468 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) 3469 { 3470 unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pColorAttachments + i)); 3471 } 3472 // WARNING PTR CHECK 3473 const VkAttachmentReference* check_pResolveAttachments; 3474 check_pResolveAttachments = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64(); 3475 if (forUnmarshaling->pResolveAttachments) 3476 { 3477 if (!(check_pResolveAttachments)) 3478 { 3479 fprintf(stderr, "fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and host\n"); 3480 } 3481 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) 3482 { 3483 unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pResolveAttachments + i)); 3484 } 3485 } 3486 // WARNING PTR CHECK 3487 const VkAttachmentReference* check_pDepthStencilAttachment; 3488 check_pDepthStencilAttachment = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64(); 3489 if (forUnmarshaling->pDepthStencilAttachment) 3490 { 3491 if (!(check_pDepthStencilAttachment)) 3492 { 3493 fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest and host\n"); 3494 } 3495 unmarshal_VkAttachmentReference(vkStream, (VkAttachmentReference*)(forUnmarshaling->pDepthStencilAttachment)); 3496 } 3497 vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t)); 3498 vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments, forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t)); 3499 } 3500 3501 void marshal_VkSubpassDependency( 3502 VulkanStreamGuest* vkStream, 3503 const VkSubpassDependency* forMarshaling) 3504 { 3505 vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t)); 3506 vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t)); 3507 vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask, sizeof(VkPipelineStageFlags)); 3508 vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask, sizeof(VkPipelineStageFlags)); 3509 vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); 3510 vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); 3511 vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags)); 3512 } 3513 3514 void unmarshal_VkSubpassDependency( 3515 VulkanStreamGuest* vkStream, 3516 VkSubpassDependency* forUnmarshaling) 3517 { 3518 vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t)); 3519 vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t)); 3520 vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask, sizeof(VkPipelineStageFlags)); 3521 vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask, sizeof(VkPipelineStageFlags)); 3522 vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags)); 3523 vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags)); 3524 vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags, sizeof(VkDependencyFlags)); 3525 } 3526 3527 void marshal_VkRenderPassCreateInfo( 3528 VulkanStreamGuest* vkStream, 3529 const VkRenderPassCreateInfo* forMarshaling) 3530 { 3531 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3532 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3533 vkStream->putBe32(pNext_size); 3534 if (pNext_size) 3535 { 3536 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3537 marshal_extension_struct(vkStream, forMarshaling->pNext); 3538 } 3539 vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags, sizeof(VkRenderPassCreateFlags)); 3540 vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t)); 3541 for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) 3542 { 3543 marshal_VkAttachmentDescription(vkStream, (const VkAttachmentDescription*)(forMarshaling->pAttachments + i)); 3544 } 3545 vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t)); 3546 for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i) 3547 { 3548 marshal_VkSubpassDescription(vkStream, (const VkSubpassDescription*)(forMarshaling->pSubpasses + i)); 3549 } 3550 vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t)); 3551 for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i) 3552 { 3553 marshal_VkSubpassDependency(vkStream, (const VkSubpassDependency*)(forMarshaling->pDependencies + i)); 3554 } 3555 } 3556 3557 void unmarshal_VkRenderPassCreateInfo( 3558 VulkanStreamGuest* vkStream, 3559 VkRenderPassCreateInfo* forUnmarshaling) 3560 { 3561 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3562 size_t pNext_size; 3563 pNext_size = vkStream->getBe32(); 3564 if (pNext_size) 3565 { 3566 uint64_t pNext_placeholder; 3567 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3568 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3569 } 3570 vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags, sizeof(VkRenderPassCreateFlags)); 3571 vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t)); 3572 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) 3573 { 3574 unmarshal_VkAttachmentDescription(vkStream, (VkAttachmentDescription*)(forUnmarshaling->pAttachments + i)); 3575 } 3576 vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t)); 3577 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i) 3578 { 3579 unmarshal_VkSubpassDescription(vkStream, (VkSubpassDescription*)(forUnmarshaling->pSubpasses + i)); 3580 } 3581 vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t)); 3582 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i) 3583 { 3584 unmarshal_VkSubpassDependency(vkStream, (VkSubpassDependency*)(forUnmarshaling->pDependencies + i)); 3585 } 3586 } 3587 3588 void marshal_VkCommandPoolCreateInfo( 3589 VulkanStreamGuest* vkStream, 3590 const VkCommandPoolCreateInfo* forMarshaling) 3591 { 3592 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3593 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3594 vkStream->putBe32(pNext_size); 3595 if (pNext_size) 3596 { 3597 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3598 marshal_extension_struct(vkStream, forMarshaling->pNext); 3599 } 3600 vkStream->write((VkCommandPoolCreateFlags*)&forMarshaling->flags, sizeof(VkCommandPoolCreateFlags)); 3601 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t)); 3602 } 3603 3604 void unmarshal_VkCommandPoolCreateInfo( 3605 VulkanStreamGuest* vkStream, 3606 VkCommandPoolCreateInfo* forUnmarshaling) 3607 { 3608 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3609 size_t pNext_size; 3610 pNext_size = vkStream->getBe32(); 3611 if (pNext_size) 3612 { 3613 uint64_t pNext_placeholder; 3614 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3615 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3616 } 3617 vkStream->read((VkCommandPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkCommandPoolCreateFlags)); 3618 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t)); 3619 } 3620 3621 void marshal_VkCommandBufferAllocateInfo( 3622 VulkanStreamGuest* vkStream, 3623 const VkCommandBufferAllocateInfo* forMarshaling) 3624 { 3625 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3626 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3627 vkStream->putBe32(pNext_size); 3628 if (pNext_size) 3629 { 3630 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3631 marshal_extension_struct(vkStream, forMarshaling->pNext); 3632 } 3633 uint64_t cgen_var_126; 3634 vkStream->handleMapping()->mapHandles_VkCommandPool_u64(&forMarshaling->commandPool, &cgen_var_126, 1); 3635 vkStream->write((uint64_t*)&cgen_var_126, 1 * 8); 3636 vkStream->write((VkCommandBufferLevel*)&forMarshaling->level, sizeof(VkCommandBufferLevel)); 3637 vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t)); 3638 } 3639 3640 void unmarshal_VkCommandBufferAllocateInfo( 3641 VulkanStreamGuest* vkStream, 3642 VkCommandBufferAllocateInfo* forUnmarshaling) 3643 { 3644 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3645 size_t pNext_size; 3646 pNext_size = vkStream->getBe32(); 3647 if (pNext_size) 3648 { 3649 uint64_t pNext_placeholder; 3650 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3651 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3652 } 3653 uint64_t cgen_var_127; 3654 vkStream->read((uint64_t*)&cgen_var_127, 1 * 8); 3655 vkStream->handleMapping()->mapHandles_u64_VkCommandPool(&cgen_var_127, (VkCommandPool*)&forUnmarshaling->commandPool, 1); 3656 vkStream->read((VkCommandBufferLevel*)&forUnmarshaling->level, sizeof(VkCommandBufferLevel)); 3657 vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t)); 3658 } 3659 3660 void marshal_VkCommandBufferInheritanceInfo( 3661 VulkanStreamGuest* vkStream, 3662 const VkCommandBufferInheritanceInfo* forMarshaling) 3663 { 3664 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3665 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3666 vkStream->putBe32(pNext_size); 3667 if (pNext_size) 3668 { 3669 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3670 marshal_extension_struct(vkStream, forMarshaling->pNext); 3671 } 3672 uint64_t cgen_var_128; 3673 vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_128, 1); 3674 vkStream->write((uint64_t*)&cgen_var_128, 1 * 8); 3675 vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t)); 3676 uint64_t cgen_var_129; 3677 vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer, &cgen_var_129, 1); 3678 vkStream->write((uint64_t*)&cgen_var_129, 1 * 8); 3679 vkStream->write((VkBool32*)&forMarshaling->occlusionQueryEnable, sizeof(VkBool32)); 3680 vkStream->write((VkQueryControlFlags*)&forMarshaling->queryFlags, sizeof(VkQueryControlFlags)); 3681 vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags)); 3682 } 3683 3684 void unmarshal_VkCommandBufferInheritanceInfo( 3685 VulkanStreamGuest* vkStream, 3686 VkCommandBufferInheritanceInfo* forUnmarshaling) 3687 { 3688 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3689 size_t pNext_size; 3690 pNext_size = vkStream->getBe32(); 3691 if (pNext_size) 3692 { 3693 uint64_t pNext_placeholder; 3694 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3695 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3696 } 3697 uint64_t cgen_var_130; 3698 vkStream->read((uint64_t*)&cgen_var_130, 1 * 8); 3699 vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_130, (VkRenderPass*)&forUnmarshaling->renderPass, 1); 3700 vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t)); 3701 uint64_t cgen_var_131; 3702 vkStream->read((uint64_t*)&cgen_var_131, 1 * 8); 3703 vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(&cgen_var_131, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1); 3704 vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryEnable, sizeof(VkBool32)); 3705 vkStream->read((VkQueryControlFlags*)&forUnmarshaling->queryFlags, sizeof(VkQueryControlFlags)); 3706 vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags)); 3707 } 3708 3709 void marshal_VkCommandBufferBeginInfo( 3710 VulkanStreamGuest* vkStream, 3711 const VkCommandBufferBeginInfo* forMarshaling) 3712 { 3713 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3714 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3715 vkStream->putBe32(pNext_size); 3716 if (pNext_size) 3717 { 3718 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3719 marshal_extension_struct(vkStream, forMarshaling->pNext); 3720 } 3721 vkStream->write((VkCommandBufferUsageFlags*)&forMarshaling->flags, sizeof(VkCommandBufferUsageFlags)); 3722 // WARNING PTR CHECK 3723 uint64_t cgen_var_132 = (uint64_t)(uintptr_t)forMarshaling->pInheritanceInfo; 3724 vkStream->putBe64(cgen_var_132); 3725 if (forMarshaling->pInheritanceInfo) 3726 { 3727 marshal_VkCommandBufferInheritanceInfo(vkStream, (const VkCommandBufferInheritanceInfo*)(forMarshaling->pInheritanceInfo)); 3728 } 3729 } 3730 3731 void unmarshal_VkCommandBufferBeginInfo( 3732 VulkanStreamGuest* vkStream, 3733 VkCommandBufferBeginInfo* forUnmarshaling) 3734 { 3735 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3736 size_t pNext_size; 3737 pNext_size = vkStream->getBe32(); 3738 if (pNext_size) 3739 { 3740 uint64_t pNext_placeholder; 3741 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 3742 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 3743 } 3744 vkStream->read((VkCommandBufferUsageFlags*)&forUnmarshaling->flags, sizeof(VkCommandBufferUsageFlags)); 3745 // WARNING PTR CHECK 3746 const VkCommandBufferInheritanceInfo* check_pInheritanceInfo; 3747 check_pInheritanceInfo = (const VkCommandBufferInheritanceInfo*)(uintptr_t)vkStream->getBe64(); 3748 if (forUnmarshaling->pInheritanceInfo) 3749 { 3750 if (!(check_pInheritanceInfo)) 3751 { 3752 fprintf(stderr, "fatal: forUnmarshaling->pInheritanceInfo inconsistent between guest and host\n"); 3753 } 3754 unmarshal_VkCommandBufferInheritanceInfo(vkStream, (VkCommandBufferInheritanceInfo*)(forUnmarshaling->pInheritanceInfo)); 3755 } 3756 } 3757 3758 void marshal_VkBufferCopy( 3759 VulkanStreamGuest* vkStream, 3760 const VkBufferCopy* forMarshaling) 3761 { 3762 vkStream->write((VkDeviceSize*)&forMarshaling->srcOffset, sizeof(VkDeviceSize)); 3763 vkStream->write((VkDeviceSize*)&forMarshaling->dstOffset, sizeof(VkDeviceSize)); 3764 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 3765 } 3766 3767 void unmarshal_VkBufferCopy( 3768 VulkanStreamGuest* vkStream, 3769 VkBufferCopy* forUnmarshaling) 3770 { 3771 vkStream->read((VkDeviceSize*)&forUnmarshaling->srcOffset, sizeof(VkDeviceSize)); 3772 vkStream->read((VkDeviceSize*)&forUnmarshaling->dstOffset, sizeof(VkDeviceSize)); 3773 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 3774 } 3775 3776 void marshal_VkImageSubresourceLayers( 3777 VulkanStreamGuest* vkStream, 3778 const VkImageSubresourceLayers* forMarshaling) 3779 { 3780 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 3781 vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t)); 3782 vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t)); 3783 vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t)); 3784 } 3785 3786 void unmarshal_VkImageSubresourceLayers( 3787 VulkanStreamGuest* vkStream, 3788 VkImageSubresourceLayers* forUnmarshaling) 3789 { 3790 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 3791 vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t)); 3792 vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t)); 3793 vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t)); 3794 } 3795 3796 void marshal_VkImageCopy( 3797 VulkanStreamGuest* vkStream, 3798 const VkImageCopy* forMarshaling) 3799 { 3800 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource)); 3801 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->srcOffset)); 3802 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource)); 3803 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->dstOffset)); 3804 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent)); 3805 } 3806 3807 void unmarshal_VkImageCopy( 3808 VulkanStreamGuest* vkStream, 3809 VkImageCopy* forUnmarshaling) 3810 { 3811 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource)); 3812 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->srcOffset)); 3813 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource)); 3814 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->dstOffset)); 3815 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent)); 3816 } 3817 3818 void marshal_VkImageBlit( 3819 VulkanStreamGuest* vkStream, 3820 const VkImageBlit* forMarshaling) 3821 { 3822 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource)); 3823 for (uint32_t i = 0; i < (uint32_t)2; ++i) 3824 { 3825 marshal_VkOffset3D(vkStream, (VkOffset3D*)(forMarshaling->srcOffsets + i)); 3826 } 3827 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource)); 3828 for (uint32_t i = 0; i < (uint32_t)2; ++i) 3829 { 3830 marshal_VkOffset3D(vkStream, (VkOffset3D*)(forMarshaling->dstOffsets + i)); 3831 } 3832 } 3833 3834 void unmarshal_VkImageBlit( 3835 VulkanStreamGuest* vkStream, 3836 VkImageBlit* forUnmarshaling) 3837 { 3838 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource)); 3839 for (uint32_t i = 0; i < (uint32_t)2; ++i) 3840 { 3841 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(forUnmarshaling->srcOffsets + i)); 3842 } 3843 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource)); 3844 for (uint32_t i = 0; i < (uint32_t)2; ++i) 3845 { 3846 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(forUnmarshaling->dstOffsets + i)); 3847 } 3848 } 3849 3850 void marshal_VkBufferImageCopy( 3851 VulkanStreamGuest* vkStream, 3852 const VkBufferImageCopy* forMarshaling) 3853 { 3854 vkStream->write((VkDeviceSize*)&forMarshaling->bufferOffset, sizeof(VkDeviceSize)); 3855 vkStream->write((uint32_t*)&forMarshaling->bufferRowLength, sizeof(uint32_t)); 3856 vkStream->write((uint32_t*)&forMarshaling->bufferImageHeight, sizeof(uint32_t)); 3857 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->imageSubresource)); 3858 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->imageOffset)); 3859 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->imageExtent)); 3860 } 3861 3862 void unmarshal_VkBufferImageCopy( 3863 VulkanStreamGuest* vkStream, 3864 VkBufferImageCopy* forUnmarshaling) 3865 { 3866 vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferOffset, sizeof(VkDeviceSize)); 3867 vkStream->read((uint32_t*)&forUnmarshaling->bufferRowLength, sizeof(uint32_t)); 3868 vkStream->read((uint32_t*)&forUnmarshaling->bufferImageHeight, sizeof(uint32_t)); 3869 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->imageSubresource)); 3870 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->imageOffset)); 3871 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->imageExtent)); 3872 } 3873 3874 void marshal_VkClearColorValue( 3875 VulkanStreamGuest* vkStream, 3876 const VkClearColorValue* forMarshaling) 3877 { 3878 vkStream->write((float*)forMarshaling->float32, 4 * sizeof(float)); 3879 } 3880 3881 void unmarshal_VkClearColorValue( 3882 VulkanStreamGuest* vkStream, 3883 VkClearColorValue* forUnmarshaling) 3884 { 3885 vkStream->read((float*)forUnmarshaling->float32, 4 * sizeof(float)); 3886 } 3887 3888 void marshal_VkClearDepthStencilValue( 3889 VulkanStreamGuest* vkStream, 3890 const VkClearDepthStencilValue* forMarshaling) 3891 { 3892 vkStream->write((float*)&forMarshaling->depth, sizeof(float)); 3893 vkStream->write((uint32_t*)&forMarshaling->stencil, sizeof(uint32_t)); 3894 } 3895 3896 void unmarshal_VkClearDepthStencilValue( 3897 VulkanStreamGuest* vkStream, 3898 VkClearDepthStencilValue* forUnmarshaling) 3899 { 3900 vkStream->read((float*)&forUnmarshaling->depth, sizeof(float)); 3901 vkStream->read((uint32_t*)&forUnmarshaling->stencil, sizeof(uint32_t)); 3902 } 3903 3904 void marshal_VkClearValue( 3905 VulkanStreamGuest* vkStream, 3906 const VkClearValue* forMarshaling) 3907 { 3908 marshal_VkClearColorValue(vkStream, (VkClearColorValue*)(&forMarshaling->color)); 3909 } 3910 3911 void unmarshal_VkClearValue( 3912 VulkanStreamGuest* vkStream, 3913 VkClearValue* forUnmarshaling) 3914 { 3915 unmarshal_VkClearColorValue(vkStream, (VkClearColorValue*)(&forUnmarshaling->color)); 3916 } 3917 3918 void marshal_VkClearAttachment( 3919 VulkanStreamGuest* vkStream, 3920 const VkClearAttachment* forMarshaling) 3921 { 3922 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 3923 vkStream->write((uint32_t*)&forMarshaling->colorAttachment, sizeof(uint32_t)); 3924 marshal_VkClearValue(vkStream, (VkClearValue*)(&forMarshaling->clearValue)); 3925 } 3926 3927 void unmarshal_VkClearAttachment( 3928 VulkanStreamGuest* vkStream, 3929 VkClearAttachment* forUnmarshaling) 3930 { 3931 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 3932 vkStream->read((uint32_t*)&forUnmarshaling->colorAttachment, sizeof(uint32_t)); 3933 unmarshal_VkClearValue(vkStream, (VkClearValue*)(&forUnmarshaling->clearValue)); 3934 } 3935 3936 void marshal_VkClearRect( 3937 VulkanStreamGuest* vkStream, 3938 const VkClearRect* forMarshaling) 3939 { 3940 marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->rect)); 3941 vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t)); 3942 vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t)); 3943 } 3944 3945 void unmarshal_VkClearRect( 3946 VulkanStreamGuest* vkStream, 3947 VkClearRect* forUnmarshaling) 3948 { 3949 unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->rect)); 3950 vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t)); 3951 vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t)); 3952 } 3953 3954 void marshal_VkImageResolve( 3955 VulkanStreamGuest* vkStream, 3956 const VkImageResolve* forMarshaling) 3957 { 3958 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->srcSubresource)); 3959 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->srcOffset)); 3960 marshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forMarshaling->dstSubresource)); 3961 marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->dstOffset)); 3962 marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent)); 3963 } 3964 3965 void unmarshal_VkImageResolve( 3966 VulkanStreamGuest* vkStream, 3967 VkImageResolve* forUnmarshaling) 3968 { 3969 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource)); 3970 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->srcOffset)); 3971 unmarshal_VkImageSubresourceLayers(vkStream, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource)); 3972 unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->dstOffset)); 3973 unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent)); 3974 } 3975 3976 void marshal_VkMemoryBarrier( 3977 VulkanStreamGuest* vkStream, 3978 const VkMemoryBarrier* forMarshaling) 3979 { 3980 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 3981 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 3982 vkStream->putBe32(pNext_size); 3983 if (pNext_size) 3984 { 3985 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 3986 marshal_extension_struct(vkStream, forMarshaling->pNext); 3987 } 3988 vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); 3989 vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); 3990 } 3991 3992 void unmarshal_VkMemoryBarrier( 3993 VulkanStreamGuest* vkStream, 3994 VkMemoryBarrier* forUnmarshaling) 3995 { 3996 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 3997 size_t pNext_size; 3998 pNext_size = vkStream->getBe32(); 3999 if (pNext_size) 4000 { 4001 uint64_t pNext_placeholder; 4002 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4003 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4004 } 4005 vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags)); 4006 vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags)); 4007 } 4008 4009 void marshal_VkBufferMemoryBarrier( 4010 VulkanStreamGuest* vkStream, 4011 const VkBufferMemoryBarrier* forMarshaling) 4012 { 4013 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4014 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4015 vkStream->putBe32(pNext_size); 4016 if (pNext_size) 4017 { 4018 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4019 marshal_extension_struct(vkStream, forMarshaling->pNext); 4020 } 4021 vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); 4022 vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); 4023 vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); 4024 vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); 4025 uint64_t cgen_var_134; 4026 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_134, 1); 4027 vkStream->write((uint64_t*)&cgen_var_134, 1 * 8); 4028 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 4029 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 4030 } 4031 4032 void unmarshal_VkBufferMemoryBarrier( 4033 VulkanStreamGuest* vkStream, 4034 VkBufferMemoryBarrier* forUnmarshaling) 4035 { 4036 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4037 size_t pNext_size; 4038 pNext_size = vkStream->getBe32(); 4039 if (pNext_size) 4040 { 4041 uint64_t pNext_placeholder; 4042 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4043 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4044 } 4045 vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags)); 4046 vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags)); 4047 vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); 4048 vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); 4049 uint64_t cgen_var_135; 4050 vkStream->read((uint64_t*)&cgen_var_135, 1 * 8); 4051 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_135, (VkBuffer*)&forUnmarshaling->buffer, 1); 4052 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 4053 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 4054 } 4055 4056 void marshal_VkImageMemoryBarrier( 4057 VulkanStreamGuest* vkStream, 4058 const VkImageMemoryBarrier* forMarshaling) 4059 { 4060 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4061 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4062 vkStream->putBe32(pNext_size); 4063 if (pNext_size) 4064 { 4065 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4066 marshal_extension_struct(vkStream, forMarshaling->pNext); 4067 } 4068 vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); 4069 vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); 4070 vkStream->write((VkImageLayout*)&forMarshaling->oldLayout, sizeof(VkImageLayout)); 4071 vkStream->write((VkImageLayout*)&forMarshaling->newLayout, sizeof(VkImageLayout)); 4072 vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); 4073 vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); 4074 uint64_t cgen_var_136; 4075 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_136, 1); 4076 vkStream->write((uint64_t*)&cgen_var_136, 1 * 8); 4077 marshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange)); 4078 } 4079 4080 void unmarshal_VkImageMemoryBarrier( 4081 VulkanStreamGuest* vkStream, 4082 VkImageMemoryBarrier* forUnmarshaling) 4083 { 4084 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4085 size_t pNext_size; 4086 pNext_size = vkStream->getBe32(); 4087 if (pNext_size) 4088 { 4089 uint64_t pNext_placeholder; 4090 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4091 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4092 } 4093 vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags)); 4094 vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags)); 4095 vkStream->read((VkImageLayout*)&forUnmarshaling->oldLayout, sizeof(VkImageLayout)); 4096 vkStream->read((VkImageLayout*)&forUnmarshaling->newLayout, sizeof(VkImageLayout)); 4097 vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t)); 4098 vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t)); 4099 uint64_t cgen_var_137; 4100 vkStream->read((uint64_t*)&cgen_var_137, 1 * 8); 4101 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_137, (VkImage*)&forUnmarshaling->image, 1); 4102 unmarshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange)); 4103 } 4104 4105 void marshal_VkRenderPassBeginInfo( 4106 VulkanStreamGuest* vkStream, 4107 const VkRenderPassBeginInfo* forMarshaling) 4108 { 4109 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4110 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4111 vkStream->putBe32(pNext_size); 4112 if (pNext_size) 4113 { 4114 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4115 marshal_extension_struct(vkStream, forMarshaling->pNext); 4116 } 4117 uint64_t cgen_var_138; 4118 vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_138, 1); 4119 vkStream->write((uint64_t*)&cgen_var_138, 1 * 8); 4120 uint64_t cgen_var_139; 4121 vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer, &cgen_var_139, 1); 4122 vkStream->write((uint64_t*)&cgen_var_139, 1 * 8); 4123 marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->renderArea)); 4124 vkStream->write((uint32_t*)&forMarshaling->clearValueCount, sizeof(uint32_t)); 4125 // WARNING PTR CHECK 4126 uint64_t cgen_var_140 = (uint64_t)(uintptr_t)forMarshaling->pClearValues; 4127 vkStream->putBe64(cgen_var_140); 4128 if (forMarshaling->pClearValues) 4129 { 4130 for (uint32_t i = 0; i < (uint32_t)forMarshaling->clearValueCount; ++i) 4131 { 4132 marshal_VkClearValue(vkStream, (const VkClearValue*)(forMarshaling->pClearValues + i)); 4133 } 4134 } 4135 } 4136 4137 void unmarshal_VkRenderPassBeginInfo( 4138 VulkanStreamGuest* vkStream, 4139 VkRenderPassBeginInfo* forUnmarshaling) 4140 { 4141 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4142 size_t pNext_size; 4143 pNext_size = vkStream->getBe32(); 4144 if (pNext_size) 4145 { 4146 uint64_t pNext_placeholder; 4147 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4148 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4149 } 4150 uint64_t cgen_var_141; 4151 vkStream->read((uint64_t*)&cgen_var_141, 1 * 8); 4152 vkStream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_141, (VkRenderPass*)&forUnmarshaling->renderPass, 1); 4153 uint64_t cgen_var_142; 4154 vkStream->read((uint64_t*)&cgen_var_142, 1 * 8); 4155 vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(&cgen_var_142, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1); 4156 unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->renderArea)); 4157 vkStream->read((uint32_t*)&forUnmarshaling->clearValueCount, sizeof(uint32_t)); 4158 // WARNING PTR CHECK 4159 const VkClearValue* check_pClearValues; 4160 check_pClearValues = (const VkClearValue*)(uintptr_t)vkStream->getBe64(); 4161 if (forUnmarshaling->pClearValues) 4162 { 4163 if (!(check_pClearValues)) 4164 { 4165 fprintf(stderr, "fatal: forUnmarshaling->pClearValues inconsistent between guest and host\n"); 4166 } 4167 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->clearValueCount; ++i) 4168 { 4169 unmarshal_VkClearValue(vkStream, (VkClearValue*)(forUnmarshaling->pClearValues + i)); 4170 } 4171 } 4172 } 4173 4174 void marshal_VkDispatchIndirectCommand( 4175 VulkanStreamGuest* vkStream, 4176 const VkDispatchIndirectCommand* forMarshaling) 4177 { 4178 vkStream->write((uint32_t*)&forMarshaling->x, sizeof(uint32_t)); 4179 vkStream->write((uint32_t*)&forMarshaling->y, sizeof(uint32_t)); 4180 vkStream->write((uint32_t*)&forMarshaling->z, sizeof(uint32_t)); 4181 } 4182 4183 void unmarshal_VkDispatchIndirectCommand( 4184 VulkanStreamGuest* vkStream, 4185 VkDispatchIndirectCommand* forUnmarshaling) 4186 { 4187 vkStream->read((uint32_t*)&forUnmarshaling->x, sizeof(uint32_t)); 4188 vkStream->read((uint32_t*)&forUnmarshaling->y, sizeof(uint32_t)); 4189 vkStream->read((uint32_t*)&forUnmarshaling->z, sizeof(uint32_t)); 4190 } 4191 4192 void marshal_VkDrawIndexedIndirectCommand( 4193 VulkanStreamGuest* vkStream, 4194 const VkDrawIndexedIndirectCommand* forMarshaling) 4195 { 4196 vkStream->write((uint32_t*)&forMarshaling->indexCount, sizeof(uint32_t)); 4197 vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t)); 4198 vkStream->write((uint32_t*)&forMarshaling->firstIndex, sizeof(uint32_t)); 4199 vkStream->write((int32_t*)&forMarshaling->vertexOffset, sizeof(int32_t)); 4200 vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t)); 4201 } 4202 4203 void unmarshal_VkDrawIndexedIndirectCommand( 4204 VulkanStreamGuest* vkStream, 4205 VkDrawIndexedIndirectCommand* forUnmarshaling) 4206 { 4207 vkStream->read((uint32_t*)&forUnmarshaling->indexCount, sizeof(uint32_t)); 4208 vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t)); 4209 vkStream->read((uint32_t*)&forUnmarshaling->firstIndex, sizeof(uint32_t)); 4210 vkStream->read((int32_t*)&forUnmarshaling->vertexOffset, sizeof(int32_t)); 4211 vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t)); 4212 } 4213 4214 void marshal_VkDrawIndirectCommand( 4215 VulkanStreamGuest* vkStream, 4216 const VkDrawIndirectCommand* forMarshaling) 4217 { 4218 vkStream->write((uint32_t*)&forMarshaling->vertexCount, sizeof(uint32_t)); 4219 vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t)); 4220 vkStream->write((uint32_t*)&forMarshaling->firstVertex, sizeof(uint32_t)); 4221 vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t)); 4222 } 4223 4224 void unmarshal_VkDrawIndirectCommand( 4225 VulkanStreamGuest* vkStream, 4226 VkDrawIndirectCommand* forUnmarshaling) 4227 { 4228 vkStream->read((uint32_t*)&forUnmarshaling->vertexCount, sizeof(uint32_t)); 4229 vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t)); 4230 vkStream->read((uint32_t*)&forUnmarshaling->firstVertex, sizeof(uint32_t)); 4231 vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t)); 4232 } 4233 4234 void marshal_VkBaseOutStructure( 4235 VulkanStreamGuest* vkStream, 4236 const VkBaseOutStructure* forMarshaling) 4237 { 4238 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4239 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4240 vkStream->putBe32(pNext_size); 4241 if (pNext_size) 4242 { 4243 vkStream->write((VkBaseOutStructure*)forMarshaling->pNext, sizeof(VkStructureType)); 4244 marshal_extension_struct(vkStream, forMarshaling->pNext); 4245 } 4246 } 4247 4248 void unmarshal_VkBaseOutStructure( 4249 VulkanStreamGuest* vkStream, 4250 VkBaseOutStructure* forUnmarshaling) 4251 { 4252 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4253 size_t pNext_size; 4254 pNext_size = vkStream->getBe32(); 4255 if (pNext_size) 4256 { 4257 uint64_t pNext_placeholder; 4258 vkStream->read((VkBaseOutStructure*)(&pNext_placeholder), sizeof(VkStructureType)); 4259 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4260 } 4261 } 4262 4263 void marshal_VkBaseInStructure( 4264 VulkanStreamGuest* vkStream, 4265 const VkBaseInStructure* forMarshaling) 4266 { 4267 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4268 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4269 vkStream->putBe32(pNext_size); 4270 if (pNext_size) 4271 { 4272 vkStream->write((const VkBaseInStructure*)forMarshaling->pNext, sizeof(VkStructureType)); 4273 marshal_extension_struct(vkStream, forMarshaling->pNext); 4274 } 4275 } 4276 4277 void unmarshal_VkBaseInStructure( 4278 VulkanStreamGuest* vkStream, 4279 VkBaseInStructure* forUnmarshaling) 4280 { 4281 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4282 size_t pNext_size; 4283 pNext_size = vkStream->getBe32(); 4284 if (pNext_size) 4285 { 4286 uint64_t pNext_placeholder; 4287 vkStream->read((VkBaseInStructure*)(&pNext_placeholder), sizeof(VkStructureType)); 4288 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4289 } 4290 } 4291 4292 #endif 4293 #ifdef VK_VERSION_1_1 4294 void marshal_VkPhysicalDeviceSubgroupProperties( 4295 VulkanStreamGuest* vkStream, 4296 const VkPhysicalDeviceSubgroupProperties* forMarshaling) 4297 { 4298 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4299 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4300 vkStream->putBe32(pNext_size); 4301 if (pNext_size) 4302 { 4303 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 4304 marshal_extension_struct(vkStream, forMarshaling->pNext); 4305 } 4306 vkStream->write((uint32_t*)&forMarshaling->subgroupSize, sizeof(uint32_t)); 4307 vkStream->write((VkShaderStageFlags*)&forMarshaling->supportedStages, sizeof(VkShaderStageFlags)); 4308 vkStream->write((VkSubgroupFeatureFlags*)&forMarshaling->supportedOperations, sizeof(VkSubgroupFeatureFlags)); 4309 vkStream->write((VkBool32*)&forMarshaling->quadOperationsInAllStages, sizeof(VkBool32)); 4310 } 4311 4312 void unmarshal_VkPhysicalDeviceSubgroupProperties( 4313 VulkanStreamGuest* vkStream, 4314 VkPhysicalDeviceSubgroupProperties* forUnmarshaling) 4315 { 4316 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4317 size_t pNext_size; 4318 pNext_size = vkStream->getBe32(); 4319 if (pNext_size) 4320 { 4321 uint64_t pNext_placeholder; 4322 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4323 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4324 } 4325 vkStream->read((uint32_t*)&forUnmarshaling->subgroupSize, sizeof(uint32_t)); 4326 vkStream->read((VkShaderStageFlags*)&forUnmarshaling->supportedStages, sizeof(VkShaderStageFlags)); 4327 vkStream->read((VkSubgroupFeatureFlags*)&forUnmarshaling->supportedOperations, sizeof(VkSubgroupFeatureFlags)); 4328 vkStream->read((VkBool32*)&forUnmarshaling->quadOperationsInAllStages, sizeof(VkBool32)); 4329 } 4330 4331 void marshal_VkBindBufferMemoryInfo( 4332 VulkanStreamGuest* vkStream, 4333 const VkBindBufferMemoryInfo* forMarshaling) 4334 { 4335 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4336 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4337 vkStream->putBe32(pNext_size); 4338 if (pNext_size) 4339 { 4340 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4341 marshal_extension_struct(vkStream, forMarshaling->pNext); 4342 } 4343 uint64_t cgen_var_144; 4344 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_144, 1); 4345 vkStream->write((uint64_t*)&cgen_var_144, 1 * 8); 4346 uint64_t cgen_var_145; 4347 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_145, 1); 4348 vkStream->write((uint64_t*)&cgen_var_145, 1 * 8); 4349 vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); 4350 } 4351 4352 void unmarshal_VkBindBufferMemoryInfo( 4353 VulkanStreamGuest* vkStream, 4354 VkBindBufferMemoryInfo* forUnmarshaling) 4355 { 4356 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4357 size_t pNext_size; 4358 pNext_size = vkStream->getBe32(); 4359 if (pNext_size) 4360 { 4361 uint64_t pNext_placeholder; 4362 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4363 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4364 } 4365 uint64_t cgen_var_146; 4366 vkStream->read((uint64_t*)&cgen_var_146, 1 * 8); 4367 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_146, (VkBuffer*)&forUnmarshaling->buffer, 1); 4368 uint64_t cgen_var_147; 4369 vkStream->read((uint64_t*)&cgen_var_147, 1 * 8); 4370 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_147, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 4371 vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize)); 4372 } 4373 4374 void marshal_VkBindImageMemoryInfo( 4375 VulkanStreamGuest* vkStream, 4376 const VkBindImageMemoryInfo* forMarshaling) 4377 { 4378 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4379 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4380 vkStream->putBe32(pNext_size); 4381 if (pNext_size) 4382 { 4383 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4384 marshal_extension_struct(vkStream, forMarshaling->pNext); 4385 } 4386 uint64_t cgen_var_148; 4387 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_148, 1); 4388 vkStream->write((uint64_t*)&cgen_var_148, 1 * 8); 4389 uint64_t cgen_var_149; 4390 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_149, 1); 4391 vkStream->write((uint64_t*)&cgen_var_149, 1 * 8); 4392 vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize)); 4393 } 4394 4395 void unmarshal_VkBindImageMemoryInfo( 4396 VulkanStreamGuest* vkStream, 4397 VkBindImageMemoryInfo* forUnmarshaling) 4398 { 4399 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4400 size_t pNext_size; 4401 pNext_size = vkStream->getBe32(); 4402 if (pNext_size) 4403 { 4404 uint64_t pNext_placeholder; 4405 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4406 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4407 } 4408 uint64_t cgen_var_150; 4409 vkStream->read((uint64_t*)&cgen_var_150, 1 * 8); 4410 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_150, (VkImage*)&forUnmarshaling->image, 1); 4411 uint64_t cgen_var_151; 4412 vkStream->read((uint64_t*)&cgen_var_151, 1 * 8); 4413 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_151, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 4414 vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize)); 4415 } 4416 4417 void marshal_VkPhysicalDevice16BitStorageFeatures( 4418 VulkanStreamGuest* vkStream, 4419 const VkPhysicalDevice16BitStorageFeatures* forMarshaling) 4420 { 4421 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4422 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4423 vkStream->putBe32(pNext_size); 4424 if (pNext_size) 4425 { 4426 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 4427 marshal_extension_struct(vkStream, forMarshaling->pNext); 4428 } 4429 vkStream->write((VkBool32*)&forMarshaling->storageBuffer16BitAccess, sizeof(VkBool32)); 4430 vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer16BitAccess, sizeof(VkBool32)); 4431 vkStream->write((VkBool32*)&forMarshaling->storagePushConstant16, sizeof(VkBool32)); 4432 vkStream->write((VkBool32*)&forMarshaling->storageInputOutput16, sizeof(VkBool32)); 4433 } 4434 4435 void unmarshal_VkPhysicalDevice16BitStorageFeatures( 4436 VulkanStreamGuest* vkStream, 4437 VkPhysicalDevice16BitStorageFeatures* forUnmarshaling) 4438 { 4439 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4440 size_t pNext_size; 4441 pNext_size = vkStream->getBe32(); 4442 if (pNext_size) 4443 { 4444 uint64_t pNext_placeholder; 4445 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4446 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4447 } 4448 vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer16BitAccess, sizeof(VkBool32)); 4449 vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer16BitAccess, sizeof(VkBool32)); 4450 vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant16, sizeof(VkBool32)); 4451 vkStream->read((VkBool32*)&forUnmarshaling->storageInputOutput16, sizeof(VkBool32)); 4452 } 4453 4454 void marshal_VkMemoryDedicatedRequirements( 4455 VulkanStreamGuest* vkStream, 4456 const VkMemoryDedicatedRequirements* forMarshaling) 4457 { 4458 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4459 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4460 vkStream->putBe32(pNext_size); 4461 if (pNext_size) 4462 { 4463 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 4464 marshal_extension_struct(vkStream, forMarshaling->pNext); 4465 } 4466 vkStream->write((VkBool32*)&forMarshaling->prefersDedicatedAllocation, sizeof(VkBool32)); 4467 vkStream->write((VkBool32*)&forMarshaling->requiresDedicatedAllocation, sizeof(VkBool32)); 4468 } 4469 4470 void unmarshal_VkMemoryDedicatedRequirements( 4471 VulkanStreamGuest* vkStream, 4472 VkMemoryDedicatedRequirements* forUnmarshaling) 4473 { 4474 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4475 size_t pNext_size; 4476 pNext_size = vkStream->getBe32(); 4477 if (pNext_size) 4478 { 4479 uint64_t pNext_placeholder; 4480 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4481 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4482 } 4483 vkStream->read((VkBool32*)&forUnmarshaling->prefersDedicatedAllocation, sizeof(VkBool32)); 4484 vkStream->read((VkBool32*)&forUnmarshaling->requiresDedicatedAllocation, sizeof(VkBool32)); 4485 } 4486 4487 void marshal_VkMemoryDedicatedAllocateInfo( 4488 VulkanStreamGuest* vkStream, 4489 const VkMemoryDedicatedAllocateInfo* forMarshaling) 4490 { 4491 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4492 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4493 vkStream->putBe32(pNext_size); 4494 if (pNext_size) 4495 { 4496 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4497 marshal_extension_struct(vkStream, forMarshaling->pNext); 4498 } 4499 uint64_t cgen_var_152; 4500 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_152, 1); 4501 vkStream->write((uint64_t*)&cgen_var_152, 1 * 8); 4502 uint64_t cgen_var_153; 4503 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_153, 1); 4504 vkStream->write((uint64_t*)&cgen_var_153, 1 * 8); 4505 } 4506 4507 void unmarshal_VkMemoryDedicatedAllocateInfo( 4508 VulkanStreamGuest* vkStream, 4509 VkMemoryDedicatedAllocateInfo* forUnmarshaling) 4510 { 4511 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4512 size_t pNext_size; 4513 pNext_size = vkStream->getBe32(); 4514 if (pNext_size) 4515 { 4516 uint64_t pNext_placeholder; 4517 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4518 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4519 } 4520 uint64_t cgen_var_154; 4521 vkStream->read((uint64_t*)&cgen_var_154, 1 * 8); 4522 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_154, (VkImage*)&forUnmarshaling->image, 1); 4523 uint64_t cgen_var_155; 4524 vkStream->read((uint64_t*)&cgen_var_155, 1 * 8); 4525 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_155, (VkBuffer*)&forUnmarshaling->buffer, 1); 4526 } 4527 4528 void marshal_VkMemoryAllocateFlagsInfo( 4529 VulkanStreamGuest* vkStream, 4530 const VkMemoryAllocateFlagsInfo* forMarshaling) 4531 { 4532 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4533 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4534 vkStream->putBe32(pNext_size); 4535 if (pNext_size) 4536 { 4537 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4538 marshal_extension_struct(vkStream, forMarshaling->pNext); 4539 } 4540 vkStream->write((VkMemoryAllocateFlags*)&forMarshaling->flags, sizeof(VkMemoryAllocateFlags)); 4541 vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t)); 4542 } 4543 4544 void unmarshal_VkMemoryAllocateFlagsInfo( 4545 VulkanStreamGuest* vkStream, 4546 VkMemoryAllocateFlagsInfo* forUnmarshaling) 4547 { 4548 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4549 size_t pNext_size; 4550 pNext_size = vkStream->getBe32(); 4551 if (pNext_size) 4552 { 4553 uint64_t pNext_placeholder; 4554 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4555 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4556 } 4557 vkStream->read((VkMemoryAllocateFlags*)&forUnmarshaling->flags, sizeof(VkMemoryAllocateFlags)); 4558 vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t)); 4559 } 4560 4561 void marshal_VkDeviceGroupRenderPassBeginInfo( 4562 VulkanStreamGuest* vkStream, 4563 const VkDeviceGroupRenderPassBeginInfo* forMarshaling) 4564 { 4565 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4566 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4567 vkStream->putBe32(pNext_size); 4568 if (pNext_size) 4569 { 4570 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4571 marshal_extension_struct(vkStream, forMarshaling->pNext); 4572 } 4573 vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t)); 4574 vkStream->write((uint32_t*)&forMarshaling->deviceRenderAreaCount, sizeof(uint32_t)); 4575 for (uint32_t i = 0; i < (uint32_t)forMarshaling->deviceRenderAreaCount; ++i) 4576 { 4577 marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pDeviceRenderAreas + i)); 4578 } 4579 } 4580 4581 void unmarshal_VkDeviceGroupRenderPassBeginInfo( 4582 VulkanStreamGuest* vkStream, 4583 VkDeviceGroupRenderPassBeginInfo* forUnmarshaling) 4584 { 4585 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4586 size_t pNext_size; 4587 pNext_size = vkStream->getBe32(); 4588 if (pNext_size) 4589 { 4590 uint64_t pNext_placeholder; 4591 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4592 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4593 } 4594 vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t)); 4595 vkStream->read((uint32_t*)&forUnmarshaling->deviceRenderAreaCount, sizeof(uint32_t)); 4596 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->deviceRenderAreaCount; ++i) 4597 { 4598 unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pDeviceRenderAreas + i)); 4599 } 4600 } 4601 4602 void marshal_VkDeviceGroupCommandBufferBeginInfo( 4603 VulkanStreamGuest* vkStream, 4604 const VkDeviceGroupCommandBufferBeginInfo* forMarshaling) 4605 { 4606 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4607 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4608 vkStream->putBe32(pNext_size); 4609 if (pNext_size) 4610 { 4611 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4612 marshal_extension_struct(vkStream, forMarshaling->pNext); 4613 } 4614 vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t)); 4615 } 4616 4617 void unmarshal_VkDeviceGroupCommandBufferBeginInfo( 4618 VulkanStreamGuest* vkStream, 4619 VkDeviceGroupCommandBufferBeginInfo* forUnmarshaling) 4620 { 4621 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4622 size_t pNext_size; 4623 pNext_size = vkStream->getBe32(); 4624 if (pNext_size) 4625 { 4626 uint64_t pNext_placeholder; 4627 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4628 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4629 } 4630 vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t)); 4631 } 4632 4633 void marshal_VkDeviceGroupSubmitInfo( 4634 VulkanStreamGuest* vkStream, 4635 const VkDeviceGroupSubmitInfo* forMarshaling) 4636 { 4637 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4638 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4639 vkStream->putBe32(pNext_size); 4640 if (pNext_size) 4641 { 4642 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4643 marshal_extension_struct(vkStream, forMarshaling->pNext); 4644 } 4645 vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); 4646 vkStream->write((const uint32_t*)forMarshaling->pWaitSemaphoreDeviceIndices, forMarshaling->waitSemaphoreCount * sizeof(const uint32_t)); 4647 vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t)); 4648 vkStream->write((const uint32_t*)forMarshaling->pCommandBufferDeviceMasks, forMarshaling->commandBufferCount * sizeof(const uint32_t)); 4649 vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t)); 4650 vkStream->write((const uint32_t*)forMarshaling->pSignalSemaphoreDeviceIndices, forMarshaling->signalSemaphoreCount * sizeof(const uint32_t)); 4651 } 4652 4653 void unmarshal_VkDeviceGroupSubmitInfo( 4654 VulkanStreamGuest* vkStream, 4655 VkDeviceGroupSubmitInfo* forUnmarshaling) 4656 { 4657 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4658 size_t pNext_size; 4659 pNext_size = vkStream->getBe32(); 4660 if (pNext_size) 4661 { 4662 uint64_t pNext_placeholder; 4663 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4664 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4665 } 4666 vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t)); 4667 vkStream->read((uint32_t*)forUnmarshaling->pWaitSemaphoreDeviceIndices, forUnmarshaling->waitSemaphoreCount * sizeof(const uint32_t)); 4668 vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t)); 4669 vkStream->read((uint32_t*)forUnmarshaling->pCommandBufferDeviceMasks, forUnmarshaling->commandBufferCount * sizeof(const uint32_t)); 4670 vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t)); 4671 vkStream->read((uint32_t*)forUnmarshaling->pSignalSemaphoreDeviceIndices, forUnmarshaling->signalSemaphoreCount * sizeof(const uint32_t)); 4672 } 4673 4674 void marshal_VkDeviceGroupBindSparseInfo( 4675 VulkanStreamGuest* vkStream, 4676 const VkDeviceGroupBindSparseInfo* forMarshaling) 4677 { 4678 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4679 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4680 vkStream->putBe32(pNext_size); 4681 if (pNext_size) 4682 { 4683 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4684 marshal_extension_struct(vkStream, forMarshaling->pNext); 4685 } 4686 vkStream->write((uint32_t*)&forMarshaling->resourceDeviceIndex, sizeof(uint32_t)); 4687 vkStream->write((uint32_t*)&forMarshaling->memoryDeviceIndex, sizeof(uint32_t)); 4688 } 4689 4690 void unmarshal_VkDeviceGroupBindSparseInfo( 4691 VulkanStreamGuest* vkStream, 4692 VkDeviceGroupBindSparseInfo* forUnmarshaling) 4693 { 4694 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4695 size_t pNext_size; 4696 pNext_size = vkStream->getBe32(); 4697 if (pNext_size) 4698 { 4699 uint64_t pNext_placeholder; 4700 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4701 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4702 } 4703 vkStream->read((uint32_t*)&forUnmarshaling->resourceDeviceIndex, sizeof(uint32_t)); 4704 vkStream->read((uint32_t*)&forUnmarshaling->memoryDeviceIndex, sizeof(uint32_t)); 4705 } 4706 4707 void marshal_VkBindBufferMemoryDeviceGroupInfo( 4708 VulkanStreamGuest* vkStream, 4709 const VkBindBufferMemoryDeviceGroupInfo* forMarshaling) 4710 { 4711 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4712 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4713 vkStream->putBe32(pNext_size); 4714 if (pNext_size) 4715 { 4716 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4717 marshal_extension_struct(vkStream, forMarshaling->pNext); 4718 } 4719 vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t)); 4720 vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices, forMarshaling->deviceIndexCount * sizeof(const uint32_t)); 4721 } 4722 4723 void unmarshal_VkBindBufferMemoryDeviceGroupInfo( 4724 VulkanStreamGuest* vkStream, 4725 VkBindBufferMemoryDeviceGroupInfo* forUnmarshaling) 4726 { 4727 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4728 size_t pNext_size; 4729 pNext_size = vkStream->getBe32(); 4730 if (pNext_size) 4731 { 4732 uint64_t pNext_placeholder; 4733 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4734 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4735 } 4736 vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t)); 4737 vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices, forUnmarshaling->deviceIndexCount * sizeof(const uint32_t)); 4738 } 4739 4740 void marshal_VkBindImageMemoryDeviceGroupInfo( 4741 VulkanStreamGuest* vkStream, 4742 const VkBindImageMemoryDeviceGroupInfo* forMarshaling) 4743 { 4744 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4745 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4746 vkStream->putBe32(pNext_size); 4747 if (pNext_size) 4748 { 4749 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4750 marshal_extension_struct(vkStream, forMarshaling->pNext); 4751 } 4752 vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t)); 4753 vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices, forMarshaling->deviceIndexCount * sizeof(const uint32_t)); 4754 vkStream->write((uint32_t*)&forMarshaling->splitInstanceBindRegionCount, sizeof(uint32_t)); 4755 for (uint32_t i = 0; i < (uint32_t)forMarshaling->splitInstanceBindRegionCount; ++i) 4756 { 4757 marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pSplitInstanceBindRegions + i)); 4758 } 4759 } 4760 4761 void unmarshal_VkBindImageMemoryDeviceGroupInfo( 4762 VulkanStreamGuest* vkStream, 4763 VkBindImageMemoryDeviceGroupInfo* forUnmarshaling) 4764 { 4765 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4766 size_t pNext_size; 4767 pNext_size = vkStream->getBe32(); 4768 if (pNext_size) 4769 { 4770 uint64_t pNext_placeholder; 4771 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4772 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4773 } 4774 vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t)); 4775 vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices, forUnmarshaling->deviceIndexCount * sizeof(const uint32_t)); 4776 vkStream->read((uint32_t*)&forUnmarshaling->splitInstanceBindRegionCount, sizeof(uint32_t)); 4777 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->splitInstanceBindRegionCount; ++i) 4778 { 4779 unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pSplitInstanceBindRegions + i)); 4780 } 4781 } 4782 4783 void marshal_VkPhysicalDeviceGroupProperties( 4784 VulkanStreamGuest* vkStream, 4785 const VkPhysicalDeviceGroupProperties* forMarshaling) 4786 { 4787 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4788 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4789 vkStream->putBe32(pNext_size); 4790 if (pNext_size) 4791 { 4792 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 4793 marshal_extension_struct(vkStream, forMarshaling->pNext); 4794 } 4795 vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t)); 4796 vkStream->write((VkPhysicalDevice*)forMarshaling->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice)); 4797 vkStream->write((VkBool32*)&forMarshaling->subsetAllocation, sizeof(VkBool32)); 4798 } 4799 4800 void unmarshal_VkPhysicalDeviceGroupProperties( 4801 VulkanStreamGuest* vkStream, 4802 VkPhysicalDeviceGroupProperties* forUnmarshaling) 4803 { 4804 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4805 size_t pNext_size; 4806 pNext_size = vkStream->getBe32(); 4807 if (pNext_size) 4808 { 4809 uint64_t pNext_placeholder; 4810 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4811 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4812 } 4813 vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t)); 4814 vkStream->read((VkPhysicalDevice*)forUnmarshaling->physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice)); 4815 vkStream->read((VkBool32*)&forUnmarshaling->subsetAllocation, sizeof(VkBool32)); 4816 } 4817 4818 void marshal_VkDeviceGroupDeviceCreateInfo( 4819 VulkanStreamGuest* vkStream, 4820 const VkDeviceGroupDeviceCreateInfo* forMarshaling) 4821 { 4822 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4823 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4824 vkStream->putBe32(pNext_size); 4825 if (pNext_size) 4826 { 4827 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4828 marshal_extension_struct(vkStream, forMarshaling->pNext); 4829 } 4830 vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t)); 4831 if (forMarshaling->physicalDeviceCount) 4832 { 4833 uint64_t* cgen_var_156; 4834 vkStream->alloc((void**)&cgen_var_156, forMarshaling->physicalDeviceCount * 8); 4835 vkStream->handleMapping()->mapHandles_VkPhysicalDevice_u64(forMarshaling->pPhysicalDevices, cgen_var_156, forMarshaling->physicalDeviceCount); 4836 vkStream->write((uint64_t*)cgen_var_156, forMarshaling->physicalDeviceCount * 8); 4837 } 4838 } 4839 4840 void unmarshal_VkDeviceGroupDeviceCreateInfo( 4841 VulkanStreamGuest* vkStream, 4842 VkDeviceGroupDeviceCreateInfo* forUnmarshaling) 4843 { 4844 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4845 size_t pNext_size; 4846 pNext_size = vkStream->getBe32(); 4847 if (pNext_size) 4848 { 4849 uint64_t pNext_placeholder; 4850 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4851 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4852 } 4853 vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t)); 4854 if (forUnmarshaling->physicalDeviceCount) 4855 { 4856 uint64_t* cgen_var_157; 4857 vkStream->alloc((void**)&cgen_var_157, forUnmarshaling->physicalDeviceCount * 8); 4858 vkStream->read((uint64_t*)cgen_var_157, forUnmarshaling->physicalDeviceCount * 8); 4859 vkStream->handleMapping()->mapHandles_u64_VkPhysicalDevice(cgen_var_157, (VkPhysicalDevice*)forUnmarshaling->pPhysicalDevices, forUnmarshaling->physicalDeviceCount); 4860 } 4861 } 4862 4863 void marshal_VkBufferMemoryRequirementsInfo2( 4864 VulkanStreamGuest* vkStream, 4865 const VkBufferMemoryRequirementsInfo2* forMarshaling) 4866 { 4867 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4868 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4869 vkStream->putBe32(pNext_size); 4870 if (pNext_size) 4871 { 4872 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4873 marshal_extension_struct(vkStream, forMarshaling->pNext); 4874 } 4875 uint64_t cgen_var_158; 4876 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_158, 1); 4877 vkStream->write((uint64_t*)&cgen_var_158, 1 * 8); 4878 } 4879 4880 void unmarshal_VkBufferMemoryRequirementsInfo2( 4881 VulkanStreamGuest* vkStream, 4882 VkBufferMemoryRequirementsInfo2* forUnmarshaling) 4883 { 4884 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4885 size_t pNext_size; 4886 pNext_size = vkStream->getBe32(); 4887 if (pNext_size) 4888 { 4889 uint64_t pNext_placeholder; 4890 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4891 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4892 } 4893 uint64_t cgen_var_159; 4894 vkStream->read((uint64_t*)&cgen_var_159, 1 * 8); 4895 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_159, (VkBuffer*)&forUnmarshaling->buffer, 1); 4896 } 4897 4898 void marshal_VkImageMemoryRequirementsInfo2( 4899 VulkanStreamGuest* vkStream, 4900 const VkImageMemoryRequirementsInfo2* forMarshaling) 4901 { 4902 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4903 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4904 vkStream->putBe32(pNext_size); 4905 if (pNext_size) 4906 { 4907 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4908 marshal_extension_struct(vkStream, forMarshaling->pNext); 4909 } 4910 uint64_t cgen_var_160; 4911 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_160, 1); 4912 vkStream->write((uint64_t*)&cgen_var_160, 1 * 8); 4913 } 4914 4915 void unmarshal_VkImageMemoryRequirementsInfo2( 4916 VulkanStreamGuest* vkStream, 4917 VkImageMemoryRequirementsInfo2* forUnmarshaling) 4918 { 4919 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4920 size_t pNext_size; 4921 pNext_size = vkStream->getBe32(); 4922 if (pNext_size) 4923 { 4924 uint64_t pNext_placeholder; 4925 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4926 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4927 } 4928 uint64_t cgen_var_161; 4929 vkStream->read((uint64_t*)&cgen_var_161, 1 * 8); 4930 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_161, (VkImage*)&forUnmarshaling->image, 1); 4931 } 4932 4933 void marshal_VkImageSparseMemoryRequirementsInfo2( 4934 VulkanStreamGuest* vkStream, 4935 const VkImageSparseMemoryRequirementsInfo2* forMarshaling) 4936 { 4937 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4938 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4939 vkStream->putBe32(pNext_size); 4940 if (pNext_size) 4941 { 4942 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 4943 marshal_extension_struct(vkStream, forMarshaling->pNext); 4944 } 4945 uint64_t cgen_var_162; 4946 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_162, 1); 4947 vkStream->write((uint64_t*)&cgen_var_162, 1 * 8); 4948 } 4949 4950 void unmarshal_VkImageSparseMemoryRequirementsInfo2( 4951 VulkanStreamGuest* vkStream, 4952 VkImageSparseMemoryRequirementsInfo2* forUnmarshaling) 4953 { 4954 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4955 size_t pNext_size; 4956 pNext_size = vkStream->getBe32(); 4957 if (pNext_size) 4958 { 4959 uint64_t pNext_placeholder; 4960 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4961 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4962 } 4963 uint64_t cgen_var_163; 4964 vkStream->read((uint64_t*)&cgen_var_163, 1 * 8); 4965 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_163, (VkImage*)&forUnmarshaling->image, 1); 4966 } 4967 4968 void marshal_VkMemoryRequirements2( 4969 VulkanStreamGuest* vkStream, 4970 const VkMemoryRequirements2* forMarshaling) 4971 { 4972 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 4973 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 4974 vkStream->putBe32(pNext_size); 4975 if (pNext_size) 4976 { 4977 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 4978 marshal_extension_struct(vkStream, forMarshaling->pNext); 4979 } 4980 marshal_VkMemoryRequirements(vkStream, (VkMemoryRequirements*)(&forMarshaling->memoryRequirements)); 4981 } 4982 4983 void unmarshal_VkMemoryRequirements2( 4984 VulkanStreamGuest* vkStream, 4985 VkMemoryRequirements2* forUnmarshaling) 4986 { 4987 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 4988 size_t pNext_size; 4989 pNext_size = vkStream->getBe32(); 4990 if (pNext_size) 4991 { 4992 uint64_t pNext_placeholder; 4993 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 4994 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 4995 } 4996 unmarshal_VkMemoryRequirements(vkStream, (VkMemoryRequirements*)(&forUnmarshaling->memoryRequirements)); 4997 } 4998 4999 void marshal_VkSparseImageMemoryRequirements2( 5000 VulkanStreamGuest* vkStream, 5001 const VkSparseImageMemoryRequirements2* forMarshaling) 5002 { 5003 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5004 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5005 vkStream->putBe32(pNext_size); 5006 if (pNext_size) 5007 { 5008 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5009 marshal_extension_struct(vkStream, forMarshaling->pNext); 5010 } 5011 marshal_VkSparseImageMemoryRequirements(vkStream, (VkSparseImageMemoryRequirements*)(&forMarshaling->memoryRequirements)); 5012 } 5013 5014 void unmarshal_VkSparseImageMemoryRequirements2( 5015 VulkanStreamGuest* vkStream, 5016 VkSparseImageMemoryRequirements2* forUnmarshaling) 5017 { 5018 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5019 size_t pNext_size; 5020 pNext_size = vkStream->getBe32(); 5021 if (pNext_size) 5022 { 5023 uint64_t pNext_placeholder; 5024 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5025 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5026 } 5027 unmarshal_VkSparseImageMemoryRequirements(vkStream, (VkSparseImageMemoryRequirements*)(&forUnmarshaling->memoryRequirements)); 5028 } 5029 5030 void marshal_VkPhysicalDeviceFeatures2( 5031 VulkanStreamGuest* vkStream, 5032 const VkPhysicalDeviceFeatures2* forMarshaling) 5033 { 5034 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5035 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5036 vkStream->putBe32(pNext_size); 5037 if (pNext_size) 5038 { 5039 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5040 marshal_extension_struct(vkStream, forMarshaling->pNext); 5041 } 5042 marshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(&forMarshaling->features)); 5043 } 5044 5045 void unmarshal_VkPhysicalDeviceFeatures2( 5046 VulkanStreamGuest* vkStream, 5047 VkPhysicalDeviceFeatures2* forUnmarshaling) 5048 { 5049 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5050 size_t pNext_size; 5051 pNext_size = vkStream->getBe32(); 5052 if (pNext_size) 5053 { 5054 uint64_t pNext_placeholder; 5055 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5056 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5057 } 5058 unmarshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(&forUnmarshaling->features)); 5059 } 5060 5061 void marshal_VkPhysicalDeviceProperties2( 5062 VulkanStreamGuest* vkStream, 5063 const VkPhysicalDeviceProperties2* forMarshaling) 5064 { 5065 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5066 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5067 vkStream->putBe32(pNext_size); 5068 if (pNext_size) 5069 { 5070 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5071 marshal_extension_struct(vkStream, forMarshaling->pNext); 5072 } 5073 marshal_VkPhysicalDeviceProperties(vkStream, (VkPhysicalDeviceProperties*)(&forMarshaling->properties)); 5074 } 5075 5076 void unmarshal_VkPhysicalDeviceProperties2( 5077 VulkanStreamGuest* vkStream, 5078 VkPhysicalDeviceProperties2* forUnmarshaling) 5079 { 5080 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5081 size_t pNext_size; 5082 pNext_size = vkStream->getBe32(); 5083 if (pNext_size) 5084 { 5085 uint64_t pNext_placeholder; 5086 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5087 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5088 } 5089 unmarshal_VkPhysicalDeviceProperties(vkStream, (VkPhysicalDeviceProperties*)(&forUnmarshaling->properties)); 5090 } 5091 5092 void marshal_VkFormatProperties2( 5093 VulkanStreamGuest* vkStream, 5094 const VkFormatProperties2* forMarshaling) 5095 { 5096 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5097 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5098 vkStream->putBe32(pNext_size); 5099 if (pNext_size) 5100 { 5101 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5102 marshal_extension_struct(vkStream, forMarshaling->pNext); 5103 } 5104 marshal_VkFormatProperties(vkStream, (VkFormatProperties*)(&forMarshaling->formatProperties)); 5105 } 5106 5107 void unmarshal_VkFormatProperties2( 5108 VulkanStreamGuest* vkStream, 5109 VkFormatProperties2* forUnmarshaling) 5110 { 5111 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5112 size_t pNext_size; 5113 pNext_size = vkStream->getBe32(); 5114 if (pNext_size) 5115 { 5116 uint64_t pNext_placeholder; 5117 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5118 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5119 } 5120 unmarshal_VkFormatProperties(vkStream, (VkFormatProperties*)(&forUnmarshaling->formatProperties)); 5121 } 5122 5123 void marshal_VkImageFormatProperties2( 5124 VulkanStreamGuest* vkStream, 5125 const VkImageFormatProperties2* forMarshaling) 5126 { 5127 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5128 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5129 vkStream->putBe32(pNext_size); 5130 if (pNext_size) 5131 { 5132 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5133 marshal_extension_struct(vkStream, forMarshaling->pNext); 5134 } 5135 marshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forMarshaling->imageFormatProperties)); 5136 } 5137 5138 void unmarshal_VkImageFormatProperties2( 5139 VulkanStreamGuest* vkStream, 5140 VkImageFormatProperties2* forUnmarshaling) 5141 { 5142 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5143 size_t pNext_size; 5144 pNext_size = vkStream->getBe32(); 5145 if (pNext_size) 5146 { 5147 uint64_t pNext_placeholder; 5148 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5149 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5150 } 5151 unmarshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forUnmarshaling->imageFormatProperties)); 5152 } 5153 5154 void marshal_VkPhysicalDeviceImageFormatInfo2( 5155 VulkanStreamGuest* vkStream, 5156 const VkPhysicalDeviceImageFormatInfo2* forMarshaling) 5157 { 5158 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5159 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5160 vkStream->putBe32(pNext_size); 5161 if (pNext_size) 5162 { 5163 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5164 marshal_extension_struct(vkStream, forMarshaling->pNext); 5165 } 5166 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 5167 vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType)); 5168 vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling)); 5169 vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags)); 5170 vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags)); 5171 } 5172 5173 void unmarshal_VkPhysicalDeviceImageFormatInfo2( 5174 VulkanStreamGuest* vkStream, 5175 VkPhysicalDeviceImageFormatInfo2* forUnmarshaling) 5176 { 5177 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5178 size_t pNext_size; 5179 pNext_size = vkStream->getBe32(); 5180 if (pNext_size) 5181 { 5182 uint64_t pNext_placeholder; 5183 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5184 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5185 } 5186 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 5187 vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType)); 5188 vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling)); 5189 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags)); 5190 vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags)); 5191 } 5192 5193 void marshal_VkQueueFamilyProperties2( 5194 VulkanStreamGuest* vkStream, 5195 const VkQueueFamilyProperties2* forMarshaling) 5196 { 5197 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5198 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5199 vkStream->putBe32(pNext_size); 5200 if (pNext_size) 5201 { 5202 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5203 marshal_extension_struct(vkStream, forMarshaling->pNext); 5204 } 5205 marshal_VkQueueFamilyProperties(vkStream, (VkQueueFamilyProperties*)(&forMarshaling->queueFamilyProperties)); 5206 } 5207 5208 void unmarshal_VkQueueFamilyProperties2( 5209 VulkanStreamGuest* vkStream, 5210 VkQueueFamilyProperties2* forUnmarshaling) 5211 { 5212 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5213 size_t pNext_size; 5214 pNext_size = vkStream->getBe32(); 5215 if (pNext_size) 5216 { 5217 uint64_t pNext_placeholder; 5218 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5219 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5220 } 5221 unmarshal_VkQueueFamilyProperties(vkStream, (VkQueueFamilyProperties*)(&forUnmarshaling->queueFamilyProperties)); 5222 } 5223 5224 void marshal_VkPhysicalDeviceMemoryProperties2( 5225 VulkanStreamGuest* vkStream, 5226 const VkPhysicalDeviceMemoryProperties2* forMarshaling) 5227 { 5228 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5229 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5230 vkStream->putBe32(pNext_size); 5231 if (pNext_size) 5232 { 5233 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5234 marshal_extension_struct(vkStream, forMarshaling->pNext); 5235 } 5236 marshal_VkPhysicalDeviceMemoryProperties(vkStream, (VkPhysicalDeviceMemoryProperties*)(&forMarshaling->memoryProperties)); 5237 } 5238 5239 void unmarshal_VkPhysicalDeviceMemoryProperties2( 5240 VulkanStreamGuest* vkStream, 5241 VkPhysicalDeviceMemoryProperties2* forUnmarshaling) 5242 { 5243 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5244 size_t pNext_size; 5245 pNext_size = vkStream->getBe32(); 5246 if (pNext_size) 5247 { 5248 uint64_t pNext_placeholder; 5249 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5250 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5251 } 5252 unmarshal_VkPhysicalDeviceMemoryProperties(vkStream, (VkPhysicalDeviceMemoryProperties*)(&forUnmarshaling->memoryProperties)); 5253 } 5254 5255 void marshal_VkSparseImageFormatProperties2( 5256 VulkanStreamGuest* vkStream, 5257 const VkSparseImageFormatProperties2* forMarshaling) 5258 { 5259 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5260 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5261 vkStream->putBe32(pNext_size); 5262 if (pNext_size) 5263 { 5264 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5265 marshal_extension_struct(vkStream, forMarshaling->pNext); 5266 } 5267 marshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forMarshaling->properties)); 5268 } 5269 5270 void unmarshal_VkSparseImageFormatProperties2( 5271 VulkanStreamGuest* vkStream, 5272 VkSparseImageFormatProperties2* forUnmarshaling) 5273 { 5274 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5275 size_t pNext_size; 5276 pNext_size = vkStream->getBe32(); 5277 if (pNext_size) 5278 { 5279 uint64_t pNext_placeholder; 5280 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5281 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5282 } 5283 unmarshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forUnmarshaling->properties)); 5284 } 5285 5286 void marshal_VkPhysicalDeviceSparseImageFormatInfo2( 5287 VulkanStreamGuest* vkStream, 5288 const VkPhysicalDeviceSparseImageFormatInfo2* forMarshaling) 5289 { 5290 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5291 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5292 vkStream->putBe32(pNext_size); 5293 if (pNext_size) 5294 { 5295 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5296 marshal_extension_struct(vkStream, forMarshaling->pNext); 5297 } 5298 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 5299 vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType)); 5300 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits)); 5301 vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags)); 5302 vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling)); 5303 } 5304 5305 void unmarshal_VkPhysicalDeviceSparseImageFormatInfo2( 5306 VulkanStreamGuest* vkStream, 5307 VkPhysicalDeviceSparseImageFormatInfo2* forUnmarshaling) 5308 { 5309 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5310 size_t pNext_size; 5311 pNext_size = vkStream->getBe32(); 5312 if (pNext_size) 5313 { 5314 uint64_t pNext_placeholder; 5315 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5316 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5317 } 5318 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 5319 vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType)); 5320 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits)); 5321 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags)); 5322 vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling)); 5323 } 5324 5325 void marshal_VkPhysicalDevicePointClippingProperties( 5326 VulkanStreamGuest* vkStream, 5327 const VkPhysicalDevicePointClippingProperties* forMarshaling) 5328 { 5329 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5330 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5331 vkStream->putBe32(pNext_size); 5332 if (pNext_size) 5333 { 5334 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5335 marshal_extension_struct(vkStream, forMarshaling->pNext); 5336 } 5337 vkStream->write((VkPointClippingBehavior*)&forMarshaling->pointClippingBehavior, sizeof(VkPointClippingBehavior)); 5338 } 5339 5340 void unmarshal_VkPhysicalDevicePointClippingProperties( 5341 VulkanStreamGuest* vkStream, 5342 VkPhysicalDevicePointClippingProperties* forUnmarshaling) 5343 { 5344 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5345 size_t pNext_size; 5346 pNext_size = vkStream->getBe32(); 5347 if (pNext_size) 5348 { 5349 uint64_t pNext_placeholder; 5350 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5351 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5352 } 5353 vkStream->read((VkPointClippingBehavior*)&forUnmarshaling->pointClippingBehavior, sizeof(VkPointClippingBehavior)); 5354 } 5355 5356 void marshal_VkInputAttachmentAspectReference( 5357 VulkanStreamGuest* vkStream, 5358 const VkInputAttachmentAspectReference* forMarshaling) 5359 { 5360 vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t)); 5361 vkStream->write((uint32_t*)&forMarshaling->inputAttachmentIndex, sizeof(uint32_t)); 5362 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 5363 } 5364 5365 void unmarshal_VkInputAttachmentAspectReference( 5366 VulkanStreamGuest* vkStream, 5367 VkInputAttachmentAspectReference* forUnmarshaling) 5368 { 5369 vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t)); 5370 vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentIndex, sizeof(uint32_t)); 5371 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 5372 } 5373 5374 void marshal_VkRenderPassInputAttachmentAspectCreateInfo( 5375 VulkanStreamGuest* vkStream, 5376 const VkRenderPassInputAttachmentAspectCreateInfo* forMarshaling) 5377 { 5378 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5379 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5380 vkStream->putBe32(pNext_size); 5381 if (pNext_size) 5382 { 5383 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5384 marshal_extension_struct(vkStream, forMarshaling->pNext); 5385 } 5386 vkStream->write((uint32_t*)&forMarshaling->aspectReferenceCount, sizeof(uint32_t)); 5387 for (uint32_t i = 0; i < (uint32_t)forMarshaling->aspectReferenceCount; ++i) 5388 { 5389 marshal_VkInputAttachmentAspectReference(vkStream, (const VkInputAttachmentAspectReference*)(forMarshaling->pAspectReferences + i)); 5390 } 5391 } 5392 5393 void unmarshal_VkRenderPassInputAttachmentAspectCreateInfo( 5394 VulkanStreamGuest* vkStream, 5395 VkRenderPassInputAttachmentAspectCreateInfo* forUnmarshaling) 5396 { 5397 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5398 size_t pNext_size; 5399 pNext_size = vkStream->getBe32(); 5400 if (pNext_size) 5401 { 5402 uint64_t pNext_placeholder; 5403 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5404 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5405 } 5406 vkStream->read((uint32_t*)&forUnmarshaling->aspectReferenceCount, sizeof(uint32_t)); 5407 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->aspectReferenceCount; ++i) 5408 { 5409 unmarshal_VkInputAttachmentAspectReference(vkStream, (VkInputAttachmentAspectReference*)(forUnmarshaling->pAspectReferences + i)); 5410 } 5411 } 5412 5413 void marshal_VkImageViewUsageCreateInfo( 5414 VulkanStreamGuest* vkStream, 5415 const VkImageViewUsageCreateInfo* forMarshaling) 5416 { 5417 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5418 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5419 vkStream->putBe32(pNext_size); 5420 if (pNext_size) 5421 { 5422 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5423 marshal_extension_struct(vkStream, forMarshaling->pNext); 5424 } 5425 vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags)); 5426 } 5427 5428 void unmarshal_VkImageViewUsageCreateInfo( 5429 VulkanStreamGuest* vkStream, 5430 VkImageViewUsageCreateInfo* forUnmarshaling) 5431 { 5432 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5433 size_t pNext_size; 5434 pNext_size = vkStream->getBe32(); 5435 if (pNext_size) 5436 { 5437 uint64_t pNext_placeholder; 5438 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5439 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5440 } 5441 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags)); 5442 } 5443 5444 void marshal_VkPipelineTessellationDomainOriginStateCreateInfo( 5445 VulkanStreamGuest* vkStream, 5446 const VkPipelineTessellationDomainOriginStateCreateInfo* forMarshaling) 5447 { 5448 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5449 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5450 vkStream->putBe32(pNext_size); 5451 if (pNext_size) 5452 { 5453 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5454 marshal_extension_struct(vkStream, forMarshaling->pNext); 5455 } 5456 vkStream->write((VkTessellationDomainOrigin*)&forMarshaling->domainOrigin, sizeof(VkTessellationDomainOrigin)); 5457 } 5458 5459 void unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo( 5460 VulkanStreamGuest* vkStream, 5461 VkPipelineTessellationDomainOriginStateCreateInfo* forUnmarshaling) 5462 { 5463 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5464 size_t pNext_size; 5465 pNext_size = vkStream->getBe32(); 5466 if (pNext_size) 5467 { 5468 uint64_t pNext_placeholder; 5469 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5470 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5471 } 5472 vkStream->read((VkTessellationDomainOrigin*)&forUnmarshaling->domainOrigin, sizeof(VkTessellationDomainOrigin)); 5473 } 5474 5475 void marshal_VkRenderPassMultiviewCreateInfo( 5476 VulkanStreamGuest* vkStream, 5477 const VkRenderPassMultiviewCreateInfo* forMarshaling) 5478 { 5479 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5480 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5481 vkStream->putBe32(pNext_size); 5482 if (pNext_size) 5483 { 5484 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5485 marshal_extension_struct(vkStream, forMarshaling->pNext); 5486 } 5487 vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t)); 5488 vkStream->write((const uint32_t*)forMarshaling->pViewMasks, forMarshaling->subpassCount * sizeof(const uint32_t)); 5489 vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t)); 5490 vkStream->write((const int32_t*)forMarshaling->pViewOffsets, forMarshaling->dependencyCount * sizeof(const int32_t)); 5491 vkStream->write((uint32_t*)&forMarshaling->correlationMaskCount, sizeof(uint32_t)); 5492 vkStream->write((const uint32_t*)forMarshaling->pCorrelationMasks, forMarshaling->correlationMaskCount * sizeof(const uint32_t)); 5493 } 5494 5495 void unmarshal_VkRenderPassMultiviewCreateInfo( 5496 VulkanStreamGuest* vkStream, 5497 VkRenderPassMultiviewCreateInfo* forUnmarshaling) 5498 { 5499 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5500 size_t pNext_size; 5501 pNext_size = vkStream->getBe32(); 5502 if (pNext_size) 5503 { 5504 uint64_t pNext_placeholder; 5505 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5506 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5507 } 5508 vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t)); 5509 vkStream->read((uint32_t*)forUnmarshaling->pViewMasks, forUnmarshaling->subpassCount * sizeof(const uint32_t)); 5510 vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t)); 5511 vkStream->read((int32_t*)forUnmarshaling->pViewOffsets, forUnmarshaling->dependencyCount * sizeof(const int32_t)); 5512 vkStream->read((uint32_t*)&forUnmarshaling->correlationMaskCount, sizeof(uint32_t)); 5513 vkStream->read((uint32_t*)forUnmarshaling->pCorrelationMasks, forUnmarshaling->correlationMaskCount * sizeof(const uint32_t)); 5514 } 5515 5516 void marshal_VkPhysicalDeviceMultiviewFeatures( 5517 VulkanStreamGuest* vkStream, 5518 const VkPhysicalDeviceMultiviewFeatures* forMarshaling) 5519 { 5520 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5521 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5522 vkStream->putBe32(pNext_size); 5523 if (pNext_size) 5524 { 5525 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5526 marshal_extension_struct(vkStream, forMarshaling->pNext); 5527 } 5528 vkStream->write((VkBool32*)&forMarshaling->multiview, sizeof(VkBool32)); 5529 vkStream->write((VkBool32*)&forMarshaling->multiviewGeometryShader, sizeof(VkBool32)); 5530 vkStream->write((VkBool32*)&forMarshaling->multiviewTessellationShader, sizeof(VkBool32)); 5531 } 5532 5533 void unmarshal_VkPhysicalDeviceMultiviewFeatures( 5534 VulkanStreamGuest* vkStream, 5535 VkPhysicalDeviceMultiviewFeatures* forUnmarshaling) 5536 { 5537 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5538 size_t pNext_size; 5539 pNext_size = vkStream->getBe32(); 5540 if (pNext_size) 5541 { 5542 uint64_t pNext_placeholder; 5543 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5544 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5545 } 5546 vkStream->read((VkBool32*)&forUnmarshaling->multiview, sizeof(VkBool32)); 5547 vkStream->read((VkBool32*)&forUnmarshaling->multiviewGeometryShader, sizeof(VkBool32)); 5548 vkStream->read((VkBool32*)&forUnmarshaling->multiviewTessellationShader, sizeof(VkBool32)); 5549 } 5550 5551 void marshal_VkPhysicalDeviceMultiviewProperties( 5552 VulkanStreamGuest* vkStream, 5553 const VkPhysicalDeviceMultiviewProperties* forMarshaling) 5554 { 5555 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5556 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5557 vkStream->putBe32(pNext_size); 5558 if (pNext_size) 5559 { 5560 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5561 marshal_extension_struct(vkStream, forMarshaling->pNext); 5562 } 5563 vkStream->write((uint32_t*)&forMarshaling->maxMultiviewViewCount, sizeof(uint32_t)); 5564 vkStream->write((uint32_t*)&forMarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t)); 5565 } 5566 5567 void unmarshal_VkPhysicalDeviceMultiviewProperties( 5568 VulkanStreamGuest* vkStream, 5569 VkPhysicalDeviceMultiviewProperties* forUnmarshaling) 5570 { 5571 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5572 size_t pNext_size; 5573 pNext_size = vkStream->getBe32(); 5574 if (pNext_size) 5575 { 5576 uint64_t pNext_placeholder; 5577 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5578 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5579 } 5580 vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewViewCount, sizeof(uint32_t)); 5581 vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t)); 5582 } 5583 5584 void marshal_VkPhysicalDeviceVariablePointerFeatures( 5585 VulkanStreamGuest* vkStream, 5586 const VkPhysicalDeviceVariablePointerFeatures* forMarshaling) 5587 { 5588 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5589 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5590 vkStream->putBe32(pNext_size); 5591 if (pNext_size) 5592 { 5593 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5594 marshal_extension_struct(vkStream, forMarshaling->pNext); 5595 } 5596 vkStream->write((VkBool32*)&forMarshaling->variablePointersStorageBuffer, sizeof(VkBool32)); 5597 vkStream->write((VkBool32*)&forMarshaling->variablePointers, sizeof(VkBool32)); 5598 } 5599 5600 void unmarshal_VkPhysicalDeviceVariablePointerFeatures( 5601 VulkanStreamGuest* vkStream, 5602 VkPhysicalDeviceVariablePointerFeatures* forUnmarshaling) 5603 { 5604 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5605 size_t pNext_size; 5606 pNext_size = vkStream->getBe32(); 5607 if (pNext_size) 5608 { 5609 uint64_t pNext_placeholder; 5610 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5611 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5612 } 5613 vkStream->read((VkBool32*)&forUnmarshaling->variablePointersStorageBuffer, sizeof(VkBool32)); 5614 vkStream->read((VkBool32*)&forUnmarshaling->variablePointers, sizeof(VkBool32)); 5615 } 5616 5617 void marshal_VkPhysicalDeviceProtectedMemoryFeatures( 5618 VulkanStreamGuest* vkStream, 5619 const VkPhysicalDeviceProtectedMemoryFeatures* forMarshaling) 5620 { 5621 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5622 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5623 vkStream->putBe32(pNext_size); 5624 if (pNext_size) 5625 { 5626 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5627 marshal_extension_struct(vkStream, forMarshaling->pNext); 5628 } 5629 vkStream->write((VkBool32*)&forMarshaling->protectedMemory, sizeof(VkBool32)); 5630 } 5631 5632 void unmarshal_VkPhysicalDeviceProtectedMemoryFeatures( 5633 VulkanStreamGuest* vkStream, 5634 VkPhysicalDeviceProtectedMemoryFeatures* forUnmarshaling) 5635 { 5636 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5637 size_t pNext_size; 5638 pNext_size = vkStream->getBe32(); 5639 if (pNext_size) 5640 { 5641 uint64_t pNext_placeholder; 5642 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5643 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5644 } 5645 vkStream->read((VkBool32*)&forUnmarshaling->protectedMemory, sizeof(VkBool32)); 5646 } 5647 5648 void marshal_VkPhysicalDeviceProtectedMemoryProperties( 5649 VulkanStreamGuest* vkStream, 5650 const VkPhysicalDeviceProtectedMemoryProperties* forMarshaling) 5651 { 5652 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5653 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5654 vkStream->putBe32(pNext_size); 5655 if (pNext_size) 5656 { 5657 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5658 marshal_extension_struct(vkStream, forMarshaling->pNext); 5659 } 5660 vkStream->write((VkBool32*)&forMarshaling->protectedNoFault, sizeof(VkBool32)); 5661 } 5662 5663 void unmarshal_VkPhysicalDeviceProtectedMemoryProperties( 5664 VulkanStreamGuest* vkStream, 5665 VkPhysicalDeviceProtectedMemoryProperties* forUnmarshaling) 5666 { 5667 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5668 size_t pNext_size; 5669 pNext_size = vkStream->getBe32(); 5670 if (pNext_size) 5671 { 5672 uint64_t pNext_placeholder; 5673 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5674 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5675 } 5676 vkStream->read((VkBool32*)&forUnmarshaling->protectedNoFault, sizeof(VkBool32)); 5677 } 5678 5679 void marshal_VkDeviceQueueInfo2( 5680 VulkanStreamGuest* vkStream, 5681 const VkDeviceQueueInfo2* forMarshaling) 5682 { 5683 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5684 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5685 vkStream->putBe32(pNext_size); 5686 if (pNext_size) 5687 { 5688 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5689 marshal_extension_struct(vkStream, forMarshaling->pNext); 5690 } 5691 vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceQueueCreateFlags)); 5692 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t)); 5693 vkStream->write((uint32_t*)&forMarshaling->queueIndex, sizeof(uint32_t)); 5694 } 5695 5696 void unmarshal_VkDeviceQueueInfo2( 5697 VulkanStreamGuest* vkStream, 5698 VkDeviceQueueInfo2* forUnmarshaling) 5699 { 5700 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5701 size_t pNext_size; 5702 pNext_size = vkStream->getBe32(); 5703 if (pNext_size) 5704 { 5705 uint64_t pNext_placeholder; 5706 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5707 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5708 } 5709 vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceQueueCreateFlags)); 5710 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t)); 5711 vkStream->read((uint32_t*)&forUnmarshaling->queueIndex, sizeof(uint32_t)); 5712 } 5713 5714 void marshal_VkProtectedSubmitInfo( 5715 VulkanStreamGuest* vkStream, 5716 const VkProtectedSubmitInfo* forMarshaling) 5717 { 5718 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5719 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5720 vkStream->putBe32(pNext_size); 5721 if (pNext_size) 5722 { 5723 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5724 marshal_extension_struct(vkStream, forMarshaling->pNext); 5725 } 5726 vkStream->write((VkBool32*)&forMarshaling->protectedSubmit, sizeof(VkBool32)); 5727 } 5728 5729 void unmarshal_VkProtectedSubmitInfo( 5730 VulkanStreamGuest* vkStream, 5731 VkProtectedSubmitInfo* forUnmarshaling) 5732 { 5733 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5734 size_t pNext_size; 5735 pNext_size = vkStream->getBe32(); 5736 if (pNext_size) 5737 { 5738 uint64_t pNext_placeholder; 5739 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5740 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5741 } 5742 vkStream->read((VkBool32*)&forUnmarshaling->protectedSubmit, sizeof(VkBool32)); 5743 } 5744 5745 void marshal_VkSamplerYcbcrConversionCreateInfo( 5746 VulkanStreamGuest* vkStream, 5747 const VkSamplerYcbcrConversionCreateInfo* forMarshaling) 5748 { 5749 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5750 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5751 vkStream->putBe32(pNext_size); 5752 if (pNext_size) 5753 { 5754 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5755 marshal_extension_struct(vkStream, forMarshaling->pNext); 5756 } 5757 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 5758 vkStream->write((VkSamplerYcbcrModelConversion*)&forMarshaling->ycbcrModel, sizeof(VkSamplerYcbcrModelConversion)); 5759 vkStream->write((VkSamplerYcbcrRange*)&forMarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange)); 5760 marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->components)); 5761 vkStream->write((VkChromaLocation*)&forMarshaling->xChromaOffset, sizeof(VkChromaLocation)); 5762 vkStream->write((VkChromaLocation*)&forMarshaling->yChromaOffset, sizeof(VkChromaLocation)); 5763 vkStream->write((VkFilter*)&forMarshaling->chromaFilter, sizeof(VkFilter)); 5764 vkStream->write((VkBool32*)&forMarshaling->forceExplicitReconstruction, sizeof(VkBool32)); 5765 } 5766 5767 void unmarshal_VkSamplerYcbcrConversionCreateInfo( 5768 VulkanStreamGuest* vkStream, 5769 VkSamplerYcbcrConversionCreateInfo* forUnmarshaling) 5770 { 5771 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5772 size_t pNext_size; 5773 pNext_size = vkStream->getBe32(); 5774 if (pNext_size) 5775 { 5776 uint64_t pNext_placeholder; 5777 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5778 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5779 } 5780 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 5781 vkStream->read((VkSamplerYcbcrModelConversion*)&forUnmarshaling->ycbcrModel, sizeof(VkSamplerYcbcrModelConversion)); 5782 vkStream->read((VkSamplerYcbcrRange*)&forUnmarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange)); 5783 unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->components)); 5784 vkStream->read((VkChromaLocation*)&forUnmarshaling->xChromaOffset, sizeof(VkChromaLocation)); 5785 vkStream->read((VkChromaLocation*)&forUnmarshaling->yChromaOffset, sizeof(VkChromaLocation)); 5786 vkStream->read((VkFilter*)&forUnmarshaling->chromaFilter, sizeof(VkFilter)); 5787 vkStream->read((VkBool32*)&forUnmarshaling->forceExplicitReconstruction, sizeof(VkBool32)); 5788 } 5789 5790 void marshal_VkSamplerYcbcrConversionInfo( 5791 VulkanStreamGuest* vkStream, 5792 const VkSamplerYcbcrConversionInfo* forMarshaling) 5793 { 5794 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5795 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5796 vkStream->putBe32(pNext_size); 5797 if (pNext_size) 5798 { 5799 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5800 marshal_extension_struct(vkStream, forMarshaling->pNext); 5801 } 5802 uint64_t cgen_var_164; 5803 vkStream->handleMapping()->mapHandles_VkSamplerYcbcrConversion_u64(&forMarshaling->conversion, &cgen_var_164, 1); 5804 vkStream->write((uint64_t*)&cgen_var_164, 1 * 8); 5805 } 5806 5807 void unmarshal_VkSamplerYcbcrConversionInfo( 5808 VulkanStreamGuest* vkStream, 5809 VkSamplerYcbcrConversionInfo* forUnmarshaling) 5810 { 5811 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5812 size_t pNext_size; 5813 pNext_size = vkStream->getBe32(); 5814 if (pNext_size) 5815 { 5816 uint64_t pNext_placeholder; 5817 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5818 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5819 } 5820 uint64_t cgen_var_165; 5821 vkStream->read((uint64_t*)&cgen_var_165, 1 * 8); 5822 vkStream->handleMapping()->mapHandles_u64_VkSamplerYcbcrConversion(&cgen_var_165, (VkSamplerYcbcrConversion*)&forUnmarshaling->conversion, 1); 5823 } 5824 5825 void marshal_VkBindImagePlaneMemoryInfo( 5826 VulkanStreamGuest* vkStream, 5827 const VkBindImagePlaneMemoryInfo* forMarshaling) 5828 { 5829 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5830 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5831 vkStream->putBe32(pNext_size); 5832 if (pNext_size) 5833 { 5834 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5835 marshal_extension_struct(vkStream, forMarshaling->pNext); 5836 } 5837 vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect, sizeof(VkImageAspectFlagBits)); 5838 } 5839 5840 void unmarshal_VkBindImagePlaneMemoryInfo( 5841 VulkanStreamGuest* vkStream, 5842 VkBindImagePlaneMemoryInfo* forUnmarshaling) 5843 { 5844 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5845 size_t pNext_size; 5846 pNext_size = vkStream->getBe32(); 5847 if (pNext_size) 5848 { 5849 uint64_t pNext_placeholder; 5850 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5851 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5852 } 5853 vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect, sizeof(VkImageAspectFlagBits)); 5854 } 5855 5856 void marshal_VkImagePlaneMemoryRequirementsInfo( 5857 VulkanStreamGuest* vkStream, 5858 const VkImagePlaneMemoryRequirementsInfo* forMarshaling) 5859 { 5860 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5861 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5862 vkStream->putBe32(pNext_size); 5863 if (pNext_size) 5864 { 5865 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 5866 marshal_extension_struct(vkStream, forMarshaling->pNext); 5867 } 5868 vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect, sizeof(VkImageAspectFlagBits)); 5869 } 5870 5871 void unmarshal_VkImagePlaneMemoryRequirementsInfo( 5872 VulkanStreamGuest* vkStream, 5873 VkImagePlaneMemoryRequirementsInfo* forUnmarshaling) 5874 { 5875 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5876 size_t pNext_size; 5877 pNext_size = vkStream->getBe32(); 5878 if (pNext_size) 5879 { 5880 uint64_t pNext_placeholder; 5881 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5882 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5883 } 5884 vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect, sizeof(VkImageAspectFlagBits)); 5885 } 5886 5887 void marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures( 5888 VulkanStreamGuest* vkStream, 5889 const VkPhysicalDeviceSamplerYcbcrConversionFeatures* forMarshaling) 5890 { 5891 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5892 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5893 vkStream->putBe32(pNext_size); 5894 if (pNext_size) 5895 { 5896 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5897 marshal_extension_struct(vkStream, forMarshaling->pNext); 5898 } 5899 vkStream->write((VkBool32*)&forMarshaling->samplerYcbcrConversion, sizeof(VkBool32)); 5900 } 5901 5902 void unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures( 5903 VulkanStreamGuest* vkStream, 5904 VkPhysicalDeviceSamplerYcbcrConversionFeatures* forUnmarshaling) 5905 { 5906 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5907 size_t pNext_size; 5908 pNext_size = vkStream->getBe32(); 5909 if (pNext_size) 5910 { 5911 uint64_t pNext_placeholder; 5912 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5913 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5914 } 5915 vkStream->read((VkBool32*)&forUnmarshaling->samplerYcbcrConversion, sizeof(VkBool32)); 5916 } 5917 5918 void marshal_VkSamplerYcbcrConversionImageFormatProperties( 5919 VulkanStreamGuest* vkStream, 5920 const VkSamplerYcbcrConversionImageFormatProperties* forMarshaling) 5921 { 5922 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5923 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5924 vkStream->putBe32(pNext_size); 5925 if (pNext_size) 5926 { 5927 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5928 marshal_extension_struct(vkStream, forMarshaling->pNext); 5929 } 5930 vkStream->write((uint32_t*)&forMarshaling->combinedImageSamplerDescriptorCount, sizeof(uint32_t)); 5931 } 5932 5933 void unmarshal_VkSamplerYcbcrConversionImageFormatProperties( 5934 VulkanStreamGuest* vkStream, 5935 VkSamplerYcbcrConversionImageFormatProperties* forUnmarshaling) 5936 { 5937 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 5938 size_t pNext_size; 5939 pNext_size = vkStream->getBe32(); 5940 if (pNext_size) 5941 { 5942 uint64_t pNext_placeholder; 5943 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 5944 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 5945 } 5946 vkStream->read((uint32_t*)&forUnmarshaling->combinedImageSamplerDescriptorCount, sizeof(uint32_t)); 5947 } 5948 5949 void marshal_VkDescriptorUpdateTemplateEntry( 5950 VulkanStreamGuest* vkStream, 5951 const VkDescriptorUpdateTemplateEntry* forMarshaling) 5952 { 5953 vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t)); 5954 vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t)); 5955 vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t)); 5956 vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType)); 5957 uint64_t cgen_var_166 = (uint64_t)forMarshaling->offset; 5958 vkStream->putBe64(cgen_var_166); 5959 uint64_t cgen_var_167 = (uint64_t)forMarshaling->stride; 5960 vkStream->putBe64(cgen_var_167); 5961 } 5962 5963 void unmarshal_VkDescriptorUpdateTemplateEntry( 5964 VulkanStreamGuest* vkStream, 5965 VkDescriptorUpdateTemplateEntry* forUnmarshaling) 5966 { 5967 vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t)); 5968 vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t)); 5969 vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t)); 5970 vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType)); 5971 forUnmarshaling->offset = (size_t)vkStream->getBe64(); 5972 forUnmarshaling->stride = (size_t)vkStream->getBe64(); 5973 } 5974 5975 void marshal_VkDescriptorUpdateTemplateCreateInfo( 5976 VulkanStreamGuest* vkStream, 5977 const VkDescriptorUpdateTemplateCreateInfo* forMarshaling) 5978 { 5979 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 5980 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 5981 vkStream->putBe32(pNext_size); 5982 if (pNext_size) 5983 { 5984 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 5985 marshal_extension_struct(vkStream, forMarshaling->pNext); 5986 } 5987 vkStream->write((VkDescriptorUpdateTemplateCreateFlags*)&forMarshaling->flags, sizeof(VkDescriptorUpdateTemplateCreateFlags)); 5988 vkStream->write((uint32_t*)&forMarshaling->descriptorUpdateEntryCount, sizeof(uint32_t)); 5989 for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorUpdateEntryCount; ++i) 5990 { 5991 marshal_VkDescriptorUpdateTemplateEntry(vkStream, (const VkDescriptorUpdateTemplateEntry*)(forMarshaling->pDescriptorUpdateEntries + i)); 5992 } 5993 vkStream->write((VkDescriptorUpdateTemplateType*)&forMarshaling->templateType, sizeof(VkDescriptorUpdateTemplateType)); 5994 uint64_t cgen_var_170; 5995 vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(&forMarshaling->descriptorSetLayout, &cgen_var_170, 1); 5996 vkStream->write((uint64_t*)&cgen_var_170, 1 * 8); 5997 vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 5998 uint64_t cgen_var_171; 5999 vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_171, 1); 6000 vkStream->write((uint64_t*)&cgen_var_171, 1 * 8); 6001 vkStream->write((uint32_t*)&forMarshaling->set, sizeof(uint32_t)); 6002 } 6003 6004 void unmarshal_VkDescriptorUpdateTemplateCreateInfo( 6005 VulkanStreamGuest* vkStream, 6006 VkDescriptorUpdateTemplateCreateInfo* forUnmarshaling) 6007 { 6008 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6009 size_t pNext_size; 6010 pNext_size = vkStream->getBe32(); 6011 if (pNext_size) 6012 { 6013 uint64_t pNext_placeholder; 6014 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6015 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6016 } 6017 vkStream->read((VkDescriptorUpdateTemplateCreateFlags*)&forUnmarshaling->flags, sizeof(VkDescriptorUpdateTemplateCreateFlags)); 6018 vkStream->read((uint32_t*)&forUnmarshaling->descriptorUpdateEntryCount, sizeof(uint32_t)); 6019 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorUpdateEntryCount; ++i) 6020 { 6021 unmarshal_VkDescriptorUpdateTemplateEntry(vkStream, (VkDescriptorUpdateTemplateEntry*)(forUnmarshaling->pDescriptorUpdateEntries + i)); 6022 } 6023 vkStream->read((VkDescriptorUpdateTemplateType*)&forUnmarshaling->templateType, sizeof(VkDescriptorUpdateTemplateType)); 6024 uint64_t cgen_var_172; 6025 vkStream->read((uint64_t*)&cgen_var_172, 1 * 8); 6026 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(&cgen_var_172, (VkDescriptorSetLayout*)&forUnmarshaling->descriptorSetLayout, 1); 6027 vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 6028 uint64_t cgen_var_173; 6029 vkStream->read((uint64_t*)&cgen_var_173, 1 * 8); 6030 vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_173, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1); 6031 vkStream->read((uint32_t*)&forUnmarshaling->set, sizeof(uint32_t)); 6032 } 6033 6034 void marshal_VkExternalMemoryProperties( 6035 VulkanStreamGuest* vkStream, 6036 const VkExternalMemoryProperties* forMarshaling) 6037 { 6038 vkStream->write((VkExternalMemoryFeatureFlags*)&forMarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlags)); 6039 vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6040 vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6041 } 6042 6043 void unmarshal_VkExternalMemoryProperties( 6044 VulkanStreamGuest* vkStream, 6045 VkExternalMemoryProperties* forUnmarshaling) 6046 { 6047 vkStream->read((VkExternalMemoryFeatureFlags*)&forUnmarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlags)); 6048 vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6049 vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6050 } 6051 6052 void marshal_VkPhysicalDeviceExternalImageFormatInfo( 6053 VulkanStreamGuest* vkStream, 6054 const VkPhysicalDeviceExternalImageFormatInfo* forMarshaling) 6055 { 6056 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6057 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6058 vkStream->putBe32(pNext_size); 6059 if (pNext_size) 6060 { 6061 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6062 marshal_extension_struct(vkStream, forMarshaling->pNext); 6063 } 6064 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 6065 } 6066 6067 void unmarshal_VkPhysicalDeviceExternalImageFormatInfo( 6068 VulkanStreamGuest* vkStream, 6069 VkPhysicalDeviceExternalImageFormatInfo* forUnmarshaling) 6070 { 6071 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6072 size_t pNext_size; 6073 pNext_size = vkStream->getBe32(); 6074 if (pNext_size) 6075 { 6076 uint64_t pNext_placeholder; 6077 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6078 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6079 } 6080 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 6081 } 6082 6083 void marshal_VkExternalImageFormatProperties( 6084 VulkanStreamGuest* vkStream, 6085 const VkExternalImageFormatProperties* forMarshaling) 6086 { 6087 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6088 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6089 vkStream->putBe32(pNext_size); 6090 if (pNext_size) 6091 { 6092 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6093 marshal_extension_struct(vkStream, forMarshaling->pNext); 6094 } 6095 marshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties)); 6096 } 6097 6098 void unmarshal_VkExternalImageFormatProperties( 6099 VulkanStreamGuest* vkStream, 6100 VkExternalImageFormatProperties* forUnmarshaling) 6101 { 6102 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6103 size_t pNext_size; 6104 pNext_size = vkStream->getBe32(); 6105 if (pNext_size) 6106 { 6107 uint64_t pNext_placeholder; 6108 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6109 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6110 } 6111 unmarshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties)); 6112 } 6113 6114 void marshal_VkPhysicalDeviceExternalBufferInfo( 6115 VulkanStreamGuest* vkStream, 6116 const VkPhysicalDeviceExternalBufferInfo* forMarshaling) 6117 { 6118 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6119 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6120 vkStream->putBe32(pNext_size); 6121 if (pNext_size) 6122 { 6123 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6124 marshal_extension_struct(vkStream, forMarshaling->pNext); 6125 } 6126 vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags)); 6127 vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags)); 6128 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 6129 } 6130 6131 void unmarshal_VkPhysicalDeviceExternalBufferInfo( 6132 VulkanStreamGuest* vkStream, 6133 VkPhysicalDeviceExternalBufferInfo* forUnmarshaling) 6134 { 6135 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6136 size_t pNext_size; 6137 pNext_size = vkStream->getBe32(); 6138 if (pNext_size) 6139 { 6140 uint64_t pNext_placeholder; 6141 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6142 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6143 } 6144 vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags)); 6145 vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags)); 6146 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 6147 } 6148 6149 void marshal_VkExternalBufferProperties( 6150 VulkanStreamGuest* vkStream, 6151 const VkExternalBufferProperties* forMarshaling) 6152 { 6153 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6154 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6155 vkStream->putBe32(pNext_size); 6156 if (pNext_size) 6157 { 6158 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6159 marshal_extension_struct(vkStream, forMarshaling->pNext); 6160 } 6161 marshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties)); 6162 } 6163 6164 void unmarshal_VkExternalBufferProperties( 6165 VulkanStreamGuest* vkStream, 6166 VkExternalBufferProperties* forUnmarshaling) 6167 { 6168 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6169 size_t pNext_size; 6170 pNext_size = vkStream->getBe32(); 6171 if (pNext_size) 6172 { 6173 uint64_t pNext_placeholder; 6174 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6175 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6176 } 6177 unmarshal_VkExternalMemoryProperties(vkStream, (VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties)); 6178 } 6179 6180 void marshal_VkPhysicalDeviceIDProperties( 6181 VulkanStreamGuest* vkStream, 6182 const VkPhysicalDeviceIDProperties* forMarshaling) 6183 { 6184 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6185 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6186 vkStream->putBe32(pNext_size); 6187 if (pNext_size) 6188 { 6189 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6190 marshal_extension_struct(vkStream, forMarshaling->pNext); 6191 } 6192 vkStream->write((uint8_t*)forMarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t)); 6193 vkStream->write((uint8_t*)forMarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t)); 6194 vkStream->write((uint8_t*)forMarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t)); 6195 vkStream->write((uint32_t*)&forMarshaling->deviceNodeMask, sizeof(uint32_t)); 6196 vkStream->write((VkBool32*)&forMarshaling->deviceLUIDValid, sizeof(VkBool32)); 6197 } 6198 6199 void unmarshal_VkPhysicalDeviceIDProperties( 6200 VulkanStreamGuest* vkStream, 6201 VkPhysicalDeviceIDProperties* forUnmarshaling) 6202 { 6203 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6204 size_t pNext_size; 6205 pNext_size = vkStream->getBe32(); 6206 if (pNext_size) 6207 { 6208 uint64_t pNext_placeholder; 6209 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6210 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6211 } 6212 vkStream->read((uint8_t*)forUnmarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t)); 6213 vkStream->read((uint8_t*)forUnmarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t)); 6214 vkStream->read((uint8_t*)forUnmarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t)); 6215 vkStream->read((uint32_t*)&forUnmarshaling->deviceNodeMask, sizeof(uint32_t)); 6216 vkStream->read((VkBool32*)&forUnmarshaling->deviceLUIDValid, sizeof(VkBool32)); 6217 } 6218 6219 void marshal_VkExternalMemoryImageCreateInfo( 6220 VulkanStreamGuest* vkStream, 6221 const VkExternalMemoryImageCreateInfo* forMarshaling) 6222 { 6223 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6224 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6225 vkStream->putBe32(pNext_size); 6226 if (pNext_size) 6227 { 6228 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6229 marshal_extension_struct(vkStream, forMarshaling->pNext); 6230 } 6231 vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6232 } 6233 6234 void unmarshal_VkExternalMemoryImageCreateInfo( 6235 VulkanStreamGuest* vkStream, 6236 VkExternalMemoryImageCreateInfo* forUnmarshaling) 6237 { 6238 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6239 size_t pNext_size; 6240 pNext_size = vkStream->getBe32(); 6241 if (pNext_size) 6242 { 6243 uint64_t pNext_placeholder; 6244 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6245 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6246 } 6247 vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6248 } 6249 6250 void marshal_VkExternalMemoryBufferCreateInfo( 6251 VulkanStreamGuest* vkStream, 6252 const VkExternalMemoryBufferCreateInfo* forMarshaling) 6253 { 6254 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6255 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6256 vkStream->putBe32(pNext_size); 6257 if (pNext_size) 6258 { 6259 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6260 marshal_extension_struct(vkStream, forMarshaling->pNext); 6261 } 6262 vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6263 } 6264 6265 void unmarshal_VkExternalMemoryBufferCreateInfo( 6266 VulkanStreamGuest* vkStream, 6267 VkExternalMemoryBufferCreateInfo* forUnmarshaling) 6268 { 6269 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6270 size_t pNext_size; 6271 pNext_size = vkStream->getBe32(); 6272 if (pNext_size) 6273 { 6274 uint64_t pNext_placeholder; 6275 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6276 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6277 } 6278 vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6279 } 6280 6281 void marshal_VkExportMemoryAllocateInfo( 6282 VulkanStreamGuest* vkStream, 6283 const VkExportMemoryAllocateInfo* forMarshaling) 6284 { 6285 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6286 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6287 vkStream->putBe32(pNext_size); 6288 if (pNext_size) 6289 { 6290 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6291 marshal_extension_struct(vkStream, forMarshaling->pNext); 6292 } 6293 vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6294 } 6295 6296 void unmarshal_VkExportMemoryAllocateInfo( 6297 VulkanStreamGuest* vkStream, 6298 VkExportMemoryAllocateInfo* forUnmarshaling) 6299 { 6300 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6301 size_t pNext_size; 6302 pNext_size = vkStream->getBe32(); 6303 if (pNext_size) 6304 { 6305 uint64_t pNext_placeholder; 6306 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6307 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6308 } 6309 vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlags)); 6310 } 6311 6312 void marshal_VkPhysicalDeviceExternalFenceInfo( 6313 VulkanStreamGuest* vkStream, 6314 const VkPhysicalDeviceExternalFenceInfo* forMarshaling) 6315 { 6316 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6317 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6318 vkStream->putBe32(pNext_size); 6319 if (pNext_size) 6320 { 6321 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6322 marshal_extension_struct(vkStream, forMarshaling->pNext); 6323 } 6324 vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 6325 } 6326 6327 void unmarshal_VkPhysicalDeviceExternalFenceInfo( 6328 VulkanStreamGuest* vkStream, 6329 VkPhysicalDeviceExternalFenceInfo* forUnmarshaling) 6330 { 6331 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6332 size_t pNext_size; 6333 pNext_size = vkStream->getBe32(); 6334 if (pNext_size) 6335 { 6336 uint64_t pNext_placeholder; 6337 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6338 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6339 } 6340 vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 6341 } 6342 6343 void marshal_VkExternalFenceProperties( 6344 VulkanStreamGuest* vkStream, 6345 const VkExternalFenceProperties* forMarshaling) 6346 { 6347 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6348 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6349 vkStream->putBe32(pNext_size); 6350 if (pNext_size) 6351 { 6352 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6353 marshal_extension_struct(vkStream, forMarshaling->pNext); 6354 } 6355 vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6356 vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6357 vkStream->write((VkExternalFenceFeatureFlags*)&forMarshaling->externalFenceFeatures, sizeof(VkExternalFenceFeatureFlags)); 6358 } 6359 6360 void unmarshal_VkExternalFenceProperties( 6361 VulkanStreamGuest* vkStream, 6362 VkExternalFenceProperties* forUnmarshaling) 6363 { 6364 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6365 size_t pNext_size; 6366 pNext_size = vkStream->getBe32(); 6367 if (pNext_size) 6368 { 6369 uint64_t pNext_placeholder; 6370 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6371 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6372 } 6373 vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6374 vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6375 vkStream->read((VkExternalFenceFeatureFlags*)&forUnmarshaling->externalFenceFeatures, sizeof(VkExternalFenceFeatureFlags)); 6376 } 6377 6378 void marshal_VkExportFenceCreateInfo( 6379 VulkanStreamGuest* vkStream, 6380 const VkExportFenceCreateInfo* forMarshaling) 6381 { 6382 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6383 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6384 vkStream->putBe32(pNext_size); 6385 if (pNext_size) 6386 { 6387 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6388 marshal_extension_struct(vkStream, forMarshaling->pNext); 6389 } 6390 vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6391 } 6392 6393 void unmarshal_VkExportFenceCreateInfo( 6394 VulkanStreamGuest* vkStream, 6395 VkExportFenceCreateInfo* forUnmarshaling) 6396 { 6397 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6398 size_t pNext_size; 6399 pNext_size = vkStream->getBe32(); 6400 if (pNext_size) 6401 { 6402 uint64_t pNext_placeholder; 6403 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6404 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6405 } 6406 vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalFenceHandleTypeFlags)); 6407 } 6408 6409 void marshal_VkExportSemaphoreCreateInfo( 6410 VulkanStreamGuest* vkStream, 6411 const VkExportSemaphoreCreateInfo* forMarshaling) 6412 { 6413 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6414 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6415 vkStream->putBe32(pNext_size); 6416 if (pNext_size) 6417 { 6418 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6419 marshal_extension_struct(vkStream, forMarshaling->pNext); 6420 } 6421 vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->handleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6422 } 6423 6424 void unmarshal_VkExportSemaphoreCreateInfo( 6425 VulkanStreamGuest* vkStream, 6426 VkExportSemaphoreCreateInfo* forUnmarshaling) 6427 { 6428 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6429 size_t pNext_size; 6430 pNext_size = vkStream->getBe32(); 6431 if (pNext_size) 6432 { 6433 uint64_t pNext_placeholder; 6434 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6435 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6436 } 6437 vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->handleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6438 } 6439 6440 void marshal_VkPhysicalDeviceExternalSemaphoreInfo( 6441 VulkanStreamGuest* vkStream, 6442 const VkPhysicalDeviceExternalSemaphoreInfo* forMarshaling) 6443 { 6444 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6445 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6446 vkStream->putBe32(pNext_size); 6447 if (pNext_size) 6448 { 6449 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6450 marshal_extension_struct(vkStream, forMarshaling->pNext); 6451 } 6452 vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 6453 } 6454 6455 void unmarshal_VkPhysicalDeviceExternalSemaphoreInfo( 6456 VulkanStreamGuest* vkStream, 6457 VkPhysicalDeviceExternalSemaphoreInfo* forUnmarshaling) 6458 { 6459 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6460 size_t pNext_size; 6461 pNext_size = vkStream->getBe32(); 6462 if (pNext_size) 6463 { 6464 uint64_t pNext_placeholder; 6465 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6466 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6467 } 6468 vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 6469 } 6470 6471 void marshal_VkExternalSemaphoreProperties( 6472 VulkanStreamGuest* vkStream, 6473 const VkExternalSemaphoreProperties* forMarshaling) 6474 { 6475 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6476 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6477 vkStream->putBe32(pNext_size); 6478 if (pNext_size) 6479 { 6480 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6481 marshal_extension_struct(vkStream, forMarshaling->pNext); 6482 } 6483 vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6484 vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6485 vkStream->write((VkExternalSemaphoreFeatureFlags*)&forMarshaling->externalSemaphoreFeatures, sizeof(VkExternalSemaphoreFeatureFlags)); 6486 } 6487 6488 void unmarshal_VkExternalSemaphoreProperties( 6489 VulkanStreamGuest* vkStream, 6490 VkExternalSemaphoreProperties* forUnmarshaling) 6491 { 6492 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6493 size_t pNext_size; 6494 pNext_size = vkStream->getBe32(); 6495 if (pNext_size) 6496 { 6497 uint64_t pNext_placeholder; 6498 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6499 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6500 } 6501 vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6502 vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalSemaphoreHandleTypeFlags)); 6503 vkStream->read((VkExternalSemaphoreFeatureFlags*)&forUnmarshaling->externalSemaphoreFeatures, sizeof(VkExternalSemaphoreFeatureFlags)); 6504 } 6505 6506 void marshal_VkPhysicalDeviceMaintenance3Properties( 6507 VulkanStreamGuest* vkStream, 6508 const VkPhysicalDeviceMaintenance3Properties* forMarshaling) 6509 { 6510 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6511 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6512 vkStream->putBe32(pNext_size); 6513 if (pNext_size) 6514 { 6515 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6516 marshal_extension_struct(vkStream, forMarshaling->pNext); 6517 } 6518 vkStream->write((uint32_t*)&forMarshaling->maxPerSetDescriptors, sizeof(uint32_t)); 6519 vkStream->write((VkDeviceSize*)&forMarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize)); 6520 } 6521 6522 void unmarshal_VkPhysicalDeviceMaintenance3Properties( 6523 VulkanStreamGuest* vkStream, 6524 VkPhysicalDeviceMaintenance3Properties* forUnmarshaling) 6525 { 6526 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6527 size_t pNext_size; 6528 pNext_size = vkStream->getBe32(); 6529 if (pNext_size) 6530 { 6531 uint64_t pNext_placeholder; 6532 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6533 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6534 } 6535 vkStream->read((uint32_t*)&forUnmarshaling->maxPerSetDescriptors, sizeof(uint32_t)); 6536 vkStream->read((VkDeviceSize*)&forUnmarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize)); 6537 } 6538 6539 void marshal_VkDescriptorSetLayoutSupport( 6540 VulkanStreamGuest* vkStream, 6541 const VkDescriptorSetLayoutSupport* forMarshaling) 6542 { 6543 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6544 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6545 vkStream->putBe32(pNext_size); 6546 if (pNext_size) 6547 { 6548 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6549 marshal_extension_struct(vkStream, forMarshaling->pNext); 6550 } 6551 vkStream->write((VkBool32*)&forMarshaling->supported, sizeof(VkBool32)); 6552 } 6553 6554 void unmarshal_VkDescriptorSetLayoutSupport( 6555 VulkanStreamGuest* vkStream, 6556 VkDescriptorSetLayoutSupport* forUnmarshaling) 6557 { 6558 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6559 size_t pNext_size; 6560 pNext_size = vkStream->getBe32(); 6561 if (pNext_size) 6562 { 6563 uint64_t pNext_placeholder; 6564 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6565 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6566 } 6567 vkStream->read((VkBool32*)&forUnmarshaling->supported, sizeof(VkBool32)); 6568 } 6569 6570 void marshal_VkPhysicalDeviceShaderDrawParameterFeatures( 6571 VulkanStreamGuest* vkStream, 6572 const VkPhysicalDeviceShaderDrawParameterFeatures* forMarshaling) 6573 { 6574 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6575 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6576 vkStream->putBe32(pNext_size); 6577 if (pNext_size) 6578 { 6579 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 6580 marshal_extension_struct(vkStream, forMarshaling->pNext); 6581 } 6582 vkStream->write((VkBool32*)&forMarshaling->shaderDrawParameters, sizeof(VkBool32)); 6583 } 6584 6585 void unmarshal_VkPhysicalDeviceShaderDrawParameterFeatures( 6586 VulkanStreamGuest* vkStream, 6587 VkPhysicalDeviceShaderDrawParameterFeatures* forUnmarshaling) 6588 { 6589 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6590 size_t pNext_size; 6591 pNext_size = vkStream->getBe32(); 6592 if (pNext_size) 6593 { 6594 uint64_t pNext_placeholder; 6595 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6596 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6597 } 6598 vkStream->read((VkBool32*)&forUnmarshaling->shaderDrawParameters, sizeof(VkBool32)); 6599 } 6600 6601 #endif 6602 #ifdef VK_KHR_surface 6603 void marshal_VkSurfaceCapabilitiesKHR( 6604 VulkanStreamGuest* vkStream, 6605 const VkSurfaceCapabilitiesKHR* forMarshaling) 6606 { 6607 vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t)); 6608 vkStream->write((uint32_t*)&forMarshaling->maxImageCount, sizeof(uint32_t)); 6609 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->currentExtent)); 6610 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minImageExtent)); 6611 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxImageExtent)); 6612 vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t)); 6613 vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 6614 vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 6615 vkStream->write((VkCompositeAlphaFlagsKHR*)&forMarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR)); 6616 vkStream->write((VkImageUsageFlags*)&forMarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags)); 6617 } 6618 6619 void unmarshal_VkSurfaceCapabilitiesKHR( 6620 VulkanStreamGuest* vkStream, 6621 VkSurfaceCapabilitiesKHR* forUnmarshaling) 6622 { 6623 vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t)); 6624 vkStream->read((uint32_t*)&forUnmarshaling->maxImageCount, sizeof(uint32_t)); 6625 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->currentExtent)); 6626 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minImageExtent)); 6627 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxImageExtent)); 6628 vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t)); 6629 vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 6630 vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 6631 vkStream->read((VkCompositeAlphaFlagsKHR*)&forUnmarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR)); 6632 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags)); 6633 } 6634 6635 void marshal_VkSurfaceFormatKHR( 6636 VulkanStreamGuest* vkStream, 6637 const VkSurfaceFormatKHR* forMarshaling) 6638 { 6639 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 6640 vkStream->write((VkColorSpaceKHR*)&forMarshaling->colorSpace, sizeof(VkColorSpaceKHR)); 6641 } 6642 6643 void unmarshal_VkSurfaceFormatKHR( 6644 VulkanStreamGuest* vkStream, 6645 VkSurfaceFormatKHR* forUnmarshaling) 6646 { 6647 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 6648 vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->colorSpace, sizeof(VkColorSpaceKHR)); 6649 } 6650 6651 #endif 6652 #ifdef VK_KHR_swapchain 6653 void marshal_VkSwapchainCreateInfoKHR( 6654 VulkanStreamGuest* vkStream, 6655 const VkSwapchainCreateInfoKHR* forMarshaling) 6656 { 6657 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6658 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6659 vkStream->putBe32(pNext_size); 6660 if (pNext_size) 6661 { 6662 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6663 marshal_extension_struct(vkStream, forMarshaling->pNext); 6664 } 6665 vkStream->write((VkSwapchainCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkSwapchainCreateFlagsKHR)); 6666 uint64_t cgen_var_174; 6667 vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_174, 1); 6668 vkStream->write((uint64_t*)&cgen_var_174, 1 * 8); 6669 vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t)); 6670 vkStream->write((VkFormat*)&forMarshaling->imageFormat, sizeof(VkFormat)); 6671 vkStream->write((VkColorSpaceKHR*)&forMarshaling->imageColorSpace, sizeof(VkColorSpaceKHR)); 6672 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->imageExtent)); 6673 vkStream->write((uint32_t*)&forMarshaling->imageArrayLayers, sizeof(uint32_t)); 6674 vkStream->write((VkImageUsageFlags*)&forMarshaling->imageUsage, sizeof(VkImageUsageFlags)); 6675 vkStream->write((VkSharingMode*)&forMarshaling->imageSharingMode, sizeof(VkSharingMode)); 6676 vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 6677 // WARNING PTR CHECK 6678 uint64_t cgen_var_175 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices; 6679 vkStream->putBe64(cgen_var_175); 6680 if (forMarshaling->pQueueFamilyIndices) 6681 { 6682 vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 6683 } 6684 vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->preTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 6685 vkStream->write((VkCompositeAlphaFlagBitsKHR*)&forMarshaling->compositeAlpha, sizeof(VkCompositeAlphaFlagBitsKHR)); 6686 vkStream->write((VkPresentModeKHR*)&forMarshaling->presentMode, sizeof(VkPresentModeKHR)); 6687 vkStream->write((VkBool32*)&forMarshaling->clipped, sizeof(VkBool32)); 6688 uint64_t cgen_var_176; 6689 vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->oldSwapchain, &cgen_var_176, 1); 6690 vkStream->write((uint64_t*)&cgen_var_176, 1 * 8); 6691 } 6692 6693 void unmarshal_VkSwapchainCreateInfoKHR( 6694 VulkanStreamGuest* vkStream, 6695 VkSwapchainCreateInfoKHR* forUnmarshaling) 6696 { 6697 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6698 size_t pNext_size; 6699 pNext_size = vkStream->getBe32(); 6700 if (pNext_size) 6701 { 6702 uint64_t pNext_placeholder; 6703 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6704 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6705 } 6706 vkStream->read((VkSwapchainCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkSwapchainCreateFlagsKHR)); 6707 uint64_t cgen_var_177; 6708 vkStream->read((uint64_t*)&cgen_var_177, 1 * 8); 6709 vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_177, (VkSurfaceKHR*)&forUnmarshaling->surface, 1); 6710 vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t)); 6711 vkStream->read((VkFormat*)&forUnmarshaling->imageFormat, sizeof(VkFormat)); 6712 vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->imageColorSpace, sizeof(VkColorSpaceKHR)); 6713 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->imageExtent)); 6714 vkStream->read((uint32_t*)&forUnmarshaling->imageArrayLayers, sizeof(uint32_t)); 6715 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->imageUsage, sizeof(VkImageUsageFlags)); 6716 vkStream->read((VkSharingMode*)&forUnmarshaling->imageSharingMode, sizeof(VkSharingMode)); 6717 vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t)); 6718 // WARNING PTR CHECK 6719 const uint32_t* check_pQueueFamilyIndices; 6720 check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64(); 6721 if (forUnmarshaling->pQueueFamilyIndices) 6722 { 6723 if (!(check_pQueueFamilyIndices)) 6724 { 6725 fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n"); 6726 } 6727 vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t)); 6728 } 6729 vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->preTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 6730 vkStream->read((VkCompositeAlphaFlagBitsKHR*)&forUnmarshaling->compositeAlpha, sizeof(VkCompositeAlphaFlagBitsKHR)); 6731 vkStream->read((VkPresentModeKHR*)&forUnmarshaling->presentMode, sizeof(VkPresentModeKHR)); 6732 vkStream->read((VkBool32*)&forUnmarshaling->clipped, sizeof(VkBool32)); 6733 uint64_t cgen_var_179; 6734 vkStream->read((uint64_t*)&cgen_var_179, 1 * 8); 6735 vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_179, (VkSwapchainKHR*)&forUnmarshaling->oldSwapchain, 1); 6736 } 6737 6738 void marshal_VkPresentInfoKHR( 6739 VulkanStreamGuest* vkStream, 6740 const VkPresentInfoKHR* forMarshaling) 6741 { 6742 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6743 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6744 vkStream->putBe32(pNext_size); 6745 if (pNext_size) 6746 { 6747 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6748 marshal_extension_struct(vkStream, forMarshaling->pNext); 6749 } 6750 vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t)); 6751 if (forMarshaling->waitSemaphoreCount) 6752 { 6753 uint64_t* cgen_var_180; 6754 vkStream->alloc((void**)&cgen_var_180, forMarshaling->waitSemaphoreCount * 8); 6755 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_180, forMarshaling->waitSemaphoreCount); 6756 vkStream->write((uint64_t*)cgen_var_180, forMarshaling->waitSemaphoreCount * 8); 6757 } 6758 vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t)); 6759 if (forMarshaling->swapchainCount) 6760 { 6761 uint64_t* cgen_var_181; 6762 vkStream->alloc((void**)&cgen_var_181, forMarshaling->swapchainCount * 8); 6763 vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(forMarshaling->pSwapchains, cgen_var_181, forMarshaling->swapchainCount); 6764 vkStream->write((uint64_t*)cgen_var_181, forMarshaling->swapchainCount * 8); 6765 } 6766 vkStream->write((const uint32_t*)forMarshaling->pImageIndices, forMarshaling->swapchainCount * sizeof(const uint32_t)); 6767 // WARNING PTR CHECK 6768 uint64_t cgen_var_182 = (uint64_t)(uintptr_t)forMarshaling->pResults; 6769 vkStream->putBe64(cgen_var_182); 6770 if (forMarshaling->pResults) 6771 { 6772 vkStream->write((VkResult*)forMarshaling->pResults, forMarshaling->swapchainCount * sizeof(VkResult)); 6773 } 6774 } 6775 6776 void unmarshal_VkPresentInfoKHR( 6777 VulkanStreamGuest* vkStream, 6778 VkPresentInfoKHR* forUnmarshaling) 6779 { 6780 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6781 size_t pNext_size; 6782 pNext_size = vkStream->getBe32(); 6783 if (pNext_size) 6784 { 6785 uint64_t pNext_placeholder; 6786 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6787 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6788 } 6789 vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t)); 6790 if (forUnmarshaling->waitSemaphoreCount) 6791 { 6792 uint64_t* cgen_var_183; 6793 vkStream->alloc((void**)&cgen_var_183, forUnmarshaling->waitSemaphoreCount * 8); 6794 vkStream->read((uint64_t*)cgen_var_183, forUnmarshaling->waitSemaphoreCount * 8); 6795 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_183, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount); 6796 } 6797 vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t)); 6798 if (forUnmarshaling->swapchainCount) 6799 { 6800 uint64_t* cgen_var_184; 6801 vkStream->alloc((void**)&cgen_var_184, forUnmarshaling->swapchainCount * 8); 6802 vkStream->read((uint64_t*)cgen_var_184, forUnmarshaling->swapchainCount * 8); 6803 vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(cgen_var_184, (VkSwapchainKHR*)forUnmarshaling->pSwapchains, forUnmarshaling->swapchainCount); 6804 } 6805 vkStream->read((uint32_t*)forUnmarshaling->pImageIndices, forUnmarshaling->swapchainCount * sizeof(const uint32_t)); 6806 // WARNING PTR CHECK 6807 VkResult* check_pResults; 6808 check_pResults = (VkResult*)(uintptr_t)vkStream->getBe64(); 6809 if (forUnmarshaling->pResults) 6810 { 6811 if (!(check_pResults)) 6812 { 6813 fprintf(stderr, "fatal: forUnmarshaling->pResults inconsistent between guest and host\n"); 6814 } 6815 vkStream->read((VkResult*)forUnmarshaling->pResults, forUnmarshaling->swapchainCount * sizeof(VkResult)); 6816 } 6817 } 6818 6819 void marshal_VkImageSwapchainCreateInfoKHR( 6820 VulkanStreamGuest* vkStream, 6821 const VkImageSwapchainCreateInfoKHR* forMarshaling) 6822 { 6823 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6824 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6825 vkStream->putBe32(pNext_size); 6826 if (pNext_size) 6827 { 6828 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6829 marshal_extension_struct(vkStream, forMarshaling->pNext); 6830 } 6831 uint64_t cgen_var_186; 6832 vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_186, 1); 6833 vkStream->write((uint64_t*)&cgen_var_186, 1 * 8); 6834 } 6835 6836 void unmarshal_VkImageSwapchainCreateInfoKHR( 6837 VulkanStreamGuest* vkStream, 6838 VkImageSwapchainCreateInfoKHR* forUnmarshaling) 6839 { 6840 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6841 size_t pNext_size; 6842 pNext_size = vkStream->getBe32(); 6843 if (pNext_size) 6844 { 6845 uint64_t pNext_placeholder; 6846 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6847 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6848 } 6849 uint64_t cgen_var_187; 6850 vkStream->read((uint64_t*)&cgen_var_187, 1 * 8); 6851 vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_187, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1); 6852 } 6853 6854 void marshal_VkBindImageMemorySwapchainInfoKHR( 6855 VulkanStreamGuest* vkStream, 6856 const VkBindImageMemorySwapchainInfoKHR* forMarshaling) 6857 { 6858 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6859 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6860 vkStream->putBe32(pNext_size); 6861 if (pNext_size) 6862 { 6863 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6864 marshal_extension_struct(vkStream, forMarshaling->pNext); 6865 } 6866 uint64_t cgen_var_188; 6867 vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_188, 1); 6868 vkStream->write((uint64_t*)&cgen_var_188, 1 * 8); 6869 vkStream->write((uint32_t*)&forMarshaling->imageIndex, sizeof(uint32_t)); 6870 } 6871 6872 void unmarshal_VkBindImageMemorySwapchainInfoKHR( 6873 VulkanStreamGuest* vkStream, 6874 VkBindImageMemorySwapchainInfoKHR* forUnmarshaling) 6875 { 6876 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6877 size_t pNext_size; 6878 pNext_size = vkStream->getBe32(); 6879 if (pNext_size) 6880 { 6881 uint64_t pNext_placeholder; 6882 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6883 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6884 } 6885 uint64_t cgen_var_189; 6886 vkStream->read((uint64_t*)&cgen_var_189, 1 * 8); 6887 vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_189, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1); 6888 vkStream->read((uint32_t*)&forUnmarshaling->imageIndex, sizeof(uint32_t)); 6889 } 6890 6891 void marshal_VkAcquireNextImageInfoKHR( 6892 VulkanStreamGuest* vkStream, 6893 const VkAcquireNextImageInfoKHR* forMarshaling) 6894 { 6895 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6896 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6897 vkStream->putBe32(pNext_size); 6898 if (pNext_size) 6899 { 6900 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6901 marshal_extension_struct(vkStream, forMarshaling->pNext); 6902 } 6903 uint64_t cgen_var_190; 6904 vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_190, 1); 6905 vkStream->write((uint64_t*)&cgen_var_190, 1 * 8); 6906 vkStream->write((uint64_t*)&forMarshaling->timeout, sizeof(uint64_t)); 6907 uint64_t cgen_var_191; 6908 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_191, 1); 6909 vkStream->write((uint64_t*)&cgen_var_191, 1 * 8); 6910 uint64_t cgen_var_192; 6911 vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_192, 1); 6912 vkStream->write((uint64_t*)&cgen_var_192, 1 * 8); 6913 vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t)); 6914 } 6915 6916 void unmarshal_VkAcquireNextImageInfoKHR( 6917 VulkanStreamGuest* vkStream, 6918 VkAcquireNextImageInfoKHR* forUnmarshaling) 6919 { 6920 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6921 size_t pNext_size; 6922 pNext_size = vkStream->getBe32(); 6923 if (pNext_size) 6924 { 6925 uint64_t pNext_placeholder; 6926 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6927 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6928 } 6929 uint64_t cgen_var_193; 6930 vkStream->read((uint64_t*)&cgen_var_193, 1 * 8); 6931 vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_193, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1); 6932 vkStream->read((uint64_t*)&forUnmarshaling->timeout, sizeof(uint64_t)); 6933 uint64_t cgen_var_194; 6934 vkStream->read((uint64_t*)&cgen_var_194, 1 * 8); 6935 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_194, (VkSemaphore*)&forUnmarshaling->semaphore, 1); 6936 uint64_t cgen_var_195; 6937 vkStream->read((uint64_t*)&cgen_var_195, 1 * 8); 6938 vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_195, (VkFence*)&forUnmarshaling->fence, 1); 6939 vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t)); 6940 } 6941 6942 void marshal_VkDeviceGroupPresentCapabilitiesKHR( 6943 VulkanStreamGuest* vkStream, 6944 const VkDeviceGroupPresentCapabilitiesKHR* forMarshaling) 6945 { 6946 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6947 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6948 vkStream->putBe32(pNext_size); 6949 if (pNext_size) 6950 { 6951 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6952 marshal_extension_struct(vkStream, forMarshaling->pNext); 6953 } 6954 vkStream->write((uint32_t*)forMarshaling->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t)); 6955 vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); 6956 } 6957 6958 void unmarshal_VkDeviceGroupPresentCapabilitiesKHR( 6959 VulkanStreamGuest* vkStream, 6960 VkDeviceGroupPresentCapabilitiesKHR* forUnmarshaling) 6961 { 6962 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6963 size_t pNext_size; 6964 pNext_size = vkStream->getBe32(); 6965 if (pNext_size) 6966 { 6967 uint64_t pNext_placeholder; 6968 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 6969 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 6970 } 6971 vkStream->read((uint32_t*)forUnmarshaling->presentMask, VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t)); 6972 vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); 6973 } 6974 6975 void marshal_VkDeviceGroupPresentInfoKHR( 6976 VulkanStreamGuest* vkStream, 6977 const VkDeviceGroupPresentInfoKHR* forMarshaling) 6978 { 6979 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 6980 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 6981 vkStream->putBe32(pNext_size); 6982 if (pNext_size) 6983 { 6984 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 6985 marshal_extension_struct(vkStream, forMarshaling->pNext); 6986 } 6987 vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t)); 6988 vkStream->write((const uint32_t*)forMarshaling->pDeviceMasks, forMarshaling->swapchainCount * sizeof(const uint32_t)); 6989 vkStream->write((VkDeviceGroupPresentModeFlagBitsKHR*)&forMarshaling->mode, sizeof(VkDeviceGroupPresentModeFlagBitsKHR)); 6990 } 6991 6992 void unmarshal_VkDeviceGroupPresentInfoKHR( 6993 VulkanStreamGuest* vkStream, 6994 VkDeviceGroupPresentInfoKHR* forUnmarshaling) 6995 { 6996 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 6997 size_t pNext_size; 6998 pNext_size = vkStream->getBe32(); 6999 if (pNext_size) 7000 { 7001 uint64_t pNext_placeholder; 7002 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7003 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7004 } 7005 vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t)); 7006 vkStream->read((uint32_t*)forUnmarshaling->pDeviceMasks, forUnmarshaling->swapchainCount * sizeof(const uint32_t)); 7007 vkStream->read((VkDeviceGroupPresentModeFlagBitsKHR*)&forUnmarshaling->mode, sizeof(VkDeviceGroupPresentModeFlagBitsKHR)); 7008 } 7009 7010 void marshal_VkDeviceGroupSwapchainCreateInfoKHR( 7011 VulkanStreamGuest* vkStream, 7012 const VkDeviceGroupSwapchainCreateInfoKHR* forMarshaling) 7013 { 7014 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7015 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7016 vkStream->putBe32(pNext_size); 7017 if (pNext_size) 7018 { 7019 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7020 marshal_extension_struct(vkStream, forMarshaling->pNext); 7021 } 7022 vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); 7023 } 7024 7025 void unmarshal_VkDeviceGroupSwapchainCreateInfoKHR( 7026 VulkanStreamGuest* vkStream, 7027 VkDeviceGroupSwapchainCreateInfoKHR* forUnmarshaling) 7028 { 7029 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7030 size_t pNext_size; 7031 pNext_size = vkStream->getBe32(); 7032 if (pNext_size) 7033 { 7034 uint64_t pNext_placeholder; 7035 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7036 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7037 } 7038 vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes, sizeof(VkDeviceGroupPresentModeFlagsKHR)); 7039 } 7040 7041 #endif 7042 #ifdef VK_KHR_display 7043 void marshal_VkDisplayPropertiesKHR( 7044 VulkanStreamGuest* vkStream, 7045 const VkDisplayPropertiesKHR* forMarshaling) 7046 { 7047 uint64_t cgen_var_196; 7048 vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->display, &cgen_var_196, 1); 7049 vkStream->write((uint64_t*)&cgen_var_196, 1 * 8); 7050 vkStream->putString(forMarshaling->displayName); 7051 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->physicalDimensions)); 7052 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->physicalResolution)); 7053 vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 7054 vkStream->write((VkBool32*)&forMarshaling->planeReorderPossible, sizeof(VkBool32)); 7055 vkStream->write((VkBool32*)&forMarshaling->persistentContent, sizeof(VkBool32)); 7056 } 7057 7058 void unmarshal_VkDisplayPropertiesKHR( 7059 VulkanStreamGuest* vkStream, 7060 VkDisplayPropertiesKHR* forUnmarshaling) 7061 { 7062 uint64_t cgen_var_197; 7063 vkStream->read((uint64_t*)&cgen_var_197, 1 * 8); 7064 vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(&cgen_var_197, (VkDisplayKHR*)&forUnmarshaling->display, 1); 7065 vkStream->loadStringInPlace((char**)&forUnmarshaling->displayName); 7066 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->physicalDimensions)); 7067 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->physicalResolution)); 7068 vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 7069 vkStream->read((VkBool32*)&forUnmarshaling->planeReorderPossible, sizeof(VkBool32)); 7070 vkStream->read((VkBool32*)&forUnmarshaling->persistentContent, sizeof(VkBool32)); 7071 } 7072 7073 void marshal_VkDisplayModeParametersKHR( 7074 VulkanStreamGuest* vkStream, 7075 const VkDisplayModeParametersKHR* forMarshaling) 7076 { 7077 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->visibleRegion)); 7078 vkStream->write((uint32_t*)&forMarshaling->refreshRate, sizeof(uint32_t)); 7079 } 7080 7081 void unmarshal_VkDisplayModeParametersKHR( 7082 VulkanStreamGuest* vkStream, 7083 VkDisplayModeParametersKHR* forUnmarshaling) 7084 { 7085 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->visibleRegion)); 7086 vkStream->read((uint32_t*)&forUnmarshaling->refreshRate, sizeof(uint32_t)); 7087 } 7088 7089 void marshal_VkDisplayModePropertiesKHR( 7090 VulkanStreamGuest* vkStream, 7091 const VkDisplayModePropertiesKHR* forMarshaling) 7092 { 7093 uint64_t cgen_var_198; 7094 vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode, &cgen_var_198, 1); 7095 vkStream->write((uint64_t*)&cgen_var_198, 1 * 8); 7096 marshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forMarshaling->parameters)); 7097 } 7098 7099 void unmarshal_VkDisplayModePropertiesKHR( 7100 VulkanStreamGuest* vkStream, 7101 VkDisplayModePropertiesKHR* forUnmarshaling) 7102 { 7103 uint64_t cgen_var_199; 7104 vkStream->read((uint64_t*)&cgen_var_199, 1 * 8); 7105 vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_199, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1); 7106 unmarshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters)); 7107 } 7108 7109 void marshal_VkDisplayModeCreateInfoKHR( 7110 VulkanStreamGuest* vkStream, 7111 const VkDisplayModeCreateInfoKHR* forMarshaling) 7112 { 7113 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7114 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7115 vkStream->putBe32(pNext_size); 7116 if (pNext_size) 7117 { 7118 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7119 marshal_extension_struct(vkStream, forMarshaling->pNext); 7120 } 7121 vkStream->write((VkDisplayModeCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkDisplayModeCreateFlagsKHR)); 7122 marshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forMarshaling->parameters)); 7123 } 7124 7125 void unmarshal_VkDisplayModeCreateInfoKHR( 7126 VulkanStreamGuest* vkStream, 7127 VkDisplayModeCreateInfoKHR* forUnmarshaling) 7128 { 7129 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7130 size_t pNext_size; 7131 pNext_size = vkStream->getBe32(); 7132 if (pNext_size) 7133 { 7134 uint64_t pNext_placeholder; 7135 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7136 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7137 } 7138 vkStream->read((VkDisplayModeCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkDisplayModeCreateFlagsKHR)); 7139 unmarshal_VkDisplayModeParametersKHR(vkStream, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters)); 7140 } 7141 7142 void marshal_VkDisplayPlaneCapabilitiesKHR( 7143 VulkanStreamGuest* vkStream, 7144 const VkDisplayPlaneCapabilitiesKHR* forMarshaling) 7145 { 7146 vkStream->write((VkDisplayPlaneAlphaFlagsKHR*)&forMarshaling->supportedAlpha, sizeof(VkDisplayPlaneAlphaFlagsKHR)); 7147 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->minSrcPosition)); 7148 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->maxSrcPosition)); 7149 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minSrcExtent)); 7150 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSrcExtent)); 7151 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->minDstPosition)); 7152 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->maxDstPosition)); 7153 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minDstExtent)); 7154 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxDstExtent)); 7155 } 7156 7157 void unmarshal_VkDisplayPlaneCapabilitiesKHR( 7158 VulkanStreamGuest* vkStream, 7159 VkDisplayPlaneCapabilitiesKHR* forUnmarshaling) 7160 { 7161 vkStream->read((VkDisplayPlaneAlphaFlagsKHR*)&forUnmarshaling->supportedAlpha, sizeof(VkDisplayPlaneAlphaFlagsKHR)); 7162 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->minSrcPosition)); 7163 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->maxSrcPosition)); 7164 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minSrcExtent)); 7165 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSrcExtent)); 7166 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->minDstPosition)); 7167 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->maxDstPosition)); 7168 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minDstExtent)); 7169 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxDstExtent)); 7170 } 7171 7172 void marshal_VkDisplayPlanePropertiesKHR( 7173 VulkanStreamGuest* vkStream, 7174 const VkDisplayPlanePropertiesKHR* forMarshaling) 7175 { 7176 uint64_t cgen_var_200; 7177 vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->currentDisplay, &cgen_var_200, 1); 7178 vkStream->write((uint64_t*)&cgen_var_200, 1 * 8); 7179 vkStream->write((uint32_t*)&forMarshaling->currentStackIndex, sizeof(uint32_t)); 7180 } 7181 7182 void unmarshal_VkDisplayPlanePropertiesKHR( 7183 VulkanStreamGuest* vkStream, 7184 VkDisplayPlanePropertiesKHR* forUnmarshaling) 7185 { 7186 uint64_t cgen_var_201; 7187 vkStream->read((uint64_t*)&cgen_var_201, 1 * 8); 7188 vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(&cgen_var_201, (VkDisplayKHR*)&forUnmarshaling->currentDisplay, 1); 7189 vkStream->read((uint32_t*)&forUnmarshaling->currentStackIndex, sizeof(uint32_t)); 7190 } 7191 7192 void marshal_VkDisplaySurfaceCreateInfoKHR( 7193 VulkanStreamGuest* vkStream, 7194 const VkDisplaySurfaceCreateInfoKHR* forMarshaling) 7195 { 7196 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7197 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7198 vkStream->putBe32(pNext_size); 7199 if (pNext_size) 7200 { 7201 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7202 marshal_extension_struct(vkStream, forMarshaling->pNext); 7203 } 7204 vkStream->write((VkDisplaySurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkDisplaySurfaceCreateFlagsKHR)); 7205 uint64_t cgen_var_202; 7206 vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode, &cgen_var_202, 1); 7207 vkStream->write((uint64_t*)&cgen_var_202, 1 * 8); 7208 vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t)); 7209 vkStream->write((uint32_t*)&forMarshaling->planeStackIndex, sizeof(uint32_t)); 7210 vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->transform, sizeof(VkSurfaceTransformFlagBitsKHR)); 7211 vkStream->write((float*)&forMarshaling->globalAlpha, sizeof(float)); 7212 vkStream->write((VkDisplayPlaneAlphaFlagBitsKHR*)&forMarshaling->alphaMode, sizeof(VkDisplayPlaneAlphaFlagBitsKHR)); 7213 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->imageExtent)); 7214 } 7215 7216 void unmarshal_VkDisplaySurfaceCreateInfoKHR( 7217 VulkanStreamGuest* vkStream, 7218 VkDisplaySurfaceCreateInfoKHR* forUnmarshaling) 7219 { 7220 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7221 size_t pNext_size; 7222 pNext_size = vkStream->getBe32(); 7223 if (pNext_size) 7224 { 7225 uint64_t pNext_placeholder; 7226 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7227 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7228 } 7229 vkStream->read((VkDisplaySurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkDisplaySurfaceCreateFlagsKHR)); 7230 uint64_t cgen_var_203; 7231 vkStream->read((uint64_t*)&cgen_var_203, 1 * 8); 7232 vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_203, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1); 7233 vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t)); 7234 vkStream->read((uint32_t*)&forUnmarshaling->planeStackIndex, sizeof(uint32_t)); 7235 vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->transform, sizeof(VkSurfaceTransformFlagBitsKHR)); 7236 vkStream->read((float*)&forUnmarshaling->globalAlpha, sizeof(float)); 7237 vkStream->read((VkDisplayPlaneAlphaFlagBitsKHR*)&forUnmarshaling->alphaMode, sizeof(VkDisplayPlaneAlphaFlagBitsKHR)); 7238 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->imageExtent)); 7239 } 7240 7241 #endif 7242 #ifdef VK_KHR_display_swapchain 7243 void marshal_VkDisplayPresentInfoKHR( 7244 VulkanStreamGuest* vkStream, 7245 const VkDisplayPresentInfoKHR* forMarshaling) 7246 { 7247 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7248 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7249 vkStream->putBe32(pNext_size); 7250 if (pNext_size) 7251 { 7252 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7253 marshal_extension_struct(vkStream, forMarshaling->pNext); 7254 } 7255 marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->srcRect)); 7256 marshal_VkRect2D(vkStream, (VkRect2D*)(&forMarshaling->dstRect)); 7257 vkStream->write((VkBool32*)&forMarshaling->persistent, sizeof(VkBool32)); 7258 } 7259 7260 void unmarshal_VkDisplayPresentInfoKHR( 7261 VulkanStreamGuest* vkStream, 7262 VkDisplayPresentInfoKHR* forUnmarshaling) 7263 { 7264 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7265 size_t pNext_size; 7266 pNext_size = vkStream->getBe32(); 7267 if (pNext_size) 7268 { 7269 uint64_t pNext_placeholder; 7270 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7271 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7272 } 7273 unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->srcRect)); 7274 unmarshal_VkRect2D(vkStream, (VkRect2D*)(&forUnmarshaling->dstRect)); 7275 vkStream->read((VkBool32*)&forUnmarshaling->persistent, sizeof(VkBool32)); 7276 } 7277 7278 #endif 7279 #ifdef VK_KHR_xlib_surface 7280 void marshal_VkXlibSurfaceCreateInfoKHR( 7281 VulkanStreamGuest* vkStream, 7282 const VkXlibSurfaceCreateInfoKHR* forMarshaling) 7283 { 7284 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7285 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7286 vkStream->putBe32(pNext_size); 7287 if (pNext_size) 7288 { 7289 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7290 marshal_extension_struct(vkStream, forMarshaling->pNext); 7291 } 7292 vkStream->write((VkXlibSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkXlibSurfaceCreateFlagsKHR)); 7293 // WARNING PTR CHECK 7294 uint64_t cgen_var_204 = (uint64_t)(uintptr_t)forMarshaling->dpy; 7295 vkStream->putBe64(cgen_var_204); 7296 if (forMarshaling->dpy) 7297 { 7298 vkStream->write((Display*)forMarshaling->dpy, sizeof(Display)); 7299 } 7300 vkStream->write((Window*)&forMarshaling->window, sizeof(Window)); 7301 } 7302 7303 void unmarshal_VkXlibSurfaceCreateInfoKHR( 7304 VulkanStreamGuest* vkStream, 7305 VkXlibSurfaceCreateInfoKHR* forUnmarshaling) 7306 { 7307 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7308 size_t pNext_size; 7309 pNext_size = vkStream->getBe32(); 7310 if (pNext_size) 7311 { 7312 uint64_t pNext_placeholder; 7313 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7314 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7315 } 7316 vkStream->read((VkXlibSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkXlibSurfaceCreateFlagsKHR)); 7317 // WARNING PTR CHECK 7318 Display* check_dpy; 7319 check_dpy = (Display*)(uintptr_t)vkStream->getBe64(); 7320 if (forUnmarshaling->dpy) 7321 { 7322 if (!(check_dpy)) 7323 { 7324 fprintf(stderr, "fatal: forUnmarshaling->dpy inconsistent between guest and host\n"); 7325 } 7326 vkStream->read((Display*)forUnmarshaling->dpy, sizeof(Display)); 7327 } 7328 vkStream->read((Window*)&forUnmarshaling->window, sizeof(Window)); 7329 } 7330 7331 #endif 7332 #ifdef VK_KHR_xcb_surface 7333 void marshal_VkXcbSurfaceCreateInfoKHR( 7334 VulkanStreamGuest* vkStream, 7335 const VkXcbSurfaceCreateInfoKHR* forMarshaling) 7336 { 7337 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7338 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7339 vkStream->putBe32(pNext_size); 7340 if (pNext_size) 7341 { 7342 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7343 marshal_extension_struct(vkStream, forMarshaling->pNext); 7344 } 7345 vkStream->write((VkXcbSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkXcbSurfaceCreateFlagsKHR)); 7346 // WARNING PTR CHECK 7347 uint64_t cgen_var_206 = (uint64_t)(uintptr_t)forMarshaling->connection; 7348 vkStream->putBe64(cgen_var_206); 7349 if (forMarshaling->connection) 7350 { 7351 vkStream->write((xcb_connection_t*)forMarshaling->connection, sizeof(xcb_connection_t)); 7352 } 7353 vkStream->write((xcb_window_t*)&forMarshaling->window, sizeof(xcb_window_t)); 7354 } 7355 7356 void unmarshal_VkXcbSurfaceCreateInfoKHR( 7357 VulkanStreamGuest* vkStream, 7358 VkXcbSurfaceCreateInfoKHR* forUnmarshaling) 7359 { 7360 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7361 size_t pNext_size; 7362 pNext_size = vkStream->getBe32(); 7363 if (pNext_size) 7364 { 7365 uint64_t pNext_placeholder; 7366 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7367 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7368 } 7369 vkStream->read((VkXcbSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkXcbSurfaceCreateFlagsKHR)); 7370 // WARNING PTR CHECK 7371 xcb_connection_t* check_connection; 7372 check_connection = (xcb_connection_t*)(uintptr_t)vkStream->getBe64(); 7373 if (forUnmarshaling->connection) 7374 { 7375 if (!(check_connection)) 7376 { 7377 fprintf(stderr, "fatal: forUnmarshaling->connection inconsistent between guest and host\n"); 7378 } 7379 vkStream->read((xcb_connection_t*)forUnmarshaling->connection, sizeof(xcb_connection_t)); 7380 } 7381 vkStream->read((xcb_window_t*)&forUnmarshaling->window, sizeof(xcb_window_t)); 7382 } 7383 7384 #endif 7385 #ifdef VK_KHR_wayland_surface 7386 void marshal_VkWaylandSurfaceCreateInfoKHR( 7387 VulkanStreamGuest* vkStream, 7388 const VkWaylandSurfaceCreateInfoKHR* forMarshaling) 7389 { 7390 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7391 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7392 vkStream->putBe32(pNext_size); 7393 if (pNext_size) 7394 { 7395 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7396 marshal_extension_struct(vkStream, forMarshaling->pNext); 7397 } 7398 vkStream->write((VkWaylandSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkWaylandSurfaceCreateFlagsKHR)); 7399 // WARNING PTR CHECK 7400 uint64_t cgen_var_208 = (uint64_t)(uintptr_t)forMarshaling->display; 7401 vkStream->putBe64(cgen_var_208); 7402 if (forMarshaling->display) 7403 { 7404 vkStream->write((wl_display*)forMarshaling->display, sizeof(wl_display)); 7405 } 7406 // WARNING PTR CHECK 7407 uint64_t cgen_var_209 = (uint64_t)(uintptr_t)forMarshaling->surface; 7408 vkStream->putBe64(cgen_var_209); 7409 if (forMarshaling->surface) 7410 { 7411 vkStream->write((wl_surface*)forMarshaling->surface, sizeof(wl_surface)); 7412 } 7413 } 7414 7415 void unmarshal_VkWaylandSurfaceCreateInfoKHR( 7416 VulkanStreamGuest* vkStream, 7417 VkWaylandSurfaceCreateInfoKHR* forUnmarshaling) 7418 { 7419 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7420 size_t pNext_size; 7421 pNext_size = vkStream->getBe32(); 7422 if (pNext_size) 7423 { 7424 uint64_t pNext_placeholder; 7425 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7426 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7427 } 7428 vkStream->read((VkWaylandSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkWaylandSurfaceCreateFlagsKHR)); 7429 // WARNING PTR CHECK 7430 wl_display* check_display; 7431 check_display = (wl_display*)(uintptr_t)vkStream->getBe64(); 7432 if (forUnmarshaling->display) 7433 { 7434 if (!(check_display)) 7435 { 7436 fprintf(stderr, "fatal: forUnmarshaling->display inconsistent between guest and host\n"); 7437 } 7438 vkStream->read((wl_display*)forUnmarshaling->display, sizeof(wl_display)); 7439 } 7440 // WARNING PTR CHECK 7441 wl_surface* check_surface; 7442 check_surface = (wl_surface*)(uintptr_t)vkStream->getBe64(); 7443 if (forUnmarshaling->surface) 7444 { 7445 if (!(check_surface)) 7446 { 7447 fprintf(stderr, "fatal: forUnmarshaling->surface inconsistent between guest and host\n"); 7448 } 7449 vkStream->read((wl_surface*)forUnmarshaling->surface, sizeof(wl_surface)); 7450 } 7451 } 7452 7453 #endif 7454 #ifdef VK_KHR_mir_surface 7455 void marshal_VkMirSurfaceCreateInfoKHR( 7456 VulkanStreamGuest* vkStream, 7457 const VkMirSurfaceCreateInfoKHR* forMarshaling) 7458 { 7459 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7460 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7461 vkStream->putBe32(pNext_size); 7462 if (pNext_size) 7463 { 7464 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7465 marshal_extension_struct(vkStream, forMarshaling->pNext); 7466 } 7467 vkStream->write((VkMirSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkMirSurfaceCreateFlagsKHR)); 7468 // WARNING PTR CHECK 7469 uint64_t cgen_var_212 = (uint64_t)(uintptr_t)forMarshaling->connection; 7470 vkStream->putBe64(cgen_var_212); 7471 if (forMarshaling->connection) 7472 { 7473 vkStream->write((MirConnection*)forMarshaling->connection, sizeof(MirConnection)); 7474 } 7475 // WARNING PTR CHECK 7476 uint64_t cgen_var_213 = (uint64_t)(uintptr_t)forMarshaling->mirSurface; 7477 vkStream->putBe64(cgen_var_213); 7478 if (forMarshaling->mirSurface) 7479 { 7480 vkStream->write((MirSurface*)forMarshaling->mirSurface, sizeof(MirSurface)); 7481 } 7482 } 7483 7484 void unmarshal_VkMirSurfaceCreateInfoKHR( 7485 VulkanStreamGuest* vkStream, 7486 VkMirSurfaceCreateInfoKHR* forUnmarshaling) 7487 { 7488 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7489 size_t pNext_size; 7490 pNext_size = vkStream->getBe32(); 7491 if (pNext_size) 7492 { 7493 uint64_t pNext_placeholder; 7494 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7495 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7496 } 7497 vkStream->read((VkMirSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkMirSurfaceCreateFlagsKHR)); 7498 // WARNING PTR CHECK 7499 MirConnection* check_connection; 7500 check_connection = (MirConnection*)(uintptr_t)vkStream->getBe64(); 7501 if (forUnmarshaling->connection) 7502 { 7503 if (!(check_connection)) 7504 { 7505 fprintf(stderr, "fatal: forUnmarshaling->connection inconsistent between guest and host\n"); 7506 } 7507 vkStream->read((MirConnection*)forUnmarshaling->connection, sizeof(MirConnection)); 7508 } 7509 // WARNING PTR CHECK 7510 MirSurface* check_mirSurface; 7511 check_mirSurface = (MirSurface*)(uintptr_t)vkStream->getBe64(); 7512 if (forUnmarshaling->mirSurface) 7513 { 7514 if (!(check_mirSurface)) 7515 { 7516 fprintf(stderr, "fatal: forUnmarshaling->mirSurface inconsistent between guest and host\n"); 7517 } 7518 vkStream->read((MirSurface*)forUnmarshaling->mirSurface, sizeof(MirSurface)); 7519 } 7520 } 7521 7522 #endif 7523 #ifdef VK_KHR_android_surface 7524 void marshal_VkAndroidSurfaceCreateInfoKHR( 7525 VulkanStreamGuest* vkStream, 7526 const VkAndroidSurfaceCreateInfoKHR* forMarshaling) 7527 { 7528 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7529 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7530 vkStream->putBe32(pNext_size); 7531 if (pNext_size) 7532 { 7533 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7534 marshal_extension_struct(vkStream, forMarshaling->pNext); 7535 } 7536 vkStream->write((VkAndroidSurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkAndroidSurfaceCreateFlagsKHR)); 7537 // WARNING PTR CHECK 7538 uint64_t cgen_var_216 = (uint64_t)(uintptr_t)forMarshaling->window; 7539 vkStream->putBe64(cgen_var_216); 7540 if (forMarshaling->window) 7541 { 7542 vkStream->write((ANativeWindow*)forMarshaling->window, sizeof(ANativeWindow)); 7543 } 7544 } 7545 7546 void unmarshal_VkAndroidSurfaceCreateInfoKHR( 7547 VulkanStreamGuest* vkStream, 7548 VkAndroidSurfaceCreateInfoKHR* forUnmarshaling) 7549 { 7550 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7551 size_t pNext_size; 7552 pNext_size = vkStream->getBe32(); 7553 if (pNext_size) 7554 { 7555 uint64_t pNext_placeholder; 7556 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7557 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7558 } 7559 vkStream->read((VkAndroidSurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkAndroidSurfaceCreateFlagsKHR)); 7560 // WARNING PTR CHECK 7561 ANativeWindow* check_window; 7562 check_window = (ANativeWindow*)(uintptr_t)vkStream->getBe64(); 7563 if (forUnmarshaling->window) 7564 { 7565 if (!(check_window)) 7566 { 7567 fprintf(stderr, "fatal: forUnmarshaling->window inconsistent between guest and host\n"); 7568 } 7569 vkStream->read((ANativeWindow*)forUnmarshaling->window, sizeof(ANativeWindow)); 7570 } 7571 } 7572 7573 #endif 7574 #ifdef VK_KHR_win32_surface 7575 void marshal_VkWin32SurfaceCreateInfoKHR( 7576 VulkanStreamGuest* vkStream, 7577 const VkWin32SurfaceCreateInfoKHR* forMarshaling) 7578 { 7579 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7580 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7581 vkStream->putBe32(pNext_size); 7582 if (pNext_size) 7583 { 7584 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7585 marshal_extension_struct(vkStream, forMarshaling->pNext); 7586 } 7587 vkStream->write((VkWin32SurfaceCreateFlagsKHR*)&forMarshaling->flags, sizeof(VkWin32SurfaceCreateFlagsKHR)); 7588 vkStream->write((HINSTANCE*)&forMarshaling->hinstance, sizeof(HINSTANCE)); 7589 vkStream->write((HWND*)&forMarshaling->hwnd, sizeof(HWND)); 7590 } 7591 7592 void unmarshal_VkWin32SurfaceCreateInfoKHR( 7593 VulkanStreamGuest* vkStream, 7594 VkWin32SurfaceCreateInfoKHR* forUnmarshaling) 7595 { 7596 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7597 size_t pNext_size; 7598 pNext_size = vkStream->getBe32(); 7599 if (pNext_size) 7600 { 7601 uint64_t pNext_placeholder; 7602 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7603 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7604 } 7605 vkStream->read((VkWin32SurfaceCreateFlagsKHR*)&forUnmarshaling->flags, sizeof(VkWin32SurfaceCreateFlagsKHR)); 7606 vkStream->read((HINSTANCE*)&forUnmarshaling->hinstance, sizeof(HINSTANCE)); 7607 vkStream->read((HWND*)&forUnmarshaling->hwnd, sizeof(HWND)); 7608 } 7609 7610 #endif 7611 #ifdef VK_KHR_sampler_mirror_clamp_to_edge 7612 #endif 7613 #ifdef VK_KHR_multiview 7614 #endif 7615 #ifdef VK_KHR_get_physical_device_properties2 7616 #endif 7617 #ifdef VK_KHR_device_group 7618 #endif 7619 #ifdef VK_KHR_shader_draw_parameters 7620 #endif 7621 #ifdef VK_KHR_maintenance1 7622 #endif 7623 #ifdef VK_KHR_device_group_creation 7624 #endif 7625 #ifdef VK_KHR_external_memory_capabilities 7626 #endif 7627 #ifdef VK_KHR_external_memory 7628 #endif 7629 #ifdef VK_KHR_external_memory_win32 7630 void marshal_VkImportMemoryWin32HandleInfoKHR( 7631 VulkanStreamGuest* vkStream, 7632 const VkImportMemoryWin32HandleInfoKHR* forMarshaling) 7633 { 7634 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7635 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7636 vkStream->putBe32(pNext_size); 7637 if (pNext_size) 7638 { 7639 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7640 marshal_extension_struct(vkStream, forMarshaling->pNext); 7641 } 7642 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7643 vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE)); 7644 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 7645 } 7646 7647 void unmarshal_VkImportMemoryWin32HandleInfoKHR( 7648 VulkanStreamGuest* vkStream, 7649 VkImportMemoryWin32HandleInfoKHR* forUnmarshaling) 7650 { 7651 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7652 size_t pNext_size; 7653 pNext_size = vkStream->getBe32(); 7654 if (pNext_size) 7655 { 7656 uint64_t pNext_placeholder; 7657 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7658 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7659 } 7660 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7661 vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE)); 7662 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 7663 } 7664 7665 void marshal_VkExportMemoryWin32HandleInfoKHR( 7666 VulkanStreamGuest* vkStream, 7667 const VkExportMemoryWin32HandleInfoKHR* forMarshaling) 7668 { 7669 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7670 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7671 vkStream->putBe32(pNext_size); 7672 if (pNext_size) 7673 { 7674 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7675 marshal_extension_struct(vkStream, forMarshaling->pNext); 7676 } 7677 // WARNING PTR CHECK 7678 uint64_t cgen_var_218 = (uint64_t)(uintptr_t)forMarshaling->pAttributes; 7679 vkStream->putBe64(cgen_var_218); 7680 if (forMarshaling->pAttributes) 7681 { 7682 vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 7683 } 7684 vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD)); 7685 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 7686 } 7687 7688 void unmarshal_VkExportMemoryWin32HandleInfoKHR( 7689 VulkanStreamGuest* vkStream, 7690 VkExportMemoryWin32HandleInfoKHR* forUnmarshaling) 7691 { 7692 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7693 size_t pNext_size; 7694 pNext_size = vkStream->getBe32(); 7695 if (pNext_size) 7696 { 7697 uint64_t pNext_placeholder; 7698 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7699 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7700 } 7701 // WARNING PTR CHECK 7702 const SECURITY_ATTRIBUTES* check_pAttributes; 7703 check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64(); 7704 if (forUnmarshaling->pAttributes) 7705 { 7706 if (!(check_pAttributes)) 7707 { 7708 fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n"); 7709 } 7710 vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 7711 } 7712 vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD)); 7713 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 7714 } 7715 7716 void marshal_VkMemoryWin32HandlePropertiesKHR( 7717 VulkanStreamGuest* vkStream, 7718 const VkMemoryWin32HandlePropertiesKHR* forMarshaling) 7719 { 7720 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7721 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7722 vkStream->putBe32(pNext_size); 7723 if (pNext_size) 7724 { 7725 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 7726 marshal_extension_struct(vkStream, forMarshaling->pNext); 7727 } 7728 vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); 7729 } 7730 7731 void unmarshal_VkMemoryWin32HandlePropertiesKHR( 7732 VulkanStreamGuest* vkStream, 7733 VkMemoryWin32HandlePropertiesKHR* forUnmarshaling) 7734 { 7735 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7736 size_t pNext_size; 7737 pNext_size = vkStream->getBe32(); 7738 if (pNext_size) 7739 { 7740 uint64_t pNext_placeholder; 7741 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7742 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7743 } 7744 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t)); 7745 } 7746 7747 void marshal_VkMemoryGetWin32HandleInfoKHR( 7748 VulkanStreamGuest* vkStream, 7749 const VkMemoryGetWin32HandleInfoKHR* forMarshaling) 7750 { 7751 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7752 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7753 vkStream->putBe32(pNext_size); 7754 if (pNext_size) 7755 { 7756 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7757 marshal_extension_struct(vkStream, forMarshaling->pNext); 7758 } 7759 uint64_t cgen_var_220; 7760 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_220, 1); 7761 vkStream->write((uint64_t*)&cgen_var_220, 1 * 8); 7762 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7763 } 7764 7765 void unmarshal_VkMemoryGetWin32HandleInfoKHR( 7766 VulkanStreamGuest* vkStream, 7767 VkMemoryGetWin32HandleInfoKHR* forUnmarshaling) 7768 { 7769 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7770 size_t pNext_size; 7771 pNext_size = vkStream->getBe32(); 7772 if (pNext_size) 7773 { 7774 uint64_t pNext_placeholder; 7775 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7776 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7777 } 7778 uint64_t cgen_var_221; 7779 vkStream->read((uint64_t*)&cgen_var_221, 1 * 8); 7780 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_221, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 7781 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7782 } 7783 7784 #endif 7785 #ifdef VK_KHR_external_memory_fd 7786 void marshal_VkImportMemoryFdInfoKHR( 7787 VulkanStreamGuest* vkStream, 7788 const VkImportMemoryFdInfoKHR* forMarshaling) 7789 { 7790 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7791 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7792 vkStream->putBe32(pNext_size); 7793 if (pNext_size) 7794 { 7795 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7796 marshal_extension_struct(vkStream, forMarshaling->pNext); 7797 } 7798 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7799 vkStream->write((int*)&forMarshaling->fd, sizeof(int)); 7800 } 7801 7802 void unmarshal_VkImportMemoryFdInfoKHR( 7803 VulkanStreamGuest* vkStream, 7804 VkImportMemoryFdInfoKHR* forUnmarshaling) 7805 { 7806 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7807 size_t pNext_size; 7808 pNext_size = vkStream->getBe32(); 7809 if (pNext_size) 7810 { 7811 uint64_t pNext_placeholder; 7812 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7813 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7814 } 7815 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7816 vkStream->read((int*)&forUnmarshaling->fd, sizeof(int)); 7817 } 7818 7819 void marshal_VkMemoryFdPropertiesKHR( 7820 VulkanStreamGuest* vkStream, 7821 const VkMemoryFdPropertiesKHR* forMarshaling) 7822 { 7823 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7824 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7825 vkStream->putBe32(pNext_size); 7826 if (pNext_size) 7827 { 7828 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 7829 marshal_extension_struct(vkStream, forMarshaling->pNext); 7830 } 7831 vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); 7832 } 7833 7834 void unmarshal_VkMemoryFdPropertiesKHR( 7835 VulkanStreamGuest* vkStream, 7836 VkMemoryFdPropertiesKHR* forUnmarshaling) 7837 { 7838 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7839 size_t pNext_size; 7840 pNext_size = vkStream->getBe32(); 7841 if (pNext_size) 7842 { 7843 uint64_t pNext_placeholder; 7844 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7845 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7846 } 7847 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t)); 7848 } 7849 7850 void marshal_VkMemoryGetFdInfoKHR( 7851 VulkanStreamGuest* vkStream, 7852 const VkMemoryGetFdInfoKHR* forMarshaling) 7853 { 7854 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7855 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7856 vkStream->putBe32(pNext_size); 7857 if (pNext_size) 7858 { 7859 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7860 marshal_extension_struct(vkStream, forMarshaling->pNext); 7861 } 7862 uint64_t cgen_var_222; 7863 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_222, 1); 7864 vkStream->write((uint64_t*)&cgen_var_222, 1 * 8); 7865 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7866 } 7867 7868 void unmarshal_VkMemoryGetFdInfoKHR( 7869 VulkanStreamGuest* vkStream, 7870 VkMemoryGetFdInfoKHR* forUnmarshaling) 7871 { 7872 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7873 size_t pNext_size; 7874 pNext_size = vkStream->getBe32(); 7875 if (pNext_size) 7876 { 7877 uint64_t pNext_placeholder; 7878 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7879 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7880 } 7881 uint64_t cgen_var_223; 7882 vkStream->read((uint64_t*)&cgen_var_223, 1 * 8); 7883 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_223, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 7884 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 7885 } 7886 7887 #endif 7888 #ifdef VK_KHR_win32_keyed_mutex 7889 void marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR( 7890 VulkanStreamGuest* vkStream, 7891 const VkWin32KeyedMutexAcquireReleaseInfoKHR* forMarshaling) 7892 { 7893 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7894 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7895 vkStream->putBe32(pNext_size); 7896 if (pNext_size) 7897 { 7898 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7899 marshal_extension_struct(vkStream, forMarshaling->pNext); 7900 } 7901 vkStream->write((uint32_t*)&forMarshaling->acquireCount, sizeof(uint32_t)); 7902 if (forMarshaling->acquireCount) 7903 { 7904 uint64_t* cgen_var_224; 7905 vkStream->alloc((void**)&cgen_var_224, forMarshaling->acquireCount * 8); 7906 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pAcquireSyncs, cgen_var_224, forMarshaling->acquireCount); 7907 vkStream->write((uint64_t*)cgen_var_224, forMarshaling->acquireCount * 8); 7908 } 7909 vkStream->write((const uint64_t*)forMarshaling->pAcquireKeys, forMarshaling->acquireCount * sizeof(const uint64_t)); 7910 vkStream->write((const uint32_t*)forMarshaling->pAcquireTimeouts, forMarshaling->acquireCount * sizeof(const uint32_t)); 7911 vkStream->write((uint32_t*)&forMarshaling->releaseCount, sizeof(uint32_t)); 7912 if (forMarshaling->releaseCount) 7913 { 7914 uint64_t* cgen_var_225; 7915 vkStream->alloc((void**)&cgen_var_225, forMarshaling->releaseCount * 8); 7916 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pReleaseSyncs, cgen_var_225, forMarshaling->releaseCount); 7917 vkStream->write((uint64_t*)cgen_var_225, forMarshaling->releaseCount * 8); 7918 } 7919 vkStream->write((const uint64_t*)forMarshaling->pReleaseKeys, forMarshaling->releaseCount * sizeof(const uint64_t)); 7920 } 7921 7922 void unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR( 7923 VulkanStreamGuest* vkStream, 7924 VkWin32KeyedMutexAcquireReleaseInfoKHR* forUnmarshaling) 7925 { 7926 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7927 size_t pNext_size; 7928 pNext_size = vkStream->getBe32(); 7929 if (pNext_size) 7930 { 7931 uint64_t pNext_placeholder; 7932 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7933 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7934 } 7935 vkStream->read((uint32_t*)&forUnmarshaling->acquireCount, sizeof(uint32_t)); 7936 if (forUnmarshaling->acquireCount) 7937 { 7938 uint64_t* cgen_var_226; 7939 vkStream->alloc((void**)&cgen_var_226, forUnmarshaling->acquireCount * 8); 7940 vkStream->read((uint64_t*)cgen_var_226, forUnmarshaling->acquireCount * 8); 7941 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_226, (VkDeviceMemory*)forUnmarshaling->pAcquireSyncs, forUnmarshaling->acquireCount); 7942 } 7943 vkStream->read((uint64_t*)forUnmarshaling->pAcquireKeys, forUnmarshaling->acquireCount * sizeof(const uint64_t)); 7944 vkStream->read((uint32_t*)forUnmarshaling->pAcquireTimeouts, forUnmarshaling->acquireCount * sizeof(const uint32_t)); 7945 vkStream->read((uint32_t*)&forUnmarshaling->releaseCount, sizeof(uint32_t)); 7946 if (forUnmarshaling->releaseCount) 7947 { 7948 uint64_t* cgen_var_227; 7949 vkStream->alloc((void**)&cgen_var_227, forUnmarshaling->releaseCount * 8); 7950 vkStream->read((uint64_t*)cgen_var_227, forUnmarshaling->releaseCount * 8); 7951 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_227, (VkDeviceMemory*)forUnmarshaling->pReleaseSyncs, forUnmarshaling->releaseCount); 7952 } 7953 vkStream->read((uint64_t*)forUnmarshaling->pReleaseKeys, forUnmarshaling->releaseCount * sizeof(const uint64_t)); 7954 } 7955 7956 #endif 7957 #ifdef VK_KHR_external_semaphore_capabilities 7958 #endif 7959 #ifdef VK_KHR_external_semaphore 7960 #endif 7961 #ifdef VK_KHR_external_semaphore_win32 7962 void marshal_VkImportSemaphoreWin32HandleInfoKHR( 7963 VulkanStreamGuest* vkStream, 7964 const VkImportSemaphoreWin32HandleInfoKHR* forMarshaling) 7965 { 7966 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 7967 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 7968 vkStream->putBe32(pNext_size); 7969 if (pNext_size) 7970 { 7971 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 7972 marshal_extension_struct(vkStream, forMarshaling->pNext); 7973 } 7974 uint64_t cgen_var_228; 7975 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_228, 1); 7976 vkStream->write((uint64_t*)&cgen_var_228, 1 * 8); 7977 vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags)); 7978 vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 7979 vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE)); 7980 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 7981 } 7982 7983 void unmarshal_VkImportSemaphoreWin32HandleInfoKHR( 7984 VulkanStreamGuest* vkStream, 7985 VkImportSemaphoreWin32HandleInfoKHR* forUnmarshaling) 7986 { 7987 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 7988 size_t pNext_size; 7989 pNext_size = vkStream->getBe32(); 7990 if (pNext_size) 7991 { 7992 uint64_t pNext_placeholder; 7993 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 7994 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 7995 } 7996 uint64_t cgen_var_229; 7997 vkStream->read((uint64_t*)&cgen_var_229, 1 * 8); 7998 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_229, (VkSemaphore*)&forUnmarshaling->semaphore, 1); 7999 vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreImportFlags)); 8000 vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8001 vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE)); 8002 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 8003 } 8004 8005 void marshal_VkExportSemaphoreWin32HandleInfoKHR( 8006 VulkanStreamGuest* vkStream, 8007 const VkExportSemaphoreWin32HandleInfoKHR* forMarshaling) 8008 { 8009 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8010 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8011 vkStream->putBe32(pNext_size); 8012 if (pNext_size) 8013 { 8014 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8015 marshal_extension_struct(vkStream, forMarshaling->pNext); 8016 } 8017 // WARNING PTR CHECK 8018 uint64_t cgen_var_230 = (uint64_t)(uintptr_t)forMarshaling->pAttributes; 8019 vkStream->putBe64(cgen_var_230); 8020 if (forMarshaling->pAttributes) 8021 { 8022 vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 8023 } 8024 vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD)); 8025 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 8026 } 8027 8028 void unmarshal_VkExportSemaphoreWin32HandleInfoKHR( 8029 VulkanStreamGuest* vkStream, 8030 VkExportSemaphoreWin32HandleInfoKHR* forUnmarshaling) 8031 { 8032 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8033 size_t pNext_size; 8034 pNext_size = vkStream->getBe32(); 8035 if (pNext_size) 8036 { 8037 uint64_t pNext_placeholder; 8038 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8039 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8040 } 8041 // WARNING PTR CHECK 8042 const SECURITY_ATTRIBUTES* check_pAttributes; 8043 check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64(); 8044 if (forUnmarshaling->pAttributes) 8045 { 8046 if (!(check_pAttributes)) 8047 { 8048 fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n"); 8049 } 8050 vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 8051 } 8052 vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD)); 8053 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 8054 } 8055 8056 void marshal_VkD3D12FenceSubmitInfoKHR( 8057 VulkanStreamGuest* vkStream, 8058 const VkD3D12FenceSubmitInfoKHR* forMarshaling) 8059 { 8060 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8061 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8062 vkStream->putBe32(pNext_size); 8063 if (pNext_size) 8064 { 8065 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8066 marshal_extension_struct(vkStream, forMarshaling->pNext); 8067 } 8068 vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreValuesCount, sizeof(uint32_t)); 8069 // WARNING PTR CHECK 8070 uint64_t cgen_var_232 = (uint64_t)(uintptr_t)forMarshaling->pWaitSemaphoreValues; 8071 vkStream->putBe64(cgen_var_232); 8072 if (forMarshaling->pWaitSemaphoreValues) 8073 { 8074 vkStream->write((const uint64_t*)forMarshaling->pWaitSemaphoreValues, forMarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t)); 8075 } 8076 vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreValuesCount, sizeof(uint32_t)); 8077 // WARNING PTR CHECK 8078 uint64_t cgen_var_233 = (uint64_t)(uintptr_t)forMarshaling->pSignalSemaphoreValues; 8079 vkStream->putBe64(cgen_var_233); 8080 if (forMarshaling->pSignalSemaphoreValues) 8081 { 8082 vkStream->write((const uint64_t*)forMarshaling->pSignalSemaphoreValues, forMarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t)); 8083 } 8084 } 8085 8086 void unmarshal_VkD3D12FenceSubmitInfoKHR( 8087 VulkanStreamGuest* vkStream, 8088 VkD3D12FenceSubmitInfoKHR* forUnmarshaling) 8089 { 8090 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8091 size_t pNext_size; 8092 pNext_size = vkStream->getBe32(); 8093 if (pNext_size) 8094 { 8095 uint64_t pNext_placeholder; 8096 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8097 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8098 } 8099 vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreValuesCount, sizeof(uint32_t)); 8100 // WARNING PTR CHECK 8101 const uint64_t* check_pWaitSemaphoreValues; 8102 check_pWaitSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64(); 8103 if (forUnmarshaling->pWaitSemaphoreValues) 8104 { 8105 if (!(check_pWaitSemaphoreValues)) 8106 { 8107 fprintf(stderr, "fatal: forUnmarshaling->pWaitSemaphoreValues inconsistent between guest and host\n"); 8108 } 8109 vkStream->read((uint64_t*)forUnmarshaling->pWaitSemaphoreValues, forUnmarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t)); 8110 } 8111 vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreValuesCount, sizeof(uint32_t)); 8112 // WARNING PTR CHECK 8113 const uint64_t* check_pSignalSemaphoreValues; 8114 check_pSignalSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64(); 8115 if (forUnmarshaling->pSignalSemaphoreValues) 8116 { 8117 if (!(check_pSignalSemaphoreValues)) 8118 { 8119 fprintf(stderr, "fatal: forUnmarshaling->pSignalSemaphoreValues inconsistent between guest and host\n"); 8120 } 8121 vkStream->read((uint64_t*)forUnmarshaling->pSignalSemaphoreValues, forUnmarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t)); 8122 } 8123 } 8124 8125 void marshal_VkSemaphoreGetWin32HandleInfoKHR( 8126 VulkanStreamGuest* vkStream, 8127 const VkSemaphoreGetWin32HandleInfoKHR* forMarshaling) 8128 { 8129 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8130 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8131 vkStream->putBe32(pNext_size); 8132 if (pNext_size) 8133 { 8134 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8135 marshal_extension_struct(vkStream, forMarshaling->pNext); 8136 } 8137 uint64_t cgen_var_236; 8138 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_236, 1); 8139 vkStream->write((uint64_t*)&cgen_var_236, 1 * 8); 8140 vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8141 } 8142 8143 void unmarshal_VkSemaphoreGetWin32HandleInfoKHR( 8144 VulkanStreamGuest* vkStream, 8145 VkSemaphoreGetWin32HandleInfoKHR* forUnmarshaling) 8146 { 8147 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8148 size_t pNext_size; 8149 pNext_size = vkStream->getBe32(); 8150 if (pNext_size) 8151 { 8152 uint64_t pNext_placeholder; 8153 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8154 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8155 } 8156 uint64_t cgen_var_237; 8157 vkStream->read((uint64_t*)&cgen_var_237, 1 * 8); 8158 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_237, (VkSemaphore*)&forUnmarshaling->semaphore, 1); 8159 vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8160 } 8161 8162 #endif 8163 #ifdef VK_KHR_external_semaphore_fd 8164 void marshal_VkImportSemaphoreFdInfoKHR( 8165 VulkanStreamGuest* vkStream, 8166 const VkImportSemaphoreFdInfoKHR* forMarshaling) 8167 { 8168 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8169 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8170 vkStream->putBe32(pNext_size); 8171 if (pNext_size) 8172 { 8173 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8174 marshal_extension_struct(vkStream, forMarshaling->pNext); 8175 } 8176 uint64_t cgen_var_238; 8177 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_238, 1); 8178 vkStream->write((uint64_t*)&cgen_var_238, 1 * 8); 8179 vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags)); 8180 vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8181 vkStream->write((int*)&forMarshaling->fd, sizeof(int)); 8182 } 8183 8184 void unmarshal_VkImportSemaphoreFdInfoKHR( 8185 VulkanStreamGuest* vkStream, 8186 VkImportSemaphoreFdInfoKHR* forUnmarshaling) 8187 { 8188 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8189 size_t pNext_size; 8190 pNext_size = vkStream->getBe32(); 8191 if (pNext_size) 8192 { 8193 uint64_t pNext_placeholder; 8194 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8195 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8196 } 8197 uint64_t cgen_var_239; 8198 vkStream->read((uint64_t*)&cgen_var_239, 1 * 8); 8199 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_239, (VkSemaphore*)&forUnmarshaling->semaphore, 1); 8200 vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreImportFlags)); 8201 vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8202 vkStream->read((int*)&forUnmarshaling->fd, sizeof(int)); 8203 } 8204 8205 void marshal_VkSemaphoreGetFdInfoKHR( 8206 VulkanStreamGuest* vkStream, 8207 const VkSemaphoreGetFdInfoKHR* forMarshaling) 8208 { 8209 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8210 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8211 vkStream->putBe32(pNext_size); 8212 if (pNext_size) 8213 { 8214 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8215 marshal_extension_struct(vkStream, forMarshaling->pNext); 8216 } 8217 uint64_t cgen_var_240; 8218 vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_240, 1); 8219 vkStream->write((uint64_t*)&cgen_var_240, 1 * 8); 8220 vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8221 } 8222 8223 void unmarshal_VkSemaphoreGetFdInfoKHR( 8224 VulkanStreamGuest* vkStream, 8225 VkSemaphoreGetFdInfoKHR* forUnmarshaling) 8226 { 8227 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8228 size_t pNext_size; 8229 pNext_size = vkStream->getBe32(); 8230 if (pNext_size) 8231 { 8232 uint64_t pNext_placeholder; 8233 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8234 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8235 } 8236 uint64_t cgen_var_241; 8237 vkStream->read((uint64_t*)&cgen_var_241, 1 * 8); 8238 vkStream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_241, (VkSemaphore*)&forUnmarshaling->semaphore, 1); 8239 vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalSemaphoreHandleTypeFlagBits)); 8240 } 8241 8242 #endif 8243 #ifdef VK_KHR_push_descriptor 8244 void marshal_VkPhysicalDevicePushDescriptorPropertiesKHR( 8245 VulkanStreamGuest* vkStream, 8246 const VkPhysicalDevicePushDescriptorPropertiesKHR* forMarshaling) 8247 { 8248 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8249 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8250 vkStream->putBe32(pNext_size); 8251 if (pNext_size) 8252 { 8253 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 8254 marshal_extension_struct(vkStream, forMarshaling->pNext); 8255 } 8256 vkStream->write((uint32_t*)&forMarshaling->maxPushDescriptors, sizeof(uint32_t)); 8257 } 8258 8259 void unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR( 8260 VulkanStreamGuest* vkStream, 8261 VkPhysicalDevicePushDescriptorPropertiesKHR* forUnmarshaling) 8262 { 8263 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8264 size_t pNext_size; 8265 pNext_size = vkStream->getBe32(); 8266 if (pNext_size) 8267 { 8268 uint64_t pNext_placeholder; 8269 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8270 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8271 } 8272 vkStream->read((uint32_t*)&forUnmarshaling->maxPushDescriptors, sizeof(uint32_t)); 8273 } 8274 8275 #endif 8276 #ifdef VK_KHR_16bit_storage 8277 #endif 8278 #ifdef VK_KHR_incremental_present 8279 void marshal_VkRectLayerKHR( 8280 VulkanStreamGuest* vkStream, 8281 const VkRectLayerKHR* forMarshaling) 8282 { 8283 marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->offset)); 8284 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->extent)); 8285 vkStream->write((uint32_t*)&forMarshaling->layer, sizeof(uint32_t)); 8286 } 8287 8288 void unmarshal_VkRectLayerKHR( 8289 VulkanStreamGuest* vkStream, 8290 VkRectLayerKHR* forUnmarshaling) 8291 { 8292 unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->offset)); 8293 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->extent)); 8294 vkStream->read((uint32_t*)&forUnmarshaling->layer, sizeof(uint32_t)); 8295 } 8296 8297 void marshal_VkPresentRegionKHR( 8298 VulkanStreamGuest* vkStream, 8299 const VkPresentRegionKHR* forMarshaling) 8300 { 8301 vkStream->write((uint32_t*)&forMarshaling->rectangleCount, sizeof(uint32_t)); 8302 // WARNING PTR CHECK 8303 uint64_t cgen_var_242 = (uint64_t)(uintptr_t)forMarshaling->pRectangles; 8304 vkStream->putBe64(cgen_var_242); 8305 if (forMarshaling->pRectangles) 8306 { 8307 for (uint32_t i = 0; i < (uint32_t)forMarshaling->rectangleCount; ++i) 8308 { 8309 marshal_VkRectLayerKHR(vkStream, (const VkRectLayerKHR*)(forMarshaling->pRectangles + i)); 8310 } 8311 } 8312 } 8313 8314 void unmarshal_VkPresentRegionKHR( 8315 VulkanStreamGuest* vkStream, 8316 VkPresentRegionKHR* forUnmarshaling) 8317 { 8318 vkStream->read((uint32_t*)&forUnmarshaling->rectangleCount, sizeof(uint32_t)); 8319 // WARNING PTR CHECK 8320 const VkRectLayerKHR* check_pRectangles; 8321 check_pRectangles = (const VkRectLayerKHR*)(uintptr_t)vkStream->getBe64(); 8322 if (forUnmarshaling->pRectangles) 8323 { 8324 if (!(check_pRectangles)) 8325 { 8326 fprintf(stderr, "fatal: forUnmarshaling->pRectangles inconsistent between guest and host\n"); 8327 } 8328 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->rectangleCount; ++i) 8329 { 8330 unmarshal_VkRectLayerKHR(vkStream, (VkRectLayerKHR*)(forUnmarshaling->pRectangles + i)); 8331 } 8332 } 8333 } 8334 8335 void marshal_VkPresentRegionsKHR( 8336 VulkanStreamGuest* vkStream, 8337 const VkPresentRegionsKHR* forMarshaling) 8338 { 8339 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8340 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8341 vkStream->putBe32(pNext_size); 8342 if (pNext_size) 8343 { 8344 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8345 marshal_extension_struct(vkStream, forMarshaling->pNext); 8346 } 8347 vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t)); 8348 // WARNING PTR CHECK 8349 uint64_t cgen_var_244 = (uint64_t)(uintptr_t)forMarshaling->pRegions; 8350 vkStream->putBe64(cgen_var_244); 8351 if (forMarshaling->pRegions) 8352 { 8353 for (uint32_t i = 0; i < (uint32_t)forMarshaling->swapchainCount; ++i) 8354 { 8355 marshal_VkPresentRegionKHR(vkStream, (const VkPresentRegionKHR*)(forMarshaling->pRegions + i)); 8356 } 8357 } 8358 } 8359 8360 void unmarshal_VkPresentRegionsKHR( 8361 VulkanStreamGuest* vkStream, 8362 VkPresentRegionsKHR* forUnmarshaling) 8363 { 8364 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8365 size_t pNext_size; 8366 pNext_size = vkStream->getBe32(); 8367 if (pNext_size) 8368 { 8369 uint64_t pNext_placeholder; 8370 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8371 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8372 } 8373 vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t)); 8374 // WARNING PTR CHECK 8375 const VkPresentRegionKHR* check_pRegions; 8376 check_pRegions = (const VkPresentRegionKHR*)(uintptr_t)vkStream->getBe64(); 8377 if (forUnmarshaling->pRegions) 8378 { 8379 if (!(check_pRegions)) 8380 { 8381 fprintf(stderr, "fatal: forUnmarshaling->pRegions inconsistent between guest and host\n"); 8382 } 8383 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->swapchainCount; ++i) 8384 { 8385 unmarshal_VkPresentRegionKHR(vkStream, (VkPresentRegionKHR*)(forUnmarshaling->pRegions + i)); 8386 } 8387 } 8388 } 8389 8390 #endif 8391 #ifdef VK_KHR_descriptor_update_template 8392 #endif 8393 #ifdef VK_KHR_create_renderpass2 8394 void marshal_VkAttachmentDescription2KHR( 8395 VulkanStreamGuest* vkStream, 8396 const VkAttachmentDescription2KHR* forMarshaling) 8397 { 8398 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8399 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8400 vkStream->putBe32(pNext_size); 8401 if (pNext_size) 8402 { 8403 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8404 marshal_extension_struct(vkStream, forMarshaling->pNext); 8405 } 8406 vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags, sizeof(VkAttachmentDescriptionFlags)); 8407 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 8408 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits)); 8409 vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp)); 8410 vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp)); 8411 vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp)); 8412 vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp)); 8413 vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout)); 8414 vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout)); 8415 } 8416 8417 void unmarshal_VkAttachmentDescription2KHR( 8418 VulkanStreamGuest* vkStream, 8419 VkAttachmentDescription2KHR* forUnmarshaling) 8420 { 8421 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8422 size_t pNext_size; 8423 pNext_size = vkStream->getBe32(); 8424 if (pNext_size) 8425 { 8426 uint64_t pNext_placeholder; 8427 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8428 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8429 } 8430 vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkAttachmentDescriptionFlags)); 8431 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 8432 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits)); 8433 vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp)); 8434 vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp)); 8435 vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp)); 8436 vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp, sizeof(VkAttachmentStoreOp)); 8437 vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout)); 8438 vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout)); 8439 } 8440 8441 void marshal_VkAttachmentReference2KHR( 8442 VulkanStreamGuest* vkStream, 8443 const VkAttachmentReference2KHR* forMarshaling) 8444 { 8445 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8446 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8447 vkStream->putBe32(pNext_size); 8448 if (pNext_size) 8449 { 8450 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8451 marshal_extension_struct(vkStream, forMarshaling->pNext); 8452 } 8453 vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t)); 8454 vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout)); 8455 vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags)); 8456 } 8457 8458 void unmarshal_VkAttachmentReference2KHR( 8459 VulkanStreamGuest* vkStream, 8460 VkAttachmentReference2KHR* forUnmarshaling) 8461 { 8462 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8463 size_t pNext_size; 8464 pNext_size = vkStream->getBe32(); 8465 if (pNext_size) 8466 { 8467 uint64_t pNext_placeholder; 8468 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8469 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8470 } 8471 vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t)); 8472 vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout)); 8473 vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags)); 8474 } 8475 8476 void marshal_VkSubpassDescription2KHR( 8477 VulkanStreamGuest* vkStream, 8478 const VkSubpassDescription2KHR* forMarshaling) 8479 { 8480 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8481 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8482 vkStream->putBe32(pNext_size); 8483 if (pNext_size) 8484 { 8485 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8486 marshal_extension_struct(vkStream, forMarshaling->pNext); 8487 } 8488 vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags, sizeof(VkSubpassDescriptionFlags)); 8489 vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 8490 vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t)); 8491 vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t)); 8492 for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i) 8493 { 8494 marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pInputAttachments + i)); 8495 } 8496 vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t)); 8497 for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) 8498 { 8499 marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pColorAttachments + i)); 8500 } 8501 // WARNING PTR CHECK 8502 uint64_t cgen_var_246 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments; 8503 vkStream->putBe64(cgen_var_246); 8504 if (forMarshaling->pResolveAttachments) 8505 { 8506 for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) 8507 { 8508 marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pResolveAttachments + i)); 8509 } 8510 } 8511 // WARNING PTR CHECK 8512 uint64_t cgen_var_247 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment; 8513 vkStream->putBe64(cgen_var_247); 8514 if (forMarshaling->pDepthStencilAttachment) 8515 { 8516 marshal_VkAttachmentReference2KHR(vkStream, (const VkAttachmentReference2KHR*)(forMarshaling->pDepthStencilAttachment)); 8517 } 8518 vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t)); 8519 vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments, forMarshaling->preserveAttachmentCount * sizeof(const uint32_t)); 8520 } 8521 8522 void unmarshal_VkSubpassDescription2KHR( 8523 VulkanStreamGuest* vkStream, 8524 VkSubpassDescription2KHR* forUnmarshaling) 8525 { 8526 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8527 size_t pNext_size; 8528 pNext_size = vkStream->getBe32(); 8529 if (pNext_size) 8530 { 8531 uint64_t pNext_placeholder; 8532 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8533 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8534 } 8535 vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags, sizeof(VkSubpassDescriptionFlags)); 8536 vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 8537 vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t)); 8538 vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t)); 8539 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i) 8540 { 8541 unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pInputAttachments + i)); 8542 } 8543 vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t)); 8544 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) 8545 { 8546 unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pColorAttachments + i)); 8547 } 8548 // WARNING PTR CHECK 8549 const VkAttachmentReference2KHR* check_pResolveAttachments; 8550 check_pResolveAttachments = (const VkAttachmentReference2KHR*)(uintptr_t)vkStream->getBe64(); 8551 if (forUnmarshaling->pResolveAttachments) 8552 { 8553 if (!(check_pResolveAttachments)) 8554 { 8555 fprintf(stderr, "fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and host\n"); 8556 } 8557 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) 8558 { 8559 unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pResolveAttachments + i)); 8560 } 8561 } 8562 // WARNING PTR CHECK 8563 const VkAttachmentReference2KHR* check_pDepthStencilAttachment; 8564 check_pDepthStencilAttachment = (const VkAttachmentReference2KHR*)(uintptr_t)vkStream->getBe64(); 8565 if (forUnmarshaling->pDepthStencilAttachment) 8566 { 8567 if (!(check_pDepthStencilAttachment)) 8568 { 8569 fprintf(stderr, "fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest and host\n"); 8570 } 8571 unmarshal_VkAttachmentReference2KHR(vkStream, (VkAttachmentReference2KHR*)(forUnmarshaling->pDepthStencilAttachment)); 8572 } 8573 vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t)); 8574 vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments, forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t)); 8575 } 8576 8577 void marshal_VkSubpassDependency2KHR( 8578 VulkanStreamGuest* vkStream, 8579 const VkSubpassDependency2KHR* forMarshaling) 8580 { 8581 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8582 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8583 vkStream->putBe32(pNext_size); 8584 if (pNext_size) 8585 { 8586 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8587 marshal_extension_struct(vkStream, forMarshaling->pNext); 8588 } 8589 vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t)); 8590 vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t)); 8591 vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask, sizeof(VkPipelineStageFlags)); 8592 vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask, sizeof(VkPipelineStageFlags)); 8593 vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags)); 8594 vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags)); 8595 vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags)); 8596 vkStream->write((int32_t*)&forMarshaling->viewOffset, sizeof(int32_t)); 8597 } 8598 8599 void unmarshal_VkSubpassDependency2KHR( 8600 VulkanStreamGuest* vkStream, 8601 VkSubpassDependency2KHR* forUnmarshaling) 8602 { 8603 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8604 size_t pNext_size; 8605 pNext_size = vkStream->getBe32(); 8606 if (pNext_size) 8607 { 8608 uint64_t pNext_placeholder; 8609 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8610 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8611 } 8612 vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t)); 8613 vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t)); 8614 vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask, sizeof(VkPipelineStageFlags)); 8615 vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask, sizeof(VkPipelineStageFlags)); 8616 vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags)); 8617 vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags)); 8618 vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags, sizeof(VkDependencyFlags)); 8619 vkStream->read((int32_t*)&forUnmarshaling->viewOffset, sizeof(int32_t)); 8620 } 8621 8622 void marshal_VkRenderPassCreateInfo2KHR( 8623 VulkanStreamGuest* vkStream, 8624 const VkRenderPassCreateInfo2KHR* forMarshaling) 8625 { 8626 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8627 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8628 vkStream->putBe32(pNext_size); 8629 if (pNext_size) 8630 { 8631 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8632 marshal_extension_struct(vkStream, forMarshaling->pNext); 8633 } 8634 vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags, sizeof(VkRenderPassCreateFlags)); 8635 vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t)); 8636 for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) 8637 { 8638 marshal_VkAttachmentDescription2KHR(vkStream, (const VkAttachmentDescription2KHR*)(forMarshaling->pAttachments + i)); 8639 } 8640 vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t)); 8641 for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i) 8642 { 8643 marshal_VkSubpassDescription2KHR(vkStream, (const VkSubpassDescription2KHR*)(forMarshaling->pSubpasses + i)); 8644 } 8645 vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t)); 8646 for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i) 8647 { 8648 marshal_VkSubpassDependency2KHR(vkStream, (const VkSubpassDependency2KHR*)(forMarshaling->pDependencies + i)); 8649 } 8650 vkStream->write((uint32_t*)&forMarshaling->correlatedViewMaskCount, sizeof(uint32_t)); 8651 vkStream->write((const uint32_t*)forMarshaling->pCorrelatedViewMasks, forMarshaling->correlatedViewMaskCount * sizeof(const uint32_t)); 8652 } 8653 8654 void unmarshal_VkRenderPassCreateInfo2KHR( 8655 VulkanStreamGuest* vkStream, 8656 VkRenderPassCreateInfo2KHR* forUnmarshaling) 8657 { 8658 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8659 size_t pNext_size; 8660 pNext_size = vkStream->getBe32(); 8661 if (pNext_size) 8662 { 8663 uint64_t pNext_placeholder; 8664 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8665 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8666 } 8667 vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags, sizeof(VkRenderPassCreateFlags)); 8668 vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t)); 8669 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) 8670 { 8671 unmarshal_VkAttachmentDescription2KHR(vkStream, (VkAttachmentDescription2KHR*)(forUnmarshaling->pAttachments + i)); 8672 } 8673 vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t)); 8674 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i) 8675 { 8676 unmarshal_VkSubpassDescription2KHR(vkStream, (VkSubpassDescription2KHR*)(forUnmarshaling->pSubpasses + i)); 8677 } 8678 vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t)); 8679 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i) 8680 { 8681 unmarshal_VkSubpassDependency2KHR(vkStream, (VkSubpassDependency2KHR*)(forUnmarshaling->pDependencies + i)); 8682 } 8683 vkStream->read((uint32_t*)&forUnmarshaling->correlatedViewMaskCount, sizeof(uint32_t)); 8684 vkStream->read((uint32_t*)forUnmarshaling->pCorrelatedViewMasks, forUnmarshaling->correlatedViewMaskCount * sizeof(const uint32_t)); 8685 } 8686 8687 void marshal_VkSubpassBeginInfoKHR( 8688 VulkanStreamGuest* vkStream, 8689 const VkSubpassBeginInfoKHR* forMarshaling) 8690 { 8691 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8692 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8693 vkStream->putBe32(pNext_size); 8694 if (pNext_size) 8695 { 8696 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8697 marshal_extension_struct(vkStream, forMarshaling->pNext); 8698 } 8699 vkStream->write((VkSubpassContents*)&forMarshaling->contents, sizeof(VkSubpassContents)); 8700 } 8701 8702 void unmarshal_VkSubpassBeginInfoKHR( 8703 VulkanStreamGuest* vkStream, 8704 VkSubpassBeginInfoKHR* forUnmarshaling) 8705 { 8706 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8707 size_t pNext_size; 8708 pNext_size = vkStream->getBe32(); 8709 if (pNext_size) 8710 { 8711 uint64_t pNext_placeholder; 8712 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8713 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8714 } 8715 vkStream->read((VkSubpassContents*)&forUnmarshaling->contents, sizeof(VkSubpassContents)); 8716 } 8717 8718 void marshal_VkSubpassEndInfoKHR( 8719 VulkanStreamGuest* vkStream, 8720 const VkSubpassEndInfoKHR* forMarshaling) 8721 { 8722 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8723 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8724 vkStream->putBe32(pNext_size); 8725 if (pNext_size) 8726 { 8727 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8728 marshal_extension_struct(vkStream, forMarshaling->pNext); 8729 } 8730 } 8731 8732 void unmarshal_VkSubpassEndInfoKHR( 8733 VulkanStreamGuest* vkStream, 8734 VkSubpassEndInfoKHR* forUnmarshaling) 8735 { 8736 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8737 size_t pNext_size; 8738 pNext_size = vkStream->getBe32(); 8739 if (pNext_size) 8740 { 8741 uint64_t pNext_placeholder; 8742 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8743 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8744 } 8745 } 8746 8747 #endif 8748 #ifdef VK_KHR_shared_presentable_image 8749 void marshal_VkSharedPresentSurfaceCapabilitiesKHR( 8750 VulkanStreamGuest* vkStream, 8751 const VkSharedPresentSurfaceCapabilitiesKHR* forMarshaling) 8752 { 8753 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8754 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8755 vkStream->putBe32(pNext_size); 8756 if (pNext_size) 8757 { 8758 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 8759 marshal_extension_struct(vkStream, forMarshaling->pNext); 8760 } 8761 vkStream->write((VkImageUsageFlags*)&forMarshaling->sharedPresentSupportedUsageFlags, sizeof(VkImageUsageFlags)); 8762 } 8763 8764 void unmarshal_VkSharedPresentSurfaceCapabilitiesKHR( 8765 VulkanStreamGuest* vkStream, 8766 VkSharedPresentSurfaceCapabilitiesKHR* forUnmarshaling) 8767 { 8768 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8769 size_t pNext_size; 8770 pNext_size = vkStream->getBe32(); 8771 if (pNext_size) 8772 { 8773 uint64_t pNext_placeholder; 8774 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8775 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8776 } 8777 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->sharedPresentSupportedUsageFlags, sizeof(VkImageUsageFlags)); 8778 } 8779 8780 #endif 8781 #ifdef VK_KHR_external_fence_capabilities 8782 #endif 8783 #ifdef VK_KHR_external_fence 8784 #endif 8785 #ifdef VK_KHR_external_fence_win32 8786 void marshal_VkImportFenceWin32HandleInfoKHR( 8787 VulkanStreamGuest* vkStream, 8788 const VkImportFenceWin32HandleInfoKHR* forMarshaling) 8789 { 8790 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8791 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8792 vkStream->putBe32(pNext_size); 8793 if (pNext_size) 8794 { 8795 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8796 marshal_extension_struct(vkStream, forMarshaling->pNext); 8797 } 8798 uint64_t cgen_var_250; 8799 vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_250, 1); 8800 vkStream->write((uint64_t*)&cgen_var_250, 1 * 8); 8801 vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags)); 8802 vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8803 vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE)); 8804 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 8805 } 8806 8807 void unmarshal_VkImportFenceWin32HandleInfoKHR( 8808 VulkanStreamGuest* vkStream, 8809 VkImportFenceWin32HandleInfoKHR* forUnmarshaling) 8810 { 8811 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8812 size_t pNext_size; 8813 pNext_size = vkStream->getBe32(); 8814 if (pNext_size) 8815 { 8816 uint64_t pNext_placeholder; 8817 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8818 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8819 } 8820 uint64_t cgen_var_251; 8821 vkStream->read((uint64_t*)&cgen_var_251, 1 * 8); 8822 vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_251, (VkFence*)&forUnmarshaling->fence, 1); 8823 vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags)); 8824 vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8825 vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE)); 8826 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 8827 } 8828 8829 void marshal_VkExportFenceWin32HandleInfoKHR( 8830 VulkanStreamGuest* vkStream, 8831 const VkExportFenceWin32HandleInfoKHR* forMarshaling) 8832 { 8833 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8834 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8835 vkStream->putBe32(pNext_size); 8836 if (pNext_size) 8837 { 8838 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8839 marshal_extension_struct(vkStream, forMarshaling->pNext); 8840 } 8841 // WARNING PTR CHECK 8842 uint64_t cgen_var_252 = (uint64_t)(uintptr_t)forMarshaling->pAttributes; 8843 vkStream->putBe64(cgen_var_252); 8844 if (forMarshaling->pAttributes) 8845 { 8846 vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 8847 } 8848 vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD)); 8849 vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR)); 8850 } 8851 8852 void unmarshal_VkExportFenceWin32HandleInfoKHR( 8853 VulkanStreamGuest* vkStream, 8854 VkExportFenceWin32HandleInfoKHR* forUnmarshaling) 8855 { 8856 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8857 size_t pNext_size; 8858 pNext_size = vkStream->getBe32(); 8859 if (pNext_size) 8860 { 8861 uint64_t pNext_placeholder; 8862 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8863 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8864 } 8865 // WARNING PTR CHECK 8866 const SECURITY_ATTRIBUTES* check_pAttributes; 8867 check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64(); 8868 if (forUnmarshaling->pAttributes) 8869 { 8870 if (!(check_pAttributes)) 8871 { 8872 fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n"); 8873 } 8874 vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 8875 } 8876 vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD)); 8877 vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR)); 8878 } 8879 8880 void marshal_VkFenceGetWin32HandleInfoKHR( 8881 VulkanStreamGuest* vkStream, 8882 const VkFenceGetWin32HandleInfoKHR* forMarshaling) 8883 { 8884 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8885 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8886 vkStream->putBe32(pNext_size); 8887 if (pNext_size) 8888 { 8889 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8890 marshal_extension_struct(vkStream, forMarshaling->pNext); 8891 } 8892 uint64_t cgen_var_254; 8893 vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_254, 1); 8894 vkStream->write((uint64_t*)&cgen_var_254, 1 * 8); 8895 vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8896 } 8897 8898 void unmarshal_VkFenceGetWin32HandleInfoKHR( 8899 VulkanStreamGuest* vkStream, 8900 VkFenceGetWin32HandleInfoKHR* forUnmarshaling) 8901 { 8902 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8903 size_t pNext_size; 8904 pNext_size = vkStream->getBe32(); 8905 if (pNext_size) 8906 { 8907 uint64_t pNext_placeholder; 8908 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8909 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8910 } 8911 uint64_t cgen_var_255; 8912 vkStream->read((uint64_t*)&cgen_var_255, 1 * 8); 8913 vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_255, (VkFence*)&forUnmarshaling->fence, 1); 8914 vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8915 } 8916 8917 #endif 8918 #ifdef VK_KHR_external_fence_fd 8919 void marshal_VkImportFenceFdInfoKHR( 8920 VulkanStreamGuest* vkStream, 8921 const VkImportFenceFdInfoKHR* forMarshaling) 8922 { 8923 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8924 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8925 vkStream->putBe32(pNext_size); 8926 if (pNext_size) 8927 { 8928 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8929 marshal_extension_struct(vkStream, forMarshaling->pNext); 8930 } 8931 uint64_t cgen_var_256; 8932 vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_256, 1); 8933 vkStream->write((uint64_t*)&cgen_var_256, 1 * 8); 8934 vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags)); 8935 vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8936 vkStream->write((int*)&forMarshaling->fd, sizeof(int)); 8937 } 8938 8939 void unmarshal_VkImportFenceFdInfoKHR( 8940 VulkanStreamGuest* vkStream, 8941 VkImportFenceFdInfoKHR* forUnmarshaling) 8942 { 8943 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8944 size_t pNext_size; 8945 pNext_size = vkStream->getBe32(); 8946 if (pNext_size) 8947 { 8948 uint64_t pNext_placeholder; 8949 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8950 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8951 } 8952 uint64_t cgen_var_257; 8953 vkStream->read((uint64_t*)&cgen_var_257, 1 * 8); 8954 vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_257, (VkFence*)&forUnmarshaling->fence, 1); 8955 vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags)); 8956 vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8957 vkStream->read((int*)&forUnmarshaling->fd, sizeof(int)); 8958 } 8959 8960 void marshal_VkFenceGetFdInfoKHR( 8961 VulkanStreamGuest* vkStream, 8962 const VkFenceGetFdInfoKHR* forMarshaling) 8963 { 8964 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 8965 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 8966 vkStream->putBe32(pNext_size); 8967 if (pNext_size) 8968 { 8969 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 8970 marshal_extension_struct(vkStream, forMarshaling->pNext); 8971 } 8972 uint64_t cgen_var_258; 8973 vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_258, 1); 8974 vkStream->write((uint64_t*)&cgen_var_258, 1 * 8); 8975 vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8976 } 8977 8978 void unmarshal_VkFenceGetFdInfoKHR( 8979 VulkanStreamGuest* vkStream, 8980 VkFenceGetFdInfoKHR* forUnmarshaling) 8981 { 8982 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 8983 size_t pNext_size; 8984 pNext_size = vkStream->getBe32(); 8985 if (pNext_size) 8986 { 8987 uint64_t pNext_placeholder; 8988 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 8989 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 8990 } 8991 uint64_t cgen_var_259; 8992 vkStream->read((uint64_t*)&cgen_var_259, 1 * 8); 8993 vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_259, (VkFence*)&forUnmarshaling->fence, 1); 8994 vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalFenceHandleTypeFlagBits)); 8995 } 8996 8997 #endif 8998 #ifdef VK_KHR_maintenance2 8999 #endif 9000 #ifdef VK_KHR_get_surface_capabilities2 9001 void marshal_VkPhysicalDeviceSurfaceInfo2KHR( 9002 VulkanStreamGuest* vkStream, 9003 const VkPhysicalDeviceSurfaceInfo2KHR* forMarshaling) 9004 { 9005 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9006 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9007 vkStream->putBe32(pNext_size); 9008 if (pNext_size) 9009 { 9010 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9011 marshal_extension_struct(vkStream, forMarshaling->pNext); 9012 } 9013 uint64_t cgen_var_260; 9014 vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_260, 1); 9015 vkStream->write((uint64_t*)&cgen_var_260, 1 * 8); 9016 } 9017 9018 void unmarshal_VkPhysicalDeviceSurfaceInfo2KHR( 9019 VulkanStreamGuest* vkStream, 9020 VkPhysicalDeviceSurfaceInfo2KHR* forUnmarshaling) 9021 { 9022 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9023 size_t pNext_size; 9024 pNext_size = vkStream->getBe32(); 9025 if (pNext_size) 9026 { 9027 uint64_t pNext_placeholder; 9028 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9029 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9030 } 9031 uint64_t cgen_var_261; 9032 vkStream->read((uint64_t*)&cgen_var_261, 1 * 8); 9033 vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_261, (VkSurfaceKHR*)&forUnmarshaling->surface, 1); 9034 } 9035 9036 void marshal_VkSurfaceCapabilities2KHR( 9037 VulkanStreamGuest* vkStream, 9038 const VkSurfaceCapabilities2KHR* forMarshaling) 9039 { 9040 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9041 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9042 vkStream->putBe32(pNext_size); 9043 if (pNext_size) 9044 { 9045 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9046 marshal_extension_struct(vkStream, forMarshaling->pNext); 9047 } 9048 marshal_VkSurfaceCapabilitiesKHR(vkStream, (VkSurfaceCapabilitiesKHR*)(&forMarshaling->surfaceCapabilities)); 9049 } 9050 9051 void unmarshal_VkSurfaceCapabilities2KHR( 9052 VulkanStreamGuest* vkStream, 9053 VkSurfaceCapabilities2KHR* forUnmarshaling) 9054 { 9055 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9056 size_t pNext_size; 9057 pNext_size = vkStream->getBe32(); 9058 if (pNext_size) 9059 { 9060 uint64_t pNext_placeholder; 9061 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9062 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9063 } 9064 unmarshal_VkSurfaceCapabilitiesKHR(vkStream, (VkSurfaceCapabilitiesKHR*)(&forUnmarshaling->surfaceCapabilities)); 9065 } 9066 9067 void marshal_VkSurfaceFormat2KHR( 9068 VulkanStreamGuest* vkStream, 9069 const VkSurfaceFormat2KHR* forMarshaling) 9070 { 9071 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9072 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9073 vkStream->putBe32(pNext_size); 9074 if (pNext_size) 9075 { 9076 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9077 marshal_extension_struct(vkStream, forMarshaling->pNext); 9078 } 9079 marshal_VkSurfaceFormatKHR(vkStream, (VkSurfaceFormatKHR*)(&forMarshaling->surfaceFormat)); 9080 } 9081 9082 void unmarshal_VkSurfaceFormat2KHR( 9083 VulkanStreamGuest* vkStream, 9084 VkSurfaceFormat2KHR* forUnmarshaling) 9085 { 9086 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9087 size_t pNext_size; 9088 pNext_size = vkStream->getBe32(); 9089 if (pNext_size) 9090 { 9091 uint64_t pNext_placeholder; 9092 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9093 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9094 } 9095 unmarshal_VkSurfaceFormatKHR(vkStream, (VkSurfaceFormatKHR*)(&forUnmarshaling->surfaceFormat)); 9096 } 9097 9098 #endif 9099 #ifdef VK_KHR_variable_pointers 9100 #endif 9101 #ifdef VK_KHR_get_display_properties2 9102 void marshal_VkDisplayProperties2KHR( 9103 VulkanStreamGuest* vkStream, 9104 const VkDisplayProperties2KHR* forMarshaling) 9105 { 9106 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9107 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9108 vkStream->putBe32(pNext_size); 9109 if (pNext_size) 9110 { 9111 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9112 marshal_extension_struct(vkStream, forMarshaling->pNext); 9113 } 9114 marshal_VkDisplayPropertiesKHR(vkStream, (VkDisplayPropertiesKHR*)(&forMarshaling->displayProperties)); 9115 } 9116 9117 void unmarshal_VkDisplayProperties2KHR( 9118 VulkanStreamGuest* vkStream, 9119 VkDisplayProperties2KHR* forUnmarshaling) 9120 { 9121 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9122 size_t pNext_size; 9123 pNext_size = vkStream->getBe32(); 9124 if (pNext_size) 9125 { 9126 uint64_t pNext_placeholder; 9127 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9128 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9129 } 9130 unmarshal_VkDisplayPropertiesKHR(vkStream, (VkDisplayPropertiesKHR*)(&forUnmarshaling->displayProperties)); 9131 } 9132 9133 void marshal_VkDisplayPlaneProperties2KHR( 9134 VulkanStreamGuest* vkStream, 9135 const VkDisplayPlaneProperties2KHR* forMarshaling) 9136 { 9137 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9138 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9139 vkStream->putBe32(pNext_size); 9140 if (pNext_size) 9141 { 9142 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9143 marshal_extension_struct(vkStream, forMarshaling->pNext); 9144 } 9145 marshal_VkDisplayPlanePropertiesKHR(vkStream, (VkDisplayPlanePropertiesKHR*)(&forMarshaling->displayPlaneProperties)); 9146 } 9147 9148 void unmarshal_VkDisplayPlaneProperties2KHR( 9149 VulkanStreamGuest* vkStream, 9150 VkDisplayPlaneProperties2KHR* forUnmarshaling) 9151 { 9152 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9153 size_t pNext_size; 9154 pNext_size = vkStream->getBe32(); 9155 if (pNext_size) 9156 { 9157 uint64_t pNext_placeholder; 9158 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9159 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9160 } 9161 unmarshal_VkDisplayPlanePropertiesKHR(vkStream, (VkDisplayPlanePropertiesKHR*)(&forUnmarshaling->displayPlaneProperties)); 9162 } 9163 9164 void marshal_VkDisplayModeProperties2KHR( 9165 VulkanStreamGuest* vkStream, 9166 const VkDisplayModeProperties2KHR* forMarshaling) 9167 { 9168 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9169 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9170 vkStream->putBe32(pNext_size); 9171 if (pNext_size) 9172 { 9173 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9174 marshal_extension_struct(vkStream, forMarshaling->pNext); 9175 } 9176 marshal_VkDisplayModePropertiesKHR(vkStream, (VkDisplayModePropertiesKHR*)(&forMarshaling->displayModeProperties)); 9177 } 9178 9179 void unmarshal_VkDisplayModeProperties2KHR( 9180 VulkanStreamGuest* vkStream, 9181 VkDisplayModeProperties2KHR* forUnmarshaling) 9182 { 9183 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9184 size_t pNext_size; 9185 pNext_size = vkStream->getBe32(); 9186 if (pNext_size) 9187 { 9188 uint64_t pNext_placeholder; 9189 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9190 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9191 } 9192 unmarshal_VkDisplayModePropertiesKHR(vkStream, (VkDisplayModePropertiesKHR*)(&forUnmarshaling->displayModeProperties)); 9193 } 9194 9195 void marshal_VkDisplayPlaneInfo2KHR( 9196 VulkanStreamGuest* vkStream, 9197 const VkDisplayPlaneInfo2KHR* forMarshaling) 9198 { 9199 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9200 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9201 vkStream->putBe32(pNext_size); 9202 if (pNext_size) 9203 { 9204 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9205 marshal_extension_struct(vkStream, forMarshaling->pNext); 9206 } 9207 uint64_t cgen_var_262; 9208 vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->mode, &cgen_var_262, 1); 9209 vkStream->write((uint64_t*)&cgen_var_262, 1 * 8); 9210 vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t)); 9211 } 9212 9213 void unmarshal_VkDisplayPlaneInfo2KHR( 9214 VulkanStreamGuest* vkStream, 9215 VkDisplayPlaneInfo2KHR* forUnmarshaling) 9216 { 9217 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9218 size_t pNext_size; 9219 pNext_size = vkStream->getBe32(); 9220 if (pNext_size) 9221 { 9222 uint64_t pNext_placeholder; 9223 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9224 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9225 } 9226 uint64_t cgen_var_263; 9227 vkStream->read((uint64_t*)&cgen_var_263, 1 * 8); 9228 vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_263, (VkDisplayModeKHR*)&forUnmarshaling->mode, 1); 9229 vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t)); 9230 } 9231 9232 void marshal_VkDisplayPlaneCapabilities2KHR( 9233 VulkanStreamGuest* vkStream, 9234 const VkDisplayPlaneCapabilities2KHR* forMarshaling) 9235 { 9236 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9237 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9238 vkStream->putBe32(pNext_size); 9239 if (pNext_size) 9240 { 9241 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9242 marshal_extension_struct(vkStream, forMarshaling->pNext); 9243 } 9244 marshal_VkDisplayPlaneCapabilitiesKHR(vkStream, (VkDisplayPlaneCapabilitiesKHR*)(&forMarshaling->capabilities)); 9245 } 9246 9247 void unmarshal_VkDisplayPlaneCapabilities2KHR( 9248 VulkanStreamGuest* vkStream, 9249 VkDisplayPlaneCapabilities2KHR* forUnmarshaling) 9250 { 9251 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9252 size_t pNext_size; 9253 pNext_size = vkStream->getBe32(); 9254 if (pNext_size) 9255 { 9256 uint64_t pNext_placeholder; 9257 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9258 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9259 } 9260 unmarshal_VkDisplayPlaneCapabilitiesKHR(vkStream, (VkDisplayPlaneCapabilitiesKHR*)(&forUnmarshaling->capabilities)); 9261 } 9262 9263 #endif 9264 #ifdef VK_KHR_dedicated_allocation 9265 #endif 9266 #ifdef VK_KHR_storage_buffer_storage_class 9267 #endif 9268 #ifdef VK_KHR_relaxed_block_layout 9269 #endif 9270 #ifdef VK_KHR_get_memory_requirements2 9271 #endif 9272 #ifdef VK_KHR_image_format_list 9273 void marshal_VkImageFormatListCreateInfoKHR( 9274 VulkanStreamGuest* vkStream, 9275 const VkImageFormatListCreateInfoKHR* forMarshaling) 9276 { 9277 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9278 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9279 vkStream->putBe32(pNext_size); 9280 if (pNext_size) 9281 { 9282 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9283 marshal_extension_struct(vkStream, forMarshaling->pNext); 9284 } 9285 vkStream->write((uint32_t*)&forMarshaling->viewFormatCount, sizeof(uint32_t)); 9286 vkStream->write((const VkFormat*)forMarshaling->pViewFormats, forMarshaling->viewFormatCount * sizeof(const VkFormat)); 9287 } 9288 9289 void unmarshal_VkImageFormatListCreateInfoKHR( 9290 VulkanStreamGuest* vkStream, 9291 VkImageFormatListCreateInfoKHR* forUnmarshaling) 9292 { 9293 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9294 size_t pNext_size; 9295 pNext_size = vkStream->getBe32(); 9296 if (pNext_size) 9297 { 9298 uint64_t pNext_placeholder; 9299 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9300 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9301 } 9302 vkStream->read((uint32_t*)&forUnmarshaling->viewFormatCount, sizeof(uint32_t)); 9303 vkStream->read((VkFormat*)forUnmarshaling->pViewFormats, forUnmarshaling->viewFormatCount * sizeof(const VkFormat)); 9304 } 9305 9306 #endif 9307 #ifdef VK_KHR_sampler_ycbcr_conversion 9308 #endif 9309 #ifdef VK_KHR_bind_memory2 9310 #endif 9311 #ifdef VK_KHR_maintenance3 9312 #endif 9313 #ifdef VK_KHR_draw_indirect_count 9314 #endif 9315 #ifdef VK_KHR_8bit_storage 9316 void marshal_VkPhysicalDevice8BitStorageFeaturesKHR( 9317 VulkanStreamGuest* vkStream, 9318 const VkPhysicalDevice8BitStorageFeaturesKHR* forMarshaling) 9319 { 9320 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9321 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9322 vkStream->putBe32(pNext_size); 9323 if (pNext_size) 9324 { 9325 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9326 marshal_extension_struct(vkStream, forMarshaling->pNext); 9327 } 9328 vkStream->write((VkBool32*)&forMarshaling->storageBuffer8BitAccess, sizeof(VkBool32)); 9329 vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32)); 9330 vkStream->write((VkBool32*)&forMarshaling->storagePushConstant8, sizeof(VkBool32)); 9331 } 9332 9333 void unmarshal_VkPhysicalDevice8BitStorageFeaturesKHR( 9334 VulkanStreamGuest* vkStream, 9335 VkPhysicalDevice8BitStorageFeaturesKHR* forUnmarshaling) 9336 { 9337 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9338 size_t pNext_size; 9339 pNext_size = vkStream->getBe32(); 9340 if (pNext_size) 9341 { 9342 uint64_t pNext_placeholder; 9343 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9344 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9345 } 9346 vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer8BitAccess, sizeof(VkBool32)); 9347 vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32)); 9348 vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant8, sizeof(VkBool32)); 9349 } 9350 9351 #endif 9352 #ifdef VK_ANDROID_native_buffer 9353 void marshal_VkNativeBufferANDROID( 9354 VulkanStreamGuest* vkStream, 9355 const VkNativeBufferANDROID* forMarshaling) 9356 { 9357 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9358 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9359 vkStream->putBe32(pNext_size); 9360 if (pNext_size) 9361 { 9362 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9363 marshal_extension_struct(vkStream, forMarshaling->pNext); 9364 } 9365 // WARNING PTR CHECK 9366 uint64_t cgen_var_264 = (uint64_t)(uintptr_t)forMarshaling->handle; 9367 vkStream->putBe64(cgen_var_264); 9368 if (forMarshaling->handle) 9369 { 9370 vkStream->write((const uint32_t*)forMarshaling->handle, sizeof(const uint32_t)); 9371 } 9372 vkStream->write((int*)&forMarshaling->stride, sizeof(int)); 9373 vkStream->write((int*)&forMarshaling->format, sizeof(int)); 9374 vkStream->write((int*)&forMarshaling->usage, sizeof(int)); 9375 vkStream->write((uint64_t*)&forMarshaling->consumer, sizeof(uint64_t)); 9376 vkStream->write((uint64_t*)&forMarshaling->producer, sizeof(uint64_t)); 9377 } 9378 9379 void unmarshal_VkNativeBufferANDROID( 9380 VulkanStreamGuest* vkStream, 9381 VkNativeBufferANDROID* forUnmarshaling) 9382 { 9383 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9384 size_t pNext_size; 9385 pNext_size = vkStream->getBe32(); 9386 if (pNext_size) 9387 { 9388 uint64_t pNext_placeholder; 9389 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9390 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9391 } 9392 // WARNING PTR CHECK 9393 const uint32_t* check_handle; 9394 check_handle = (const uint32_t*)(uintptr_t)vkStream->getBe64(); 9395 if (forUnmarshaling->handle) 9396 { 9397 if (!(check_handle)) 9398 { 9399 fprintf(stderr, "fatal: forUnmarshaling->handle inconsistent between guest and host\n"); 9400 } 9401 vkStream->read((uint32_t*)forUnmarshaling->handle, sizeof(const uint32_t)); 9402 } 9403 vkStream->read((int*)&forUnmarshaling->stride, sizeof(int)); 9404 vkStream->read((int*)&forUnmarshaling->format, sizeof(int)); 9405 vkStream->read((int*)&forUnmarshaling->usage, sizeof(int)); 9406 vkStream->read((uint64_t*)&forUnmarshaling->consumer, sizeof(uint64_t)); 9407 vkStream->read((uint64_t*)&forUnmarshaling->producer, sizeof(uint64_t)); 9408 } 9409 9410 #endif 9411 #ifdef VK_EXT_debug_report 9412 void marshal_VkDebugReportCallbackCreateInfoEXT( 9413 VulkanStreamGuest* vkStream, 9414 const VkDebugReportCallbackCreateInfoEXT* forMarshaling) 9415 { 9416 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9417 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9418 vkStream->putBe32(pNext_size); 9419 if (pNext_size) 9420 { 9421 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9422 marshal_extension_struct(vkStream, forMarshaling->pNext); 9423 } 9424 vkStream->write((VkDebugReportFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugReportFlagsEXT)); 9425 uint64_t cgen_var_266 = (uint64_t)forMarshaling->pfnCallback; 9426 vkStream->putBe64(cgen_var_266); 9427 // WARNING PTR CHECK 9428 uint64_t cgen_var_267 = (uint64_t)(uintptr_t)forMarshaling->pUserData; 9429 vkStream->putBe64(cgen_var_267); 9430 if (forMarshaling->pUserData) 9431 { 9432 vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t)); 9433 } 9434 } 9435 9436 void unmarshal_VkDebugReportCallbackCreateInfoEXT( 9437 VulkanStreamGuest* vkStream, 9438 VkDebugReportCallbackCreateInfoEXT* forUnmarshaling) 9439 { 9440 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9441 size_t pNext_size; 9442 pNext_size = vkStream->getBe32(); 9443 if (pNext_size) 9444 { 9445 uint64_t pNext_placeholder; 9446 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9447 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9448 } 9449 vkStream->read((VkDebugReportFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugReportFlagsEXT)); 9450 forUnmarshaling->pfnCallback = (PFN_vkDebugReportCallbackEXT)vkStream->getBe64(); 9451 // WARNING PTR CHECK 9452 void* check_pUserData; 9453 check_pUserData = (void*)(uintptr_t)vkStream->getBe64(); 9454 if (forUnmarshaling->pUserData) 9455 { 9456 if (!(check_pUserData)) 9457 { 9458 fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n"); 9459 } 9460 vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t)); 9461 } 9462 } 9463 9464 #endif 9465 #ifdef VK_NV_glsl_shader 9466 #endif 9467 #ifdef VK_EXT_depth_range_unrestricted 9468 #endif 9469 #ifdef VK_IMG_filter_cubic 9470 #endif 9471 #ifdef VK_AMD_rasterization_order 9472 void marshal_VkPipelineRasterizationStateRasterizationOrderAMD( 9473 VulkanStreamGuest* vkStream, 9474 const VkPipelineRasterizationStateRasterizationOrderAMD* forMarshaling) 9475 { 9476 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9477 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9478 vkStream->putBe32(pNext_size); 9479 if (pNext_size) 9480 { 9481 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9482 marshal_extension_struct(vkStream, forMarshaling->pNext); 9483 } 9484 vkStream->write((VkRasterizationOrderAMD*)&forMarshaling->rasterizationOrder, sizeof(VkRasterizationOrderAMD)); 9485 } 9486 9487 void unmarshal_VkPipelineRasterizationStateRasterizationOrderAMD( 9488 VulkanStreamGuest* vkStream, 9489 VkPipelineRasterizationStateRasterizationOrderAMD* forUnmarshaling) 9490 { 9491 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9492 size_t pNext_size; 9493 pNext_size = vkStream->getBe32(); 9494 if (pNext_size) 9495 { 9496 uint64_t pNext_placeholder; 9497 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9498 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9499 } 9500 vkStream->read((VkRasterizationOrderAMD*)&forUnmarshaling->rasterizationOrder, sizeof(VkRasterizationOrderAMD)); 9501 } 9502 9503 #endif 9504 #ifdef VK_AMD_shader_trinary_minmax 9505 #endif 9506 #ifdef VK_AMD_shader_explicit_vertex_parameter 9507 #endif 9508 #ifdef VK_EXT_debug_marker 9509 void marshal_VkDebugMarkerObjectNameInfoEXT( 9510 VulkanStreamGuest* vkStream, 9511 const VkDebugMarkerObjectNameInfoEXT* forMarshaling) 9512 { 9513 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9514 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9515 vkStream->putBe32(pNext_size); 9516 if (pNext_size) 9517 { 9518 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9519 marshal_extension_struct(vkStream, forMarshaling->pNext); 9520 } 9521 vkStream->write((VkDebugReportObjectTypeEXT*)&forMarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT)); 9522 vkStream->write((uint64_t*)&forMarshaling->object, sizeof(uint64_t)); 9523 vkStream->putString(forMarshaling->pObjectName); 9524 } 9525 9526 void unmarshal_VkDebugMarkerObjectNameInfoEXT( 9527 VulkanStreamGuest* vkStream, 9528 VkDebugMarkerObjectNameInfoEXT* forUnmarshaling) 9529 { 9530 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9531 size_t pNext_size; 9532 pNext_size = vkStream->getBe32(); 9533 if (pNext_size) 9534 { 9535 uint64_t pNext_placeholder; 9536 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9537 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9538 } 9539 vkStream->read((VkDebugReportObjectTypeEXT*)&forUnmarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT)); 9540 vkStream->read((uint64_t*)&forUnmarshaling->object, sizeof(uint64_t)); 9541 vkStream->loadStringInPlace((char**)&forUnmarshaling->pObjectName); 9542 } 9543 9544 void marshal_VkDebugMarkerObjectTagInfoEXT( 9545 VulkanStreamGuest* vkStream, 9546 const VkDebugMarkerObjectTagInfoEXT* forMarshaling) 9547 { 9548 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9549 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9550 vkStream->putBe32(pNext_size); 9551 if (pNext_size) 9552 { 9553 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9554 marshal_extension_struct(vkStream, forMarshaling->pNext); 9555 } 9556 vkStream->write((VkDebugReportObjectTypeEXT*)&forMarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT)); 9557 vkStream->write((uint64_t*)&forMarshaling->object, sizeof(uint64_t)); 9558 vkStream->write((uint64_t*)&forMarshaling->tagName, sizeof(uint64_t)); 9559 uint64_t cgen_var_270 = (uint64_t)forMarshaling->tagSize; 9560 vkStream->putBe64(cgen_var_270); 9561 vkStream->write((const void*)forMarshaling->pTag, forMarshaling->tagSize * sizeof(const uint8_t)); 9562 } 9563 9564 void unmarshal_VkDebugMarkerObjectTagInfoEXT( 9565 VulkanStreamGuest* vkStream, 9566 VkDebugMarkerObjectTagInfoEXT* forUnmarshaling) 9567 { 9568 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9569 size_t pNext_size; 9570 pNext_size = vkStream->getBe32(); 9571 if (pNext_size) 9572 { 9573 uint64_t pNext_placeholder; 9574 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9575 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9576 } 9577 vkStream->read((VkDebugReportObjectTypeEXT*)&forUnmarshaling->objectType, sizeof(VkDebugReportObjectTypeEXT)); 9578 vkStream->read((uint64_t*)&forUnmarshaling->object, sizeof(uint64_t)); 9579 vkStream->read((uint64_t*)&forUnmarshaling->tagName, sizeof(uint64_t)); 9580 forUnmarshaling->tagSize = (size_t)vkStream->getBe64(); 9581 vkStream->read((void*)forUnmarshaling->pTag, forUnmarshaling->tagSize * sizeof(const uint8_t)); 9582 } 9583 9584 void marshal_VkDebugMarkerMarkerInfoEXT( 9585 VulkanStreamGuest* vkStream, 9586 const VkDebugMarkerMarkerInfoEXT* forMarshaling) 9587 { 9588 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9589 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9590 vkStream->putBe32(pNext_size); 9591 if (pNext_size) 9592 { 9593 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9594 marshal_extension_struct(vkStream, forMarshaling->pNext); 9595 } 9596 vkStream->putString(forMarshaling->pMarkerName); 9597 vkStream->write((float*)forMarshaling->color, 4 * sizeof(float)); 9598 } 9599 9600 void unmarshal_VkDebugMarkerMarkerInfoEXT( 9601 VulkanStreamGuest* vkStream, 9602 VkDebugMarkerMarkerInfoEXT* forUnmarshaling) 9603 { 9604 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9605 size_t pNext_size; 9606 pNext_size = vkStream->getBe32(); 9607 if (pNext_size) 9608 { 9609 uint64_t pNext_placeholder; 9610 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9611 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9612 } 9613 vkStream->loadStringInPlace((char**)&forUnmarshaling->pMarkerName); 9614 vkStream->read((float*)forUnmarshaling->color, 4 * sizeof(float)); 9615 } 9616 9617 #endif 9618 #ifdef VK_AMD_gcn_shader 9619 #endif 9620 #ifdef VK_NV_dedicated_allocation 9621 void marshal_VkDedicatedAllocationImageCreateInfoNV( 9622 VulkanStreamGuest* vkStream, 9623 const VkDedicatedAllocationImageCreateInfoNV* forMarshaling) 9624 { 9625 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9626 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9627 vkStream->putBe32(pNext_size); 9628 if (pNext_size) 9629 { 9630 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9631 marshal_extension_struct(vkStream, forMarshaling->pNext); 9632 } 9633 vkStream->write((VkBool32*)&forMarshaling->dedicatedAllocation, sizeof(VkBool32)); 9634 } 9635 9636 void unmarshal_VkDedicatedAllocationImageCreateInfoNV( 9637 VulkanStreamGuest* vkStream, 9638 VkDedicatedAllocationImageCreateInfoNV* forUnmarshaling) 9639 { 9640 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9641 size_t pNext_size; 9642 pNext_size = vkStream->getBe32(); 9643 if (pNext_size) 9644 { 9645 uint64_t pNext_placeholder; 9646 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9647 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9648 } 9649 vkStream->read((VkBool32*)&forUnmarshaling->dedicatedAllocation, sizeof(VkBool32)); 9650 } 9651 9652 void marshal_VkDedicatedAllocationBufferCreateInfoNV( 9653 VulkanStreamGuest* vkStream, 9654 const VkDedicatedAllocationBufferCreateInfoNV* forMarshaling) 9655 { 9656 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9657 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9658 vkStream->putBe32(pNext_size); 9659 if (pNext_size) 9660 { 9661 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9662 marshal_extension_struct(vkStream, forMarshaling->pNext); 9663 } 9664 vkStream->write((VkBool32*)&forMarshaling->dedicatedAllocation, sizeof(VkBool32)); 9665 } 9666 9667 void unmarshal_VkDedicatedAllocationBufferCreateInfoNV( 9668 VulkanStreamGuest* vkStream, 9669 VkDedicatedAllocationBufferCreateInfoNV* forUnmarshaling) 9670 { 9671 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9672 size_t pNext_size; 9673 pNext_size = vkStream->getBe32(); 9674 if (pNext_size) 9675 { 9676 uint64_t pNext_placeholder; 9677 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9678 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9679 } 9680 vkStream->read((VkBool32*)&forUnmarshaling->dedicatedAllocation, sizeof(VkBool32)); 9681 } 9682 9683 void marshal_VkDedicatedAllocationMemoryAllocateInfoNV( 9684 VulkanStreamGuest* vkStream, 9685 const VkDedicatedAllocationMemoryAllocateInfoNV* forMarshaling) 9686 { 9687 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9688 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9689 vkStream->putBe32(pNext_size); 9690 if (pNext_size) 9691 { 9692 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9693 marshal_extension_struct(vkStream, forMarshaling->pNext); 9694 } 9695 uint64_t cgen_var_272; 9696 vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_272, 1); 9697 vkStream->write((uint64_t*)&cgen_var_272, 1 * 8); 9698 uint64_t cgen_var_273; 9699 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_273, 1); 9700 vkStream->write((uint64_t*)&cgen_var_273, 1 * 8); 9701 } 9702 9703 void unmarshal_VkDedicatedAllocationMemoryAllocateInfoNV( 9704 VulkanStreamGuest* vkStream, 9705 VkDedicatedAllocationMemoryAllocateInfoNV* forUnmarshaling) 9706 { 9707 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9708 size_t pNext_size; 9709 pNext_size = vkStream->getBe32(); 9710 if (pNext_size) 9711 { 9712 uint64_t pNext_placeholder; 9713 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9714 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9715 } 9716 uint64_t cgen_var_274; 9717 vkStream->read((uint64_t*)&cgen_var_274, 1 * 8); 9718 vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_274, (VkImage*)&forUnmarshaling->image, 1); 9719 uint64_t cgen_var_275; 9720 vkStream->read((uint64_t*)&cgen_var_275, 1 * 8); 9721 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_275, (VkBuffer*)&forUnmarshaling->buffer, 1); 9722 } 9723 9724 #endif 9725 #ifdef VK_AMD_draw_indirect_count 9726 #endif 9727 #ifdef VK_AMD_negative_viewport_height 9728 #endif 9729 #ifdef VK_AMD_gpu_shader_half_float 9730 #endif 9731 #ifdef VK_AMD_shader_ballot 9732 #endif 9733 #ifdef VK_AMD_texture_gather_bias_lod 9734 void marshal_VkTextureLODGatherFormatPropertiesAMD( 9735 VulkanStreamGuest* vkStream, 9736 const VkTextureLODGatherFormatPropertiesAMD* forMarshaling) 9737 { 9738 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9739 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9740 vkStream->putBe32(pNext_size); 9741 if (pNext_size) 9742 { 9743 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 9744 marshal_extension_struct(vkStream, forMarshaling->pNext); 9745 } 9746 vkStream->write((VkBool32*)&forMarshaling->supportsTextureGatherLODBiasAMD, sizeof(VkBool32)); 9747 } 9748 9749 void unmarshal_VkTextureLODGatherFormatPropertiesAMD( 9750 VulkanStreamGuest* vkStream, 9751 VkTextureLODGatherFormatPropertiesAMD* forUnmarshaling) 9752 { 9753 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9754 size_t pNext_size; 9755 pNext_size = vkStream->getBe32(); 9756 if (pNext_size) 9757 { 9758 uint64_t pNext_placeholder; 9759 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9760 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9761 } 9762 vkStream->read((VkBool32*)&forUnmarshaling->supportsTextureGatherLODBiasAMD, sizeof(VkBool32)); 9763 } 9764 9765 #endif 9766 #ifdef VK_AMD_shader_info 9767 void marshal_VkShaderResourceUsageAMD( 9768 VulkanStreamGuest* vkStream, 9769 const VkShaderResourceUsageAMD* forMarshaling) 9770 { 9771 vkStream->write((uint32_t*)&forMarshaling->numUsedVgprs, sizeof(uint32_t)); 9772 vkStream->write((uint32_t*)&forMarshaling->numUsedSgprs, sizeof(uint32_t)); 9773 vkStream->write((uint32_t*)&forMarshaling->ldsSizePerLocalWorkGroup, sizeof(uint32_t)); 9774 uint64_t cgen_var_276 = (uint64_t)forMarshaling->ldsUsageSizeInBytes; 9775 vkStream->putBe64(cgen_var_276); 9776 uint64_t cgen_var_277 = (uint64_t)forMarshaling->scratchMemUsageInBytes; 9777 vkStream->putBe64(cgen_var_277); 9778 } 9779 9780 void unmarshal_VkShaderResourceUsageAMD( 9781 VulkanStreamGuest* vkStream, 9782 VkShaderResourceUsageAMD* forUnmarshaling) 9783 { 9784 vkStream->read((uint32_t*)&forUnmarshaling->numUsedVgprs, sizeof(uint32_t)); 9785 vkStream->read((uint32_t*)&forUnmarshaling->numUsedSgprs, sizeof(uint32_t)); 9786 vkStream->read((uint32_t*)&forUnmarshaling->ldsSizePerLocalWorkGroup, sizeof(uint32_t)); 9787 forUnmarshaling->ldsUsageSizeInBytes = (size_t)vkStream->getBe64(); 9788 forUnmarshaling->scratchMemUsageInBytes = (size_t)vkStream->getBe64(); 9789 } 9790 9791 void marshal_VkShaderStatisticsInfoAMD( 9792 VulkanStreamGuest* vkStream, 9793 const VkShaderStatisticsInfoAMD* forMarshaling) 9794 { 9795 vkStream->write((VkShaderStageFlags*)&forMarshaling->shaderStageMask, sizeof(VkShaderStageFlags)); 9796 marshal_VkShaderResourceUsageAMD(vkStream, (VkShaderResourceUsageAMD*)(&forMarshaling->resourceUsage)); 9797 vkStream->write((uint32_t*)&forMarshaling->numPhysicalVgprs, sizeof(uint32_t)); 9798 vkStream->write((uint32_t*)&forMarshaling->numPhysicalSgprs, sizeof(uint32_t)); 9799 vkStream->write((uint32_t*)&forMarshaling->numAvailableVgprs, sizeof(uint32_t)); 9800 vkStream->write((uint32_t*)&forMarshaling->numAvailableSgprs, sizeof(uint32_t)); 9801 vkStream->write((uint32_t*)forMarshaling->computeWorkGroupSize, 3 * sizeof(uint32_t)); 9802 } 9803 9804 void unmarshal_VkShaderStatisticsInfoAMD( 9805 VulkanStreamGuest* vkStream, 9806 VkShaderStatisticsInfoAMD* forUnmarshaling) 9807 { 9808 vkStream->read((VkShaderStageFlags*)&forUnmarshaling->shaderStageMask, sizeof(VkShaderStageFlags)); 9809 unmarshal_VkShaderResourceUsageAMD(vkStream, (VkShaderResourceUsageAMD*)(&forUnmarshaling->resourceUsage)); 9810 vkStream->read((uint32_t*)&forUnmarshaling->numPhysicalVgprs, sizeof(uint32_t)); 9811 vkStream->read((uint32_t*)&forUnmarshaling->numPhysicalSgprs, sizeof(uint32_t)); 9812 vkStream->read((uint32_t*)&forUnmarshaling->numAvailableVgprs, sizeof(uint32_t)); 9813 vkStream->read((uint32_t*)&forUnmarshaling->numAvailableSgprs, sizeof(uint32_t)); 9814 vkStream->read((uint32_t*)forUnmarshaling->computeWorkGroupSize, 3 * sizeof(uint32_t)); 9815 } 9816 9817 #endif 9818 #ifdef VK_AMD_shader_image_load_store_lod 9819 #endif 9820 #ifdef VK_IMG_format_pvrtc 9821 #endif 9822 #ifdef VK_NV_external_memory_capabilities 9823 void marshal_VkExternalImageFormatPropertiesNV( 9824 VulkanStreamGuest* vkStream, 9825 const VkExternalImageFormatPropertiesNV* forMarshaling) 9826 { 9827 marshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forMarshaling->imageFormatProperties)); 9828 vkStream->write((VkExternalMemoryFeatureFlagsNV*)&forMarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlagsNV)); 9829 vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9830 vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9831 } 9832 9833 void unmarshal_VkExternalImageFormatPropertiesNV( 9834 VulkanStreamGuest* vkStream, 9835 VkExternalImageFormatPropertiesNV* forUnmarshaling) 9836 { 9837 unmarshal_VkImageFormatProperties(vkStream, (VkImageFormatProperties*)(&forUnmarshaling->imageFormatProperties)); 9838 vkStream->read((VkExternalMemoryFeatureFlagsNV*)&forUnmarshaling->externalMemoryFeatures, sizeof(VkExternalMemoryFeatureFlagsNV)); 9839 vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->exportFromImportedHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9840 vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->compatibleHandleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9841 } 9842 9843 #endif 9844 #ifdef VK_NV_external_memory 9845 void marshal_VkExternalMemoryImageCreateInfoNV( 9846 VulkanStreamGuest* vkStream, 9847 const VkExternalMemoryImageCreateInfoNV* forMarshaling) 9848 { 9849 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9850 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9851 vkStream->putBe32(pNext_size); 9852 if (pNext_size) 9853 { 9854 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9855 marshal_extension_struct(vkStream, forMarshaling->pNext); 9856 } 9857 vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9858 } 9859 9860 void unmarshal_VkExternalMemoryImageCreateInfoNV( 9861 VulkanStreamGuest* vkStream, 9862 VkExternalMemoryImageCreateInfoNV* forUnmarshaling) 9863 { 9864 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9865 size_t pNext_size; 9866 pNext_size = vkStream->getBe32(); 9867 if (pNext_size) 9868 { 9869 uint64_t pNext_placeholder; 9870 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9871 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9872 } 9873 vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9874 } 9875 9876 void marshal_VkExportMemoryAllocateInfoNV( 9877 VulkanStreamGuest* vkStream, 9878 const VkExportMemoryAllocateInfoNV* forMarshaling) 9879 { 9880 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9881 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9882 vkStream->putBe32(pNext_size); 9883 if (pNext_size) 9884 { 9885 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9886 marshal_extension_struct(vkStream, forMarshaling->pNext); 9887 } 9888 vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9889 } 9890 9891 void unmarshal_VkExportMemoryAllocateInfoNV( 9892 VulkanStreamGuest* vkStream, 9893 VkExportMemoryAllocateInfoNV* forUnmarshaling) 9894 { 9895 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9896 size_t pNext_size; 9897 pNext_size = vkStream->getBe32(); 9898 if (pNext_size) 9899 { 9900 uint64_t pNext_placeholder; 9901 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9902 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9903 } 9904 vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleTypes, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9905 } 9906 9907 #endif 9908 #ifdef VK_NV_external_memory_win32 9909 void marshal_VkImportMemoryWin32HandleInfoNV( 9910 VulkanStreamGuest* vkStream, 9911 const VkImportMemoryWin32HandleInfoNV* forMarshaling) 9912 { 9913 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9914 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9915 vkStream->putBe32(pNext_size); 9916 if (pNext_size) 9917 { 9918 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9919 marshal_extension_struct(vkStream, forMarshaling->pNext); 9920 } 9921 vkStream->write((VkExternalMemoryHandleTypeFlagsNV*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9922 vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE)); 9923 } 9924 9925 void unmarshal_VkImportMemoryWin32HandleInfoNV( 9926 VulkanStreamGuest* vkStream, 9927 VkImportMemoryWin32HandleInfoNV* forUnmarshaling) 9928 { 9929 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9930 size_t pNext_size; 9931 pNext_size = vkStream->getBe32(); 9932 if (pNext_size) 9933 { 9934 uint64_t pNext_placeholder; 9935 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9936 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9937 } 9938 vkStream->read((VkExternalMemoryHandleTypeFlagsNV*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV)); 9939 vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE)); 9940 } 9941 9942 void marshal_VkExportMemoryWin32HandleInfoNV( 9943 VulkanStreamGuest* vkStream, 9944 const VkExportMemoryWin32HandleInfoNV* forMarshaling) 9945 { 9946 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9947 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9948 vkStream->putBe32(pNext_size); 9949 if (pNext_size) 9950 { 9951 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 9952 marshal_extension_struct(vkStream, forMarshaling->pNext); 9953 } 9954 // WARNING PTR CHECK 9955 uint64_t cgen_var_280 = (uint64_t)(uintptr_t)forMarshaling->pAttributes; 9956 vkStream->putBe64(cgen_var_280); 9957 if (forMarshaling->pAttributes) 9958 { 9959 vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 9960 } 9961 vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD)); 9962 } 9963 9964 void unmarshal_VkExportMemoryWin32HandleInfoNV( 9965 VulkanStreamGuest* vkStream, 9966 VkExportMemoryWin32HandleInfoNV* forUnmarshaling) 9967 { 9968 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 9969 size_t pNext_size; 9970 pNext_size = vkStream->getBe32(); 9971 if (pNext_size) 9972 { 9973 uint64_t pNext_placeholder; 9974 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 9975 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 9976 } 9977 // WARNING PTR CHECK 9978 const SECURITY_ATTRIBUTES* check_pAttributes; 9979 check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64(); 9980 if (forUnmarshaling->pAttributes) 9981 { 9982 if (!(check_pAttributes)) 9983 { 9984 fprintf(stderr, "fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n"); 9985 } 9986 vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes, sizeof(const SECURITY_ATTRIBUTES)); 9987 } 9988 vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD)); 9989 } 9990 9991 #endif 9992 #ifdef VK_NV_win32_keyed_mutex 9993 void marshal_VkWin32KeyedMutexAcquireReleaseInfoNV( 9994 VulkanStreamGuest* vkStream, 9995 const VkWin32KeyedMutexAcquireReleaseInfoNV* forMarshaling) 9996 { 9997 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 9998 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 9999 vkStream->putBe32(pNext_size); 10000 if (pNext_size) 10001 { 10002 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10003 marshal_extension_struct(vkStream, forMarshaling->pNext); 10004 } 10005 vkStream->write((uint32_t*)&forMarshaling->acquireCount, sizeof(uint32_t)); 10006 if (forMarshaling->acquireCount) 10007 { 10008 uint64_t* cgen_var_282; 10009 vkStream->alloc((void**)&cgen_var_282, forMarshaling->acquireCount * 8); 10010 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pAcquireSyncs, cgen_var_282, forMarshaling->acquireCount); 10011 vkStream->write((uint64_t*)cgen_var_282, forMarshaling->acquireCount * 8); 10012 } 10013 vkStream->write((const uint64_t*)forMarshaling->pAcquireKeys, forMarshaling->acquireCount * sizeof(const uint64_t)); 10014 vkStream->write((const uint32_t*)forMarshaling->pAcquireTimeoutMilliseconds, forMarshaling->acquireCount * sizeof(const uint32_t)); 10015 vkStream->write((uint32_t*)&forMarshaling->releaseCount, sizeof(uint32_t)); 10016 if (forMarshaling->releaseCount) 10017 { 10018 uint64_t* cgen_var_283; 10019 vkStream->alloc((void**)&cgen_var_283, forMarshaling->releaseCount * 8); 10020 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(forMarshaling->pReleaseSyncs, cgen_var_283, forMarshaling->releaseCount); 10021 vkStream->write((uint64_t*)cgen_var_283, forMarshaling->releaseCount * 8); 10022 } 10023 vkStream->write((const uint64_t*)forMarshaling->pReleaseKeys, forMarshaling->releaseCount * sizeof(const uint64_t)); 10024 } 10025 10026 void unmarshal_VkWin32KeyedMutexAcquireReleaseInfoNV( 10027 VulkanStreamGuest* vkStream, 10028 VkWin32KeyedMutexAcquireReleaseInfoNV* forUnmarshaling) 10029 { 10030 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10031 size_t pNext_size; 10032 pNext_size = vkStream->getBe32(); 10033 if (pNext_size) 10034 { 10035 uint64_t pNext_placeholder; 10036 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10037 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10038 } 10039 vkStream->read((uint32_t*)&forUnmarshaling->acquireCount, sizeof(uint32_t)); 10040 if (forUnmarshaling->acquireCount) 10041 { 10042 uint64_t* cgen_var_284; 10043 vkStream->alloc((void**)&cgen_var_284, forUnmarshaling->acquireCount * 8); 10044 vkStream->read((uint64_t*)cgen_var_284, forUnmarshaling->acquireCount * 8); 10045 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_284, (VkDeviceMemory*)forUnmarshaling->pAcquireSyncs, forUnmarshaling->acquireCount); 10046 } 10047 vkStream->read((uint64_t*)forUnmarshaling->pAcquireKeys, forUnmarshaling->acquireCount * sizeof(const uint64_t)); 10048 vkStream->read((uint32_t*)forUnmarshaling->pAcquireTimeoutMilliseconds, forUnmarshaling->acquireCount * sizeof(const uint32_t)); 10049 vkStream->read((uint32_t*)&forUnmarshaling->releaseCount, sizeof(uint32_t)); 10050 if (forUnmarshaling->releaseCount) 10051 { 10052 uint64_t* cgen_var_285; 10053 vkStream->alloc((void**)&cgen_var_285, forUnmarshaling->releaseCount * 8); 10054 vkStream->read((uint64_t*)cgen_var_285, forUnmarshaling->releaseCount * 8); 10055 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(cgen_var_285, (VkDeviceMemory*)forUnmarshaling->pReleaseSyncs, forUnmarshaling->releaseCount); 10056 } 10057 vkStream->read((uint64_t*)forUnmarshaling->pReleaseKeys, forUnmarshaling->releaseCount * sizeof(const uint64_t)); 10058 } 10059 10060 #endif 10061 #ifdef VK_EXT_validation_flags 10062 void marshal_VkValidationFlagsEXT( 10063 VulkanStreamGuest* vkStream, 10064 const VkValidationFlagsEXT* forMarshaling) 10065 { 10066 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10067 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10068 vkStream->putBe32(pNext_size); 10069 if (pNext_size) 10070 { 10071 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10072 marshal_extension_struct(vkStream, forMarshaling->pNext); 10073 } 10074 vkStream->write((uint32_t*)&forMarshaling->disabledValidationCheckCount, sizeof(uint32_t)); 10075 vkStream->write((const VkValidationCheckEXT*)forMarshaling->pDisabledValidationChecks, forMarshaling->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT)); 10076 } 10077 10078 void unmarshal_VkValidationFlagsEXT( 10079 VulkanStreamGuest* vkStream, 10080 VkValidationFlagsEXT* forUnmarshaling) 10081 { 10082 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10083 size_t pNext_size; 10084 pNext_size = vkStream->getBe32(); 10085 if (pNext_size) 10086 { 10087 uint64_t pNext_placeholder; 10088 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10089 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10090 } 10091 vkStream->read((uint32_t*)&forUnmarshaling->disabledValidationCheckCount, sizeof(uint32_t)); 10092 vkStream->read((VkValidationCheckEXT*)forUnmarshaling->pDisabledValidationChecks, forUnmarshaling->disabledValidationCheckCount * sizeof(const VkValidationCheckEXT)); 10093 } 10094 10095 #endif 10096 #ifdef VK_NN_vi_surface 10097 void marshal_VkViSurfaceCreateInfoNN( 10098 VulkanStreamGuest* vkStream, 10099 const VkViSurfaceCreateInfoNN* forMarshaling) 10100 { 10101 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10102 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10103 vkStream->putBe32(pNext_size); 10104 if (pNext_size) 10105 { 10106 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10107 marshal_extension_struct(vkStream, forMarshaling->pNext); 10108 } 10109 vkStream->write((VkViSurfaceCreateFlagsNN*)&forMarshaling->flags, sizeof(VkViSurfaceCreateFlagsNN)); 10110 // WARNING PTR CHECK 10111 uint64_t cgen_var_286 = (uint64_t)(uintptr_t)forMarshaling->window; 10112 vkStream->putBe64(cgen_var_286); 10113 if (forMarshaling->window) 10114 { 10115 vkStream->write((void*)forMarshaling->window, sizeof(uint8_t)); 10116 } 10117 } 10118 10119 void unmarshal_VkViSurfaceCreateInfoNN( 10120 VulkanStreamGuest* vkStream, 10121 VkViSurfaceCreateInfoNN* forUnmarshaling) 10122 { 10123 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10124 size_t pNext_size; 10125 pNext_size = vkStream->getBe32(); 10126 if (pNext_size) 10127 { 10128 uint64_t pNext_placeholder; 10129 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10130 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10131 } 10132 vkStream->read((VkViSurfaceCreateFlagsNN*)&forUnmarshaling->flags, sizeof(VkViSurfaceCreateFlagsNN)); 10133 // WARNING PTR CHECK 10134 void* check_window; 10135 check_window = (void*)(uintptr_t)vkStream->getBe64(); 10136 if (forUnmarshaling->window) 10137 { 10138 if (!(check_window)) 10139 { 10140 fprintf(stderr, "fatal: forUnmarshaling->window inconsistent between guest and host\n"); 10141 } 10142 vkStream->read((void*)forUnmarshaling->window, sizeof(uint8_t)); 10143 } 10144 } 10145 10146 #endif 10147 #ifdef VK_EXT_shader_subgroup_ballot 10148 #endif 10149 #ifdef VK_EXT_shader_subgroup_vote 10150 #endif 10151 #ifdef VK_EXT_conditional_rendering 10152 void marshal_VkConditionalRenderingBeginInfoEXT( 10153 VulkanStreamGuest* vkStream, 10154 const VkConditionalRenderingBeginInfoEXT* forMarshaling) 10155 { 10156 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10157 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10158 vkStream->putBe32(pNext_size); 10159 if (pNext_size) 10160 { 10161 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10162 marshal_extension_struct(vkStream, forMarshaling->pNext); 10163 } 10164 uint64_t cgen_var_288; 10165 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_288, 1); 10166 vkStream->write((uint64_t*)&cgen_var_288, 1 * 8); 10167 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 10168 vkStream->write((VkConditionalRenderingFlagsEXT*)&forMarshaling->flags, sizeof(VkConditionalRenderingFlagsEXT)); 10169 } 10170 10171 void unmarshal_VkConditionalRenderingBeginInfoEXT( 10172 VulkanStreamGuest* vkStream, 10173 VkConditionalRenderingBeginInfoEXT* forUnmarshaling) 10174 { 10175 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10176 size_t pNext_size; 10177 pNext_size = vkStream->getBe32(); 10178 if (pNext_size) 10179 { 10180 uint64_t pNext_placeholder; 10181 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10182 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10183 } 10184 uint64_t cgen_var_289; 10185 vkStream->read((uint64_t*)&cgen_var_289, 1 * 8); 10186 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_289, (VkBuffer*)&forUnmarshaling->buffer, 1); 10187 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 10188 vkStream->read((VkConditionalRenderingFlagsEXT*)&forUnmarshaling->flags, sizeof(VkConditionalRenderingFlagsEXT)); 10189 } 10190 10191 void marshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT( 10192 VulkanStreamGuest* vkStream, 10193 const VkPhysicalDeviceConditionalRenderingFeaturesEXT* forMarshaling) 10194 { 10195 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10196 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10197 vkStream->putBe32(pNext_size); 10198 if (pNext_size) 10199 { 10200 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 10201 marshal_extension_struct(vkStream, forMarshaling->pNext); 10202 } 10203 vkStream->write((VkBool32*)&forMarshaling->conditionalRendering, sizeof(VkBool32)); 10204 vkStream->write((VkBool32*)&forMarshaling->inheritedConditionalRendering, sizeof(VkBool32)); 10205 } 10206 10207 void unmarshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT( 10208 VulkanStreamGuest* vkStream, 10209 VkPhysicalDeviceConditionalRenderingFeaturesEXT* forUnmarshaling) 10210 { 10211 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10212 size_t pNext_size; 10213 pNext_size = vkStream->getBe32(); 10214 if (pNext_size) 10215 { 10216 uint64_t pNext_placeholder; 10217 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10218 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10219 } 10220 vkStream->read((VkBool32*)&forUnmarshaling->conditionalRendering, sizeof(VkBool32)); 10221 vkStream->read((VkBool32*)&forUnmarshaling->inheritedConditionalRendering, sizeof(VkBool32)); 10222 } 10223 10224 void marshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT( 10225 VulkanStreamGuest* vkStream, 10226 const VkCommandBufferInheritanceConditionalRenderingInfoEXT* forMarshaling) 10227 { 10228 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10229 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10230 vkStream->putBe32(pNext_size); 10231 if (pNext_size) 10232 { 10233 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10234 marshal_extension_struct(vkStream, forMarshaling->pNext); 10235 } 10236 vkStream->write((VkBool32*)&forMarshaling->conditionalRenderingEnable, sizeof(VkBool32)); 10237 } 10238 10239 void unmarshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT( 10240 VulkanStreamGuest* vkStream, 10241 VkCommandBufferInheritanceConditionalRenderingInfoEXT* forUnmarshaling) 10242 { 10243 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10244 size_t pNext_size; 10245 pNext_size = vkStream->getBe32(); 10246 if (pNext_size) 10247 { 10248 uint64_t pNext_placeholder; 10249 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10250 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10251 } 10252 vkStream->read((VkBool32*)&forUnmarshaling->conditionalRenderingEnable, sizeof(VkBool32)); 10253 } 10254 10255 #endif 10256 #ifdef VK_NVX_device_generated_commands 10257 void marshal_VkDeviceGeneratedCommandsFeaturesNVX( 10258 VulkanStreamGuest* vkStream, 10259 const VkDeviceGeneratedCommandsFeaturesNVX* forMarshaling) 10260 { 10261 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10262 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10263 vkStream->putBe32(pNext_size); 10264 if (pNext_size) 10265 { 10266 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10267 marshal_extension_struct(vkStream, forMarshaling->pNext); 10268 } 10269 vkStream->write((VkBool32*)&forMarshaling->computeBindingPointSupport, sizeof(VkBool32)); 10270 } 10271 10272 void unmarshal_VkDeviceGeneratedCommandsFeaturesNVX( 10273 VulkanStreamGuest* vkStream, 10274 VkDeviceGeneratedCommandsFeaturesNVX* forUnmarshaling) 10275 { 10276 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10277 size_t pNext_size; 10278 pNext_size = vkStream->getBe32(); 10279 if (pNext_size) 10280 { 10281 uint64_t pNext_placeholder; 10282 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10283 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10284 } 10285 vkStream->read((VkBool32*)&forUnmarshaling->computeBindingPointSupport, sizeof(VkBool32)); 10286 } 10287 10288 void marshal_VkDeviceGeneratedCommandsLimitsNVX( 10289 VulkanStreamGuest* vkStream, 10290 const VkDeviceGeneratedCommandsLimitsNVX* forMarshaling) 10291 { 10292 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10293 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10294 vkStream->putBe32(pNext_size); 10295 if (pNext_size) 10296 { 10297 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10298 marshal_extension_struct(vkStream, forMarshaling->pNext); 10299 } 10300 vkStream->write((uint32_t*)&forMarshaling->maxIndirectCommandsLayoutTokenCount, sizeof(uint32_t)); 10301 vkStream->write((uint32_t*)&forMarshaling->maxObjectEntryCounts, sizeof(uint32_t)); 10302 vkStream->write((uint32_t*)&forMarshaling->minSequenceCountBufferOffsetAlignment, sizeof(uint32_t)); 10303 vkStream->write((uint32_t*)&forMarshaling->minSequenceIndexBufferOffsetAlignment, sizeof(uint32_t)); 10304 vkStream->write((uint32_t*)&forMarshaling->minCommandsTokenBufferOffsetAlignment, sizeof(uint32_t)); 10305 } 10306 10307 void unmarshal_VkDeviceGeneratedCommandsLimitsNVX( 10308 VulkanStreamGuest* vkStream, 10309 VkDeviceGeneratedCommandsLimitsNVX* forUnmarshaling) 10310 { 10311 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10312 size_t pNext_size; 10313 pNext_size = vkStream->getBe32(); 10314 if (pNext_size) 10315 { 10316 uint64_t pNext_placeholder; 10317 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10318 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10319 } 10320 vkStream->read((uint32_t*)&forUnmarshaling->maxIndirectCommandsLayoutTokenCount, sizeof(uint32_t)); 10321 vkStream->read((uint32_t*)&forUnmarshaling->maxObjectEntryCounts, sizeof(uint32_t)); 10322 vkStream->read((uint32_t*)&forUnmarshaling->minSequenceCountBufferOffsetAlignment, sizeof(uint32_t)); 10323 vkStream->read((uint32_t*)&forUnmarshaling->minSequenceIndexBufferOffsetAlignment, sizeof(uint32_t)); 10324 vkStream->read((uint32_t*)&forUnmarshaling->minCommandsTokenBufferOffsetAlignment, sizeof(uint32_t)); 10325 } 10326 10327 void marshal_VkIndirectCommandsTokenNVX( 10328 VulkanStreamGuest* vkStream, 10329 const VkIndirectCommandsTokenNVX* forMarshaling) 10330 { 10331 vkStream->write((VkIndirectCommandsTokenTypeNVX*)&forMarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX)); 10332 uint64_t cgen_var_290; 10333 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_290, 1); 10334 vkStream->write((uint64_t*)&cgen_var_290, 1 * 8); 10335 vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize)); 10336 } 10337 10338 void unmarshal_VkIndirectCommandsTokenNVX( 10339 VulkanStreamGuest* vkStream, 10340 VkIndirectCommandsTokenNVX* forUnmarshaling) 10341 { 10342 vkStream->read((VkIndirectCommandsTokenTypeNVX*)&forUnmarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX)); 10343 uint64_t cgen_var_291; 10344 vkStream->read((uint64_t*)&cgen_var_291, 1 * 8); 10345 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_291, (VkBuffer*)&forUnmarshaling->buffer, 1); 10346 vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize)); 10347 } 10348 10349 void marshal_VkIndirectCommandsLayoutTokenNVX( 10350 VulkanStreamGuest* vkStream, 10351 const VkIndirectCommandsLayoutTokenNVX* forMarshaling) 10352 { 10353 vkStream->write((VkIndirectCommandsTokenTypeNVX*)&forMarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX)); 10354 vkStream->write((uint32_t*)&forMarshaling->bindingUnit, sizeof(uint32_t)); 10355 vkStream->write((uint32_t*)&forMarshaling->dynamicCount, sizeof(uint32_t)); 10356 vkStream->write((uint32_t*)&forMarshaling->divisor, sizeof(uint32_t)); 10357 } 10358 10359 void unmarshal_VkIndirectCommandsLayoutTokenNVX( 10360 VulkanStreamGuest* vkStream, 10361 VkIndirectCommandsLayoutTokenNVX* forUnmarshaling) 10362 { 10363 vkStream->read((VkIndirectCommandsTokenTypeNVX*)&forUnmarshaling->tokenType, sizeof(VkIndirectCommandsTokenTypeNVX)); 10364 vkStream->read((uint32_t*)&forUnmarshaling->bindingUnit, sizeof(uint32_t)); 10365 vkStream->read((uint32_t*)&forUnmarshaling->dynamicCount, sizeof(uint32_t)); 10366 vkStream->read((uint32_t*)&forUnmarshaling->divisor, sizeof(uint32_t)); 10367 } 10368 10369 void marshal_VkIndirectCommandsLayoutCreateInfoNVX( 10370 VulkanStreamGuest* vkStream, 10371 const VkIndirectCommandsLayoutCreateInfoNVX* forMarshaling) 10372 { 10373 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10374 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10375 vkStream->putBe32(pNext_size); 10376 if (pNext_size) 10377 { 10378 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10379 marshal_extension_struct(vkStream, forMarshaling->pNext); 10380 } 10381 vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 10382 vkStream->write((VkIndirectCommandsLayoutUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkIndirectCommandsLayoutUsageFlagsNVX)); 10383 vkStream->write((uint32_t*)&forMarshaling->tokenCount, sizeof(uint32_t)); 10384 for (uint32_t i = 0; i < (uint32_t)forMarshaling->tokenCount; ++i) 10385 { 10386 marshal_VkIndirectCommandsLayoutTokenNVX(vkStream, (const VkIndirectCommandsLayoutTokenNVX*)(forMarshaling->pTokens + i)); 10387 } 10388 } 10389 10390 void unmarshal_VkIndirectCommandsLayoutCreateInfoNVX( 10391 VulkanStreamGuest* vkStream, 10392 VkIndirectCommandsLayoutCreateInfoNVX* forUnmarshaling) 10393 { 10394 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10395 size_t pNext_size; 10396 pNext_size = vkStream->getBe32(); 10397 if (pNext_size) 10398 { 10399 uint64_t pNext_placeholder; 10400 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10401 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10402 } 10403 vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint, sizeof(VkPipelineBindPoint)); 10404 vkStream->read((VkIndirectCommandsLayoutUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkIndirectCommandsLayoutUsageFlagsNVX)); 10405 vkStream->read((uint32_t*)&forUnmarshaling->tokenCount, sizeof(uint32_t)); 10406 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->tokenCount; ++i) 10407 { 10408 unmarshal_VkIndirectCommandsLayoutTokenNVX(vkStream, (VkIndirectCommandsLayoutTokenNVX*)(forUnmarshaling->pTokens + i)); 10409 } 10410 } 10411 10412 void marshal_VkCmdProcessCommandsInfoNVX( 10413 VulkanStreamGuest* vkStream, 10414 const VkCmdProcessCommandsInfoNVX* forMarshaling) 10415 { 10416 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10417 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10418 vkStream->putBe32(pNext_size); 10419 if (pNext_size) 10420 { 10421 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10422 marshal_extension_struct(vkStream, forMarshaling->pNext); 10423 } 10424 uint64_t cgen_var_292; 10425 vkStream->handleMapping()->mapHandles_VkObjectTableNVX_u64(&forMarshaling->objectTable, &cgen_var_292, 1); 10426 vkStream->write((uint64_t*)&cgen_var_292, 1 * 8); 10427 uint64_t cgen_var_293; 10428 vkStream->handleMapping()->mapHandles_VkIndirectCommandsLayoutNVX_u64(&forMarshaling->indirectCommandsLayout, &cgen_var_293, 1); 10429 vkStream->write((uint64_t*)&cgen_var_293, 1 * 8); 10430 vkStream->write((uint32_t*)&forMarshaling->indirectCommandsTokenCount, sizeof(uint32_t)); 10431 for (uint32_t i = 0; i < (uint32_t)forMarshaling->indirectCommandsTokenCount; ++i) 10432 { 10433 marshal_VkIndirectCommandsTokenNVX(vkStream, (const VkIndirectCommandsTokenNVX*)(forMarshaling->pIndirectCommandsTokens + i)); 10434 } 10435 vkStream->write((uint32_t*)&forMarshaling->maxSequencesCount, sizeof(uint32_t)); 10436 uint64_t cgen_var_294; 10437 vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(&forMarshaling->targetCommandBuffer, &cgen_var_294, 1); 10438 vkStream->write((uint64_t*)&cgen_var_294, 1 * 8); 10439 uint64_t cgen_var_295; 10440 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->sequencesCountBuffer, &cgen_var_295, 1); 10441 vkStream->write((uint64_t*)&cgen_var_295, 1 * 8); 10442 vkStream->write((VkDeviceSize*)&forMarshaling->sequencesCountOffset, sizeof(VkDeviceSize)); 10443 uint64_t cgen_var_296; 10444 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->sequencesIndexBuffer, &cgen_var_296, 1); 10445 vkStream->write((uint64_t*)&cgen_var_296, 1 * 8); 10446 vkStream->write((VkDeviceSize*)&forMarshaling->sequencesIndexOffset, sizeof(VkDeviceSize)); 10447 } 10448 10449 void unmarshal_VkCmdProcessCommandsInfoNVX( 10450 VulkanStreamGuest* vkStream, 10451 VkCmdProcessCommandsInfoNVX* forUnmarshaling) 10452 { 10453 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10454 size_t pNext_size; 10455 pNext_size = vkStream->getBe32(); 10456 if (pNext_size) 10457 { 10458 uint64_t pNext_placeholder; 10459 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10460 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10461 } 10462 uint64_t cgen_var_297; 10463 vkStream->read((uint64_t*)&cgen_var_297, 1 * 8); 10464 vkStream->handleMapping()->mapHandles_u64_VkObjectTableNVX(&cgen_var_297, (VkObjectTableNVX*)&forUnmarshaling->objectTable, 1); 10465 uint64_t cgen_var_298; 10466 vkStream->read((uint64_t*)&cgen_var_298, 1 * 8); 10467 vkStream->handleMapping()->mapHandles_u64_VkIndirectCommandsLayoutNVX(&cgen_var_298, (VkIndirectCommandsLayoutNVX*)&forUnmarshaling->indirectCommandsLayout, 1); 10468 vkStream->read((uint32_t*)&forUnmarshaling->indirectCommandsTokenCount, sizeof(uint32_t)); 10469 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->indirectCommandsTokenCount; ++i) 10470 { 10471 unmarshal_VkIndirectCommandsTokenNVX(vkStream, (VkIndirectCommandsTokenNVX*)(forUnmarshaling->pIndirectCommandsTokens + i)); 10472 } 10473 vkStream->read((uint32_t*)&forUnmarshaling->maxSequencesCount, sizeof(uint32_t)); 10474 uint64_t cgen_var_299; 10475 vkStream->read((uint64_t*)&cgen_var_299, 1 * 8); 10476 vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(&cgen_var_299, (VkCommandBuffer*)&forUnmarshaling->targetCommandBuffer, 1); 10477 uint64_t cgen_var_300; 10478 vkStream->read((uint64_t*)&cgen_var_300, 1 * 8); 10479 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_300, (VkBuffer*)&forUnmarshaling->sequencesCountBuffer, 1); 10480 vkStream->read((VkDeviceSize*)&forUnmarshaling->sequencesCountOffset, sizeof(VkDeviceSize)); 10481 uint64_t cgen_var_301; 10482 vkStream->read((uint64_t*)&cgen_var_301, 1 * 8); 10483 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_301, (VkBuffer*)&forUnmarshaling->sequencesIndexBuffer, 1); 10484 vkStream->read((VkDeviceSize*)&forUnmarshaling->sequencesIndexOffset, sizeof(VkDeviceSize)); 10485 } 10486 10487 void marshal_VkCmdReserveSpaceForCommandsInfoNVX( 10488 VulkanStreamGuest* vkStream, 10489 const VkCmdReserveSpaceForCommandsInfoNVX* forMarshaling) 10490 { 10491 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10492 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10493 vkStream->putBe32(pNext_size); 10494 if (pNext_size) 10495 { 10496 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10497 marshal_extension_struct(vkStream, forMarshaling->pNext); 10498 } 10499 uint64_t cgen_var_302; 10500 vkStream->handleMapping()->mapHandles_VkObjectTableNVX_u64(&forMarshaling->objectTable, &cgen_var_302, 1); 10501 vkStream->write((uint64_t*)&cgen_var_302, 1 * 8); 10502 uint64_t cgen_var_303; 10503 vkStream->handleMapping()->mapHandles_VkIndirectCommandsLayoutNVX_u64(&forMarshaling->indirectCommandsLayout, &cgen_var_303, 1); 10504 vkStream->write((uint64_t*)&cgen_var_303, 1 * 8); 10505 vkStream->write((uint32_t*)&forMarshaling->maxSequencesCount, sizeof(uint32_t)); 10506 } 10507 10508 void unmarshal_VkCmdReserveSpaceForCommandsInfoNVX( 10509 VulkanStreamGuest* vkStream, 10510 VkCmdReserveSpaceForCommandsInfoNVX* forUnmarshaling) 10511 { 10512 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10513 size_t pNext_size; 10514 pNext_size = vkStream->getBe32(); 10515 if (pNext_size) 10516 { 10517 uint64_t pNext_placeholder; 10518 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10519 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10520 } 10521 uint64_t cgen_var_304; 10522 vkStream->read((uint64_t*)&cgen_var_304, 1 * 8); 10523 vkStream->handleMapping()->mapHandles_u64_VkObjectTableNVX(&cgen_var_304, (VkObjectTableNVX*)&forUnmarshaling->objectTable, 1); 10524 uint64_t cgen_var_305; 10525 vkStream->read((uint64_t*)&cgen_var_305, 1 * 8); 10526 vkStream->handleMapping()->mapHandles_u64_VkIndirectCommandsLayoutNVX(&cgen_var_305, (VkIndirectCommandsLayoutNVX*)&forUnmarshaling->indirectCommandsLayout, 1); 10527 vkStream->read((uint32_t*)&forUnmarshaling->maxSequencesCount, sizeof(uint32_t)); 10528 } 10529 10530 void marshal_VkObjectTableCreateInfoNVX( 10531 VulkanStreamGuest* vkStream, 10532 const VkObjectTableCreateInfoNVX* forMarshaling) 10533 { 10534 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10535 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10536 vkStream->putBe32(pNext_size); 10537 if (pNext_size) 10538 { 10539 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10540 marshal_extension_struct(vkStream, forMarshaling->pNext); 10541 } 10542 vkStream->write((uint32_t*)&forMarshaling->objectCount, sizeof(uint32_t)); 10543 vkStream->write((const VkObjectEntryTypeNVX*)forMarshaling->pObjectEntryTypes, forMarshaling->objectCount * sizeof(const VkObjectEntryTypeNVX)); 10544 vkStream->write((const uint32_t*)forMarshaling->pObjectEntryCounts, forMarshaling->objectCount * sizeof(const uint32_t)); 10545 vkStream->write((const VkObjectEntryUsageFlagsNVX*)forMarshaling->pObjectEntryUsageFlags, forMarshaling->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX)); 10546 vkStream->write((uint32_t*)&forMarshaling->maxUniformBuffersPerDescriptor, sizeof(uint32_t)); 10547 vkStream->write((uint32_t*)&forMarshaling->maxStorageBuffersPerDescriptor, sizeof(uint32_t)); 10548 vkStream->write((uint32_t*)&forMarshaling->maxStorageImagesPerDescriptor, sizeof(uint32_t)); 10549 vkStream->write((uint32_t*)&forMarshaling->maxSampledImagesPerDescriptor, sizeof(uint32_t)); 10550 vkStream->write((uint32_t*)&forMarshaling->maxPipelineLayouts, sizeof(uint32_t)); 10551 } 10552 10553 void unmarshal_VkObjectTableCreateInfoNVX( 10554 VulkanStreamGuest* vkStream, 10555 VkObjectTableCreateInfoNVX* forUnmarshaling) 10556 { 10557 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10558 size_t pNext_size; 10559 pNext_size = vkStream->getBe32(); 10560 if (pNext_size) 10561 { 10562 uint64_t pNext_placeholder; 10563 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10564 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10565 } 10566 vkStream->read((uint32_t*)&forUnmarshaling->objectCount, sizeof(uint32_t)); 10567 vkStream->read((VkObjectEntryTypeNVX*)forUnmarshaling->pObjectEntryTypes, forUnmarshaling->objectCount * sizeof(const VkObjectEntryTypeNVX)); 10568 vkStream->read((uint32_t*)forUnmarshaling->pObjectEntryCounts, forUnmarshaling->objectCount * sizeof(const uint32_t)); 10569 vkStream->read((VkObjectEntryUsageFlagsNVX*)forUnmarshaling->pObjectEntryUsageFlags, forUnmarshaling->objectCount * sizeof(const VkObjectEntryUsageFlagsNVX)); 10570 vkStream->read((uint32_t*)&forUnmarshaling->maxUniformBuffersPerDescriptor, sizeof(uint32_t)); 10571 vkStream->read((uint32_t*)&forUnmarshaling->maxStorageBuffersPerDescriptor, sizeof(uint32_t)); 10572 vkStream->read((uint32_t*)&forUnmarshaling->maxStorageImagesPerDescriptor, sizeof(uint32_t)); 10573 vkStream->read((uint32_t*)&forUnmarshaling->maxSampledImagesPerDescriptor, sizeof(uint32_t)); 10574 vkStream->read((uint32_t*)&forUnmarshaling->maxPipelineLayouts, sizeof(uint32_t)); 10575 } 10576 10577 void marshal_VkObjectTableEntryNVX( 10578 VulkanStreamGuest* vkStream, 10579 const VkObjectTableEntryNVX* forMarshaling) 10580 { 10581 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10582 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10583 } 10584 10585 void unmarshal_VkObjectTableEntryNVX( 10586 VulkanStreamGuest* vkStream, 10587 VkObjectTableEntryNVX* forUnmarshaling) 10588 { 10589 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10590 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10591 } 10592 10593 void marshal_VkObjectTablePipelineEntryNVX( 10594 VulkanStreamGuest* vkStream, 10595 const VkObjectTablePipelineEntryNVX* forMarshaling) 10596 { 10597 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10598 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10599 uint64_t cgen_var_306; 10600 vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->pipeline, &cgen_var_306, 1); 10601 vkStream->write((uint64_t*)&cgen_var_306, 1 * 8); 10602 } 10603 10604 void unmarshal_VkObjectTablePipelineEntryNVX( 10605 VulkanStreamGuest* vkStream, 10606 VkObjectTablePipelineEntryNVX* forUnmarshaling) 10607 { 10608 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10609 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10610 uint64_t cgen_var_307; 10611 vkStream->read((uint64_t*)&cgen_var_307, 1 * 8); 10612 vkStream->handleMapping()->mapHandles_u64_VkPipeline(&cgen_var_307, (VkPipeline*)&forUnmarshaling->pipeline, 1); 10613 } 10614 10615 void marshal_VkObjectTableDescriptorSetEntryNVX( 10616 VulkanStreamGuest* vkStream, 10617 const VkObjectTableDescriptorSetEntryNVX* forMarshaling) 10618 { 10619 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10620 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10621 uint64_t cgen_var_308; 10622 vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_308, 1); 10623 vkStream->write((uint64_t*)&cgen_var_308, 1 * 8); 10624 uint64_t cgen_var_309; 10625 vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->descriptorSet, &cgen_var_309, 1); 10626 vkStream->write((uint64_t*)&cgen_var_309, 1 * 8); 10627 } 10628 10629 void unmarshal_VkObjectTableDescriptorSetEntryNVX( 10630 VulkanStreamGuest* vkStream, 10631 VkObjectTableDescriptorSetEntryNVX* forUnmarshaling) 10632 { 10633 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10634 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10635 uint64_t cgen_var_310; 10636 vkStream->read((uint64_t*)&cgen_var_310, 1 * 8); 10637 vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_310, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1); 10638 uint64_t cgen_var_311; 10639 vkStream->read((uint64_t*)&cgen_var_311, 1 * 8); 10640 vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(&cgen_var_311, (VkDescriptorSet*)&forUnmarshaling->descriptorSet, 1); 10641 } 10642 10643 void marshal_VkObjectTableVertexBufferEntryNVX( 10644 VulkanStreamGuest* vkStream, 10645 const VkObjectTableVertexBufferEntryNVX* forMarshaling) 10646 { 10647 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10648 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10649 uint64_t cgen_var_312; 10650 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_312, 1); 10651 vkStream->write((uint64_t*)&cgen_var_312, 1 * 8); 10652 } 10653 10654 void unmarshal_VkObjectTableVertexBufferEntryNVX( 10655 VulkanStreamGuest* vkStream, 10656 VkObjectTableVertexBufferEntryNVX* forUnmarshaling) 10657 { 10658 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10659 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10660 uint64_t cgen_var_313; 10661 vkStream->read((uint64_t*)&cgen_var_313, 1 * 8); 10662 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_313, (VkBuffer*)&forUnmarshaling->buffer, 1); 10663 } 10664 10665 void marshal_VkObjectTableIndexBufferEntryNVX( 10666 VulkanStreamGuest* vkStream, 10667 const VkObjectTableIndexBufferEntryNVX* forMarshaling) 10668 { 10669 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10670 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10671 uint64_t cgen_var_314; 10672 vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_314, 1); 10673 vkStream->write((uint64_t*)&cgen_var_314, 1 * 8); 10674 vkStream->write((VkIndexType*)&forMarshaling->indexType, sizeof(VkIndexType)); 10675 } 10676 10677 void unmarshal_VkObjectTableIndexBufferEntryNVX( 10678 VulkanStreamGuest* vkStream, 10679 VkObjectTableIndexBufferEntryNVX* forUnmarshaling) 10680 { 10681 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10682 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10683 uint64_t cgen_var_315; 10684 vkStream->read((uint64_t*)&cgen_var_315, 1 * 8); 10685 vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_315, (VkBuffer*)&forUnmarshaling->buffer, 1); 10686 vkStream->read((VkIndexType*)&forUnmarshaling->indexType, sizeof(VkIndexType)); 10687 } 10688 10689 void marshal_VkObjectTablePushConstantEntryNVX( 10690 VulkanStreamGuest* vkStream, 10691 const VkObjectTablePushConstantEntryNVX* forMarshaling) 10692 { 10693 vkStream->write((VkObjectEntryTypeNVX*)&forMarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10694 vkStream->write((VkObjectEntryUsageFlagsNVX*)&forMarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10695 uint64_t cgen_var_316; 10696 vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout, &cgen_var_316, 1); 10697 vkStream->write((uint64_t*)&cgen_var_316, 1 * 8); 10698 vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags)); 10699 } 10700 10701 void unmarshal_VkObjectTablePushConstantEntryNVX( 10702 VulkanStreamGuest* vkStream, 10703 VkObjectTablePushConstantEntryNVX* forUnmarshaling) 10704 { 10705 vkStream->read((VkObjectEntryTypeNVX*)&forUnmarshaling->type, sizeof(VkObjectEntryTypeNVX)); 10706 vkStream->read((VkObjectEntryUsageFlagsNVX*)&forUnmarshaling->flags, sizeof(VkObjectEntryUsageFlagsNVX)); 10707 uint64_t cgen_var_317; 10708 vkStream->read((uint64_t*)&cgen_var_317, 1 * 8); 10709 vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_317, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1); 10710 vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags)); 10711 } 10712 10713 #endif 10714 #ifdef VK_NV_clip_space_w_scaling 10715 void marshal_VkViewportWScalingNV( 10716 VulkanStreamGuest* vkStream, 10717 const VkViewportWScalingNV* forMarshaling) 10718 { 10719 vkStream->write((float*)&forMarshaling->xcoeff, sizeof(float)); 10720 vkStream->write((float*)&forMarshaling->ycoeff, sizeof(float)); 10721 } 10722 10723 void unmarshal_VkViewportWScalingNV( 10724 VulkanStreamGuest* vkStream, 10725 VkViewportWScalingNV* forUnmarshaling) 10726 { 10727 vkStream->read((float*)&forUnmarshaling->xcoeff, sizeof(float)); 10728 vkStream->read((float*)&forUnmarshaling->ycoeff, sizeof(float)); 10729 } 10730 10731 void marshal_VkPipelineViewportWScalingStateCreateInfoNV( 10732 VulkanStreamGuest* vkStream, 10733 const VkPipelineViewportWScalingStateCreateInfoNV* forMarshaling) 10734 { 10735 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10736 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10737 vkStream->putBe32(pNext_size); 10738 if (pNext_size) 10739 { 10740 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10741 marshal_extension_struct(vkStream, forMarshaling->pNext); 10742 } 10743 vkStream->write((VkBool32*)&forMarshaling->viewportWScalingEnable, sizeof(VkBool32)); 10744 vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t)); 10745 // WARNING PTR CHECK 10746 uint64_t cgen_var_318 = (uint64_t)(uintptr_t)forMarshaling->pViewportWScalings; 10747 vkStream->putBe64(cgen_var_318); 10748 if (forMarshaling->pViewportWScalings) 10749 { 10750 for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i) 10751 { 10752 marshal_VkViewportWScalingNV(vkStream, (const VkViewportWScalingNV*)(forMarshaling->pViewportWScalings + i)); 10753 } 10754 } 10755 } 10756 10757 void unmarshal_VkPipelineViewportWScalingStateCreateInfoNV( 10758 VulkanStreamGuest* vkStream, 10759 VkPipelineViewportWScalingStateCreateInfoNV* forUnmarshaling) 10760 { 10761 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10762 size_t pNext_size; 10763 pNext_size = vkStream->getBe32(); 10764 if (pNext_size) 10765 { 10766 uint64_t pNext_placeholder; 10767 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10768 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10769 } 10770 vkStream->read((VkBool32*)&forUnmarshaling->viewportWScalingEnable, sizeof(VkBool32)); 10771 vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t)); 10772 // WARNING PTR CHECK 10773 const VkViewportWScalingNV* check_pViewportWScalings; 10774 check_pViewportWScalings = (const VkViewportWScalingNV*)(uintptr_t)vkStream->getBe64(); 10775 if (forUnmarshaling->pViewportWScalings) 10776 { 10777 if (!(check_pViewportWScalings)) 10778 { 10779 fprintf(stderr, "fatal: forUnmarshaling->pViewportWScalings inconsistent between guest and host\n"); 10780 } 10781 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i) 10782 { 10783 unmarshal_VkViewportWScalingNV(vkStream, (VkViewportWScalingNV*)(forUnmarshaling->pViewportWScalings + i)); 10784 } 10785 } 10786 } 10787 10788 #endif 10789 #ifdef VK_EXT_direct_mode_display 10790 #endif 10791 #ifdef VK_EXT_acquire_xlib_display 10792 #endif 10793 #ifdef VK_EXT_display_surface_counter 10794 void marshal_VkSurfaceCapabilities2EXT( 10795 VulkanStreamGuest* vkStream, 10796 const VkSurfaceCapabilities2EXT* forMarshaling) 10797 { 10798 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10799 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10800 vkStream->putBe32(pNext_size); 10801 if (pNext_size) 10802 { 10803 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 10804 marshal_extension_struct(vkStream, forMarshaling->pNext); 10805 } 10806 vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t)); 10807 vkStream->write((uint32_t*)&forMarshaling->maxImageCount, sizeof(uint32_t)); 10808 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->currentExtent)); 10809 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->minImageExtent)); 10810 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxImageExtent)); 10811 vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t)); 10812 vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 10813 vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 10814 vkStream->write((VkCompositeAlphaFlagsKHR*)&forMarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR)); 10815 vkStream->write((VkImageUsageFlags*)&forMarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags)); 10816 vkStream->write((VkSurfaceCounterFlagsEXT*)&forMarshaling->supportedSurfaceCounters, sizeof(VkSurfaceCounterFlagsEXT)); 10817 } 10818 10819 void unmarshal_VkSurfaceCapabilities2EXT( 10820 VulkanStreamGuest* vkStream, 10821 VkSurfaceCapabilities2EXT* forUnmarshaling) 10822 { 10823 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10824 size_t pNext_size; 10825 pNext_size = vkStream->getBe32(); 10826 if (pNext_size) 10827 { 10828 uint64_t pNext_placeholder; 10829 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10830 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10831 } 10832 vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t)); 10833 vkStream->read((uint32_t*)&forUnmarshaling->maxImageCount, sizeof(uint32_t)); 10834 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->currentExtent)); 10835 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->minImageExtent)); 10836 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxImageExtent)); 10837 vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t)); 10838 vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms, sizeof(VkSurfaceTransformFlagsKHR)); 10839 vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->currentTransform, sizeof(VkSurfaceTransformFlagBitsKHR)); 10840 vkStream->read((VkCompositeAlphaFlagsKHR*)&forUnmarshaling->supportedCompositeAlpha, sizeof(VkCompositeAlphaFlagsKHR)); 10841 vkStream->read((VkImageUsageFlags*)&forUnmarshaling->supportedUsageFlags, sizeof(VkImageUsageFlags)); 10842 vkStream->read((VkSurfaceCounterFlagsEXT*)&forUnmarshaling->supportedSurfaceCounters, sizeof(VkSurfaceCounterFlagsEXT)); 10843 } 10844 10845 #endif 10846 #ifdef VK_EXT_display_control 10847 void marshal_VkDisplayPowerInfoEXT( 10848 VulkanStreamGuest* vkStream, 10849 const VkDisplayPowerInfoEXT* forMarshaling) 10850 { 10851 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10852 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10853 vkStream->putBe32(pNext_size); 10854 if (pNext_size) 10855 { 10856 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10857 marshal_extension_struct(vkStream, forMarshaling->pNext); 10858 } 10859 vkStream->write((VkDisplayPowerStateEXT*)&forMarshaling->powerState, sizeof(VkDisplayPowerStateEXT)); 10860 } 10861 10862 void unmarshal_VkDisplayPowerInfoEXT( 10863 VulkanStreamGuest* vkStream, 10864 VkDisplayPowerInfoEXT* forUnmarshaling) 10865 { 10866 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10867 size_t pNext_size; 10868 pNext_size = vkStream->getBe32(); 10869 if (pNext_size) 10870 { 10871 uint64_t pNext_placeholder; 10872 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10873 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10874 } 10875 vkStream->read((VkDisplayPowerStateEXT*)&forUnmarshaling->powerState, sizeof(VkDisplayPowerStateEXT)); 10876 } 10877 10878 void marshal_VkDeviceEventInfoEXT( 10879 VulkanStreamGuest* vkStream, 10880 const VkDeviceEventInfoEXT* forMarshaling) 10881 { 10882 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10883 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10884 vkStream->putBe32(pNext_size); 10885 if (pNext_size) 10886 { 10887 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10888 marshal_extension_struct(vkStream, forMarshaling->pNext); 10889 } 10890 vkStream->write((VkDeviceEventTypeEXT*)&forMarshaling->deviceEvent, sizeof(VkDeviceEventTypeEXT)); 10891 } 10892 10893 void unmarshal_VkDeviceEventInfoEXT( 10894 VulkanStreamGuest* vkStream, 10895 VkDeviceEventInfoEXT* forUnmarshaling) 10896 { 10897 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10898 size_t pNext_size; 10899 pNext_size = vkStream->getBe32(); 10900 if (pNext_size) 10901 { 10902 uint64_t pNext_placeholder; 10903 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10904 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10905 } 10906 vkStream->read((VkDeviceEventTypeEXT*)&forUnmarshaling->deviceEvent, sizeof(VkDeviceEventTypeEXT)); 10907 } 10908 10909 void marshal_VkDisplayEventInfoEXT( 10910 VulkanStreamGuest* vkStream, 10911 const VkDisplayEventInfoEXT* forMarshaling) 10912 { 10913 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10914 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10915 vkStream->putBe32(pNext_size); 10916 if (pNext_size) 10917 { 10918 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10919 marshal_extension_struct(vkStream, forMarshaling->pNext); 10920 } 10921 vkStream->write((VkDisplayEventTypeEXT*)&forMarshaling->displayEvent, sizeof(VkDisplayEventTypeEXT)); 10922 } 10923 10924 void unmarshal_VkDisplayEventInfoEXT( 10925 VulkanStreamGuest* vkStream, 10926 VkDisplayEventInfoEXT* forUnmarshaling) 10927 { 10928 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10929 size_t pNext_size; 10930 pNext_size = vkStream->getBe32(); 10931 if (pNext_size) 10932 { 10933 uint64_t pNext_placeholder; 10934 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10935 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10936 } 10937 vkStream->read((VkDisplayEventTypeEXT*)&forUnmarshaling->displayEvent, sizeof(VkDisplayEventTypeEXT)); 10938 } 10939 10940 void marshal_VkSwapchainCounterCreateInfoEXT( 10941 VulkanStreamGuest* vkStream, 10942 const VkSwapchainCounterCreateInfoEXT* forMarshaling) 10943 { 10944 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 10945 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 10946 vkStream->putBe32(pNext_size); 10947 if (pNext_size) 10948 { 10949 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 10950 marshal_extension_struct(vkStream, forMarshaling->pNext); 10951 } 10952 vkStream->write((VkSurfaceCounterFlagsEXT*)&forMarshaling->surfaceCounters, sizeof(VkSurfaceCounterFlagsEXT)); 10953 } 10954 10955 void unmarshal_VkSwapchainCounterCreateInfoEXT( 10956 VulkanStreamGuest* vkStream, 10957 VkSwapchainCounterCreateInfoEXT* forUnmarshaling) 10958 { 10959 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 10960 size_t pNext_size; 10961 pNext_size = vkStream->getBe32(); 10962 if (pNext_size) 10963 { 10964 uint64_t pNext_placeholder; 10965 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 10966 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 10967 } 10968 vkStream->read((VkSurfaceCounterFlagsEXT*)&forUnmarshaling->surfaceCounters, sizeof(VkSurfaceCounterFlagsEXT)); 10969 } 10970 10971 #endif 10972 #ifdef VK_GOOGLE_display_timing 10973 void marshal_VkRefreshCycleDurationGOOGLE( 10974 VulkanStreamGuest* vkStream, 10975 const VkRefreshCycleDurationGOOGLE* forMarshaling) 10976 { 10977 vkStream->write((uint64_t*)&forMarshaling->refreshDuration, sizeof(uint64_t)); 10978 } 10979 10980 void unmarshal_VkRefreshCycleDurationGOOGLE( 10981 VulkanStreamGuest* vkStream, 10982 VkRefreshCycleDurationGOOGLE* forUnmarshaling) 10983 { 10984 vkStream->read((uint64_t*)&forUnmarshaling->refreshDuration, sizeof(uint64_t)); 10985 } 10986 10987 void marshal_VkPastPresentationTimingGOOGLE( 10988 VulkanStreamGuest* vkStream, 10989 const VkPastPresentationTimingGOOGLE* forMarshaling) 10990 { 10991 vkStream->write((uint32_t*)&forMarshaling->presentID, sizeof(uint32_t)); 10992 vkStream->write((uint64_t*)&forMarshaling->desiredPresentTime, sizeof(uint64_t)); 10993 vkStream->write((uint64_t*)&forMarshaling->actualPresentTime, sizeof(uint64_t)); 10994 vkStream->write((uint64_t*)&forMarshaling->earliestPresentTime, sizeof(uint64_t)); 10995 vkStream->write((uint64_t*)&forMarshaling->presentMargin, sizeof(uint64_t)); 10996 } 10997 10998 void unmarshal_VkPastPresentationTimingGOOGLE( 10999 VulkanStreamGuest* vkStream, 11000 VkPastPresentationTimingGOOGLE* forUnmarshaling) 11001 { 11002 vkStream->read((uint32_t*)&forUnmarshaling->presentID, sizeof(uint32_t)); 11003 vkStream->read((uint64_t*)&forUnmarshaling->desiredPresentTime, sizeof(uint64_t)); 11004 vkStream->read((uint64_t*)&forUnmarshaling->actualPresentTime, sizeof(uint64_t)); 11005 vkStream->read((uint64_t*)&forUnmarshaling->earliestPresentTime, sizeof(uint64_t)); 11006 vkStream->read((uint64_t*)&forUnmarshaling->presentMargin, sizeof(uint64_t)); 11007 } 11008 11009 void marshal_VkPresentTimeGOOGLE( 11010 VulkanStreamGuest* vkStream, 11011 const VkPresentTimeGOOGLE* forMarshaling) 11012 { 11013 vkStream->write((uint32_t*)&forMarshaling->presentID, sizeof(uint32_t)); 11014 vkStream->write((uint64_t*)&forMarshaling->desiredPresentTime, sizeof(uint64_t)); 11015 } 11016 11017 void unmarshal_VkPresentTimeGOOGLE( 11018 VulkanStreamGuest* vkStream, 11019 VkPresentTimeGOOGLE* forUnmarshaling) 11020 { 11021 vkStream->read((uint32_t*)&forUnmarshaling->presentID, sizeof(uint32_t)); 11022 vkStream->read((uint64_t*)&forUnmarshaling->desiredPresentTime, sizeof(uint64_t)); 11023 } 11024 11025 void marshal_VkPresentTimesInfoGOOGLE( 11026 VulkanStreamGuest* vkStream, 11027 const VkPresentTimesInfoGOOGLE* forMarshaling) 11028 { 11029 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11030 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11031 vkStream->putBe32(pNext_size); 11032 if (pNext_size) 11033 { 11034 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11035 marshal_extension_struct(vkStream, forMarshaling->pNext); 11036 } 11037 vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t)); 11038 // WARNING PTR CHECK 11039 uint64_t cgen_var_320 = (uint64_t)(uintptr_t)forMarshaling->pTimes; 11040 vkStream->putBe64(cgen_var_320); 11041 if (forMarshaling->pTimes) 11042 { 11043 for (uint32_t i = 0; i < (uint32_t)forMarshaling->swapchainCount; ++i) 11044 { 11045 marshal_VkPresentTimeGOOGLE(vkStream, (const VkPresentTimeGOOGLE*)(forMarshaling->pTimes + i)); 11046 } 11047 } 11048 } 11049 11050 void unmarshal_VkPresentTimesInfoGOOGLE( 11051 VulkanStreamGuest* vkStream, 11052 VkPresentTimesInfoGOOGLE* forUnmarshaling) 11053 { 11054 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11055 size_t pNext_size; 11056 pNext_size = vkStream->getBe32(); 11057 if (pNext_size) 11058 { 11059 uint64_t pNext_placeholder; 11060 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11061 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11062 } 11063 vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t)); 11064 // WARNING PTR CHECK 11065 const VkPresentTimeGOOGLE* check_pTimes; 11066 check_pTimes = (const VkPresentTimeGOOGLE*)(uintptr_t)vkStream->getBe64(); 11067 if (forUnmarshaling->pTimes) 11068 { 11069 if (!(check_pTimes)) 11070 { 11071 fprintf(stderr, "fatal: forUnmarshaling->pTimes inconsistent between guest and host\n"); 11072 } 11073 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->swapchainCount; ++i) 11074 { 11075 unmarshal_VkPresentTimeGOOGLE(vkStream, (VkPresentTimeGOOGLE*)(forUnmarshaling->pTimes + i)); 11076 } 11077 } 11078 } 11079 11080 #endif 11081 #ifdef VK_NV_sample_mask_override_coverage 11082 #endif 11083 #ifdef VK_NV_geometry_shader_passthrough 11084 #endif 11085 #ifdef VK_NV_viewport_array2 11086 #endif 11087 #ifdef VK_NVX_multiview_per_view_attributes 11088 void marshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( 11089 VulkanStreamGuest* vkStream, 11090 const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* forMarshaling) 11091 { 11092 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11093 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11094 vkStream->putBe32(pNext_size); 11095 if (pNext_size) 11096 { 11097 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11098 marshal_extension_struct(vkStream, forMarshaling->pNext); 11099 } 11100 vkStream->write((VkBool32*)&forMarshaling->perViewPositionAllComponents, sizeof(VkBool32)); 11101 } 11102 11103 void unmarshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX( 11104 VulkanStreamGuest* vkStream, 11105 VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX* forUnmarshaling) 11106 { 11107 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11108 size_t pNext_size; 11109 pNext_size = vkStream->getBe32(); 11110 if (pNext_size) 11111 { 11112 uint64_t pNext_placeholder; 11113 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11114 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11115 } 11116 vkStream->read((VkBool32*)&forUnmarshaling->perViewPositionAllComponents, sizeof(VkBool32)); 11117 } 11118 11119 #endif 11120 #ifdef VK_NV_viewport_swizzle 11121 void marshal_VkViewportSwizzleNV( 11122 VulkanStreamGuest* vkStream, 11123 const VkViewportSwizzleNV* forMarshaling) 11124 { 11125 vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->x, sizeof(VkViewportCoordinateSwizzleNV)); 11126 vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->y, sizeof(VkViewportCoordinateSwizzleNV)); 11127 vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->z, sizeof(VkViewportCoordinateSwizzleNV)); 11128 vkStream->write((VkViewportCoordinateSwizzleNV*)&forMarshaling->w, sizeof(VkViewportCoordinateSwizzleNV)); 11129 } 11130 11131 void unmarshal_VkViewportSwizzleNV( 11132 VulkanStreamGuest* vkStream, 11133 VkViewportSwizzleNV* forUnmarshaling) 11134 { 11135 vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->x, sizeof(VkViewportCoordinateSwizzleNV)); 11136 vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->y, sizeof(VkViewportCoordinateSwizzleNV)); 11137 vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->z, sizeof(VkViewportCoordinateSwizzleNV)); 11138 vkStream->read((VkViewportCoordinateSwizzleNV*)&forUnmarshaling->w, sizeof(VkViewportCoordinateSwizzleNV)); 11139 } 11140 11141 void marshal_VkPipelineViewportSwizzleStateCreateInfoNV( 11142 VulkanStreamGuest* vkStream, 11143 const VkPipelineViewportSwizzleStateCreateInfoNV* forMarshaling) 11144 { 11145 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11146 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11147 vkStream->putBe32(pNext_size); 11148 if (pNext_size) 11149 { 11150 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11151 marshal_extension_struct(vkStream, forMarshaling->pNext); 11152 } 11153 vkStream->write((VkPipelineViewportSwizzleStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineViewportSwizzleStateCreateFlagsNV)); 11154 vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t)); 11155 // WARNING PTR CHECK 11156 uint64_t cgen_var_322 = (uint64_t)(uintptr_t)forMarshaling->pViewportSwizzles; 11157 vkStream->putBe64(cgen_var_322); 11158 if (forMarshaling->pViewportSwizzles) 11159 { 11160 for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i) 11161 { 11162 marshal_VkViewportSwizzleNV(vkStream, (const VkViewportSwizzleNV*)(forMarshaling->pViewportSwizzles + i)); 11163 } 11164 } 11165 } 11166 11167 void unmarshal_VkPipelineViewportSwizzleStateCreateInfoNV( 11168 VulkanStreamGuest* vkStream, 11169 VkPipelineViewportSwizzleStateCreateInfoNV* forUnmarshaling) 11170 { 11171 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11172 size_t pNext_size; 11173 pNext_size = vkStream->getBe32(); 11174 if (pNext_size) 11175 { 11176 uint64_t pNext_placeholder; 11177 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11178 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11179 } 11180 vkStream->read((VkPipelineViewportSwizzleStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineViewportSwizzleStateCreateFlagsNV)); 11181 vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t)); 11182 // WARNING PTR CHECK 11183 const VkViewportSwizzleNV* check_pViewportSwizzles; 11184 check_pViewportSwizzles = (const VkViewportSwizzleNV*)(uintptr_t)vkStream->getBe64(); 11185 if (forUnmarshaling->pViewportSwizzles) 11186 { 11187 if (!(check_pViewportSwizzles)) 11188 { 11189 fprintf(stderr, "fatal: forUnmarshaling->pViewportSwizzles inconsistent between guest and host\n"); 11190 } 11191 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i) 11192 { 11193 unmarshal_VkViewportSwizzleNV(vkStream, (VkViewportSwizzleNV*)(forUnmarshaling->pViewportSwizzles + i)); 11194 } 11195 } 11196 } 11197 11198 #endif 11199 #ifdef VK_EXT_discard_rectangles 11200 void marshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT( 11201 VulkanStreamGuest* vkStream, 11202 const VkPhysicalDeviceDiscardRectanglePropertiesEXT* forMarshaling) 11203 { 11204 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11205 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11206 vkStream->putBe32(pNext_size); 11207 if (pNext_size) 11208 { 11209 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11210 marshal_extension_struct(vkStream, forMarshaling->pNext); 11211 } 11212 vkStream->write((uint32_t*)&forMarshaling->maxDiscardRectangles, sizeof(uint32_t)); 11213 } 11214 11215 void unmarshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT( 11216 VulkanStreamGuest* vkStream, 11217 VkPhysicalDeviceDiscardRectanglePropertiesEXT* forUnmarshaling) 11218 { 11219 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11220 size_t pNext_size; 11221 pNext_size = vkStream->getBe32(); 11222 if (pNext_size) 11223 { 11224 uint64_t pNext_placeholder; 11225 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11226 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11227 } 11228 vkStream->read((uint32_t*)&forUnmarshaling->maxDiscardRectangles, sizeof(uint32_t)); 11229 } 11230 11231 void marshal_VkPipelineDiscardRectangleStateCreateInfoEXT( 11232 VulkanStreamGuest* vkStream, 11233 const VkPipelineDiscardRectangleStateCreateInfoEXT* forMarshaling) 11234 { 11235 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11236 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11237 vkStream->putBe32(pNext_size); 11238 if (pNext_size) 11239 { 11240 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11241 marshal_extension_struct(vkStream, forMarshaling->pNext); 11242 } 11243 vkStream->write((VkPipelineDiscardRectangleStateCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkPipelineDiscardRectangleStateCreateFlagsEXT)); 11244 vkStream->write((VkDiscardRectangleModeEXT*)&forMarshaling->discardRectangleMode, sizeof(VkDiscardRectangleModeEXT)); 11245 vkStream->write((uint32_t*)&forMarshaling->discardRectangleCount, sizeof(uint32_t)); 11246 // WARNING PTR CHECK 11247 uint64_t cgen_var_324 = (uint64_t)(uintptr_t)forMarshaling->pDiscardRectangles; 11248 vkStream->putBe64(cgen_var_324); 11249 if (forMarshaling->pDiscardRectangles) 11250 { 11251 for (uint32_t i = 0; i < (uint32_t)forMarshaling->discardRectangleCount; ++i) 11252 { 11253 marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pDiscardRectangles + i)); 11254 } 11255 } 11256 } 11257 11258 void unmarshal_VkPipelineDiscardRectangleStateCreateInfoEXT( 11259 VulkanStreamGuest* vkStream, 11260 VkPipelineDiscardRectangleStateCreateInfoEXT* forUnmarshaling) 11261 { 11262 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11263 size_t pNext_size; 11264 pNext_size = vkStream->getBe32(); 11265 if (pNext_size) 11266 { 11267 uint64_t pNext_placeholder; 11268 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11269 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11270 } 11271 vkStream->read((VkPipelineDiscardRectangleStateCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkPipelineDiscardRectangleStateCreateFlagsEXT)); 11272 vkStream->read((VkDiscardRectangleModeEXT*)&forUnmarshaling->discardRectangleMode, sizeof(VkDiscardRectangleModeEXT)); 11273 vkStream->read((uint32_t*)&forUnmarshaling->discardRectangleCount, sizeof(uint32_t)); 11274 // WARNING PTR CHECK 11275 const VkRect2D* check_pDiscardRectangles; 11276 check_pDiscardRectangles = (const VkRect2D*)(uintptr_t)vkStream->getBe64(); 11277 if (forUnmarshaling->pDiscardRectangles) 11278 { 11279 if (!(check_pDiscardRectangles)) 11280 { 11281 fprintf(stderr, "fatal: forUnmarshaling->pDiscardRectangles inconsistent between guest and host\n"); 11282 } 11283 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->discardRectangleCount; ++i) 11284 { 11285 unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pDiscardRectangles + i)); 11286 } 11287 } 11288 } 11289 11290 #endif 11291 #ifdef VK_EXT_conservative_rasterization 11292 void marshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT( 11293 VulkanStreamGuest* vkStream, 11294 const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* forMarshaling) 11295 { 11296 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11297 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11298 vkStream->putBe32(pNext_size); 11299 if (pNext_size) 11300 { 11301 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11302 marshal_extension_struct(vkStream, forMarshaling->pNext); 11303 } 11304 vkStream->write((float*)&forMarshaling->primitiveOverestimationSize, sizeof(float)); 11305 vkStream->write((float*)&forMarshaling->maxExtraPrimitiveOverestimationSize, sizeof(float)); 11306 vkStream->write((float*)&forMarshaling->extraPrimitiveOverestimationSizeGranularity, sizeof(float)); 11307 vkStream->write((VkBool32*)&forMarshaling->primitiveUnderestimation, sizeof(VkBool32)); 11308 vkStream->write((VkBool32*)&forMarshaling->conservativePointAndLineRasterization, sizeof(VkBool32)); 11309 vkStream->write((VkBool32*)&forMarshaling->degenerateTrianglesRasterized, sizeof(VkBool32)); 11310 vkStream->write((VkBool32*)&forMarshaling->degenerateLinesRasterized, sizeof(VkBool32)); 11311 vkStream->write((VkBool32*)&forMarshaling->fullyCoveredFragmentShaderInputVariable, sizeof(VkBool32)); 11312 vkStream->write((VkBool32*)&forMarshaling->conservativeRasterizationPostDepthCoverage, sizeof(VkBool32)); 11313 } 11314 11315 void unmarshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT( 11316 VulkanStreamGuest* vkStream, 11317 VkPhysicalDeviceConservativeRasterizationPropertiesEXT* forUnmarshaling) 11318 { 11319 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11320 size_t pNext_size; 11321 pNext_size = vkStream->getBe32(); 11322 if (pNext_size) 11323 { 11324 uint64_t pNext_placeholder; 11325 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11326 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11327 } 11328 vkStream->read((float*)&forUnmarshaling->primitiveOverestimationSize, sizeof(float)); 11329 vkStream->read((float*)&forUnmarshaling->maxExtraPrimitiveOverestimationSize, sizeof(float)); 11330 vkStream->read((float*)&forUnmarshaling->extraPrimitiveOverestimationSizeGranularity, sizeof(float)); 11331 vkStream->read((VkBool32*)&forUnmarshaling->primitiveUnderestimation, sizeof(VkBool32)); 11332 vkStream->read((VkBool32*)&forUnmarshaling->conservativePointAndLineRasterization, sizeof(VkBool32)); 11333 vkStream->read((VkBool32*)&forUnmarshaling->degenerateTrianglesRasterized, sizeof(VkBool32)); 11334 vkStream->read((VkBool32*)&forUnmarshaling->degenerateLinesRasterized, sizeof(VkBool32)); 11335 vkStream->read((VkBool32*)&forUnmarshaling->fullyCoveredFragmentShaderInputVariable, sizeof(VkBool32)); 11336 vkStream->read((VkBool32*)&forUnmarshaling->conservativeRasterizationPostDepthCoverage, sizeof(VkBool32)); 11337 } 11338 11339 void marshal_VkPipelineRasterizationConservativeStateCreateInfoEXT( 11340 VulkanStreamGuest* vkStream, 11341 const VkPipelineRasterizationConservativeStateCreateInfoEXT* forMarshaling) 11342 { 11343 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11344 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11345 vkStream->putBe32(pNext_size); 11346 if (pNext_size) 11347 { 11348 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11349 marshal_extension_struct(vkStream, forMarshaling->pNext); 11350 } 11351 vkStream->write((VkPipelineRasterizationConservativeStateCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkPipelineRasterizationConservativeStateCreateFlagsEXT)); 11352 vkStream->write((VkConservativeRasterizationModeEXT*)&forMarshaling->conservativeRasterizationMode, sizeof(VkConservativeRasterizationModeEXT)); 11353 vkStream->write((float*)&forMarshaling->extraPrimitiveOverestimationSize, sizeof(float)); 11354 } 11355 11356 void unmarshal_VkPipelineRasterizationConservativeStateCreateInfoEXT( 11357 VulkanStreamGuest* vkStream, 11358 VkPipelineRasterizationConservativeStateCreateInfoEXT* forUnmarshaling) 11359 { 11360 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11361 size_t pNext_size; 11362 pNext_size = vkStream->getBe32(); 11363 if (pNext_size) 11364 { 11365 uint64_t pNext_placeholder; 11366 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11367 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11368 } 11369 vkStream->read((VkPipelineRasterizationConservativeStateCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkPipelineRasterizationConservativeStateCreateFlagsEXT)); 11370 vkStream->read((VkConservativeRasterizationModeEXT*)&forUnmarshaling->conservativeRasterizationMode, sizeof(VkConservativeRasterizationModeEXT)); 11371 vkStream->read((float*)&forUnmarshaling->extraPrimitiveOverestimationSize, sizeof(float)); 11372 } 11373 11374 #endif 11375 #ifdef VK_EXT_swapchain_colorspace 11376 #endif 11377 #ifdef VK_EXT_hdr_metadata 11378 void marshal_VkXYColorEXT( 11379 VulkanStreamGuest* vkStream, 11380 const VkXYColorEXT* forMarshaling) 11381 { 11382 vkStream->write((float*)&forMarshaling->x, sizeof(float)); 11383 vkStream->write((float*)&forMarshaling->y, sizeof(float)); 11384 } 11385 11386 void unmarshal_VkXYColorEXT( 11387 VulkanStreamGuest* vkStream, 11388 VkXYColorEXT* forUnmarshaling) 11389 { 11390 vkStream->read((float*)&forUnmarshaling->x, sizeof(float)); 11391 vkStream->read((float*)&forUnmarshaling->y, sizeof(float)); 11392 } 11393 11394 void marshal_VkHdrMetadataEXT( 11395 VulkanStreamGuest* vkStream, 11396 const VkHdrMetadataEXT* forMarshaling) 11397 { 11398 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11399 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11400 vkStream->putBe32(pNext_size); 11401 if (pNext_size) 11402 { 11403 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11404 marshal_extension_struct(vkStream, forMarshaling->pNext); 11405 } 11406 marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryRed)); 11407 marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryGreen)); 11408 marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->displayPrimaryBlue)); 11409 marshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forMarshaling->whitePoint)); 11410 vkStream->write((float*)&forMarshaling->maxLuminance, sizeof(float)); 11411 vkStream->write((float*)&forMarshaling->minLuminance, sizeof(float)); 11412 vkStream->write((float*)&forMarshaling->maxContentLightLevel, sizeof(float)); 11413 vkStream->write((float*)&forMarshaling->maxFrameAverageLightLevel, sizeof(float)); 11414 } 11415 11416 void unmarshal_VkHdrMetadataEXT( 11417 VulkanStreamGuest* vkStream, 11418 VkHdrMetadataEXT* forUnmarshaling) 11419 { 11420 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11421 size_t pNext_size; 11422 pNext_size = vkStream->getBe32(); 11423 if (pNext_size) 11424 { 11425 uint64_t pNext_placeholder; 11426 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11427 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11428 } 11429 unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryRed)); 11430 unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryGreen)); 11431 unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->displayPrimaryBlue)); 11432 unmarshal_VkXYColorEXT(vkStream, (VkXYColorEXT*)(&forUnmarshaling->whitePoint)); 11433 vkStream->read((float*)&forUnmarshaling->maxLuminance, sizeof(float)); 11434 vkStream->read((float*)&forUnmarshaling->minLuminance, sizeof(float)); 11435 vkStream->read((float*)&forUnmarshaling->maxContentLightLevel, sizeof(float)); 11436 vkStream->read((float*)&forUnmarshaling->maxFrameAverageLightLevel, sizeof(float)); 11437 } 11438 11439 #endif 11440 #ifdef VK_MVK_ios_surface 11441 void marshal_VkIOSSurfaceCreateInfoMVK( 11442 VulkanStreamGuest* vkStream, 11443 const VkIOSSurfaceCreateInfoMVK* forMarshaling) 11444 { 11445 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11446 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11447 vkStream->putBe32(pNext_size); 11448 if (pNext_size) 11449 { 11450 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11451 marshal_extension_struct(vkStream, forMarshaling->pNext); 11452 } 11453 vkStream->write((VkIOSSurfaceCreateFlagsMVK*)&forMarshaling->flags, sizeof(VkIOSSurfaceCreateFlagsMVK)); 11454 // WARNING PTR CHECK 11455 uint64_t cgen_var_326 = (uint64_t)(uintptr_t)forMarshaling->pView; 11456 vkStream->putBe64(cgen_var_326); 11457 if (forMarshaling->pView) 11458 { 11459 vkStream->write((const void*)forMarshaling->pView, sizeof(const uint8_t)); 11460 } 11461 } 11462 11463 void unmarshal_VkIOSSurfaceCreateInfoMVK( 11464 VulkanStreamGuest* vkStream, 11465 VkIOSSurfaceCreateInfoMVK* forUnmarshaling) 11466 { 11467 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11468 size_t pNext_size; 11469 pNext_size = vkStream->getBe32(); 11470 if (pNext_size) 11471 { 11472 uint64_t pNext_placeholder; 11473 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11474 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11475 } 11476 vkStream->read((VkIOSSurfaceCreateFlagsMVK*)&forUnmarshaling->flags, sizeof(VkIOSSurfaceCreateFlagsMVK)); 11477 // WARNING PTR CHECK 11478 const void* check_pView; 11479 check_pView = (const void*)(uintptr_t)vkStream->getBe64(); 11480 if (forUnmarshaling->pView) 11481 { 11482 if (!(check_pView)) 11483 { 11484 fprintf(stderr, "fatal: forUnmarshaling->pView inconsistent between guest and host\n"); 11485 } 11486 vkStream->read((void*)forUnmarshaling->pView, sizeof(const uint8_t)); 11487 } 11488 } 11489 11490 #endif 11491 #ifdef VK_MVK_macos_surface 11492 void marshal_VkMacOSSurfaceCreateInfoMVK( 11493 VulkanStreamGuest* vkStream, 11494 const VkMacOSSurfaceCreateInfoMVK* forMarshaling) 11495 { 11496 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11497 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11498 vkStream->putBe32(pNext_size); 11499 if (pNext_size) 11500 { 11501 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11502 marshal_extension_struct(vkStream, forMarshaling->pNext); 11503 } 11504 vkStream->write((VkMacOSSurfaceCreateFlagsMVK*)&forMarshaling->flags, sizeof(VkMacOSSurfaceCreateFlagsMVK)); 11505 // WARNING PTR CHECK 11506 uint64_t cgen_var_328 = (uint64_t)(uintptr_t)forMarshaling->pView; 11507 vkStream->putBe64(cgen_var_328); 11508 if (forMarshaling->pView) 11509 { 11510 vkStream->write((const void*)forMarshaling->pView, sizeof(const uint8_t)); 11511 } 11512 } 11513 11514 void unmarshal_VkMacOSSurfaceCreateInfoMVK( 11515 VulkanStreamGuest* vkStream, 11516 VkMacOSSurfaceCreateInfoMVK* forUnmarshaling) 11517 { 11518 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11519 size_t pNext_size; 11520 pNext_size = vkStream->getBe32(); 11521 if (pNext_size) 11522 { 11523 uint64_t pNext_placeholder; 11524 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11525 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11526 } 11527 vkStream->read((VkMacOSSurfaceCreateFlagsMVK*)&forUnmarshaling->flags, sizeof(VkMacOSSurfaceCreateFlagsMVK)); 11528 // WARNING PTR CHECK 11529 const void* check_pView; 11530 check_pView = (const void*)(uintptr_t)vkStream->getBe64(); 11531 if (forUnmarshaling->pView) 11532 { 11533 if (!(check_pView)) 11534 { 11535 fprintf(stderr, "fatal: forUnmarshaling->pView inconsistent between guest and host\n"); 11536 } 11537 vkStream->read((void*)forUnmarshaling->pView, sizeof(const uint8_t)); 11538 } 11539 } 11540 11541 #endif 11542 #ifdef VK_EXT_external_memory_dma_buf 11543 #endif 11544 #ifdef VK_EXT_queue_family_foreign 11545 #endif 11546 #ifdef VK_EXT_debug_utils 11547 void marshal_VkDebugUtilsObjectNameInfoEXT( 11548 VulkanStreamGuest* vkStream, 11549 const VkDebugUtilsObjectNameInfoEXT* forMarshaling) 11550 { 11551 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11552 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11553 vkStream->putBe32(pNext_size); 11554 if (pNext_size) 11555 { 11556 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11557 marshal_extension_struct(vkStream, forMarshaling->pNext); 11558 } 11559 vkStream->write((VkObjectType*)&forMarshaling->objectType, sizeof(VkObjectType)); 11560 vkStream->write((uint64_t*)&forMarshaling->objectHandle, sizeof(uint64_t)); 11561 vkStream->putString(forMarshaling->pObjectName); 11562 } 11563 11564 void unmarshal_VkDebugUtilsObjectNameInfoEXT( 11565 VulkanStreamGuest* vkStream, 11566 VkDebugUtilsObjectNameInfoEXT* forUnmarshaling) 11567 { 11568 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11569 size_t pNext_size; 11570 pNext_size = vkStream->getBe32(); 11571 if (pNext_size) 11572 { 11573 uint64_t pNext_placeholder; 11574 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11575 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11576 } 11577 vkStream->read((VkObjectType*)&forUnmarshaling->objectType, sizeof(VkObjectType)); 11578 vkStream->read((uint64_t*)&forUnmarshaling->objectHandle, sizeof(uint64_t)); 11579 vkStream->loadStringInPlace((char**)&forUnmarshaling->pObjectName); 11580 } 11581 11582 void marshal_VkDebugUtilsObjectTagInfoEXT( 11583 VulkanStreamGuest* vkStream, 11584 const VkDebugUtilsObjectTagInfoEXT* forMarshaling) 11585 { 11586 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11587 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11588 vkStream->putBe32(pNext_size); 11589 if (pNext_size) 11590 { 11591 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11592 marshal_extension_struct(vkStream, forMarshaling->pNext); 11593 } 11594 vkStream->write((VkObjectType*)&forMarshaling->objectType, sizeof(VkObjectType)); 11595 vkStream->write((uint64_t*)&forMarshaling->objectHandle, sizeof(uint64_t)); 11596 vkStream->write((uint64_t*)&forMarshaling->tagName, sizeof(uint64_t)); 11597 uint64_t cgen_var_330 = (uint64_t)forMarshaling->tagSize; 11598 vkStream->putBe64(cgen_var_330); 11599 vkStream->write((const void*)forMarshaling->pTag, forMarshaling->tagSize * sizeof(const uint8_t)); 11600 } 11601 11602 void unmarshal_VkDebugUtilsObjectTagInfoEXT( 11603 VulkanStreamGuest* vkStream, 11604 VkDebugUtilsObjectTagInfoEXT* forUnmarshaling) 11605 { 11606 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11607 size_t pNext_size; 11608 pNext_size = vkStream->getBe32(); 11609 if (pNext_size) 11610 { 11611 uint64_t pNext_placeholder; 11612 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11613 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11614 } 11615 vkStream->read((VkObjectType*)&forUnmarshaling->objectType, sizeof(VkObjectType)); 11616 vkStream->read((uint64_t*)&forUnmarshaling->objectHandle, sizeof(uint64_t)); 11617 vkStream->read((uint64_t*)&forUnmarshaling->tagName, sizeof(uint64_t)); 11618 forUnmarshaling->tagSize = (size_t)vkStream->getBe64(); 11619 vkStream->read((void*)forUnmarshaling->pTag, forUnmarshaling->tagSize * sizeof(const uint8_t)); 11620 } 11621 11622 void marshal_VkDebugUtilsLabelEXT( 11623 VulkanStreamGuest* vkStream, 11624 const VkDebugUtilsLabelEXT* forMarshaling) 11625 { 11626 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11627 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11628 vkStream->putBe32(pNext_size); 11629 if (pNext_size) 11630 { 11631 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11632 marshal_extension_struct(vkStream, forMarshaling->pNext); 11633 } 11634 vkStream->putString(forMarshaling->pLabelName); 11635 vkStream->write((float*)forMarshaling->color, 4 * sizeof(float)); 11636 } 11637 11638 void unmarshal_VkDebugUtilsLabelEXT( 11639 VulkanStreamGuest* vkStream, 11640 VkDebugUtilsLabelEXT* forUnmarshaling) 11641 { 11642 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11643 size_t pNext_size; 11644 pNext_size = vkStream->getBe32(); 11645 if (pNext_size) 11646 { 11647 uint64_t pNext_placeholder; 11648 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11649 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11650 } 11651 vkStream->loadStringInPlace((char**)&forUnmarshaling->pLabelName); 11652 vkStream->read((float*)forUnmarshaling->color, 4 * sizeof(float)); 11653 } 11654 11655 void marshal_VkDebugUtilsMessengerCallbackDataEXT( 11656 VulkanStreamGuest* vkStream, 11657 const VkDebugUtilsMessengerCallbackDataEXT* forMarshaling) 11658 { 11659 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11660 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11661 vkStream->putBe32(pNext_size); 11662 if (pNext_size) 11663 { 11664 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11665 marshal_extension_struct(vkStream, forMarshaling->pNext); 11666 } 11667 vkStream->write((VkDebugUtilsMessengerCallbackDataFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugUtilsMessengerCallbackDataFlagsEXT)); 11668 vkStream->putString(forMarshaling->pMessageIdName); 11669 vkStream->write((int32_t*)&forMarshaling->messageIdNumber, sizeof(int32_t)); 11670 vkStream->putString(forMarshaling->pMessage); 11671 vkStream->write((uint32_t*)&forMarshaling->queueLabelCount, sizeof(uint32_t)); 11672 // WARNING PTR CHECK 11673 uint64_t cgen_var_332 = (uint64_t)(uintptr_t)forMarshaling->pQueueLabels; 11674 vkStream->putBe64(cgen_var_332); 11675 if (forMarshaling->pQueueLabels) 11676 { 11677 for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueLabelCount; ++i) 11678 { 11679 marshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forMarshaling->pQueueLabels + i)); 11680 } 11681 } 11682 vkStream->write((uint32_t*)&forMarshaling->cmdBufLabelCount, sizeof(uint32_t)); 11683 // WARNING PTR CHECK 11684 uint64_t cgen_var_333 = (uint64_t)(uintptr_t)forMarshaling->pCmdBufLabels; 11685 vkStream->putBe64(cgen_var_333); 11686 if (forMarshaling->pCmdBufLabels) 11687 { 11688 for (uint32_t i = 0; i < (uint32_t)forMarshaling->cmdBufLabelCount; ++i) 11689 { 11690 marshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forMarshaling->pCmdBufLabels + i)); 11691 } 11692 } 11693 vkStream->write((uint32_t*)&forMarshaling->objectCount, sizeof(uint32_t)); 11694 // WARNING PTR CHECK 11695 uint64_t cgen_var_334 = (uint64_t)(uintptr_t)forMarshaling->pObjects; 11696 vkStream->putBe64(cgen_var_334); 11697 if (forMarshaling->pObjects) 11698 { 11699 for (uint32_t i = 0; i < (uint32_t)forMarshaling->objectCount; ++i) 11700 { 11701 marshal_VkDebugUtilsObjectNameInfoEXT(vkStream, (VkDebugUtilsObjectNameInfoEXT*)(forMarshaling->pObjects + i)); 11702 } 11703 } 11704 } 11705 11706 void unmarshal_VkDebugUtilsMessengerCallbackDataEXT( 11707 VulkanStreamGuest* vkStream, 11708 VkDebugUtilsMessengerCallbackDataEXT* forUnmarshaling) 11709 { 11710 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11711 size_t pNext_size; 11712 pNext_size = vkStream->getBe32(); 11713 if (pNext_size) 11714 { 11715 uint64_t pNext_placeholder; 11716 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11717 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11718 } 11719 vkStream->read((VkDebugUtilsMessengerCallbackDataFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugUtilsMessengerCallbackDataFlagsEXT)); 11720 vkStream->loadStringInPlace((char**)&forUnmarshaling->pMessageIdName); 11721 vkStream->read((int32_t*)&forUnmarshaling->messageIdNumber, sizeof(int32_t)); 11722 vkStream->loadStringInPlace((char**)&forUnmarshaling->pMessage); 11723 vkStream->read((uint32_t*)&forUnmarshaling->queueLabelCount, sizeof(uint32_t)); 11724 // WARNING PTR CHECK 11725 VkDebugUtilsLabelEXT* check_pQueueLabels; 11726 check_pQueueLabels = (VkDebugUtilsLabelEXT*)(uintptr_t)vkStream->getBe64(); 11727 if (forUnmarshaling->pQueueLabels) 11728 { 11729 if (!(check_pQueueLabels)) 11730 { 11731 fprintf(stderr, "fatal: forUnmarshaling->pQueueLabels inconsistent between guest and host\n"); 11732 } 11733 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueLabelCount; ++i) 11734 { 11735 unmarshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forUnmarshaling->pQueueLabels + i)); 11736 } 11737 } 11738 vkStream->read((uint32_t*)&forUnmarshaling->cmdBufLabelCount, sizeof(uint32_t)); 11739 // WARNING PTR CHECK 11740 VkDebugUtilsLabelEXT* check_pCmdBufLabels; 11741 check_pCmdBufLabels = (VkDebugUtilsLabelEXT*)(uintptr_t)vkStream->getBe64(); 11742 if (forUnmarshaling->pCmdBufLabels) 11743 { 11744 if (!(check_pCmdBufLabels)) 11745 { 11746 fprintf(stderr, "fatal: forUnmarshaling->pCmdBufLabels inconsistent between guest and host\n"); 11747 } 11748 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->cmdBufLabelCount; ++i) 11749 { 11750 unmarshal_VkDebugUtilsLabelEXT(vkStream, (VkDebugUtilsLabelEXT*)(forUnmarshaling->pCmdBufLabels + i)); 11751 } 11752 } 11753 vkStream->read((uint32_t*)&forUnmarshaling->objectCount, sizeof(uint32_t)); 11754 // WARNING PTR CHECK 11755 VkDebugUtilsObjectNameInfoEXT* check_pObjects; 11756 check_pObjects = (VkDebugUtilsObjectNameInfoEXT*)(uintptr_t)vkStream->getBe64(); 11757 if (forUnmarshaling->pObjects) 11758 { 11759 if (!(check_pObjects)) 11760 { 11761 fprintf(stderr, "fatal: forUnmarshaling->pObjects inconsistent between guest and host\n"); 11762 } 11763 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->objectCount; ++i) 11764 { 11765 unmarshal_VkDebugUtilsObjectNameInfoEXT(vkStream, (VkDebugUtilsObjectNameInfoEXT*)(forUnmarshaling->pObjects + i)); 11766 } 11767 } 11768 } 11769 11770 void marshal_VkDebugUtilsMessengerCreateInfoEXT( 11771 VulkanStreamGuest* vkStream, 11772 const VkDebugUtilsMessengerCreateInfoEXT* forMarshaling) 11773 { 11774 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11775 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11776 vkStream->putBe32(pNext_size); 11777 if (pNext_size) 11778 { 11779 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11780 marshal_extension_struct(vkStream, forMarshaling->pNext); 11781 } 11782 vkStream->write((VkDebugUtilsMessengerCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkDebugUtilsMessengerCreateFlagsEXT)); 11783 vkStream->write((VkDebugUtilsMessageSeverityFlagsEXT*)&forMarshaling->messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagsEXT)); 11784 vkStream->write((VkDebugUtilsMessageTypeFlagsEXT*)&forMarshaling->messageType, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); 11785 uint64_t cgen_var_338 = (uint64_t)forMarshaling->pfnUserCallback; 11786 vkStream->putBe64(cgen_var_338); 11787 // WARNING PTR CHECK 11788 uint64_t cgen_var_339 = (uint64_t)(uintptr_t)forMarshaling->pUserData; 11789 vkStream->putBe64(cgen_var_339); 11790 if (forMarshaling->pUserData) 11791 { 11792 vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t)); 11793 } 11794 } 11795 11796 void unmarshal_VkDebugUtilsMessengerCreateInfoEXT( 11797 VulkanStreamGuest* vkStream, 11798 VkDebugUtilsMessengerCreateInfoEXT* forUnmarshaling) 11799 { 11800 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11801 size_t pNext_size; 11802 pNext_size = vkStream->getBe32(); 11803 if (pNext_size) 11804 { 11805 uint64_t pNext_placeholder; 11806 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11807 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11808 } 11809 vkStream->read((VkDebugUtilsMessengerCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkDebugUtilsMessengerCreateFlagsEXT)); 11810 vkStream->read((VkDebugUtilsMessageSeverityFlagsEXT*)&forUnmarshaling->messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagsEXT)); 11811 vkStream->read((VkDebugUtilsMessageTypeFlagsEXT*)&forUnmarshaling->messageType, sizeof(VkDebugUtilsMessageTypeFlagsEXT)); 11812 forUnmarshaling->pfnUserCallback = (PFN_vkDebugUtilsMessengerCallbackEXT)vkStream->getBe64(); 11813 // WARNING PTR CHECK 11814 void* check_pUserData; 11815 check_pUserData = (void*)(uintptr_t)vkStream->getBe64(); 11816 if (forUnmarshaling->pUserData) 11817 { 11818 if (!(check_pUserData)) 11819 { 11820 fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n"); 11821 } 11822 vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t)); 11823 } 11824 } 11825 11826 #endif 11827 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 11828 void marshal_VkAndroidHardwareBufferUsageANDROID( 11829 VulkanStreamGuest* vkStream, 11830 const VkAndroidHardwareBufferUsageANDROID* forMarshaling) 11831 { 11832 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11833 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11834 vkStream->putBe32(pNext_size); 11835 if (pNext_size) 11836 { 11837 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11838 marshal_extension_struct(vkStream, forMarshaling->pNext); 11839 } 11840 vkStream->write((uint64_t*)&forMarshaling->androidHardwareBufferUsage, sizeof(uint64_t)); 11841 } 11842 11843 void unmarshal_VkAndroidHardwareBufferUsageANDROID( 11844 VulkanStreamGuest* vkStream, 11845 VkAndroidHardwareBufferUsageANDROID* forUnmarshaling) 11846 { 11847 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11848 size_t pNext_size; 11849 pNext_size = vkStream->getBe32(); 11850 if (pNext_size) 11851 { 11852 uint64_t pNext_placeholder; 11853 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11854 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11855 } 11856 vkStream->read((uint64_t*)&forUnmarshaling->androidHardwareBufferUsage, sizeof(uint64_t)); 11857 } 11858 11859 void marshal_VkAndroidHardwareBufferPropertiesANDROID( 11860 VulkanStreamGuest* vkStream, 11861 const VkAndroidHardwareBufferPropertiesANDROID* forMarshaling) 11862 { 11863 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11864 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11865 vkStream->putBe32(pNext_size); 11866 if (pNext_size) 11867 { 11868 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11869 marshal_extension_struct(vkStream, forMarshaling->pNext); 11870 } 11871 vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize)); 11872 vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); 11873 } 11874 11875 void unmarshal_VkAndroidHardwareBufferPropertiesANDROID( 11876 VulkanStreamGuest* vkStream, 11877 VkAndroidHardwareBufferPropertiesANDROID* forUnmarshaling) 11878 { 11879 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11880 size_t pNext_size; 11881 pNext_size = vkStream->getBe32(); 11882 if (pNext_size) 11883 { 11884 uint64_t pNext_placeholder; 11885 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11886 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11887 } 11888 vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize)); 11889 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t)); 11890 } 11891 11892 void marshal_VkAndroidHardwareBufferFormatPropertiesANDROID( 11893 VulkanStreamGuest* vkStream, 11894 const VkAndroidHardwareBufferFormatPropertiesANDROID* forMarshaling) 11895 { 11896 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11897 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11898 vkStream->putBe32(pNext_size); 11899 if (pNext_size) 11900 { 11901 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 11902 marshal_extension_struct(vkStream, forMarshaling->pNext); 11903 } 11904 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 11905 vkStream->write((uint64_t*)&forMarshaling->externalFormat, sizeof(uint64_t)); 11906 vkStream->write((VkFormatFeatureFlags*)&forMarshaling->formatFeatures, sizeof(VkFormatFeatureFlags)); 11907 marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->samplerYcbcrConversionComponents)); 11908 vkStream->write((VkSamplerYcbcrModelConversion*)&forMarshaling->suggestedYcbcrModel, sizeof(VkSamplerYcbcrModelConversion)); 11909 vkStream->write((VkSamplerYcbcrRange*)&forMarshaling->suggestedYcbcrRange, sizeof(VkSamplerYcbcrRange)); 11910 vkStream->write((VkChromaLocation*)&forMarshaling->suggestedXChromaOffset, sizeof(VkChromaLocation)); 11911 vkStream->write((VkChromaLocation*)&forMarshaling->suggestedYChromaOffset, sizeof(VkChromaLocation)); 11912 } 11913 11914 void unmarshal_VkAndroidHardwareBufferFormatPropertiesANDROID( 11915 VulkanStreamGuest* vkStream, 11916 VkAndroidHardwareBufferFormatPropertiesANDROID* forUnmarshaling) 11917 { 11918 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11919 size_t pNext_size; 11920 pNext_size = vkStream->getBe32(); 11921 if (pNext_size) 11922 { 11923 uint64_t pNext_placeholder; 11924 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11925 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11926 } 11927 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 11928 vkStream->read((uint64_t*)&forUnmarshaling->externalFormat, sizeof(uint64_t)); 11929 vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->formatFeatures, sizeof(VkFormatFeatureFlags)); 11930 unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->samplerYcbcrConversionComponents)); 11931 vkStream->read((VkSamplerYcbcrModelConversion*)&forUnmarshaling->suggestedYcbcrModel, sizeof(VkSamplerYcbcrModelConversion)); 11932 vkStream->read((VkSamplerYcbcrRange*)&forUnmarshaling->suggestedYcbcrRange, sizeof(VkSamplerYcbcrRange)); 11933 vkStream->read((VkChromaLocation*)&forUnmarshaling->suggestedXChromaOffset, sizeof(VkChromaLocation)); 11934 vkStream->read((VkChromaLocation*)&forUnmarshaling->suggestedYChromaOffset, sizeof(VkChromaLocation)); 11935 } 11936 11937 void marshal_VkImportAndroidHardwareBufferInfoANDROID( 11938 VulkanStreamGuest* vkStream, 11939 const VkImportAndroidHardwareBufferInfoANDROID* forMarshaling) 11940 { 11941 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11942 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11943 vkStream->putBe32(pNext_size); 11944 if (pNext_size) 11945 { 11946 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11947 marshal_extension_struct(vkStream, forMarshaling->pNext); 11948 } 11949 vkStream->write((AHardwareBuffer*)forMarshaling->buffer, sizeof(AHardwareBuffer)); 11950 } 11951 11952 void unmarshal_VkImportAndroidHardwareBufferInfoANDROID( 11953 VulkanStreamGuest* vkStream, 11954 VkImportAndroidHardwareBufferInfoANDROID* forUnmarshaling) 11955 { 11956 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11957 size_t pNext_size; 11958 pNext_size = vkStream->getBe32(); 11959 if (pNext_size) 11960 { 11961 uint64_t pNext_placeholder; 11962 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11963 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11964 } 11965 vkStream->read((AHardwareBuffer*)forUnmarshaling->buffer, sizeof(AHardwareBuffer)); 11966 } 11967 11968 void marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID( 11969 VulkanStreamGuest* vkStream, 11970 const VkMemoryGetAndroidHardwareBufferInfoANDROID* forMarshaling) 11971 { 11972 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 11973 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 11974 vkStream->putBe32(pNext_size); 11975 if (pNext_size) 11976 { 11977 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 11978 marshal_extension_struct(vkStream, forMarshaling->pNext); 11979 } 11980 uint64_t cgen_var_342; 11981 vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_342, 1); 11982 vkStream->write((uint64_t*)&cgen_var_342, 1 * 8); 11983 } 11984 11985 void unmarshal_VkMemoryGetAndroidHardwareBufferInfoANDROID( 11986 VulkanStreamGuest* vkStream, 11987 VkMemoryGetAndroidHardwareBufferInfoANDROID* forUnmarshaling) 11988 { 11989 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 11990 size_t pNext_size; 11991 pNext_size = vkStream->getBe32(); 11992 if (pNext_size) 11993 { 11994 uint64_t pNext_placeholder; 11995 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 11996 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 11997 } 11998 uint64_t cgen_var_343; 11999 vkStream->read((uint64_t*)&cgen_var_343, 1 * 8); 12000 vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_343, (VkDeviceMemory*)&forUnmarshaling->memory, 1); 12001 } 12002 12003 void marshal_VkExternalFormatANDROID( 12004 VulkanStreamGuest* vkStream, 12005 const VkExternalFormatANDROID* forMarshaling) 12006 { 12007 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12008 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12009 vkStream->putBe32(pNext_size); 12010 if (pNext_size) 12011 { 12012 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12013 marshal_extension_struct(vkStream, forMarshaling->pNext); 12014 } 12015 vkStream->write((uint64_t*)&forMarshaling->externalFormat, sizeof(uint64_t)); 12016 } 12017 12018 void unmarshal_VkExternalFormatANDROID( 12019 VulkanStreamGuest* vkStream, 12020 VkExternalFormatANDROID* forUnmarshaling) 12021 { 12022 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12023 size_t pNext_size; 12024 pNext_size = vkStream->getBe32(); 12025 if (pNext_size) 12026 { 12027 uint64_t pNext_placeholder; 12028 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12029 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12030 } 12031 vkStream->read((uint64_t*)&forUnmarshaling->externalFormat, sizeof(uint64_t)); 12032 } 12033 12034 #endif 12035 #ifdef VK_EXT_sampler_filter_minmax 12036 void marshal_VkSamplerReductionModeCreateInfoEXT( 12037 VulkanStreamGuest* vkStream, 12038 const VkSamplerReductionModeCreateInfoEXT* forMarshaling) 12039 { 12040 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12041 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12042 vkStream->putBe32(pNext_size); 12043 if (pNext_size) 12044 { 12045 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12046 marshal_extension_struct(vkStream, forMarshaling->pNext); 12047 } 12048 vkStream->write((VkSamplerReductionModeEXT*)&forMarshaling->reductionMode, sizeof(VkSamplerReductionModeEXT)); 12049 } 12050 12051 void unmarshal_VkSamplerReductionModeCreateInfoEXT( 12052 VulkanStreamGuest* vkStream, 12053 VkSamplerReductionModeCreateInfoEXT* forUnmarshaling) 12054 { 12055 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12056 size_t pNext_size; 12057 pNext_size = vkStream->getBe32(); 12058 if (pNext_size) 12059 { 12060 uint64_t pNext_placeholder; 12061 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12062 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12063 } 12064 vkStream->read((VkSamplerReductionModeEXT*)&forUnmarshaling->reductionMode, sizeof(VkSamplerReductionModeEXT)); 12065 } 12066 12067 void marshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT( 12068 VulkanStreamGuest* vkStream, 12069 const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* forMarshaling) 12070 { 12071 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12072 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12073 vkStream->putBe32(pNext_size); 12074 if (pNext_size) 12075 { 12076 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12077 marshal_extension_struct(vkStream, forMarshaling->pNext); 12078 } 12079 vkStream->write((VkBool32*)&forMarshaling->filterMinmaxSingleComponentFormats, sizeof(VkBool32)); 12080 vkStream->write((VkBool32*)&forMarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32)); 12081 } 12082 12083 void unmarshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT( 12084 VulkanStreamGuest* vkStream, 12085 VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT* forUnmarshaling) 12086 { 12087 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12088 size_t pNext_size; 12089 pNext_size = vkStream->getBe32(); 12090 if (pNext_size) 12091 { 12092 uint64_t pNext_placeholder; 12093 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12094 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12095 } 12096 vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxSingleComponentFormats, sizeof(VkBool32)); 12097 vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32)); 12098 } 12099 12100 #endif 12101 #ifdef VK_AMD_gpu_shader_int16 12102 #endif 12103 #ifdef VK_AMD_mixed_attachment_samples 12104 #endif 12105 #ifdef VK_AMD_shader_fragment_mask 12106 #endif 12107 #ifdef VK_EXT_shader_stencil_export 12108 #endif 12109 #ifdef VK_EXT_sample_locations 12110 void marshal_VkSampleLocationEXT( 12111 VulkanStreamGuest* vkStream, 12112 const VkSampleLocationEXT* forMarshaling) 12113 { 12114 vkStream->write((float*)&forMarshaling->x, sizeof(float)); 12115 vkStream->write((float*)&forMarshaling->y, sizeof(float)); 12116 } 12117 12118 void unmarshal_VkSampleLocationEXT( 12119 VulkanStreamGuest* vkStream, 12120 VkSampleLocationEXT* forUnmarshaling) 12121 { 12122 vkStream->read((float*)&forUnmarshaling->x, sizeof(float)); 12123 vkStream->read((float*)&forUnmarshaling->y, sizeof(float)); 12124 } 12125 12126 void marshal_VkSampleLocationsInfoEXT( 12127 VulkanStreamGuest* vkStream, 12128 const VkSampleLocationsInfoEXT* forMarshaling) 12129 { 12130 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12131 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12132 vkStream->putBe32(pNext_size); 12133 if (pNext_size) 12134 { 12135 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12136 marshal_extension_struct(vkStream, forMarshaling->pNext); 12137 } 12138 vkStream->write((VkSampleCountFlagBits*)&forMarshaling->sampleLocationsPerPixel, sizeof(VkSampleCountFlagBits)); 12139 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->sampleLocationGridSize)); 12140 vkStream->write((uint32_t*)&forMarshaling->sampleLocationsCount, sizeof(uint32_t)); 12141 for (uint32_t i = 0; i < (uint32_t)forMarshaling->sampleLocationsCount; ++i) 12142 { 12143 marshal_VkSampleLocationEXT(vkStream, (const VkSampleLocationEXT*)(forMarshaling->pSampleLocations + i)); 12144 } 12145 } 12146 12147 void unmarshal_VkSampleLocationsInfoEXT( 12148 VulkanStreamGuest* vkStream, 12149 VkSampleLocationsInfoEXT* forUnmarshaling) 12150 { 12151 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12152 size_t pNext_size; 12153 pNext_size = vkStream->getBe32(); 12154 if (pNext_size) 12155 { 12156 uint64_t pNext_placeholder; 12157 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12158 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12159 } 12160 vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->sampleLocationsPerPixel, sizeof(VkSampleCountFlagBits)); 12161 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->sampleLocationGridSize)); 12162 vkStream->read((uint32_t*)&forUnmarshaling->sampleLocationsCount, sizeof(uint32_t)); 12163 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->sampleLocationsCount; ++i) 12164 { 12165 unmarshal_VkSampleLocationEXT(vkStream, (VkSampleLocationEXT*)(forUnmarshaling->pSampleLocations + i)); 12166 } 12167 } 12168 12169 void marshal_VkAttachmentSampleLocationsEXT( 12170 VulkanStreamGuest* vkStream, 12171 const VkAttachmentSampleLocationsEXT* forMarshaling) 12172 { 12173 vkStream->write((uint32_t*)&forMarshaling->attachmentIndex, sizeof(uint32_t)); 12174 marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo)); 12175 } 12176 12177 void unmarshal_VkAttachmentSampleLocationsEXT( 12178 VulkanStreamGuest* vkStream, 12179 VkAttachmentSampleLocationsEXT* forUnmarshaling) 12180 { 12181 vkStream->read((uint32_t*)&forUnmarshaling->attachmentIndex, sizeof(uint32_t)); 12182 unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo)); 12183 } 12184 12185 void marshal_VkSubpassSampleLocationsEXT( 12186 VulkanStreamGuest* vkStream, 12187 const VkSubpassSampleLocationsEXT* forMarshaling) 12188 { 12189 vkStream->write((uint32_t*)&forMarshaling->subpassIndex, sizeof(uint32_t)); 12190 marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo)); 12191 } 12192 12193 void unmarshal_VkSubpassSampleLocationsEXT( 12194 VulkanStreamGuest* vkStream, 12195 VkSubpassSampleLocationsEXT* forUnmarshaling) 12196 { 12197 vkStream->read((uint32_t*)&forUnmarshaling->subpassIndex, sizeof(uint32_t)); 12198 unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo)); 12199 } 12200 12201 void marshal_VkRenderPassSampleLocationsBeginInfoEXT( 12202 VulkanStreamGuest* vkStream, 12203 const VkRenderPassSampleLocationsBeginInfoEXT* forMarshaling) 12204 { 12205 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12206 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12207 vkStream->putBe32(pNext_size); 12208 if (pNext_size) 12209 { 12210 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12211 marshal_extension_struct(vkStream, forMarshaling->pNext); 12212 } 12213 vkStream->write((uint32_t*)&forMarshaling->attachmentInitialSampleLocationsCount, sizeof(uint32_t)); 12214 for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentInitialSampleLocationsCount; ++i) 12215 { 12216 marshal_VkAttachmentSampleLocationsEXT(vkStream, (const VkAttachmentSampleLocationsEXT*)(forMarshaling->pAttachmentInitialSampleLocations + i)); 12217 } 12218 vkStream->write((uint32_t*)&forMarshaling->postSubpassSampleLocationsCount, sizeof(uint32_t)); 12219 for (uint32_t i = 0; i < (uint32_t)forMarshaling->postSubpassSampleLocationsCount; ++i) 12220 { 12221 marshal_VkSubpassSampleLocationsEXT(vkStream, (const VkSubpassSampleLocationsEXT*)(forMarshaling->pPostSubpassSampleLocations + i)); 12222 } 12223 } 12224 12225 void unmarshal_VkRenderPassSampleLocationsBeginInfoEXT( 12226 VulkanStreamGuest* vkStream, 12227 VkRenderPassSampleLocationsBeginInfoEXT* forUnmarshaling) 12228 { 12229 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12230 size_t pNext_size; 12231 pNext_size = vkStream->getBe32(); 12232 if (pNext_size) 12233 { 12234 uint64_t pNext_placeholder; 12235 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12236 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12237 } 12238 vkStream->read((uint32_t*)&forUnmarshaling->attachmentInitialSampleLocationsCount, sizeof(uint32_t)); 12239 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentInitialSampleLocationsCount; ++i) 12240 { 12241 unmarshal_VkAttachmentSampleLocationsEXT(vkStream, (VkAttachmentSampleLocationsEXT*)(forUnmarshaling->pAttachmentInitialSampleLocations + i)); 12242 } 12243 vkStream->read((uint32_t*)&forUnmarshaling->postSubpassSampleLocationsCount, sizeof(uint32_t)); 12244 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->postSubpassSampleLocationsCount; ++i) 12245 { 12246 unmarshal_VkSubpassSampleLocationsEXT(vkStream, (VkSubpassSampleLocationsEXT*)(forUnmarshaling->pPostSubpassSampleLocations + i)); 12247 } 12248 } 12249 12250 void marshal_VkPipelineSampleLocationsStateCreateInfoEXT( 12251 VulkanStreamGuest* vkStream, 12252 const VkPipelineSampleLocationsStateCreateInfoEXT* forMarshaling) 12253 { 12254 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12255 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12256 vkStream->putBe32(pNext_size); 12257 if (pNext_size) 12258 { 12259 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12260 marshal_extension_struct(vkStream, forMarshaling->pNext); 12261 } 12262 vkStream->write((VkBool32*)&forMarshaling->sampleLocationsEnable, sizeof(VkBool32)); 12263 marshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forMarshaling->sampleLocationsInfo)); 12264 } 12265 12266 void unmarshal_VkPipelineSampleLocationsStateCreateInfoEXT( 12267 VulkanStreamGuest* vkStream, 12268 VkPipelineSampleLocationsStateCreateInfoEXT* forUnmarshaling) 12269 { 12270 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12271 size_t pNext_size; 12272 pNext_size = vkStream->getBe32(); 12273 if (pNext_size) 12274 { 12275 uint64_t pNext_placeholder; 12276 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12277 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12278 } 12279 vkStream->read((VkBool32*)&forUnmarshaling->sampleLocationsEnable, sizeof(VkBool32)); 12280 unmarshal_VkSampleLocationsInfoEXT(vkStream, (VkSampleLocationsInfoEXT*)(&forUnmarshaling->sampleLocationsInfo)); 12281 } 12282 12283 void marshal_VkPhysicalDeviceSampleLocationsPropertiesEXT( 12284 VulkanStreamGuest* vkStream, 12285 const VkPhysicalDeviceSampleLocationsPropertiesEXT* forMarshaling) 12286 { 12287 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12288 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12289 vkStream->putBe32(pNext_size); 12290 if (pNext_size) 12291 { 12292 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12293 marshal_extension_struct(vkStream, forMarshaling->pNext); 12294 } 12295 vkStream->write((VkSampleCountFlags*)&forMarshaling->sampleLocationSampleCounts, sizeof(VkSampleCountFlags)); 12296 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSampleLocationGridSize)); 12297 vkStream->write((float*)forMarshaling->sampleLocationCoordinateRange, 2 * sizeof(float)); 12298 vkStream->write((uint32_t*)&forMarshaling->sampleLocationSubPixelBits, sizeof(uint32_t)); 12299 vkStream->write((VkBool32*)&forMarshaling->variableSampleLocations, sizeof(VkBool32)); 12300 } 12301 12302 void unmarshal_VkPhysicalDeviceSampleLocationsPropertiesEXT( 12303 VulkanStreamGuest* vkStream, 12304 VkPhysicalDeviceSampleLocationsPropertiesEXT* forUnmarshaling) 12305 { 12306 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12307 size_t pNext_size; 12308 pNext_size = vkStream->getBe32(); 12309 if (pNext_size) 12310 { 12311 uint64_t pNext_placeholder; 12312 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12313 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12314 } 12315 vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampleLocationSampleCounts, sizeof(VkSampleCountFlags)); 12316 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSampleLocationGridSize)); 12317 vkStream->read((float*)forUnmarshaling->sampleLocationCoordinateRange, 2 * sizeof(float)); 12318 vkStream->read((uint32_t*)&forUnmarshaling->sampleLocationSubPixelBits, sizeof(uint32_t)); 12319 vkStream->read((VkBool32*)&forUnmarshaling->variableSampleLocations, sizeof(VkBool32)); 12320 } 12321 12322 void marshal_VkMultisamplePropertiesEXT( 12323 VulkanStreamGuest* vkStream, 12324 const VkMultisamplePropertiesEXT* forMarshaling) 12325 { 12326 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12327 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12328 vkStream->putBe32(pNext_size); 12329 if (pNext_size) 12330 { 12331 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12332 marshal_extension_struct(vkStream, forMarshaling->pNext); 12333 } 12334 marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->maxSampleLocationGridSize)); 12335 } 12336 12337 void unmarshal_VkMultisamplePropertiesEXT( 12338 VulkanStreamGuest* vkStream, 12339 VkMultisamplePropertiesEXT* forUnmarshaling) 12340 { 12341 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12342 size_t pNext_size; 12343 pNext_size = vkStream->getBe32(); 12344 if (pNext_size) 12345 { 12346 uint64_t pNext_placeholder; 12347 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12348 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12349 } 12350 unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->maxSampleLocationGridSize)); 12351 } 12352 12353 #endif 12354 #ifdef VK_EXT_blend_operation_advanced 12355 void marshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT( 12356 VulkanStreamGuest* vkStream, 12357 const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* forMarshaling) 12358 { 12359 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12360 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12361 vkStream->putBe32(pNext_size); 12362 if (pNext_size) 12363 { 12364 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12365 marshal_extension_struct(vkStream, forMarshaling->pNext); 12366 } 12367 vkStream->write((VkBool32*)&forMarshaling->advancedBlendCoherentOperations, sizeof(VkBool32)); 12368 } 12369 12370 void unmarshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT( 12371 VulkanStreamGuest* vkStream, 12372 VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* forUnmarshaling) 12373 { 12374 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12375 size_t pNext_size; 12376 pNext_size = vkStream->getBe32(); 12377 if (pNext_size) 12378 { 12379 uint64_t pNext_placeholder; 12380 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12381 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12382 } 12383 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendCoherentOperations, sizeof(VkBool32)); 12384 } 12385 12386 void marshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT( 12387 VulkanStreamGuest* vkStream, 12388 const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* forMarshaling) 12389 { 12390 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12391 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12392 vkStream->putBe32(pNext_size); 12393 if (pNext_size) 12394 { 12395 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12396 marshal_extension_struct(vkStream, forMarshaling->pNext); 12397 } 12398 vkStream->write((uint32_t*)&forMarshaling->advancedBlendMaxColorAttachments, sizeof(uint32_t)); 12399 vkStream->write((VkBool32*)&forMarshaling->advancedBlendIndependentBlend, sizeof(VkBool32)); 12400 vkStream->write((VkBool32*)&forMarshaling->advancedBlendNonPremultipliedSrcColor, sizeof(VkBool32)); 12401 vkStream->write((VkBool32*)&forMarshaling->advancedBlendNonPremultipliedDstColor, sizeof(VkBool32)); 12402 vkStream->write((VkBool32*)&forMarshaling->advancedBlendCorrelatedOverlap, sizeof(VkBool32)); 12403 vkStream->write((VkBool32*)&forMarshaling->advancedBlendAllOperations, sizeof(VkBool32)); 12404 } 12405 12406 void unmarshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT( 12407 VulkanStreamGuest* vkStream, 12408 VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* forUnmarshaling) 12409 { 12410 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12411 size_t pNext_size; 12412 pNext_size = vkStream->getBe32(); 12413 if (pNext_size) 12414 { 12415 uint64_t pNext_placeholder; 12416 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12417 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12418 } 12419 vkStream->read((uint32_t*)&forUnmarshaling->advancedBlendMaxColorAttachments, sizeof(uint32_t)); 12420 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendIndependentBlend, sizeof(VkBool32)); 12421 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendNonPremultipliedSrcColor, sizeof(VkBool32)); 12422 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendNonPremultipliedDstColor, sizeof(VkBool32)); 12423 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendCorrelatedOverlap, sizeof(VkBool32)); 12424 vkStream->read((VkBool32*)&forUnmarshaling->advancedBlendAllOperations, sizeof(VkBool32)); 12425 } 12426 12427 void marshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT( 12428 VulkanStreamGuest* vkStream, 12429 const VkPipelineColorBlendAdvancedStateCreateInfoEXT* forMarshaling) 12430 { 12431 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12432 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12433 vkStream->putBe32(pNext_size); 12434 if (pNext_size) 12435 { 12436 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12437 marshal_extension_struct(vkStream, forMarshaling->pNext); 12438 } 12439 vkStream->write((VkBool32*)&forMarshaling->srcPremultiplied, sizeof(VkBool32)); 12440 vkStream->write((VkBool32*)&forMarshaling->dstPremultiplied, sizeof(VkBool32)); 12441 vkStream->write((VkBlendOverlapEXT*)&forMarshaling->blendOverlap, sizeof(VkBlendOverlapEXT)); 12442 } 12443 12444 void unmarshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT( 12445 VulkanStreamGuest* vkStream, 12446 VkPipelineColorBlendAdvancedStateCreateInfoEXT* forUnmarshaling) 12447 { 12448 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12449 size_t pNext_size; 12450 pNext_size = vkStream->getBe32(); 12451 if (pNext_size) 12452 { 12453 uint64_t pNext_placeholder; 12454 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12455 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12456 } 12457 vkStream->read((VkBool32*)&forUnmarshaling->srcPremultiplied, sizeof(VkBool32)); 12458 vkStream->read((VkBool32*)&forUnmarshaling->dstPremultiplied, sizeof(VkBool32)); 12459 vkStream->read((VkBlendOverlapEXT*)&forUnmarshaling->blendOverlap, sizeof(VkBlendOverlapEXT)); 12460 } 12461 12462 #endif 12463 #ifdef VK_NV_fragment_coverage_to_color 12464 void marshal_VkPipelineCoverageToColorStateCreateInfoNV( 12465 VulkanStreamGuest* vkStream, 12466 const VkPipelineCoverageToColorStateCreateInfoNV* forMarshaling) 12467 { 12468 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12469 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12470 vkStream->putBe32(pNext_size); 12471 if (pNext_size) 12472 { 12473 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12474 marshal_extension_struct(vkStream, forMarshaling->pNext); 12475 } 12476 vkStream->write((VkPipelineCoverageToColorStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineCoverageToColorStateCreateFlagsNV)); 12477 vkStream->write((VkBool32*)&forMarshaling->coverageToColorEnable, sizeof(VkBool32)); 12478 vkStream->write((uint32_t*)&forMarshaling->coverageToColorLocation, sizeof(uint32_t)); 12479 } 12480 12481 void unmarshal_VkPipelineCoverageToColorStateCreateInfoNV( 12482 VulkanStreamGuest* vkStream, 12483 VkPipelineCoverageToColorStateCreateInfoNV* forUnmarshaling) 12484 { 12485 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12486 size_t pNext_size; 12487 pNext_size = vkStream->getBe32(); 12488 if (pNext_size) 12489 { 12490 uint64_t pNext_placeholder; 12491 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12492 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12493 } 12494 vkStream->read((VkPipelineCoverageToColorStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineCoverageToColorStateCreateFlagsNV)); 12495 vkStream->read((VkBool32*)&forUnmarshaling->coverageToColorEnable, sizeof(VkBool32)); 12496 vkStream->read((uint32_t*)&forUnmarshaling->coverageToColorLocation, sizeof(uint32_t)); 12497 } 12498 12499 #endif 12500 #ifdef VK_NV_framebuffer_mixed_samples 12501 void marshal_VkPipelineCoverageModulationStateCreateInfoNV( 12502 VulkanStreamGuest* vkStream, 12503 const VkPipelineCoverageModulationStateCreateInfoNV* forMarshaling) 12504 { 12505 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12506 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12507 vkStream->putBe32(pNext_size); 12508 if (pNext_size) 12509 { 12510 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12511 marshal_extension_struct(vkStream, forMarshaling->pNext); 12512 } 12513 vkStream->write((VkPipelineCoverageModulationStateCreateFlagsNV*)&forMarshaling->flags, sizeof(VkPipelineCoverageModulationStateCreateFlagsNV)); 12514 vkStream->write((VkCoverageModulationModeNV*)&forMarshaling->coverageModulationMode, sizeof(VkCoverageModulationModeNV)); 12515 vkStream->write((VkBool32*)&forMarshaling->coverageModulationTableEnable, sizeof(VkBool32)); 12516 vkStream->write((uint32_t*)&forMarshaling->coverageModulationTableCount, sizeof(uint32_t)); 12517 // WARNING PTR CHECK 12518 uint64_t cgen_var_344 = (uint64_t)(uintptr_t)forMarshaling->pCoverageModulationTable; 12519 vkStream->putBe64(cgen_var_344); 12520 if (forMarshaling->pCoverageModulationTable) 12521 { 12522 vkStream->write((const float*)forMarshaling->pCoverageModulationTable, forMarshaling->coverageModulationTableCount * sizeof(const float)); 12523 } 12524 } 12525 12526 void unmarshal_VkPipelineCoverageModulationStateCreateInfoNV( 12527 VulkanStreamGuest* vkStream, 12528 VkPipelineCoverageModulationStateCreateInfoNV* forUnmarshaling) 12529 { 12530 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12531 size_t pNext_size; 12532 pNext_size = vkStream->getBe32(); 12533 if (pNext_size) 12534 { 12535 uint64_t pNext_placeholder; 12536 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12537 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12538 } 12539 vkStream->read((VkPipelineCoverageModulationStateCreateFlagsNV*)&forUnmarshaling->flags, sizeof(VkPipelineCoverageModulationStateCreateFlagsNV)); 12540 vkStream->read((VkCoverageModulationModeNV*)&forUnmarshaling->coverageModulationMode, sizeof(VkCoverageModulationModeNV)); 12541 vkStream->read((VkBool32*)&forUnmarshaling->coverageModulationTableEnable, sizeof(VkBool32)); 12542 vkStream->read((uint32_t*)&forUnmarshaling->coverageModulationTableCount, sizeof(uint32_t)); 12543 // WARNING PTR CHECK 12544 const float* check_pCoverageModulationTable; 12545 check_pCoverageModulationTable = (const float*)(uintptr_t)vkStream->getBe64(); 12546 if (forUnmarshaling->pCoverageModulationTable) 12547 { 12548 if (!(check_pCoverageModulationTable)) 12549 { 12550 fprintf(stderr, "fatal: forUnmarshaling->pCoverageModulationTable inconsistent between guest and host\n"); 12551 } 12552 vkStream->read((float*)forUnmarshaling->pCoverageModulationTable, forUnmarshaling->coverageModulationTableCount * sizeof(const float)); 12553 } 12554 } 12555 12556 #endif 12557 #ifdef VK_NV_fill_rectangle 12558 #endif 12559 #ifdef VK_EXT_post_depth_coverage 12560 #endif 12561 #ifdef VK_EXT_validation_cache 12562 void marshal_VkValidationCacheCreateInfoEXT( 12563 VulkanStreamGuest* vkStream, 12564 const VkValidationCacheCreateInfoEXT* forMarshaling) 12565 { 12566 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12567 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12568 vkStream->putBe32(pNext_size); 12569 if (pNext_size) 12570 { 12571 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12572 marshal_extension_struct(vkStream, forMarshaling->pNext); 12573 } 12574 vkStream->write((VkValidationCacheCreateFlagsEXT*)&forMarshaling->flags, sizeof(VkValidationCacheCreateFlagsEXT)); 12575 uint64_t cgen_var_346 = (uint64_t)forMarshaling->initialDataSize; 12576 vkStream->putBe64(cgen_var_346); 12577 vkStream->write((const void*)forMarshaling->pInitialData, forMarshaling->initialDataSize * sizeof(const uint8_t)); 12578 } 12579 12580 void unmarshal_VkValidationCacheCreateInfoEXT( 12581 VulkanStreamGuest* vkStream, 12582 VkValidationCacheCreateInfoEXT* forUnmarshaling) 12583 { 12584 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12585 size_t pNext_size; 12586 pNext_size = vkStream->getBe32(); 12587 if (pNext_size) 12588 { 12589 uint64_t pNext_placeholder; 12590 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12591 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12592 } 12593 vkStream->read((VkValidationCacheCreateFlagsEXT*)&forUnmarshaling->flags, sizeof(VkValidationCacheCreateFlagsEXT)); 12594 forUnmarshaling->initialDataSize = (size_t)vkStream->getBe64(); 12595 vkStream->read((void*)forUnmarshaling->pInitialData, forUnmarshaling->initialDataSize * sizeof(const uint8_t)); 12596 } 12597 12598 void marshal_VkShaderModuleValidationCacheCreateInfoEXT( 12599 VulkanStreamGuest* vkStream, 12600 const VkShaderModuleValidationCacheCreateInfoEXT* forMarshaling) 12601 { 12602 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12603 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12604 vkStream->putBe32(pNext_size); 12605 if (pNext_size) 12606 { 12607 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12608 marshal_extension_struct(vkStream, forMarshaling->pNext); 12609 } 12610 uint64_t cgen_var_348; 12611 vkStream->handleMapping()->mapHandles_VkValidationCacheEXT_u64(&forMarshaling->validationCache, &cgen_var_348, 1); 12612 vkStream->write((uint64_t*)&cgen_var_348, 1 * 8); 12613 } 12614 12615 void unmarshal_VkShaderModuleValidationCacheCreateInfoEXT( 12616 VulkanStreamGuest* vkStream, 12617 VkShaderModuleValidationCacheCreateInfoEXT* forUnmarshaling) 12618 { 12619 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12620 size_t pNext_size; 12621 pNext_size = vkStream->getBe32(); 12622 if (pNext_size) 12623 { 12624 uint64_t pNext_placeholder; 12625 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12626 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12627 } 12628 uint64_t cgen_var_349; 12629 vkStream->read((uint64_t*)&cgen_var_349, 1 * 8); 12630 vkStream->handleMapping()->mapHandles_u64_VkValidationCacheEXT(&cgen_var_349, (VkValidationCacheEXT*)&forUnmarshaling->validationCache, 1); 12631 } 12632 12633 #endif 12634 #ifdef VK_EXT_descriptor_indexing 12635 void marshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT( 12636 VulkanStreamGuest* vkStream, 12637 const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* forMarshaling) 12638 { 12639 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12640 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12641 vkStream->putBe32(pNext_size); 12642 if (pNext_size) 12643 { 12644 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12645 marshal_extension_struct(vkStream, forMarshaling->pNext); 12646 } 12647 vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t)); 12648 vkStream->write((const VkDescriptorBindingFlagsEXT*)forMarshaling->pBindingFlags, forMarshaling->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT)); 12649 } 12650 12651 void unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT( 12652 VulkanStreamGuest* vkStream, 12653 VkDescriptorSetLayoutBindingFlagsCreateInfoEXT* forUnmarshaling) 12654 { 12655 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12656 size_t pNext_size; 12657 pNext_size = vkStream->getBe32(); 12658 if (pNext_size) 12659 { 12660 uint64_t pNext_placeholder; 12661 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12662 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12663 } 12664 vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t)); 12665 vkStream->read((VkDescriptorBindingFlagsEXT*)forUnmarshaling->pBindingFlags, forUnmarshaling->bindingCount * sizeof(const VkDescriptorBindingFlagsEXT)); 12666 } 12667 12668 void marshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT( 12669 VulkanStreamGuest* vkStream, 12670 const VkPhysicalDeviceDescriptorIndexingFeaturesEXT* forMarshaling) 12671 { 12672 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12673 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12674 vkStream->putBe32(pNext_size); 12675 if (pNext_size) 12676 { 12677 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12678 marshal_extension_struct(vkStream, forMarshaling->pNext); 12679 } 12680 vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayDynamicIndexing, sizeof(VkBool32)); 12681 vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayDynamicIndexing, sizeof(VkBool32)); 12682 vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayDynamicIndexing, sizeof(VkBool32)); 12683 vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12684 vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexing, sizeof(VkBool32)); 12685 vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12686 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexing, sizeof(VkBool32)); 12687 vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexing, sizeof(VkBool32)); 12688 vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12689 vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12690 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformBufferUpdateAfterBind, sizeof(VkBool32)); 12691 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingSampledImageUpdateAfterBind, sizeof(VkBool32)); 12692 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageImageUpdateAfterBind, sizeof(VkBool32)); 12693 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageBufferUpdateAfterBind, sizeof(VkBool32)); 12694 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind, sizeof(VkBool32)); 12695 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind, sizeof(VkBool32)); 12696 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUpdateUnusedWhilePending, sizeof(VkBool32)); 12697 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32)); 12698 vkStream->write((VkBool32*)&forMarshaling->descriptorBindingVariableDescriptorCount, sizeof(VkBool32)); 12699 vkStream->write((VkBool32*)&forMarshaling->runtimeDescriptorArray, sizeof(VkBool32)); 12700 } 12701 12702 void unmarshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT( 12703 VulkanStreamGuest* vkStream, 12704 VkPhysicalDeviceDescriptorIndexingFeaturesEXT* forUnmarshaling) 12705 { 12706 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12707 size_t pNext_size; 12708 pNext_size = vkStream->getBe32(); 12709 if (pNext_size) 12710 { 12711 uint64_t pNext_placeholder; 12712 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12713 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12714 } 12715 vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayDynamicIndexing, sizeof(VkBool32)); 12716 vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayDynamicIndexing, sizeof(VkBool32)); 12717 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayDynamicIndexing, sizeof(VkBool32)); 12718 vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12719 vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexing, sizeof(VkBool32)); 12720 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12721 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexing, sizeof(VkBool32)); 12722 vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexing, sizeof(VkBool32)); 12723 vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12724 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayNonUniformIndexing, sizeof(VkBool32)); 12725 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformBufferUpdateAfterBind, sizeof(VkBool32)); 12726 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingSampledImageUpdateAfterBind, sizeof(VkBool32)); 12727 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageImageUpdateAfterBind, sizeof(VkBool32)); 12728 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageBufferUpdateAfterBind, sizeof(VkBool32)); 12729 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind, sizeof(VkBool32)); 12730 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind, sizeof(VkBool32)); 12731 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUpdateUnusedWhilePending, sizeof(VkBool32)); 12732 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32)); 12733 vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingVariableDescriptorCount, sizeof(VkBool32)); 12734 vkStream->read((VkBool32*)&forUnmarshaling->runtimeDescriptorArray, sizeof(VkBool32)); 12735 } 12736 12737 void marshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT( 12738 VulkanStreamGuest* vkStream, 12739 const VkPhysicalDeviceDescriptorIndexingPropertiesEXT* forMarshaling) 12740 { 12741 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12742 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12743 vkStream->putBe32(pNext_size); 12744 if (pNext_size) 12745 { 12746 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12747 marshal_extension_struct(vkStream, forMarshaling->pNext); 12748 } 12749 vkStream->write((uint32_t*)&forMarshaling->maxUpdateAfterBindDescriptorsInAllPools, sizeof(uint32_t)); 12750 vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexingNative, sizeof(VkBool32)); 12751 vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexingNative, sizeof(VkBool32)); 12752 vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexingNative, sizeof(VkBool32)); 12753 vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexingNative, sizeof(VkBool32)); 12754 vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexingNative, sizeof(VkBool32)); 12755 vkStream->write((VkBool32*)&forMarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32)); 12756 vkStream->write((VkBool32*)&forMarshaling->quadDivergentImplicitLod, sizeof(VkBool32)); 12757 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSamplers, sizeof(uint32_t)); 12758 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers, sizeof(uint32_t)); 12759 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers, sizeof(uint32_t)); 12760 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages, sizeof(uint32_t)); 12761 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages, sizeof(uint32_t)); 12762 vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments, sizeof(uint32_t)); 12763 vkStream->write((uint32_t*)&forMarshaling->maxPerStageUpdateAfterBindResources, sizeof(uint32_t)); 12764 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSamplers, sizeof(uint32_t)); 12765 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers, sizeof(uint32_t)); 12766 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, sizeof(uint32_t)); 12767 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers, sizeof(uint32_t)); 12768 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, sizeof(uint32_t)); 12769 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSampledImages, sizeof(uint32_t)); 12770 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageImages, sizeof(uint32_t)); 12771 vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindInputAttachments, sizeof(uint32_t)); 12772 } 12773 12774 void unmarshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT( 12775 VulkanStreamGuest* vkStream, 12776 VkPhysicalDeviceDescriptorIndexingPropertiesEXT* forUnmarshaling) 12777 { 12778 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12779 size_t pNext_size; 12780 pNext_size = vkStream->getBe32(); 12781 if (pNext_size) 12782 { 12783 uint64_t pNext_placeholder; 12784 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12785 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12786 } 12787 vkStream->read((uint32_t*)&forUnmarshaling->maxUpdateAfterBindDescriptorsInAllPools, sizeof(uint32_t)); 12788 vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexingNative, sizeof(VkBool32)); 12789 vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexingNative, sizeof(VkBool32)); 12790 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexingNative, sizeof(VkBool32)); 12791 vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexingNative, sizeof(VkBool32)); 12792 vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexingNative, sizeof(VkBool32)); 12793 vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32)); 12794 vkStream->read((VkBool32*)&forUnmarshaling->quadDivergentImplicitLod, sizeof(VkBool32)); 12795 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSamplers, sizeof(uint32_t)); 12796 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers, sizeof(uint32_t)); 12797 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers, sizeof(uint32_t)); 12798 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages, sizeof(uint32_t)); 12799 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages, sizeof(uint32_t)); 12800 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments, sizeof(uint32_t)); 12801 vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageUpdateAfterBindResources, sizeof(uint32_t)); 12802 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSamplers, sizeof(uint32_t)); 12803 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers, sizeof(uint32_t)); 12804 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic, sizeof(uint32_t)); 12805 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers, sizeof(uint32_t)); 12806 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic, sizeof(uint32_t)); 12807 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSampledImages, sizeof(uint32_t)); 12808 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageImages, sizeof(uint32_t)); 12809 vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindInputAttachments, sizeof(uint32_t)); 12810 } 12811 12812 void marshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT( 12813 VulkanStreamGuest* vkStream, 12814 const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* forMarshaling) 12815 { 12816 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12817 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12818 vkStream->putBe32(pNext_size); 12819 if (pNext_size) 12820 { 12821 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12822 marshal_extension_struct(vkStream, forMarshaling->pNext); 12823 } 12824 vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t)); 12825 vkStream->write((const uint32_t*)forMarshaling->pDescriptorCounts, forMarshaling->descriptorSetCount * sizeof(const uint32_t)); 12826 } 12827 12828 void unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT( 12829 VulkanStreamGuest* vkStream, 12830 VkDescriptorSetVariableDescriptorCountAllocateInfoEXT* forUnmarshaling) 12831 { 12832 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12833 size_t pNext_size; 12834 pNext_size = vkStream->getBe32(); 12835 if (pNext_size) 12836 { 12837 uint64_t pNext_placeholder; 12838 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12839 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12840 } 12841 vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t)); 12842 vkStream->read((uint32_t*)forUnmarshaling->pDescriptorCounts, forUnmarshaling->descriptorSetCount * sizeof(const uint32_t)); 12843 } 12844 12845 void marshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT( 12846 VulkanStreamGuest* vkStream, 12847 const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* forMarshaling) 12848 { 12849 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12850 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12851 vkStream->putBe32(pNext_size); 12852 if (pNext_size) 12853 { 12854 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12855 marshal_extension_struct(vkStream, forMarshaling->pNext); 12856 } 12857 vkStream->write((uint32_t*)&forMarshaling->maxVariableDescriptorCount, sizeof(uint32_t)); 12858 } 12859 12860 void unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT( 12861 VulkanStreamGuest* vkStream, 12862 VkDescriptorSetVariableDescriptorCountLayoutSupportEXT* forUnmarshaling) 12863 { 12864 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12865 size_t pNext_size; 12866 pNext_size = vkStream->getBe32(); 12867 if (pNext_size) 12868 { 12869 uint64_t pNext_placeholder; 12870 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12871 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12872 } 12873 vkStream->read((uint32_t*)&forUnmarshaling->maxVariableDescriptorCount, sizeof(uint32_t)); 12874 } 12875 12876 #endif 12877 #ifdef VK_EXT_shader_viewport_index_layer 12878 #endif 12879 #ifdef VK_EXT_global_priority 12880 void marshal_VkDeviceQueueGlobalPriorityCreateInfoEXT( 12881 VulkanStreamGuest* vkStream, 12882 const VkDeviceQueueGlobalPriorityCreateInfoEXT* forMarshaling) 12883 { 12884 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12885 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12886 vkStream->putBe32(pNext_size); 12887 if (pNext_size) 12888 { 12889 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12890 marshal_extension_struct(vkStream, forMarshaling->pNext); 12891 } 12892 vkStream->write((VkQueueGlobalPriorityEXT*)&forMarshaling->globalPriority, sizeof(VkQueueGlobalPriorityEXT)); 12893 } 12894 12895 void unmarshal_VkDeviceQueueGlobalPriorityCreateInfoEXT( 12896 VulkanStreamGuest* vkStream, 12897 VkDeviceQueueGlobalPriorityCreateInfoEXT* forUnmarshaling) 12898 { 12899 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12900 size_t pNext_size; 12901 pNext_size = vkStream->getBe32(); 12902 if (pNext_size) 12903 { 12904 uint64_t pNext_placeholder; 12905 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12906 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12907 } 12908 vkStream->read((VkQueueGlobalPriorityEXT*)&forUnmarshaling->globalPriority, sizeof(VkQueueGlobalPriorityEXT)); 12909 } 12910 12911 #endif 12912 #ifdef VK_EXT_external_memory_host 12913 void marshal_VkImportMemoryHostPointerInfoEXT( 12914 VulkanStreamGuest* vkStream, 12915 const VkImportMemoryHostPointerInfoEXT* forMarshaling) 12916 { 12917 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12918 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12919 vkStream->putBe32(pNext_size); 12920 if (pNext_size) 12921 { 12922 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 12923 marshal_extension_struct(vkStream, forMarshaling->pNext); 12924 } 12925 vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 12926 // WARNING PTR CHECK 12927 uint64_t cgen_var_350 = (uint64_t)(uintptr_t)forMarshaling->pHostPointer; 12928 vkStream->putBe64(cgen_var_350); 12929 if (forMarshaling->pHostPointer) 12930 { 12931 vkStream->write((void*)forMarshaling->pHostPointer, sizeof(uint8_t)); 12932 } 12933 } 12934 12935 void unmarshal_VkImportMemoryHostPointerInfoEXT( 12936 VulkanStreamGuest* vkStream, 12937 VkImportMemoryHostPointerInfoEXT* forUnmarshaling) 12938 { 12939 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12940 size_t pNext_size; 12941 pNext_size = vkStream->getBe32(); 12942 if (pNext_size) 12943 { 12944 uint64_t pNext_placeholder; 12945 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12946 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12947 } 12948 vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType, sizeof(VkExternalMemoryHandleTypeFlagBits)); 12949 // WARNING PTR CHECK 12950 void* check_pHostPointer; 12951 check_pHostPointer = (void*)(uintptr_t)vkStream->getBe64(); 12952 if (forUnmarshaling->pHostPointer) 12953 { 12954 if (!(check_pHostPointer)) 12955 { 12956 fprintf(stderr, "fatal: forUnmarshaling->pHostPointer inconsistent between guest and host\n"); 12957 } 12958 vkStream->read((void*)forUnmarshaling->pHostPointer, sizeof(uint8_t)); 12959 } 12960 } 12961 12962 void marshal_VkMemoryHostPointerPropertiesEXT( 12963 VulkanStreamGuest* vkStream, 12964 const VkMemoryHostPointerPropertiesEXT* forMarshaling) 12965 { 12966 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12967 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12968 vkStream->putBe32(pNext_size); 12969 if (pNext_size) 12970 { 12971 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 12972 marshal_extension_struct(vkStream, forMarshaling->pNext); 12973 } 12974 vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t)); 12975 } 12976 12977 void unmarshal_VkMemoryHostPointerPropertiesEXT( 12978 VulkanStreamGuest* vkStream, 12979 VkMemoryHostPointerPropertiesEXT* forUnmarshaling) 12980 { 12981 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 12982 size_t pNext_size; 12983 pNext_size = vkStream->getBe32(); 12984 if (pNext_size) 12985 { 12986 uint64_t pNext_placeholder; 12987 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 12988 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 12989 } 12990 vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t)); 12991 } 12992 12993 void marshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT( 12994 VulkanStreamGuest* vkStream, 12995 const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* forMarshaling) 12996 { 12997 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 12998 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 12999 vkStream->putBe32(pNext_size); 13000 if (pNext_size) 13001 { 13002 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13003 marshal_extension_struct(vkStream, forMarshaling->pNext); 13004 } 13005 vkStream->write((VkDeviceSize*)&forMarshaling->minImportedHostPointerAlignment, sizeof(VkDeviceSize)); 13006 } 13007 13008 void unmarshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT( 13009 VulkanStreamGuest* vkStream, 13010 VkPhysicalDeviceExternalMemoryHostPropertiesEXT* forUnmarshaling) 13011 { 13012 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13013 size_t pNext_size; 13014 pNext_size = vkStream->getBe32(); 13015 if (pNext_size) 13016 { 13017 uint64_t pNext_placeholder; 13018 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13019 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13020 } 13021 vkStream->read((VkDeviceSize*)&forUnmarshaling->minImportedHostPointerAlignment, sizeof(VkDeviceSize)); 13022 } 13023 13024 #endif 13025 #ifdef VK_AMD_buffer_marker 13026 #endif 13027 #ifdef VK_AMD_shader_core_properties 13028 void marshal_VkPhysicalDeviceShaderCorePropertiesAMD( 13029 VulkanStreamGuest* vkStream, 13030 const VkPhysicalDeviceShaderCorePropertiesAMD* forMarshaling) 13031 { 13032 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13033 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13034 vkStream->putBe32(pNext_size); 13035 if (pNext_size) 13036 { 13037 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13038 marshal_extension_struct(vkStream, forMarshaling->pNext); 13039 } 13040 vkStream->write((uint32_t*)&forMarshaling->shaderEngineCount, sizeof(uint32_t)); 13041 vkStream->write((uint32_t*)&forMarshaling->shaderArraysPerEngineCount, sizeof(uint32_t)); 13042 vkStream->write((uint32_t*)&forMarshaling->computeUnitsPerShaderArray, sizeof(uint32_t)); 13043 vkStream->write((uint32_t*)&forMarshaling->simdPerComputeUnit, sizeof(uint32_t)); 13044 vkStream->write((uint32_t*)&forMarshaling->wavefrontsPerSimd, sizeof(uint32_t)); 13045 vkStream->write((uint32_t*)&forMarshaling->wavefrontSize, sizeof(uint32_t)); 13046 vkStream->write((uint32_t*)&forMarshaling->sgprsPerSimd, sizeof(uint32_t)); 13047 vkStream->write((uint32_t*)&forMarshaling->minSgprAllocation, sizeof(uint32_t)); 13048 vkStream->write((uint32_t*)&forMarshaling->maxSgprAllocation, sizeof(uint32_t)); 13049 vkStream->write((uint32_t*)&forMarshaling->sgprAllocationGranularity, sizeof(uint32_t)); 13050 vkStream->write((uint32_t*)&forMarshaling->vgprsPerSimd, sizeof(uint32_t)); 13051 vkStream->write((uint32_t*)&forMarshaling->minVgprAllocation, sizeof(uint32_t)); 13052 vkStream->write((uint32_t*)&forMarshaling->maxVgprAllocation, sizeof(uint32_t)); 13053 vkStream->write((uint32_t*)&forMarshaling->vgprAllocationGranularity, sizeof(uint32_t)); 13054 } 13055 13056 void unmarshal_VkPhysicalDeviceShaderCorePropertiesAMD( 13057 VulkanStreamGuest* vkStream, 13058 VkPhysicalDeviceShaderCorePropertiesAMD* forUnmarshaling) 13059 { 13060 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13061 size_t pNext_size; 13062 pNext_size = vkStream->getBe32(); 13063 if (pNext_size) 13064 { 13065 uint64_t pNext_placeholder; 13066 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13067 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13068 } 13069 vkStream->read((uint32_t*)&forUnmarshaling->shaderEngineCount, sizeof(uint32_t)); 13070 vkStream->read((uint32_t*)&forUnmarshaling->shaderArraysPerEngineCount, sizeof(uint32_t)); 13071 vkStream->read((uint32_t*)&forUnmarshaling->computeUnitsPerShaderArray, sizeof(uint32_t)); 13072 vkStream->read((uint32_t*)&forUnmarshaling->simdPerComputeUnit, sizeof(uint32_t)); 13073 vkStream->read((uint32_t*)&forUnmarshaling->wavefrontsPerSimd, sizeof(uint32_t)); 13074 vkStream->read((uint32_t*)&forUnmarshaling->wavefrontSize, sizeof(uint32_t)); 13075 vkStream->read((uint32_t*)&forUnmarshaling->sgprsPerSimd, sizeof(uint32_t)); 13076 vkStream->read((uint32_t*)&forUnmarshaling->minSgprAllocation, sizeof(uint32_t)); 13077 vkStream->read((uint32_t*)&forUnmarshaling->maxSgprAllocation, sizeof(uint32_t)); 13078 vkStream->read((uint32_t*)&forUnmarshaling->sgprAllocationGranularity, sizeof(uint32_t)); 13079 vkStream->read((uint32_t*)&forUnmarshaling->vgprsPerSimd, sizeof(uint32_t)); 13080 vkStream->read((uint32_t*)&forUnmarshaling->minVgprAllocation, sizeof(uint32_t)); 13081 vkStream->read((uint32_t*)&forUnmarshaling->maxVgprAllocation, sizeof(uint32_t)); 13082 vkStream->read((uint32_t*)&forUnmarshaling->vgprAllocationGranularity, sizeof(uint32_t)); 13083 } 13084 13085 #endif 13086 #ifdef VK_EXT_vertex_attribute_divisor 13087 void marshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT( 13088 VulkanStreamGuest* vkStream, 13089 const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* forMarshaling) 13090 { 13091 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13092 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13093 vkStream->putBe32(pNext_size); 13094 if (pNext_size) 13095 { 13096 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13097 marshal_extension_struct(vkStream, forMarshaling->pNext); 13098 } 13099 vkStream->write((uint32_t*)&forMarshaling->maxVertexAttribDivisor, sizeof(uint32_t)); 13100 } 13101 13102 void unmarshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT( 13103 VulkanStreamGuest* vkStream, 13104 VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* forUnmarshaling) 13105 { 13106 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13107 size_t pNext_size; 13108 pNext_size = vkStream->getBe32(); 13109 if (pNext_size) 13110 { 13111 uint64_t pNext_placeholder; 13112 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13113 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13114 } 13115 vkStream->read((uint32_t*)&forUnmarshaling->maxVertexAttribDivisor, sizeof(uint32_t)); 13116 } 13117 13118 void marshal_VkVertexInputBindingDivisorDescriptionEXT( 13119 VulkanStreamGuest* vkStream, 13120 const VkVertexInputBindingDivisorDescriptionEXT* forMarshaling) 13121 { 13122 vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t)); 13123 vkStream->write((uint32_t*)&forMarshaling->divisor, sizeof(uint32_t)); 13124 } 13125 13126 void unmarshal_VkVertexInputBindingDivisorDescriptionEXT( 13127 VulkanStreamGuest* vkStream, 13128 VkVertexInputBindingDivisorDescriptionEXT* forUnmarshaling) 13129 { 13130 vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t)); 13131 vkStream->read((uint32_t*)&forUnmarshaling->divisor, sizeof(uint32_t)); 13132 } 13133 13134 void marshal_VkPipelineVertexInputDivisorStateCreateInfoEXT( 13135 VulkanStreamGuest* vkStream, 13136 const VkPipelineVertexInputDivisorStateCreateInfoEXT* forMarshaling) 13137 { 13138 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13139 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13140 vkStream->putBe32(pNext_size); 13141 if (pNext_size) 13142 { 13143 vkStream->write((const void*)forMarshaling->pNext, sizeof(VkStructureType)); 13144 marshal_extension_struct(vkStream, forMarshaling->pNext); 13145 } 13146 vkStream->write((uint32_t*)&forMarshaling->vertexBindingDivisorCount, sizeof(uint32_t)); 13147 for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDivisorCount; ++i) 13148 { 13149 marshal_VkVertexInputBindingDivisorDescriptionEXT(vkStream, (const VkVertexInputBindingDivisorDescriptionEXT*)(forMarshaling->pVertexBindingDivisors + i)); 13150 } 13151 } 13152 13153 void unmarshal_VkPipelineVertexInputDivisorStateCreateInfoEXT( 13154 VulkanStreamGuest* vkStream, 13155 VkPipelineVertexInputDivisorStateCreateInfoEXT* forUnmarshaling) 13156 { 13157 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13158 size_t pNext_size; 13159 pNext_size = vkStream->getBe32(); 13160 if (pNext_size) 13161 { 13162 uint64_t pNext_placeholder; 13163 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13164 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13165 } 13166 vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDivisorCount, sizeof(uint32_t)); 13167 for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDivisorCount; ++i) 13168 { 13169 unmarshal_VkVertexInputBindingDivisorDescriptionEXT(vkStream, (VkVertexInputBindingDivisorDescriptionEXT*)(forUnmarshaling->pVertexBindingDivisors + i)); 13170 } 13171 } 13172 13173 #endif 13174 #ifdef VK_NV_shader_subgroup_partitioned 13175 #endif 13176 #ifdef VK_NV_device_diagnostic_checkpoints 13177 void marshal_VkQueueFamilyCheckpointPropertiesNV( 13178 VulkanStreamGuest* vkStream, 13179 const VkQueueFamilyCheckpointPropertiesNV* forMarshaling) 13180 { 13181 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13182 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13183 vkStream->putBe32(pNext_size); 13184 if (pNext_size) 13185 { 13186 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13187 marshal_extension_struct(vkStream, forMarshaling->pNext); 13188 } 13189 vkStream->write((VkPipelineStageFlags*)&forMarshaling->checkpointExecutionStageMask, sizeof(VkPipelineStageFlags)); 13190 } 13191 13192 void unmarshal_VkQueueFamilyCheckpointPropertiesNV( 13193 VulkanStreamGuest* vkStream, 13194 VkQueueFamilyCheckpointPropertiesNV* forUnmarshaling) 13195 { 13196 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13197 size_t pNext_size; 13198 pNext_size = vkStream->getBe32(); 13199 if (pNext_size) 13200 { 13201 uint64_t pNext_placeholder; 13202 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13203 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13204 } 13205 vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->checkpointExecutionStageMask, sizeof(VkPipelineStageFlags)); 13206 } 13207 13208 void marshal_VkCheckpointDataNV( 13209 VulkanStreamGuest* vkStream, 13210 const VkCheckpointDataNV* forMarshaling) 13211 { 13212 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13213 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13214 vkStream->putBe32(pNext_size); 13215 if (pNext_size) 13216 { 13217 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13218 marshal_extension_struct(vkStream, forMarshaling->pNext); 13219 } 13220 vkStream->write((VkPipelineStageFlagBits*)&forMarshaling->stage, sizeof(VkPipelineStageFlagBits)); 13221 // WARNING PTR CHECK 13222 uint64_t cgen_var_352 = (uint64_t)(uintptr_t)forMarshaling->pCheckpointMarker; 13223 vkStream->putBe64(cgen_var_352); 13224 if (forMarshaling->pCheckpointMarker) 13225 { 13226 vkStream->write((void*)forMarshaling->pCheckpointMarker, sizeof(uint8_t)); 13227 } 13228 } 13229 13230 void unmarshal_VkCheckpointDataNV( 13231 VulkanStreamGuest* vkStream, 13232 VkCheckpointDataNV* forUnmarshaling) 13233 { 13234 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13235 size_t pNext_size; 13236 pNext_size = vkStream->getBe32(); 13237 if (pNext_size) 13238 { 13239 uint64_t pNext_placeholder; 13240 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13241 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13242 } 13243 vkStream->read((VkPipelineStageFlagBits*)&forUnmarshaling->stage, sizeof(VkPipelineStageFlagBits)); 13244 // WARNING PTR CHECK 13245 void* check_pCheckpointMarker; 13246 check_pCheckpointMarker = (void*)(uintptr_t)vkStream->getBe64(); 13247 if (forUnmarshaling->pCheckpointMarker) 13248 { 13249 if (!(check_pCheckpointMarker)) 13250 { 13251 fprintf(stderr, "fatal: forUnmarshaling->pCheckpointMarker inconsistent between guest and host\n"); 13252 } 13253 vkStream->read((void*)forUnmarshaling->pCheckpointMarker, sizeof(uint8_t)); 13254 } 13255 } 13256 13257 #endif 13258 #ifdef VK_GOOGLE_address_space 13259 #endif 13260 #ifdef VK_GOOGLE_color_buffer 13261 void marshal_VkImportColorBufferGOOGLE( 13262 VulkanStreamGuest* vkStream, 13263 const VkImportColorBufferGOOGLE* forMarshaling) 13264 { 13265 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13266 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13267 vkStream->putBe32(pNext_size); 13268 if (pNext_size) 13269 { 13270 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13271 marshal_extension_struct(vkStream, forMarshaling->pNext); 13272 } 13273 vkStream->write((uint32_t*)&forMarshaling->colorBuffer, sizeof(uint32_t)); 13274 } 13275 13276 void unmarshal_VkImportColorBufferGOOGLE( 13277 VulkanStreamGuest* vkStream, 13278 VkImportColorBufferGOOGLE* forUnmarshaling) 13279 { 13280 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13281 size_t pNext_size; 13282 pNext_size = vkStream->getBe32(); 13283 if (pNext_size) 13284 { 13285 uint64_t pNext_placeholder; 13286 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13287 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13288 } 13289 vkStream->read((uint32_t*)&forUnmarshaling->colorBuffer, sizeof(uint32_t)); 13290 } 13291 13292 void marshal_VkImportPhysicalAddressGOOGLE( 13293 VulkanStreamGuest* vkStream, 13294 const VkImportPhysicalAddressGOOGLE* forMarshaling) 13295 { 13296 vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType)); 13297 size_t pNext_size = goldfish_vk_extension_struct_size(forMarshaling->pNext); 13298 vkStream->putBe32(pNext_size); 13299 if (pNext_size) 13300 { 13301 vkStream->write((void*)forMarshaling->pNext, sizeof(VkStructureType)); 13302 marshal_extension_struct(vkStream, forMarshaling->pNext); 13303 } 13304 vkStream->write((uint64_t*)&forMarshaling->physicalAddress, sizeof(uint64_t)); 13305 vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize)); 13306 vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat)); 13307 vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling)); 13308 vkStream->write((uint32_t*)&forMarshaling->tilingParameter, sizeof(uint32_t)); 13309 } 13310 13311 void unmarshal_VkImportPhysicalAddressGOOGLE( 13312 VulkanStreamGuest* vkStream, 13313 VkImportPhysicalAddressGOOGLE* forUnmarshaling) 13314 { 13315 vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType)); 13316 size_t pNext_size; 13317 pNext_size = vkStream->getBe32(); 13318 if (pNext_size) 13319 { 13320 uint64_t pNext_placeholder; 13321 vkStream->read((void*)(&pNext_placeholder), sizeof(VkStructureType)); 13322 unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext)); 13323 } 13324 vkStream->read((uint64_t*)&forUnmarshaling->physicalAddress, sizeof(uint64_t)); 13325 vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize)); 13326 vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat)); 13327 vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling)); 13328 vkStream->read((uint32_t*)&forUnmarshaling->tilingParameter, sizeof(uint32_t)); 13329 } 13330 13331 #endif 13332 #ifdef VK_GOOGLE_sized_descriptor_update_template 13333 #endif 13334 #ifdef VK_GOOGLE_async_command_buffers 13335 #endif 13336 void marshal_extension_struct( 13337 VulkanStreamGuest* vkStream, 13338 const void* structExtension) 13339 { 13340 if (!structExtension) 13341 { 13342 return; 13343 } 13344 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension); 13345 switch(structType) 13346 { 13347 #ifdef VK_VERSION_1_1 13348 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: 13349 { 13350 marshal_VkPhysicalDeviceSubgroupProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceSubgroupProperties*>(structExtension)); 13351 break; 13352 } 13353 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: 13354 { 13355 marshal_VkPhysicalDevice16BitStorageFeatures(vkStream, reinterpret_cast<const VkPhysicalDevice16BitStorageFeatures*>(structExtension)); 13356 break; 13357 } 13358 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: 13359 { 13360 marshal_VkMemoryDedicatedRequirements(vkStream, reinterpret_cast<const VkMemoryDedicatedRequirements*>(structExtension)); 13361 break; 13362 } 13363 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: 13364 { 13365 marshal_VkMemoryDedicatedAllocateInfo(vkStream, reinterpret_cast<const VkMemoryDedicatedAllocateInfo*>(structExtension)); 13366 break; 13367 } 13368 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: 13369 { 13370 marshal_VkMemoryAllocateFlagsInfo(vkStream, reinterpret_cast<const VkMemoryAllocateFlagsInfo*>(structExtension)); 13371 break; 13372 } 13373 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 13374 { 13375 marshal_VkDeviceGroupRenderPassBeginInfo(vkStream, reinterpret_cast<const VkDeviceGroupRenderPassBeginInfo*>(structExtension)); 13376 break; 13377 } 13378 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 13379 { 13380 marshal_VkDeviceGroupCommandBufferBeginInfo(vkStream, reinterpret_cast<const VkDeviceGroupCommandBufferBeginInfo*>(structExtension)); 13381 break; 13382 } 13383 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: 13384 { 13385 marshal_VkDeviceGroupSubmitInfo(vkStream, reinterpret_cast<const VkDeviceGroupSubmitInfo*>(structExtension)); 13386 break; 13387 } 13388 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: 13389 { 13390 marshal_VkDeviceGroupBindSparseInfo(vkStream, reinterpret_cast<const VkDeviceGroupBindSparseInfo*>(structExtension)); 13391 break; 13392 } 13393 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: 13394 { 13395 marshal_VkBindBufferMemoryDeviceGroupInfo(vkStream, reinterpret_cast<const VkBindBufferMemoryDeviceGroupInfo*>(structExtension)); 13396 break; 13397 } 13398 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: 13399 { 13400 marshal_VkBindImageMemoryDeviceGroupInfo(vkStream, reinterpret_cast<const VkBindImageMemoryDeviceGroupInfo*>(structExtension)); 13401 break; 13402 } 13403 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: 13404 { 13405 marshal_VkDeviceGroupDeviceCreateInfo(vkStream, reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(structExtension)); 13406 break; 13407 } 13408 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: 13409 { 13410 marshal_VkPhysicalDeviceFeatures2(vkStream, reinterpret_cast<const VkPhysicalDeviceFeatures2*>(structExtension)); 13411 break; 13412 } 13413 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: 13414 { 13415 marshal_VkPhysicalDevicePointClippingProperties(vkStream, reinterpret_cast<const VkPhysicalDevicePointClippingProperties*>(structExtension)); 13416 break; 13417 } 13418 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: 13419 { 13420 marshal_VkRenderPassInputAttachmentAspectCreateInfo(vkStream, reinterpret_cast<const VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension)); 13421 break; 13422 } 13423 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: 13424 { 13425 marshal_VkImageViewUsageCreateInfo(vkStream, reinterpret_cast<const VkImageViewUsageCreateInfo*>(structExtension)); 13426 break; 13427 } 13428 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: 13429 { 13430 marshal_VkPipelineTessellationDomainOriginStateCreateInfo(vkStream, reinterpret_cast<const VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension)); 13431 break; 13432 } 13433 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: 13434 { 13435 marshal_VkRenderPassMultiviewCreateInfo(vkStream, reinterpret_cast<const VkRenderPassMultiviewCreateInfo*>(structExtension)); 13436 break; 13437 } 13438 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: 13439 { 13440 marshal_VkPhysicalDeviceMultiviewFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewFeatures*>(structExtension)); 13441 break; 13442 } 13443 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: 13444 { 13445 marshal_VkPhysicalDeviceMultiviewProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewProperties*>(structExtension)); 13446 break; 13447 } 13448 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: 13449 { 13450 marshal_VkPhysicalDeviceVariablePointerFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceVariablePointerFeatures*>(structExtension)); 13451 break; 13452 } 13453 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: 13454 { 13455 marshal_VkPhysicalDeviceProtectedMemoryFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension)); 13456 break; 13457 } 13458 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: 13459 { 13460 marshal_VkPhysicalDeviceProtectedMemoryProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceProtectedMemoryProperties*>(structExtension)); 13461 break; 13462 } 13463 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: 13464 { 13465 marshal_VkProtectedSubmitInfo(vkStream, reinterpret_cast<const VkProtectedSubmitInfo*>(structExtension)); 13466 break; 13467 } 13468 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: 13469 { 13470 marshal_VkSamplerYcbcrConversionInfo(vkStream, reinterpret_cast<const VkSamplerYcbcrConversionInfo*>(structExtension)); 13471 break; 13472 } 13473 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: 13474 { 13475 marshal_VkBindImagePlaneMemoryInfo(vkStream, reinterpret_cast<const VkBindImagePlaneMemoryInfo*>(structExtension)); 13476 break; 13477 } 13478 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: 13479 { 13480 marshal_VkImagePlaneMemoryRequirementsInfo(vkStream, reinterpret_cast<const VkImagePlaneMemoryRequirementsInfo*>(structExtension)); 13481 break; 13482 } 13483 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: 13484 { 13485 marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension)); 13486 break; 13487 } 13488 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: 13489 { 13490 marshal_VkSamplerYcbcrConversionImageFormatProperties(vkStream, reinterpret_cast<const VkSamplerYcbcrConversionImageFormatProperties*>(structExtension)); 13491 break; 13492 } 13493 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: 13494 { 13495 marshal_VkPhysicalDeviceExternalImageFormatInfo(vkStream, reinterpret_cast<const VkPhysicalDeviceExternalImageFormatInfo*>(structExtension)); 13496 break; 13497 } 13498 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: 13499 { 13500 marshal_VkExternalImageFormatProperties(vkStream, reinterpret_cast<const VkExternalImageFormatProperties*>(structExtension)); 13501 break; 13502 } 13503 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: 13504 { 13505 marshal_VkPhysicalDeviceIDProperties(vkStream, reinterpret_cast<const VkPhysicalDeviceIDProperties*>(structExtension)); 13506 break; 13507 } 13508 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: 13509 { 13510 marshal_VkExternalMemoryImageCreateInfo(vkStream, reinterpret_cast<const VkExternalMemoryImageCreateInfo*>(structExtension)); 13511 break; 13512 } 13513 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: 13514 { 13515 marshal_VkExternalMemoryBufferCreateInfo(vkStream, reinterpret_cast<const VkExternalMemoryBufferCreateInfo*>(structExtension)); 13516 break; 13517 } 13518 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: 13519 { 13520 marshal_VkExportMemoryAllocateInfo(vkStream, reinterpret_cast<const VkExportMemoryAllocateInfo*>(structExtension)); 13521 break; 13522 } 13523 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: 13524 { 13525 marshal_VkExportFenceCreateInfo(vkStream, reinterpret_cast<const VkExportFenceCreateInfo*>(structExtension)); 13526 break; 13527 } 13528 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: 13529 { 13530 marshal_VkExportSemaphoreCreateInfo(vkStream, reinterpret_cast<const VkExportSemaphoreCreateInfo*>(structExtension)); 13531 break; 13532 } 13533 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: 13534 { 13535 marshal_VkPhysicalDeviceMaintenance3Properties(vkStream, reinterpret_cast<const VkPhysicalDeviceMaintenance3Properties*>(structExtension)); 13536 break; 13537 } 13538 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES: 13539 { 13540 marshal_VkPhysicalDeviceShaderDrawParameterFeatures(vkStream, reinterpret_cast<const VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension)); 13541 break; 13542 } 13543 #endif 13544 #ifdef VK_KHR_swapchain 13545 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: 13546 { 13547 marshal_VkImageSwapchainCreateInfoKHR(vkStream, reinterpret_cast<const VkImageSwapchainCreateInfoKHR*>(structExtension)); 13548 break; 13549 } 13550 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: 13551 { 13552 marshal_VkBindImageMemorySwapchainInfoKHR(vkStream, reinterpret_cast<const VkBindImageMemorySwapchainInfoKHR*>(structExtension)); 13553 break; 13554 } 13555 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: 13556 { 13557 marshal_VkDeviceGroupPresentInfoKHR(vkStream, reinterpret_cast<const VkDeviceGroupPresentInfoKHR*>(structExtension)); 13558 break; 13559 } 13560 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: 13561 { 13562 marshal_VkDeviceGroupSwapchainCreateInfoKHR(vkStream, reinterpret_cast<const VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension)); 13563 break; 13564 } 13565 #endif 13566 #ifdef VK_KHR_display_swapchain 13567 case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: 13568 { 13569 marshal_VkDisplayPresentInfoKHR(vkStream, reinterpret_cast<const VkDisplayPresentInfoKHR*>(structExtension)); 13570 break; 13571 } 13572 #endif 13573 #ifdef VK_KHR_external_memory_win32 13574 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 13575 { 13576 marshal_VkImportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkImportMemoryWin32HandleInfoKHR*>(structExtension)); 13577 break; 13578 } 13579 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 13580 { 13581 marshal_VkExportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportMemoryWin32HandleInfoKHR*>(structExtension)); 13582 break; 13583 } 13584 #endif 13585 #ifdef VK_KHR_external_memory_fd 13586 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: 13587 { 13588 marshal_VkImportMemoryFdInfoKHR(vkStream, reinterpret_cast<const VkImportMemoryFdInfoKHR*>(structExtension)); 13589 break; 13590 } 13591 #endif 13592 #ifdef VK_KHR_win32_keyed_mutex 13593 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: 13594 { 13595 marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(vkStream, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension)); 13596 break; 13597 } 13598 #endif 13599 #ifdef VK_KHR_external_semaphore_win32 13600 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: 13601 { 13602 marshal_VkExportSemaphoreWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportSemaphoreWin32HandleInfoKHR*>(structExtension)); 13603 break; 13604 } 13605 case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: 13606 { 13607 marshal_VkD3D12FenceSubmitInfoKHR(vkStream, reinterpret_cast<const VkD3D12FenceSubmitInfoKHR*>(structExtension)); 13608 break; 13609 } 13610 #endif 13611 #ifdef VK_KHR_push_descriptor 13612 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: 13613 { 13614 marshal_VkPhysicalDevicePushDescriptorPropertiesKHR(vkStream, reinterpret_cast<const VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension)); 13615 break; 13616 } 13617 #endif 13618 #ifdef VK_KHR_incremental_present 13619 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: 13620 { 13621 marshal_VkPresentRegionsKHR(vkStream, reinterpret_cast<const VkPresentRegionsKHR*>(structExtension)); 13622 break; 13623 } 13624 #endif 13625 #ifdef VK_KHR_shared_presentable_image 13626 case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: 13627 { 13628 marshal_VkSharedPresentSurfaceCapabilitiesKHR(vkStream, reinterpret_cast<const VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension)); 13629 break; 13630 } 13631 #endif 13632 #ifdef VK_KHR_external_fence_win32 13633 case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: 13634 { 13635 marshal_VkExportFenceWin32HandleInfoKHR(vkStream, reinterpret_cast<const VkExportFenceWin32HandleInfoKHR*>(structExtension)); 13636 break; 13637 } 13638 #endif 13639 #ifdef VK_KHR_image_format_list 13640 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: 13641 { 13642 marshal_VkImageFormatListCreateInfoKHR(vkStream, reinterpret_cast<const VkImageFormatListCreateInfoKHR*>(structExtension)); 13643 break; 13644 } 13645 #endif 13646 #ifdef VK_KHR_8bit_storage 13647 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: 13648 { 13649 marshal_VkPhysicalDevice8BitStorageFeaturesKHR(vkStream, reinterpret_cast<const VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension)); 13650 break; 13651 } 13652 #endif 13653 #ifdef VK_ANDROID_native_buffer 13654 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: 13655 { 13656 marshal_VkNativeBufferANDROID(vkStream, reinterpret_cast<const VkNativeBufferANDROID*>(structExtension)); 13657 break; 13658 } 13659 #endif 13660 #ifdef VK_EXT_debug_report 13661 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: 13662 { 13663 marshal_VkDebugReportCallbackCreateInfoEXT(vkStream, reinterpret_cast<const VkDebugReportCallbackCreateInfoEXT*>(structExtension)); 13664 break; 13665 } 13666 #endif 13667 #ifdef VK_AMD_rasterization_order 13668 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: 13669 { 13670 marshal_VkPipelineRasterizationStateRasterizationOrderAMD(vkStream, reinterpret_cast<const VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension)); 13671 break; 13672 } 13673 #endif 13674 #ifdef VK_NV_dedicated_allocation 13675 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: 13676 { 13677 marshal_VkDedicatedAllocationImageCreateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationImageCreateInfoNV*>(structExtension)); 13678 break; 13679 } 13680 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: 13681 { 13682 marshal_VkDedicatedAllocationBufferCreateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationBufferCreateInfoNV*>(structExtension)); 13683 break; 13684 } 13685 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: 13686 { 13687 marshal_VkDedicatedAllocationMemoryAllocateInfoNV(vkStream, reinterpret_cast<const VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension)); 13688 break; 13689 } 13690 #endif 13691 #ifdef VK_AMD_texture_gather_bias_lod 13692 case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: 13693 { 13694 marshal_VkTextureLODGatherFormatPropertiesAMD(vkStream, reinterpret_cast<const VkTextureLODGatherFormatPropertiesAMD*>(structExtension)); 13695 break; 13696 } 13697 #endif 13698 #ifdef VK_NV_external_memory 13699 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: 13700 { 13701 marshal_VkExternalMemoryImageCreateInfoNV(vkStream, reinterpret_cast<const VkExternalMemoryImageCreateInfoNV*>(structExtension)); 13702 break; 13703 } 13704 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: 13705 { 13706 marshal_VkExportMemoryAllocateInfoNV(vkStream, reinterpret_cast<const VkExportMemoryAllocateInfoNV*>(structExtension)); 13707 break; 13708 } 13709 #endif 13710 #ifdef VK_NV_external_memory_win32 13711 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: 13712 { 13713 marshal_VkImportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<const VkImportMemoryWin32HandleInfoNV*>(structExtension)); 13714 break; 13715 } 13716 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: 13717 { 13718 marshal_VkExportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<const VkExportMemoryWin32HandleInfoNV*>(structExtension)); 13719 break; 13720 } 13721 #endif 13722 #ifdef VK_NV_win32_keyed_mutex 13723 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: 13724 { 13725 marshal_VkWin32KeyedMutexAcquireReleaseInfoNV(vkStream, reinterpret_cast<const VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension)); 13726 break; 13727 } 13728 #endif 13729 #ifdef VK_EXT_validation_flags 13730 case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: 13731 { 13732 marshal_VkValidationFlagsEXT(vkStream, reinterpret_cast<const VkValidationFlagsEXT*>(structExtension)); 13733 break; 13734 } 13735 #endif 13736 #ifdef VK_EXT_conditional_rendering 13737 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: 13738 { 13739 marshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension)); 13740 break; 13741 } 13742 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: 13743 { 13744 marshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(vkStream, reinterpret_cast<const VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension)); 13745 break; 13746 } 13747 #endif 13748 #ifdef VK_NV_clip_space_w_scaling 13749 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: 13750 { 13751 marshal_VkPipelineViewportWScalingStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension)); 13752 break; 13753 } 13754 #endif 13755 #ifdef VK_EXT_display_control 13756 case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: 13757 { 13758 marshal_VkSwapchainCounterCreateInfoEXT(vkStream, reinterpret_cast<const VkSwapchainCounterCreateInfoEXT*>(structExtension)); 13759 break; 13760 } 13761 #endif 13762 #ifdef VK_GOOGLE_display_timing 13763 case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: 13764 { 13765 marshal_VkPresentTimesInfoGOOGLE(vkStream, reinterpret_cast<const VkPresentTimesInfoGOOGLE*>(structExtension)); 13766 break; 13767 } 13768 #endif 13769 #ifdef VK_NVX_multiview_per_view_attributes 13770 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: 13771 { 13772 marshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(vkStream, reinterpret_cast<const VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension)); 13773 break; 13774 } 13775 #endif 13776 #ifdef VK_NV_viewport_swizzle 13777 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: 13778 { 13779 marshal_VkPipelineViewportSwizzleStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension)); 13780 break; 13781 } 13782 #endif 13783 #ifdef VK_EXT_discard_rectangles 13784 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: 13785 { 13786 marshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension)); 13787 break; 13788 } 13789 case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: 13790 { 13791 marshal_VkPipelineDiscardRectangleStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension)); 13792 break; 13793 } 13794 #endif 13795 #ifdef VK_EXT_conservative_rasterization 13796 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: 13797 { 13798 marshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension)); 13799 break; 13800 } 13801 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: 13802 { 13803 marshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension)); 13804 break; 13805 } 13806 #endif 13807 #ifdef VK_EXT_debug_utils 13808 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: 13809 { 13810 marshal_VkDebugUtilsMessengerCreateInfoEXT(vkStream, reinterpret_cast<const VkDebugUtilsMessengerCreateInfoEXT*>(structExtension)); 13811 break; 13812 } 13813 #endif 13814 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 13815 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: 13816 { 13817 marshal_VkAndroidHardwareBufferUsageANDROID(vkStream, reinterpret_cast<const VkAndroidHardwareBufferUsageANDROID*>(structExtension)); 13818 break; 13819 } 13820 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: 13821 { 13822 marshal_VkAndroidHardwareBufferFormatPropertiesANDROID(vkStream, reinterpret_cast<const VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension)); 13823 break; 13824 } 13825 case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: 13826 { 13827 marshal_VkImportAndroidHardwareBufferInfoANDROID(vkStream, reinterpret_cast<const VkImportAndroidHardwareBufferInfoANDROID*>(structExtension)); 13828 break; 13829 } 13830 case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: 13831 { 13832 marshal_VkExternalFormatANDROID(vkStream, reinterpret_cast<const VkExternalFormatANDROID*>(structExtension)); 13833 break; 13834 } 13835 #endif 13836 #ifdef VK_EXT_sampler_filter_minmax 13837 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: 13838 { 13839 marshal_VkSamplerReductionModeCreateInfoEXT(vkStream, reinterpret_cast<const VkSamplerReductionModeCreateInfoEXT*>(structExtension)); 13840 break; 13841 } 13842 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: 13843 { 13844 marshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension)); 13845 break; 13846 } 13847 #endif 13848 #ifdef VK_EXT_sample_locations 13849 case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: 13850 { 13851 marshal_VkSampleLocationsInfoEXT(vkStream, reinterpret_cast<const VkSampleLocationsInfoEXT*>(structExtension)); 13852 break; 13853 } 13854 case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: 13855 { 13856 marshal_VkRenderPassSampleLocationsBeginInfoEXT(vkStream, reinterpret_cast<const VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension)); 13857 break; 13858 } 13859 case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: 13860 { 13861 marshal_VkPipelineSampleLocationsStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension)); 13862 break; 13863 } 13864 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: 13865 { 13866 marshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension)); 13867 break; 13868 } 13869 #endif 13870 #ifdef VK_EXT_blend_operation_advanced 13871 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: 13872 { 13873 marshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension)); 13874 break; 13875 } 13876 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: 13877 { 13878 marshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension)); 13879 break; 13880 } 13881 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: 13882 { 13883 marshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension)); 13884 break; 13885 } 13886 #endif 13887 #ifdef VK_NV_fragment_coverage_to_color 13888 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: 13889 { 13890 marshal_VkPipelineCoverageToColorStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension)); 13891 break; 13892 } 13893 #endif 13894 #ifdef VK_NV_framebuffer_mixed_samples 13895 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: 13896 { 13897 marshal_VkPipelineCoverageModulationStateCreateInfoNV(vkStream, reinterpret_cast<const VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension)); 13898 break; 13899 } 13900 #endif 13901 #ifdef VK_EXT_validation_cache 13902 case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: 13903 { 13904 marshal_VkShaderModuleValidationCacheCreateInfoEXT(vkStream, reinterpret_cast<const VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension)); 13905 break; 13906 } 13907 #endif 13908 #ifdef VK_EXT_descriptor_indexing 13909 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: 13910 { 13911 marshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(vkStream, reinterpret_cast<const VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension)); 13912 break; 13913 } 13914 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: 13915 { 13916 marshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension)); 13917 break; 13918 } 13919 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: 13920 { 13921 marshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension)); 13922 break; 13923 } 13924 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: 13925 { 13926 marshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(vkStream, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension)); 13927 break; 13928 } 13929 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: 13930 { 13931 marshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(vkStream, reinterpret_cast<const VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension)); 13932 break; 13933 } 13934 #endif 13935 #ifdef VK_EXT_global_priority 13936 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: 13937 { 13938 marshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(vkStream, reinterpret_cast<const VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension)); 13939 break; 13940 } 13941 #endif 13942 #ifdef VK_EXT_external_memory_host 13943 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: 13944 { 13945 marshal_VkImportMemoryHostPointerInfoEXT(vkStream, reinterpret_cast<const VkImportMemoryHostPointerInfoEXT*>(structExtension)); 13946 break; 13947 } 13948 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: 13949 { 13950 marshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension)); 13951 break; 13952 } 13953 #endif 13954 #ifdef VK_AMD_shader_core_properties 13955 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: 13956 { 13957 marshal_VkPhysicalDeviceShaderCorePropertiesAMD(vkStream, reinterpret_cast<const VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension)); 13958 break; 13959 } 13960 #endif 13961 #ifdef VK_EXT_vertex_attribute_divisor 13962 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: 13963 { 13964 marshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(vkStream, reinterpret_cast<const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension)); 13965 break; 13966 } 13967 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: 13968 { 13969 marshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(vkStream, reinterpret_cast<const VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension)); 13970 break; 13971 } 13972 #endif 13973 #ifdef VK_NV_device_diagnostic_checkpoints 13974 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: 13975 { 13976 marshal_VkQueueFamilyCheckpointPropertiesNV(vkStream, reinterpret_cast<const VkQueueFamilyCheckpointPropertiesNV*>(structExtension)); 13977 break; 13978 } 13979 #endif 13980 #ifdef VK_GOOGLE_color_buffer 13981 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: 13982 { 13983 marshal_VkImportColorBufferGOOGLE(vkStream, reinterpret_cast<const VkImportColorBufferGOOGLE*>(structExtension)); 13984 break; 13985 } 13986 case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE: 13987 { 13988 marshal_VkImportPhysicalAddressGOOGLE(vkStream, reinterpret_cast<const VkImportPhysicalAddressGOOGLE*>(structExtension)); 13989 break; 13990 } 13991 #endif 13992 default: 13993 { 13994 return; 13995 } 13996 } 13997 } 13998 13999 void unmarshal_extension_struct( 14000 VulkanStreamGuest* vkStream, 14001 void* structExtension_out) 14002 { 14003 if (!structExtension_out) 14004 { 14005 return; 14006 } 14007 uint32_t structType = (uint32_t)goldfish_vk_struct_type(structExtension_out); 14008 switch(structType) 14009 { 14010 #ifdef VK_VERSION_1_1 14011 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES: 14012 { 14013 unmarshal_VkPhysicalDeviceSubgroupProperties(vkStream, reinterpret_cast<VkPhysicalDeviceSubgroupProperties*>(structExtension_out)); 14014 break; 14015 } 14016 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: 14017 { 14018 unmarshal_VkPhysicalDevice16BitStorageFeatures(vkStream, reinterpret_cast<VkPhysicalDevice16BitStorageFeatures*>(structExtension_out)); 14019 break; 14020 } 14021 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: 14022 { 14023 unmarshal_VkMemoryDedicatedRequirements(vkStream, reinterpret_cast<VkMemoryDedicatedRequirements*>(structExtension_out)); 14024 break; 14025 } 14026 case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: 14027 { 14028 unmarshal_VkMemoryDedicatedAllocateInfo(vkStream, reinterpret_cast<VkMemoryDedicatedAllocateInfo*>(structExtension_out)); 14029 break; 14030 } 14031 case VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO: 14032 { 14033 unmarshal_VkMemoryAllocateFlagsInfo(vkStream, reinterpret_cast<VkMemoryAllocateFlagsInfo*>(structExtension_out)); 14034 break; 14035 } 14036 case VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO: 14037 { 14038 unmarshal_VkDeviceGroupRenderPassBeginInfo(vkStream, reinterpret_cast<VkDeviceGroupRenderPassBeginInfo*>(structExtension_out)); 14039 break; 14040 } 14041 case VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO: 14042 { 14043 unmarshal_VkDeviceGroupCommandBufferBeginInfo(vkStream, reinterpret_cast<VkDeviceGroupCommandBufferBeginInfo*>(structExtension_out)); 14044 break; 14045 } 14046 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO: 14047 { 14048 unmarshal_VkDeviceGroupSubmitInfo(vkStream, reinterpret_cast<VkDeviceGroupSubmitInfo*>(structExtension_out)); 14049 break; 14050 } 14051 case VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO: 14052 { 14053 unmarshal_VkDeviceGroupBindSparseInfo(vkStream, reinterpret_cast<VkDeviceGroupBindSparseInfo*>(structExtension_out)); 14054 break; 14055 } 14056 case VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO: 14057 { 14058 unmarshal_VkBindBufferMemoryDeviceGroupInfo(vkStream, reinterpret_cast<VkBindBufferMemoryDeviceGroupInfo*>(structExtension_out)); 14059 break; 14060 } 14061 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO: 14062 { 14063 unmarshal_VkBindImageMemoryDeviceGroupInfo(vkStream, reinterpret_cast<VkBindImageMemoryDeviceGroupInfo*>(structExtension_out)); 14064 break; 14065 } 14066 case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: 14067 { 14068 unmarshal_VkDeviceGroupDeviceCreateInfo(vkStream, reinterpret_cast<VkDeviceGroupDeviceCreateInfo*>(structExtension_out)); 14069 break; 14070 } 14071 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2: 14072 { 14073 unmarshal_VkPhysicalDeviceFeatures2(vkStream, reinterpret_cast<VkPhysicalDeviceFeatures2*>(structExtension_out)); 14074 break; 14075 } 14076 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES: 14077 { 14078 unmarshal_VkPhysicalDevicePointClippingProperties(vkStream, reinterpret_cast<VkPhysicalDevicePointClippingProperties*>(structExtension_out)); 14079 break; 14080 } 14081 case VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO: 14082 { 14083 unmarshal_VkRenderPassInputAttachmentAspectCreateInfo(vkStream, reinterpret_cast<VkRenderPassInputAttachmentAspectCreateInfo*>(structExtension_out)); 14084 break; 14085 } 14086 case VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO: 14087 { 14088 unmarshal_VkImageViewUsageCreateInfo(vkStream, reinterpret_cast<VkImageViewUsageCreateInfo*>(structExtension_out)); 14089 break; 14090 } 14091 case VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO: 14092 { 14093 unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo(vkStream, reinterpret_cast<VkPipelineTessellationDomainOriginStateCreateInfo*>(structExtension_out)); 14094 break; 14095 } 14096 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO: 14097 { 14098 unmarshal_VkRenderPassMultiviewCreateInfo(vkStream, reinterpret_cast<VkRenderPassMultiviewCreateInfo*>(structExtension_out)); 14099 break; 14100 } 14101 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES: 14102 { 14103 unmarshal_VkPhysicalDeviceMultiviewFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewFeatures*>(structExtension_out)); 14104 break; 14105 } 14106 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES: 14107 { 14108 unmarshal_VkPhysicalDeviceMultiviewProperties(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewProperties*>(structExtension_out)); 14109 break; 14110 } 14111 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES: 14112 { 14113 unmarshal_VkPhysicalDeviceVariablePointerFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceVariablePointerFeatures*>(structExtension_out)); 14114 break; 14115 } 14116 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES: 14117 { 14118 unmarshal_VkPhysicalDeviceProtectedMemoryFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceProtectedMemoryFeatures*>(structExtension_out)); 14119 break; 14120 } 14121 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES: 14122 { 14123 unmarshal_VkPhysicalDeviceProtectedMemoryProperties(vkStream, reinterpret_cast<VkPhysicalDeviceProtectedMemoryProperties*>(structExtension_out)); 14124 break; 14125 } 14126 case VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO: 14127 { 14128 unmarshal_VkProtectedSubmitInfo(vkStream, reinterpret_cast<VkProtectedSubmitInfo*>(structExtension_out)); 14129 break; 14130 } 14131 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: 14132 { 14133 unmarshal_VkSamplerYcbcrConversionInfo(vkStream, reinterpret_cast<VkSamplerYcbcrConversionInfo*>(structExtension_out)); 14134 break; 14135 } 14136 case VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO: 14137 { 14138 unmarshal_VkBindImagePlaneMemoryInfo(vkStream, reinterpret_cast<VkBindImagePlaneMemoryInfo*>(structExtension_out)); 14139 break; 14140 } 14141 case VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO: 14142 { 14143 unmarshal_VkImagePlaneMemoryRequirementsInfo(vkStream, reinterpret_cast<VkImagePlaneMemoryRequirementsInfo*>(structExtension_out)); 14144 break; 14145 } 14146 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: 14147 { 14148 unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceSamplerYcbcrConversionFeatures*>(structExtension_out)); 14149 break; 14150 } 14151 case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES: 14152 { 14153 unmarshal_VkSamplerYcbcrConversionImageFormatProperties(vkStream, reinterpret_cast<VkSamplerYcbcrConversionImageFormatProperties*>(structExtension_out)); 14154 break; 14155 } 14156 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO: 14157 { 14158 unmarshal_VkPhysicalDeviceExternalImageFormatInfo(vkStream, reinterpret_cast<VkPhysicalDeviceExternalImageFormatInfo*>(structExtension_out)); 14159 break; 14160 } 14161 case VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES: 14162 { 14163 unmarshal_VkExternalImageFormatProperties(vkStream, reinterpret_cast<VkExternalImageFormatProperties*>(structExtension_out)); 14164 break; 14165 } 14166 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES: 14167 { 14168 unmarshal_VkPhysicalDeviceIDProperties(vkStream, reinterpret_cast<VkPhysicalDeviceIDProperties*>(structExtension_out)); 14169 break; 14170 } 14171 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO: 14172 { 14173 unmarshal_VkExternalMemoryImageCreateInfo(vkStream, reinterpret_cast<VkExternalMemoryImageCreateInfo*>(structExtension_out)); 14174 break; 14175 } 14176 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO: 14177 { 14178 unmarshal_VkExternalMemoryBufferCreateInfo(vkStream, reinterpret_cast<VkExternalMemoryBufferCreateInfo*>(structExtension_out)); 14179 break; 14180 } 14181 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO: 14182 { 14183 unmarshal_VkExportMemoryAllocateInfo(vkStream, reinterpret_cast<VkExportMemoryAllocateInfo*>(structExtension_out)); 14184 break; 14185 } 14186 case VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO: 14187 { 14188 unmarshal_VkExportFenceCreateInfo(vkStream, reinterpret_cast<VkExportFenceCreateInfo*>(structExtension_out)); 14189 break; 14190 } 14191 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO: 14192 { 14193 unmarshal_VkExportSemaphoreCreateInfo(vkStream, reinterpret_cast<VkExportSemaphoreCreateInfo*>(structExtension_out)); 14194 break; 14195 } 14196 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES: 14197 { 14198 unmarshal_VkPhysicalDeviceMaintenance3Properties(vkStream, reinterpret_cast<VkPhysicalDeviceMaintenance3Properties*>(structExtension_out)); 14199 break; 14200 } 14201 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES: 14202 { 14203 unmarshal_VkPhysicalDeviceShaderDrawParameterFeatures(vkStream, reinterpret_cast<VkPhysicalDeviceShaderDrawParameterFeatures*>(structExtension_out)); 14204 break; 14205 } 14206 #endif 14207 #ifdef VK_KHR_swapchain 14208 case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: 14209 { 14210 unmarshal_VkImageSwapchainCreateInfoKHR(vkStream, reinterpret_cast<VkImageSwapchainCreateInfoKHR*>(structExtension_out)); 14211 break; 14212 } 14213 case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: 14214 { 14215 unmarshal_VkBindImageMemorySwapchainInfoKHR(vkStream, reinterpret_cast<VkBindImageMemorySwapchainInfoKHR*>(structExtension_out)); 14216 break; 14217 } 14218 case VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR: 14219 { 14220 unmarshal_VkDeviceGroupPresentInfoKHR(vkStream, reinterpret_cast<VkDeviceGroupPresentInfoKHR*>(structExtension_out)); 14221 break; 14222 } 14223 case VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR: 14224 { 14225 unmarshal_VkDeviceGroupSwapchainCreateInfoKHR(vkStream, reinterpret_cast<VkDeviceGroupSwapchainCreateInfoKHR*>(structExtension_out)); 14226 break; 14227 } 14228 #endif 14229 #ifdef VK_KHR_display_swapchain 14230 case VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR: 14231 { 14232 unmarshal_VkDisplayPresentInfoKHR(vkStream, reinterpret_cast<VkDisplayPresentInfoKHR*>(structExtension_out)); 14233 break; 14234 } 14235 #endif 14236 #ifdef VK_KHR_external_memory_win32 14237 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 14238 { 14239 unmarshal_VkImportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<VkImportMemoryWin32HandleInfoKHR*>(structExtension_out)); 14240 break; 14241 } 14242 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: 14243 { 14244 unmarshal_VkExportMemoryWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportMemoryWin32HandleInfoKHR*>(structExtension_out)); 14245 break; 14246 } 14247 #endif 14248 #ifdef VK_KHR_external_memory_fd 14249 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR: 14250 { 14251 unmarshal_VkImportMemoryFdInfoKHR(vkStream, reinterpret_cast<VkImportMemoryFdInfoKHR*>(structExtension_out)); 14252 break; 14253 } 14254 #endif 14255 #ifdef VK_KHR_win32_keyed_mutex 14256 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: 14257 { 14258 unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(vkStream, reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoKHR*>(structExtension_out)); 14259 break; 14260 } 14261 #endif 14262 #ifdef VK_KHR_external_semaphore_win32 14263 case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: 14264 { 14265 unmarshal_VkExportSemaphoreWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportSemaphoreWin32HandleInfoKHR*>(structExtension_out)); 14266 break; 14267 } 14268 case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: 14269 { 14270 unmarshal_VkD3D12FenceSubmitInfoKHR(vkStream, reinterpret_cast<VkD3D12FenceSubmitInfoKHR*>(structExtension_out)); 14271 break; 14272 } 14273 #endif 14274 #ifdef VK_KHR_push_descriptor 14275 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR: 14276 { 14277 unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR(vkStream, reinterpret_cast<VkPhysicalDevicePushDescriptorPropertiesKHR*>(structExtension_out)); 14278 break; 14279 } 14280 #endif 14281 #ifdef VK_KHR_incremental_present 14282 case VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR: 14283 { 14284 unmarshal_VkPresentRegionsKHR(vkStream, reinterpret_cast<VkPresentRegionsKHR*>(structExtension_out)); 14285 break; 14286 } 14287 #endif 14288 #ifdef VK_KHR_shared_presentable_image 14289 case VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR: 14290 { 14291 unmarshal_VkSharedPresentSurfaceCapabilitiesKHR(vkStream, reinterpret_cast<VkSharedPresentSurfaceCapabilitiesKHR*>(structExtension_out)); 14292 break; 14293 } 14294 #endif 14295 #ifdef VK_KHR_external_fence_win32 14296 case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: 14297 { 14298 unmarshal_VkExportFenceWin32HandleInfoKHR(vkStream, reinterpret_cast<VkExportFenceWin32HandleInfoKHR*>(structExtension_out)); 14299 break; 14300 } 14301 #endif 14302 #ifdef VK_KHR_image_format_list 14303 case VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR: 14304 { 14305 unmarshal_VkImageFormatListCreateInfoKHR(vkStream, reinterpret_cast<VkImageFormatListCreateInfoKHR*>(structExtension_out)); 14306 break; 14307 } 14308 #endif 14309 #ifdef VK_KHR_8bit_storage 14310 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: 14311 { 14312 unmarshal_VkPhysicalDevice8BitStorageFeaturesKHR(vkStream, reinterpret_cast<VkPhysicalDevice8BitStorageFeaturesKHR*>(structExtension_out)); 14313 break; 14314 } 14315 #endif 14316 #ifdef VK_ANDROID_native_buffer 14317 case VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID: 14318 { 14319 unmarshal_VkNativeBufferANDROID(vkStream, reinterpret_cast<VkNativeBufferANDROID*>(structExtension_out)); 14320 break; 14321 } 14322 #endif 14323 #ifdef VK_EXT_debug_report 14324 case VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT: 14325 { 14326 unmarshal_VkDebugReportCallbackCreateInfoEXT(vkStream, reinterpret_cast<VkDebugReportCallbackCreateInfoEXT*>(structExtension_out)); 14327 break; 14328 } 14329 #endif 14330 #ifdef VK_AMD_rasterization_order 14331 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: 14332 { 14333 unmarshal_VkPipelineRasterizationStateRasterizationOrderAMD(vkStream, reinterpret_cast<VkPipelineRasterizationStateRasterizationOrderAMD*>(structExtension_out)); 14334 break; 14335 } 14336 #endif 14337 #ifdef VK_NV_dedicated_allocation 14338 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV: 14339 { 14340 unmarshal_VkDedicatedAllocationImageCreateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationImageCreateInfoNV*>(structExtension_out)); 14341 break; 14342 } 14343 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV: 14344 { 14345 unmarshal_VkDedicatedAllocationBufferCreateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationBufferCreateInfoNV*>(structExtension_out)); 14346 break; 14347 } 14348 case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: 14349 { 14350 unmarshal_VkDedicatedAllocationMemoryAllocateInfoNV(vkStream, reinterpret_cast<VkDedicatedAllocationMemoryAllocateInfoNV*>(structExtension_out)); 14351 break; 14352 } 14353 #endif 14354 #ifdef VK_AMD_texture_gather_bias_lod 14355 case VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD: 14356 { 14357 unmarshal_VkTextureLODGatherFormatPropertiesAMD(vkStream, reinterpret_cast<VkTextureLODGatherFormatPropertiesAMD*>(structExtension_out)); 14358 break; 14359 } 14360 #endif 14361 #ifdef VK_NV_external_memory 14362 case VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV: 14363 { 14364 unmarshal_VkExternalMemoryImageCreateInfoNV(vkStream, reinterpret_cast<VkExternalMemoryImageCreateInfoNV*>(structExtension_out)); 14365 break; 14366 } 14367 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV: 14368 { 14369 unmarshal_VkExportMemoryAllocateInfoNV(vkStream, reinterpret_cast<VkExportMemoryAllocateInfoNV*>(structExtension_out)); 14370 break; 14371 } 14372 #endif 14373 #ifdef VK_NV_external_memory_win32 14374 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: 14375 { 14376 unmarshal_VkImportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<VkImportMemoryWin32HandleInfoNV*>(structExtension_out)); 14377 break; 14378 } 14379 case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: 14380 { 14381 unmarshal_VkExportMemoryWin32HandleInfoNV(vkStream, reinterpret_cast<VkExportMemoryWin32HandleInfoNV*>(structExtension_out)); 14382 break; 14383 } 14384 #endif 14385 #ifdef VK_NV_win32_keyed_mutex 14386 case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: 14387 { 14388 unmarshal_VkWin32KeyedMutexAcquireReleaseInfoNV(vkStream, reinterpret_cast<VkWin32KeyedMutexAcquireReleaseInfoNV*>(structExtension_out)); 14389 break; 14390 } 14391 #endif 14392 #ifdef VK_EXT_validation_flags 14393 case VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT: 14394 { 14395 unmarshal_VkValidationFlagsEXT(vkStream, reinterpret_cast<VkValidationFlagsEXT*>(structExtension_out)); 14396 break; 14397 } 14398 #endif 14399 #ifdef VK_EXT_conditional_rendering 14400 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: 14401 { 14402 unmarshal_VkPhysicalDeviceConditionalRenderingFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceConditionalRenderingFeaturesEXT*>(structExtension_out)); 14403 break; 14404 } 14405 case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: 14406 { 14407 unmarshal_VkCommandBufferInheritanceConditionalRenderingInfoEXT(vkStream, reinterpret_cast<VkCommandBufferInheritanceConditionalRenderingInfoEXT*>(structExtension_out)); 14408 break; 14409 } 14410 #endif 14411 #ifdef VK_NV_clip_space_w_scaling 14412 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: 14413 { 14414 unmarshal_VkPipelineViewportWScalingStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineViewportWScalingStateCreateInfoNV*>(structExtension_out)); 14415 break; 14416 } 14417 #endif 14418 #ifdef VK_EXT_display_control 14419 case VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT: 14420 { 14421 unmarshal_VkSwapchainCounterCreateInfoEXT(vkStream, reinterpret_cast<VkSwapchainCounterCreateInfoEXT*>(structExtension_out)); 14422 break; 14423 } 14424 #endif 14425 #ifdef VK_GOOGLE_display_timing 14426 case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: 14427 { 14428 unmarshal_VkPresentTimesInfoGOOGLE(vkStream, reinterpret_cast<VkPresentTimesInfoGOOGLE*>(structExtension_out)); 14429 break; 14430 } 14431 #endif 14432 #ifdef VK_NVX_multiview_per_view_attributes 14433 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: 14434 { 14435 unmarshal_VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX(vkStream, reinterpret_cast<VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX*>(structExtension_out)); 14436 break; 14437 } 14438 #endif 14439 #ifdef VK_NV_viewport_swizzle 14440 case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: 14441 { 14442 unmarshal_VkPipelineViewportSwizzleStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineViewportSwizzleStateCreateInfoNV*>(structExtension_out)); 14443 break; 14444 } 14445 #endif 14446 #ifdef VK_EXT_discard_rectangles 14447 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: 14448 { 14449 unmarshal_VkPhysicalDeviceDiscardRectanglePropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDiscardRectanglePropertiesEXT*>(structExtension_out)); 14450 break; 14451 } 14452 case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: 14453 { 14454 unmarshal_VkPipelineDiscardRectangleStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineDiscardRectangleStateCreateInfoEXT*>(structExtension_out)); 14455 break; 14456 } 14457 #endif 14458 #ifdef VK_EXT_conservative_rasterization 14459 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT: 14460 { 14461 unmarshal_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceConservativeRasterizationPropertiesEXT*>(structExtension_out)); 14462 break; 14463 } 14464 case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT: 14465 { 14466 unmarshal_VkPipelineRasterizationConservativeStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineRasterizationConservativeStateCreateInfoEXT*>(structExtension_out)); 14467 break; 14468 } 14469 #endif 14470 #ifdef VK_EXT_debug_utils 14471 case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT: 14472 { 14473 unmarshal_VkDebugUtilsMessengerCreateInfoEXT(vkStream, reinterpret_cast<VkDebugUtilsMessengerCreateInfoEXT*>(structExtension_out)); 14474 break; 14475 } 14476 #endif 14477 #ifdef VK_ANDROID_external_memory_android_hardware_buffer 14478 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: 14479 { 14480 unmarshal_VkAndroidHardwareBufferUsageANDROID(vkStream, reinterpret_cast<VkAndroidHardwareBufferUsageANDROID*>(structExtension_out)); 14481 break; 14482 } 14483 case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: 14484 { 14485 unmarshal_VkAndroidHardwareBufferFormatPropertiesANDROID(vkStream, reinterpret_cast<VkAndroidHardwareBufferFormatPropertiesANDROID*>(structExtension_out)); 14486 break; 14487 } 14488 case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: 14489 { 14490 unmarshal_VkImportAndroidHardwareBufferInfoANDROID(vkStream, reinterpret_cast<VkImportAndroidHardwareBufferInfoANDROID*>(structExtension_out)); 14491 break; 14492 } 14493 case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: 14494 { 14495 unmarshal_VkExternalFormatANDROID(vkStream, reinterpret_cast<VkExternalFormatANDROID*>(structExtension_out)); 14496 break; 14497 } 14498 #endif 14499 #ifdef VK_EXT_sampler_filter_minmax 14500 case VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT: 14501 { 14502 unmarshal_VkSamplerReductionModeCreateInfoEXT(vkStream, reinterpret_cast<VkSamplerReductionModeCreateInfoEXT*>(structExtension_out)); 14503 break; 14504 } 14505 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT: 14506 { 14507 unmarshal_VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT*>(structExtension_out)); 14508 break; 14509 } 14510 #endif 14511 #ifdef VK_EXT_sample_locations 14512 case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: 14513 { 14514 unmarshal_VkSampleLocationsInfoEXT(vkStream, reinterpret_cast<VkSampleLocationsInfoEXT*>(structExtension_out)); 14515 break; 14516 } 14517 case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: 14518 { 14519 unmarshal_VkRenderPassSampleLocationsBeginInfoEXT(vkStream, reinterpret_cast<VkRenderPassSampleLocationsBeginInfoEXT*>(structExtension_out)); 14520 break; 14521 } 14522 case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: 14523 { 14524 unmarshal_VkPipelineSampleLocationsStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineSampleLocationsStateCreateInfoEXT*>(structExtension_out)); 14525 break; 14526 } 14527 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: 14528 { 14529 unmarshal_VkPhysicalDeviceSampleLocationsPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceSampleLocationsPropertiesEXT*>(structExtension_out)); 14530 break; 14531 } 14532 #endif 14533 #ifdef VK_EXT_blend_operation_advanced 14534 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: 14535 { 14536 unmarshal_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT*>(structExtension_out)); 14537 break; 14538 } 14539 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: 14540 { 14541 unmarshal_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT*>(structExtension_out)); 14542 break; 14543 } 14544 case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: 14545 { 14546 unmarshal_VkPipelineColorBlendAdvancedStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineColorBlendAdvancedStateCreateInfoEXT*>(structExtension_out)); 14547 break; 14548 } 14549 #endif 14550 #ifdef VK_NV_fragment_coverage_to_color 14551 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: 14552 { 14553 unmarshal_VkPipelineCoverageToColorStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineCoverageToColorStateCreateInfoNV*>(structExtension_out)); 14554 break; 14555 } 14556 #endif 14557 #ifdef VK_NV_framebuffer_mixed_samples 14558 case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: 14559 { 14560 unmarshal_VkPipelineCoverageModulationStateCreateInfoNV(vkStream, reinterpret_cast<VkPipelineCoverageModulationStateCreateInfoNV*>(structExtension_out)); 14561 break; 14562 } 14563 #endif 14564 #ifdef VK_EXT_validation_cache 14565 case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: 14566 { 14567 unmarshal_VkShaderModuleValidationCacheCreateInfoEXT(vkStream, reinterpret_cast<VkShaderModuleValidationCacheCreateInfoEXT*>(structExtension_out)); 14568 break; 14569 } 14570 #endif 14571 #ifdef VK_EXT_descriptor_indexing 14572 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: 14573 { 14574 unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfoEXT(vkStream, reinterpret_cast<VkDescriptorSetLayoutBindingFlagsCreateInfoEXT*>(structExtension_out)); 14575 break; 14576 } 14577 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: 14578 { 14579 unmarshal_VkPhysicalDeviceDescriptorIndexingFeaturesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDescriptorIndexingFeaturesEXT*>(structExtension_out)); 14580 break; 14581 } 14582 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: 14583 { 14584 unmarshal_VkPhysicalDeviceDescriptorIndexingPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceDescriptorIndexingPropertiesEXT*>(structExtension_out)); 14585 break; 14586 } 14587 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: 14588 { 14589 unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfoEXT(vkStream, reinterpret_cast<VkDescriptorSetVariableDescriptorCountAllocateInfoEXT*>(structExtension_out)); 14590 break; 14591 } 14592 case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: 14593 { 14594 unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupportEXT(vkStream, reinterpret_cast<VkDescriptorSetVariableDescriptorCountLayoutSupportEXT*>(structExtension_out)); 14595 break; 14596 } 14597 #endif 14598 #ifdef VK_EXT_global_priority 14599 case VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT: 14600 { 14601 unmarshal_VkDeviceQueueGlobalPriorityCreateInfoEXT(vkStream, reinterpret_cast<VkDeviceQueueGlobalPriorityCreateInfoEXT*>(structExtension_out)); 14602 break; 14603 } 14604 #endif 14605 #ifdef VK_EXT_external_memory_host 14606 case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: 14607 { 14608 unmarshal_VkImportMemoryHostPointerInfoEXT(vkStream, reinterpret_cast<VkImportMemoryHostPointerInfoEXT*>(structExtension_out)); 14609 break; 14610 } 14611 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: 14612 { 14613 unmarshal_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceExternalMemoryHostPropertiesEXT*>(structExtension_out)); 14614 break; 14615 } 14616 #endif 14617 #ifdef VK_AMD_shader_core_properties 14618 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD: 14619 { 14620 unmarshal_VkPhysicalDeviceShaderCorePropertiesAMD(vkStream, reinterpret_cast<VkPhysicalDeviceShaderCorePropertiesAMD*>(structExtension_out)); 14621 break; 14622 } 14623 #endif 14624 #ifdef VK_EXT_vertex_attribute_divisor 14625 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: 14626 { 14627 unmarshal_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(vkStream, reinterpret_cast<VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT*>(structExtension_out)); 14628 break; 14629 } 14630 case VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT: 14631 { 14632 unmarshal_VkPipelineVertexInputDivisorStateCreateInfoEXT(vkStream, reinterpret_cast<VkPipelineVertexInputDivisorStateCreateInfoEXT*>(structExtension_out)); 14633 break; 14634 } 14635 #endif 14636 #ifdef VK_NV_device_diagnostic_checkpoints 14637 case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: 14638 { 14639 unmarshal_VkQueueFamilyCheckpointPropertiesNV(vkStream, reinterpret_cast<VkQueueFamilyCheckpointPropertiesNV*>(structExtension_out)); 14640 break; 14641 } 14642 #endif 14643 #ifdef VK_GOOGLE_color_buffer 14644 case VK_STRUCTURE_TYPE_IMPORT_COLOR_BUFFER_GOOGLE: 14645 { 14646 unmarshal_VkImportColorBufferGOOGLE(vkStream, reinterpret_cast<VkImportColorBufferGOOGLE*>(structExtension_out)); 14647 break; 14648 } 14649 case VK_STRUCTURE_TYPE_IMPORT_PHYSICAL_ADDRESS_GOOGLE: 14650 { 14651 unmarshal_VkImportPhysicalAddressGOOGLE(vkStream, reinterpret_cast<VkImportPhysicalAddressGOOGLE*>(structExtension_out)); 14652 break; 14653 } 14654 #endif 14655 default: 14656 { 14657 return; 14658 } 14659 } 14660 } 14661 14662 14663 } // namespace goldfish_vk 14664