blob: 706bb91651ce35727d5cf9c847d42a965896780b [file] [log] [blame]
// Copyright (C) 2018 The Android Open Source Project
// Copyright (C) 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Autogenerated module goldfish_vk_marshaling_guest
// (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
// Please do not modify directly;
// re-run android/scripts/generate-vulkan-sources.sh,
// or directly from Python by defining:
// VULKAN_REGISTRY_XML_DIR : Directory containing genvk.py and vk.xml
// CEREAL_OUTPUT_DIR: Where to put the generated sources.
// python3 $VULKAN_REGISTRY_XML_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o $CEREAL_OUTPUT_DIR
#include "goldfish_vk_marshaling_guest.h"
#include "goldfish_vk_extension_structs_guest.h"
#include "goldfish_vk_private_defs.h"
namespace goldfish_vk {
void marshal_extension_struct(
VulkanStreamGuest* vkStream,
const void* structExtension);
void unmarshal_extension_struct(
VulkanStreamGuest* vkStream,
void* structExtension_out);
#ifdef VK_VERSION_1_0
void marshal_VkApplicationInfo(
VulkanStreamGuest* vkStream,
const VkApplicationInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
{
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationName;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pApplicationName)
{
vkStream->putString(forMarshaling->pApplicationName);
}
}
else
{
vkStream->putString(forMarshaling->pApplicationName);
}
vkStream->write((uint32_t*)&forMarshaling->applicationVersion, sizeof(uint32_t));
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
{
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pEngineName;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pEngineName)
{
vkStream->putString(forMarshaling->pEngineName);
}
}
else
{
vkStream->putString(forMarshaling->pEngineName);
}
vkStream->write((uint32_t*)&forMarshaling->engineVersion, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t));
}
void unmarshal_VkApplicationInfo(
VulkanStreamGuest* vkStream,
VkApplicationInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
{
// WARNING PTR CHECK
const char* check_pApplicationName;
check_pApplicationName = (const char*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pApplicationName)
{
if (!(check_pApplicationName))
{
fprintf(stderr, "fatal: forUnmarshaling->pApplicationName inconsistent between guest and host\n");
}
vkStream->loadStringInPlace((char**)&forUnmarshaling->pApplicationName);
}
}
else
{
vkStream->loadStringInPlace((char**)&forUnmarshaling->pApplicationName);
}
vkStream->read((uint32_t*)&forUnmarshaling->applicationVersion, sizeof(uint32_t));
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_NULL_OPTIONAL_STRINGS_BIT)
{
// WARNING PTR CHECK
const char* check_pEngineName;
check_pEngineName = (const char*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pEngineName)
{
if (!(check_pEngineName))
{
fprintf(stderr, "fatal: forUnmarshaling->pEngineName inconsistent between guest and host\n");
}
vkStream->loadStringInPlace((char**)&forUnmarshaling->pEngineName);
}
}
else
{
vkStream->loadStringInPlace((char**)&forUnmarshaling->pEngineName);
}
vkStream->read((uint32_t*)&forUnmarshaling->engineVersion, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t));
}
void marshal_VkInstanceCreateInfo(
VulkanStreamGuest* vkStream,
const VkInstanceCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkInstanceCreateFlags*)&forMarshaling->flags, sizeof(VkInstanceCreateFlags));
// WARNING PTR CHECK
uint64_t cgen_var_4 = (uint64_t)(uintptr_t)forMarshaling->pApplicationInfo;
vkStream->putBe64(cgen_var_4);
if (forMarshaling->pApplicationInfo)
{
marshal_VkApplicationInfo(vkStream, (const VkApplicationInfo*)(forMarshaling->pApplicationInfo));
}
vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t));
saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount);
vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t));
saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount);
}
void unmarshal_VkInstanceCreateInfo(
VulkanStreamGuest* vkStream,
VkInstanceCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkInstanceCreateFlags*)&forUnmarshaling->flags, sizeof(VkInstanceCreateFlags));
// WARNING PTR CHECK
const VkApplicationInfo* check_pApplicationInfo;
check_pApplicationInfo = (const VkApplicationInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pApplicationInfo)
{
if (!(check_pApplicationInfo))
{
fprintf(stderr, "fatal: forUnmarshaling->pApplicationInfo inconsistent between guest and host\n");
}
unmarshal_VkApplicationInfo(vkStream, (VkApplicationInfo*)(forUnmarshaling->pApplicationInfo));
}
vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t));
vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames);
vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t));
vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames);
}
void marshal_VkAllocationCallbacks(
VulkanStreamGuest* vkStream,
const VkAllocationCallbacks* forMarshaling)
{
// WARNING PTR CHECK
uint64_t cgen_var_6 = (uint64_t)(uintptr_t)forMarshaling->pUserData;
vkStream->putBe64(cgen_var_6);
if (forMarshaling->pUserData)
{
vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t));
}
uint64_t cgen_var_7 = (uint64_t)forMarshaling->pfnAllocation;
vkStream->putBe64(cgen_var_7);
uint64_t cgen_var_8 = (uint64_t)forMarshaling->pfnReallocation;
vkStream->putBe64(cgen_var_8);
uint64_t cgen_var_9 = (uint64_t)forMarshaling->pfnFree;
vkStream->putBe64(cgen_var_9);
uint64_t cgen_var_10 = (uint64_t)forMarshaling->pfnInternalAllocation;
vkStream->putBe64(cgen_var_10);
uint64_t cgen_var_11 = (uint64_t)forMarshaling->pfnInternalFree;
vkStream->putBe64(cgen_var_11);
}
void unmarshal_VkAllocationCallbacks(
VulkanStreamGuest* vkStream,
VkAllocationCallbacks* forUnmarshaling)
{
// WARNING PTR CHECK
void* check_pUserData;
check_pUserData = (void*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pUserData)
{
if (!(check_pUserData))
{
fprintf(stderr, "fatal: forUnmarshaling->pUserData inconsistent between guest and host\n");
}
vkStream->read((void*)forUnmarshaling->pUserData, sizeof(uint8_t));
}
forUnmarshaling->pfnAllocation = (PFN_vkAllocationFunction)vkStream->getBe64();
forUnmarshaling->pfnReallocation = (PFN_vkReallocationFunction)vkStream->getBe64();
forUnmarshaling->pfnFree = (PFN_vkFreeFunction)vkStream->getBe64();
forUnmarshaling->pfnInternalAllocation = (PFN_vkInternalAllocationNotification)vkStream->getBe64();
forUnmarshaling->pfnInternalFree = (PFN_vkInternalFreeNotification)vkStream->getBe64();
}
void marshal_VkPhysicalDeviceFeatures(
VulkanStreamGuest* vkStream,
const VkPhysicalDeviceFeatures* forMarshaling)
{
vkStream->write((VkBool32*)&forMarshaling->robustBufferAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->fullDrawIndexUint32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->imageCubeArray, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->independentBlend, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->geometryShader, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->tessellationShader, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sampleRateShading, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->dualSrcBlend, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->logicOp, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiDrawIndirect, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->drawIndirectFirstInstance, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->depthClamp, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->depthBiasClamp, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->fillModeNonSolid, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->depthBounds, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->wideLines, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->largePoints, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->alphaToOne, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiViewport, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->samplerAnisotropy, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->textureCompressionETC2, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->textureCompressionASTC_LDR, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->textureCompressionBC, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->occlusionQueryPrecise, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->pipelineStatisticsQuery, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->fragmentStoresAndAtomics, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderImageGatherExtended, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageMultisample, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderClipDistance, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderCullDistance, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInt64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInt16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderResourceResidency, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderResourceMinLod, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseBinding, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidencyBuffer, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage2D, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidencyImage3D, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidency2Samples, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidency4Samples, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidency8Samples, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidency16Samples, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->sparseResidencyAliased, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->variableMultisampleRate, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->inheritedQueries, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceFeatures(
VulkanStreamGuest* vkStream,
VkPhysicalDeviceFeatures* forUnmarshaling)
{
vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccess, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->fullDrawIndexUint32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->imageCubeArray, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->independentBlend, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->geometryShader, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->tessellationShader, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sampleRateShading, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->dualSrcBlend, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->logicOp, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiDrawIndirect, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->drawIndirectFirstInstance, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->depthClamp, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->depthBiasClamp, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->fillModeNonSolid, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->depthBounds, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->wideLines, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->largePoints, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->alphaToOne, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiViewport, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->samplerAnisotropy, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionETC2, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionASTC_LDR, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->textureCompressionBC, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryPrecise, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->pipelineStatisticsQuery, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vertexPipelineStoresAndAtomics, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->fragmentStoresAndAtomics, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderTessellationAndGeometryPointSize, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderImageGatherExtended, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageExtendedFormats, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageMultisample, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageReadWithoutFormat, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageWriteWithoutFormat, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayDynamicIndexing, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayDynamicIndexing, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayDynamicIndexing, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayDynamicIndexing, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderClipDistance, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderCullDistance, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInt64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInt16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceResidency, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderResourceMinLod, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseBinding, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyBuffer, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage2D, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyImage3D, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency2Samples, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency4Samples, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency8Samples, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidency16Samples, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->sparseResidencyAliased, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->variableMultisampleRate, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->inheritedQueries, sizeof(VkBool32));
}
void marshal_VkFormatProperties(
VulkanStreamGuest* vkStream,
const VkFormatProperties* forMarshaling)
{
vkStream->write((VkFormatFeatureFlags*)&forMarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags));
vkStream->write((VkFormatFeatureFlags*)&forMarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags));
vkStream->write((VkFormatFeatureFlags*)&forMarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags));
}
void unmarshal_VkFormatProperties(
VulkanStreamGuest* vkStream,
VkFormatProperties* forUnmarshaling)
{
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->linearTilingFeatures, sizeof(VkFormatFeatureFlags));
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->optimalTilingFeatures, sizeof(VkFormatFeatureFlags));
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->bufferFeatures, sizeof(VkFormatFeatureFlags));
}
void marshal_VkExtent3D(
VulkanStreamGuest* vkStream,
const VkExtent3D* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->depth, sizeof(uint32_t));
}
void unmarshal_VkExtent3D(
VulkanStreamGuest* vkStream,
VkExtent3D* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->depth, sizeof(uint32_t));
}
void marshal_VkImageFormatProperties(
VulkanStreamGuest* vkStream,
const VkImageFormatProperties* forMarshaling)
{
marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->maxExtent));
vkStream->write((uint32_t*)&forMarshaling->maxMipLevels, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxArrayLayers, sizeof(uint32_t));
vkStream->write((VkSampleCountFlags*)&forMarshaling->sampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkDeviceSize*)&forMarshaling->maxResourceSize, sizeof(VkDeviceSize));
}
void unmarshal_VkImageFormatProperties(
VulkanStreamGuest* vkStream,
VkImageFormatProperties* forUnmarshaling)
{
unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->maxExtent));
vkStream->read((uint32_t*)&forUnmarshaling->maxMipLevels, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxArrayLayers, sizeof(uint32_t));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkDeviceSize*)&forUnmarshaling->maxResourceSize, sizeof(VkDeviceSize));
}
void marshal_VkPhysicalDeviceLimits(
VulkanStreamGuest* vkStream,
const VkPhysicalDeviceLimits* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->maxImageDimension1D, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxImageDimension2D, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxImageDimension3D, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxImageDimensionCube, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTexelBufferElements, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxUniformBufferRange, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxStorageBufferRange, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPushConstantsSize, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxMemoryAllocationCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxSamplerAllocationCount, sizeof(uint32_t));
vkStream->write((VkDeviceSize*)&forMarshaling->bufferImageGranularity, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize));
vkStream->write((uint32_t*)&forMarshaling->maxBoundDescriptorSets, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageResources, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSamplers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributes, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindings, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxVertexInputBindingStride, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxVertexOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationGenerationLevel, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationPatchSize, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxGeometryShaderInvocations, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxGeometryInputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxGeometryOutputVertices, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFragmentInputComponents, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFragmentOutputAttachments, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxComputeSharedMemorySize, sizeof(uint32_t));
vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t));
vkStream->write((uint32_t*)forMarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->subPixelPrecisionBits, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->subTexelPrecisionBits, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->mipmapPrecisionBits, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDrawIndirectCount, sizeof(uint32_t));
vkStream->write((float*)&forMarshaling->maxSamplerLodBias, sizeof(float));
vkStream->write((float*)&forMarshaling->maxSamplerAnisotropy, sizeof(float));
vkStream->write((uint32_t*)&forMarshaling->maxViewports, sizeof(uint32_t));
vkStream->write((uint32_t*)forMarshaling->maxViewportDimensions, 2 * sizeof(uint32_t));
vkStream->write((float*)forMarshaling->viewportBoundsRange, 2 * sizeof(float));
vkStream->write((uint32_t*)&forMarshaling->viewportSubPixelBits, sizeof(uint32_t));
uint64_t cgen_var_18 = (uint64_t)forMarshaling->minMemoryMapAlignment;
vkStream->putBe64(cgen_var_18);
vkStream->write((VkDeviceSize*)&forMarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->write((int32_t*)&forMarshaling->minTexelOffset, sizeof(int32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTexelOffset, sizeof(uint32_t));
vkStream->write((int32_t*)&forMarshaling->minTexelGatherOffset, sizeof(int32_t));
vkStream->write((uint32_t*)&forMarshaling->maxTexelGatherOffset, sizeof(uint32_t));
vkStream->write((float*)&forMarshaling->minInterpolationOffset, sizeof(float));
vkStream->write((float*)&forMarshaling->maxInterpolationOffset, sizeof(float));
vkStream->write((uint32_t*)&forMarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFramebufferWidth, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFramebufferHeight, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxFramebufferLayers, sizeof(uint32_t));
vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((uint32_t*)&forMarshaling->maxColorAttachments, sizeof(uint32_t));
vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((VkSampleCountFlags*)&forMarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags));
vkStream->write((uint32_t*)&forMarshaling->maxSampleMaskWords, sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->timestampComputeAndGraphics, sizeof(VkBool32));
vkStream->write((float*)&forMarshaling->timestampPeriod, sizeof(float));
vkStream->write((uint32_t*)&forMarshaling->maxClipDistances, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxCullDistances, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->discreteQueuePriorities, sizeof(uint32_t));
vkStream->write((float*)forMarshaling->pointSizeRange, 2 * sizeof(float));
vkStream->write((float*)forMarshaling->lineWidthRange, 2 * sizeof(float));
vkStream->write((float*)&forMarshaling->pointSizeGranularity, sizeof(float));
vkStream->write((float*)&forMarshaling->lineWidthGranularity, sizeof(float));
vkStream->write((VkBool32*)&forMarshaling->strictLines, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->standardSampleLocations, sizeof(VkBool32));
vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize));
}
void unmarshal_VkPhysicalDeviceLimits(
VulkanStreamGuest* vkStream,
VkPhysicalDeviceLimits* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension1D, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension2D, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimension3D, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageDimensionCube, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTexelBufferElements, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxUniformBufferRange, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxStorageBufferRange, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPushConstantsSize, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxMemoryAllocationCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxSamplerAllocationCount, sizeof(uint32_t));
vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferImageGranularity, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->sparseAddressSpaceSize, sizeof(VkDeviceSize));
vkStream->read((uint32_t*)&forUnmarshaling->maxBoundDescriptorSets, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSamplers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUniformBuffers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageBuffers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorSampledImages, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorStorageImages, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorInputAttachments, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageResources, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSamplers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUniformBuffersDynamic, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffers, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageBuffersDynamic, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetSampledImages, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetStorageImages, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetInputAttachments, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributes, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindings, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputAttributeOffset, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxVertexInputBindingStride, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxVertexOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationGenerationLevel, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationPatchSize, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexInputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerVertexOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlPerPatchOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationControlTotalOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationInputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTessellationEvaluationOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryShaderInvocations, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryInputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryOutputVertices, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxGeometryTotalOutputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentInputComponents, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentOutputAttachments, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentDualSrcAttachments, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFragmentCombinedOutputResources, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxComputeSharedMemorySize, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupCount, 3 * sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxComputeWorkGroupInvocations, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->maxComputeWorkGroupSize, 3 * sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->subPixelPrecisionBits, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->subTexelPrecisionBits, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->mipmapPrecisionBits, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndexedIndexValue, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDrawIndirectCount, sizeof(uint32_t));
vkStream->read((float*)&forUnmarshaling->maxSamplerLodBias, sizeof(float));
vkStream->read((float*)&forUnmarshaling->maxSamplerAnisotropy, sizeof(float));
vkStream->read((uint32_t*)&forUnmarshaling->maxViewports, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->maxViewportDimensions, 2 * sizeof(uint32_t));
vkStream->read((float*)forUnmarshaling->viewportBoundsRange, 2 * sizeof(float));
vkStream->read((uint32_t*)&forUnmarshaling->viewportSubPixelBits, sizeof(uint32_t));
forUnmarshaling->minMemoryMapAlignment = (size_t)vkStream->getBe64();
vkStream->read((VkDeviceSize*)&forUnmarshaling->minTexelBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->minUniformBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->minStorageBufferOffsetAlignment, sizeof(VkDeviceSize));
vkStream->read((int32_t*)&forUnmarshaling->minTexelOffset, sizeof(int32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTexelOffset, sizeof(uint32_t));
vkStream->read((int32_t*)&forUnmarshaling->minTexelGatherOffset, sizeof(int32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxTexelGatherOffset, sizeof(uint32_t));
vkStream->read((float*)&forUnmarshaling->minInterpolationOffset, sizeof(float));
vkStream->read((float*)&forUnmarshaling->maxInterpolationOffset, sizeof(float));
vkStream->read((uint32_t*)&forUnmarshaling->subPixelInterpolationOffsetBits, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferWidth, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferHeight, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxFramebufferLayers, sizeof(uint32_t));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferColorSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferDepthSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferStencilSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferNoAttachmentsSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((uint32_t*)&forUnmarshaling->maxColorAttachments, sizeof(uint32_t));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageColorSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageIntegerSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageDepthSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->sampledImageStencilSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->storageImageSampleCounts, sizeof(VkSampleCountFlags));
vkStream->read((uint32_t*)&forUnmarshaling->maxSampleMaskWords, sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->timestampComputeAndGraphics, sizeof(VkBool32));
vkStream->read((float*)&forUnmarshaling->timestampPeriod, sizeof(float));
vkStream->read((uint32_t*)&forUnmarshaling->maxClipDistances, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxCullDistances, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxCombinedClipAndCullDistances, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->discreteQueuePriorities, sizeof(uint32_t));
vkStream->read((float*)forUnmarshaling->pointSizeRange, 2 * sizeof(float));
vkStream->read((float*)forUnmarshaling->lineWidthRange, 2 * sizeof(float));
vkStream->read((float*)&forUnmarshaling->pointSizeGranularity, sizeof(float));
vkStream->read((float*)&forUnmarshaling->lineWidthGranularity, sizeof(float));
vkStream->read((VkBool32*)&forUnmarshaling->strictLines, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->standardSampleLocations, sizeof(VkBool32));
vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyOffsetAlignment, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->optimalBufferCopyRowPitchAlignment, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->nonCoherentAtomSize, sizeof(VkDeviceSize));
}
void marshal_VkPhysicalDeviceSparseProperties(
VulkanStreamGuest* vkStream,
const VkPhysicalDeviceSparseProperties* forMarshaling)
{
vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DBlockShape, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->residencyStandard3DBlockShape, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->residencyAlignedMipSize, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->residencyNonResidentStrict, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceSparseProperties(
VulkanStreamGuest* vkStream,
VkPhysicalDeviceSparseProperties* forUnmarshaling)
{
vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DBlockShape, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard2DMultisampleBlockShape, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->residencyStandard3DBlockShape, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->residencyAlignedMipSize, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->residencyNonResidentStrict, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceProperties(
VulkanStreamGuest* vkStream,
const VkPhysicalDeviceProperties* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->apiVersion, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->driverVersion, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t));
vkStream->write((VkPhysicalDeviceType*)&forMarshaling->deviceType, sizeof(VkPhysicalDeviceType));
vkStream->write((char*)forMarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
vkStream->write((uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
marshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forMarshaling->limits));
marshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forMarshaling->sparseProperties));
}
void unmarshal_VkPhysicalDeviceProperties(
VulkanStreamGuest* vkStream,
VkPhysicalDeviceProperties* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->apiVersion, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->driverVersion, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->vendorID, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->deviceID, sizeof(uint32_t));
vkStream->read((VkPhysicalDeviceType*)&forUnmarshaling->deviceType, sizeof(VkPhysicalDeviceType));
vkStream->read((char*)forUnmarshaling->deviceName, VK_MAX_PHYSICAL_DEVICE_NAME_SIZE * sizeof(char));
vkStream->read((uint8_t*)forUnmarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
unmarshal_VkPhysicalDeviceLimits(vkStream, (VkPhysicalDeviceLimits*)(&forUnmarshaling->limits));
unmarshal_VkPhysicalDeviceSparseProperties(vkStream, (VkPhysicalDeviceSparseProperties*)(&forUnmarshaling->sparseProperties));
}
void marshal_VkQueueFamilyProperties(
VulkanStreamGuest* vkStream,
const VkQueueFamilyProperties* forMarshaling)
{
vkStream->write((VkQueueFlags*)&forMarshaling->queueFlags, sizeof(VkQueueFlags));
vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->timestampValidBits, sizeof(uint32_t));
marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->minImageTransferGranularity));
}
void unmarshal_VkQueueFamilyProperties(
VulkanStreamGuest* vkStream,
VkQueueFamilyProperties* forUnmarshaling)
{
vkStream->read((VkQueueFlags*)&forUnmarshaling->queueFlags, sizeof(VkQueueFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->timestampValidBits, sizeof(uint32_t));
unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->minImageTransferGranularity));
}
void marshal_VkMemoryType(
VulkanStreamGuest* vkStream,
const VkMemoryType* forMarshaling)
{
vkStream->write((VkMemoryPropertyFlags*)&forMarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags));
vkStream->write((uint32_t*)&forMarshaling->heapIndex, sizeof(uint32_t));
}
void unmarshal_VkMemoryType(
VulkanStreamGuest* vkStream,
VkMemoryType* forUnmarshaling)
{
vkStream->read((VkMemoryPropertyFlags*)&forUnmarshaling->propertyFlags, sizeof(VkMemoryPropertyFlags));
vkStream->read((uint32_t*)&forUnmarshaling->heapIndex, sizeof(uint32_t));
}
void marshal_VkMemoryHeap(
VulkanStreamGuest* vkStream,
const VkMemoryHeap* forMarshaling)
{
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
vkStream->write((VkMemoryHeapFlags*)&forMarshaling->flags, sizeof(VkMemoryHeapFlags));
}
void unmarshal_VkMemoryHeap(
VulkanStreamGuest* vkStream,
VkMemoryHeap* forUnmarshaling)
{
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
vkStream->read((VkMemoryHeapFlags*)&forUnmarshaling->flags, sizeof(VkMemoryHeapFlags));
}
void marshal_VkPhysicalDeviceMemoryProperties(
VulkanStreamGuest* vkStream,
const VkPhysicalDeviceMemoryProperties* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->memoryTypeCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
{
marshal_VkMemoryType(vkStream, (VkMemoryType*)(forMarshaling->memoryTypes + i));
}
vkStream->write((uint32_t*)&forMarshaling->memoryHeapCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
{
marshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forMarshaling->memoryHeaps + i));
}
}
void unmarshal_VkPhysicalDeviceMemoryProperties(
VulkanStreamGuest* vkStream,
VkPhysicalDeviceMemoryProperties* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_TYPES; ++i)
{
unmarshal_VkMemoryType(vkStream, (VkMemoryType*)(forUnmarshaling->memoryTypes + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->memoryHeapCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)VK_MAX_MEMORY_HEAPS; ++i)
{
unmarshal_VkMemoryHeap(vkStream, (VkMemoryHeap*)(forUnmarshaling->memoryHeaps + i));
}
}
void marshal_VkDeviceQueueCreateInfo(
VulkanStreamGuest* vkStream,
const VkDeviceQueueCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->queueCount, sizeof(uint32_t));
vkStream->write((const float*)forMarshaling->pQueuePriorities, forMarshaling->queueCount * sizeof(const float));
}
void unmarshal_VkDeviceQueueCreateInfo(
VulkanStreamGuest* vkStream,
VkDeviceQueueCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceQueueCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->queueCount, sizeof(uint32_t));
vkStream->read((float*)forUnmarshaling->pQueuePriorities, forUnmarshaling->queueCount * sizeof(const float));
}
void marshal_VkDeviceCreateInfo(
VulkanStreamGuest* vkStream,
const VkDeviceCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkDeviceCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->queueCreateInfoCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueCreateInfoCount; ++i)
{
marshal_VkDeviceQueueCreateInfo(vkStream, (const VkDeviceQueueCreateInfo*)(forMarshaling->pQueueCreateInfos + i));
}
vkStream->write((uint32_t*)&forMarshaling->enabledLayerCount, sizeof(uint32_t));
saveStringArray(vkStream, forMarshaling->ppEnabledLayerNames, forMarshaling->enabledLayerCount);
vkStream->write((uint32_t*)&forMarshaling->enabledExtensionCount, sizeof(uint32_t));
saveStringArray(vkStream, forMarshaling->ppEnabledExtensionNames, forMarshaling->enabledExtensionCount);
// WARNING PTR CHECK
uint64_t cgen_var_20 = (uint64_t)(uintptr_t)forMarshaling->pEnabledFeatures;
vkStream->putBe64(cgen_var_20);
if (forMarshaling->pEnabledFeatures)
{
marshal_VkPhysicalDeviceFeatures(vkStream, (const VkPhysicalDeviceFeatures*)(forMarshaling->pEnabledFeatures));
}
}
void unmarshal_VkDeviceCreateInfo(
VulkanStreamGuest* vkStream,
VkDeviceCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueCreateInfoCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueCreateInfoCount; ++i)
{
unmarshal_VkDeviceQueueCreateInfo(vkStream, (VkDeviceQueueCreateInfo*)(forUnmarshaling->pQueueCreateInfos + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->enabledLayerCount, sizeof(uint32_t));
vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledLayerNames);
vkStream->read((uint32_t*)&forUnmarshaling->enabledExtensionCount, sizeof(uint32_t));
vkStream->loadStringArrayInPlace((char***)&forUnmarshaling->ppEnabledExtensionNames);
// WARNING PTR CHECK
const VkPhysicalDeviceFeatures* check_pEnabledFeatures;
check_pEnabledFeatures = (const VkPhysicalDeviceFeatures*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pEnabledFeatures)
{
if (!(check_pEnabledFeatures))
{
fprintf(stderr, "fatal: forUnmarshaling->pEnabledFeatures inconsistent between guest and host\n");
}
unmarshal_VkPhysicalDeviceFeatures(vkStream, (VkPhysicalDeviceFeatures*)(forUnmarshaling->pEnabledFeatures));
}
}
void marshal_VkExtensionProperties(
VulkanStreamGuest* vkStream,
const VkExtensionProperties* forMarshaling)
{
vkStream->write((char*)forMarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t));
}
void unmarshal_VkExtensionProperties(
VulkanStreamGuest* vkStream,
VkExtensionProperties* forUnmarshaling)
{
vkStream->read((char*)forUnmarshaling->extensionName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t));
}
void marshal_VkLayerProperties(
VulkanStreamGuest* vkStream,
const VkLayerProperties* forMarshaling)
{
vkStream->write((char*)forMarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
vkStream->write((uint32_t*)&forMarshaling->specVersion, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->implementationVersion, sizeof(uint32_t));
vkStream->write((char*)forMarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
}
void unmarshal_VkLayerProperties(
VulkanStreamGuest* vkStream,
VkLayerProperties* forUnmarshaling)
{
vkStream->read((char*)forUnmarshaling->layerName, VK_MAX_EXTENSION_NAME_SIZE * sizeof(char));
vkStream->read((uint32_t*)&forUnmarshaling->specVersion, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->implementationVersion, sizeof(uint32_t));
vkStream->read((char*)forUnmarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
}
void marshal_VkSubmitInfo(
VulkanStreamGuest* vkStream,
const VkSubmitInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->waitSemaphoreCount)
{
uint64_t* cgen_var_22;
vkStream->alloc((void**)&cgen_var_22, forMarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_22, forMarshaling->waitSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_22, forMarshaling->waitSemaphoreCount * 8);
}
vkStream->write((const VkPipelineStageFlags*)forMarshaling->pWaitDstStageMask, forMarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
if (forMarshaling->commandBufferCount)
{
uint64_t* cgen_var_23;
vkStream->alloc((void**)&cgen_var_23, forMarshaling->commandBufferCount * 8);
vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(forMarshaling->pCommandBuffers, cgen_var_23, forMarshaling->commandBufferCount);
vkStream->write((uint64_t*)cgen_var_23, forMarshaling->commandBufferCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->signalSemaphoreCount)
{
uint64_t* cgen_var_24;
vkStream->alloc((void**)&cgen_var_24, forMarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_24, forMarshaling->signalSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_24, forMarshaling->signalSemaphoreCount * 8);
}
}
void unmarshal_VkSubmitInfo(
VulkanStreamGuest* vkStream,
VkSubmitInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->waitSemaphoreCount)
{
uint64_t* cgen_var_25;
vkStream->alloc((void**)&cgen_var_25, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_25, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_25, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount);
}
vkStream->read((VkPipelineStageFlags*)forUnmarshaling->pWaitDstStageMask, forUnmarshaling->waitSemaphoreCount * sizeof(const VkPipelineStageFlags));
vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
if (forUnmarshaling->commandBufferCount)
{
uint64_t* cgen_var_26;
vkStream->alloc((void**)&cgen_var_26, forUnmarshaling->commandBufferCount * 8);
vkStream->read((uint64_t*)cgen_var_26, forUnmarshaling->commandBufferCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(cgen_var_26, (VkCommandBuffer*)forUnmarshaling->pCommandBuffers, forUnmarshaling->commandBufferCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->signalSemaphoreCount)
{
uint64_t* cgen_var_27;
vkStream->alloc((void**)&cgen_var_27, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_27, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_27, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount);
}
}
void marshal_VkMemoryAllocateInfo(
VulkanStreamGuest* vkStream,
const VkMemoryAllocateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize));
vkStream->write((uint32_t*)&forMarshaling->memoryTypeIndex, sizeof(uint32_t));
}
void unmarshal_VkMemoryAllocateInfo(
VulkanStreamGuest* vkStream,
VkMemoryAllocateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize));
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeIndex, sizeof(uint32_t));
}
void marshal_VkMappedMemoryRange(
VulkanStreamGuest* vkStream,
const VkMappedMemoryRange* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
uint64_t cgen_var_28;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_28, 1);
vkStream->write((uint64_t*)&cgen_var_28, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
}
void unmarshal_VkMappedMemoryRange(
VulkanStreamGuest* vkStream,
VkMappedMemoryRange* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_29;
vkStream->read((uint64_t*)&cgen_var_29, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_29, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
}
void marshal_VkMemoryRequirements(
VulkanStreamGuest* vkStream,
const VkMemoryRequirements* forMarshaling)
{
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->alignment, sizeof(VkDeviceSize));
vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
}
void unmarshal_VkMemoryRequirements(
VulkanStreamGuest* vkStream,
VkMemoryRequirements* forUnmarshaling)
{
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->alignment, sizeof(VkDeviceSize));
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
}
void marshal_VkSparseImageFormatProperties(
VulkanStreamGuest* vkStream,
const VkSparseImageFormatProperties* forMarshaling)
{
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->imageGranularity));
vkStream->write((VkSparseImageFormatFlags*)&forMarshaling->flags, sizeof(VkSparseImageFormatFlags));
}
void unmarshal_VkSparseImageFormatProperties(
VulkanStreamGuest* vkStream,
VkSparseImageFormatProperties* forUnmarshaling)
{
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->imageGranularity));
vkStream->read((VkSparseImageFormatFlags*)&forUnmarshaling->flags, sizeof(VkSparseImageFormatFlags));
}
void marshal_VkSparseImageMemoryRequirements(
VulkanStreamGuest* vkStream,
const VkSparseImageMemoryRequirements* forMarshaling)
{
marshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forMarshaling->formatProperties));
vkStream->write((uint32_t*)&forMarshaling->imageMipTailFirstLod, sizeof(uint32_t));
vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailSize, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->imageMipTailStride, sizeof(VkDeviceSize));
}
void unmarshal_VkSparseImageMemoryRequirements(
VulkanStreamGuest* vkStream,
VkSparseImageMemoryRequirements* forUnmarshaling)
{
unmarshal_VkSparseImageFormatProperties(vkStream, (VkSparseImageFormatProperties*)(&forUnmarshaling->formatProperties));
vkStream->read((uint32_t*)&forUnmarshaling->imageMipTailFirstLod, sizeof(uint32_t));
vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailSize, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->imageMipTailStride, sizeof(VkDeviceSize));
}
void marshal_VkSparseMemoryBind(
VulkanStreamGuest* vkStream,
const VkSparseMemoryBind* forMarshaling)
{
vkStream->write((VkDeviceSize*)&forMarshaling->resourceOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
uint64_t cgen_var_30;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_30, 1);
vkStream->write((uint64_t*)&cgen_var_30, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags));
}
void unmarshal_VkSparseMemoryBind(
VulkanStreamGuest* vkStream,
VkSparseMemoryBind* forUnmarshaling)
{
vkStream->read((VkDeviceSize*)&forUnmarshaling->resourceOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
uint64_t cgen_var_31;
vkStream->read((uint64_t*)&cgen_var_31, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_31, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags));
}
void marshal_VkSparseBufferMemoryBindInfo(
VulkanStreamGuest* vkStream,
const VkSparseBufferMemoryBindInfo* forMarshaling)
{
uint64_t cgen_var_32;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_32, 1);
vkStream->write((uint64_t*)&cgen_var_32, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
{
marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
}
}
void unmarshal_VkSparseBufferMemoryBindInfo(
VulkanStreamGuest* vkStream,
VkSparseBufferMemoryBindInfo* forUnmarshaling)
{
uint64_t cgen_var_33;
vkStream->read((uint64_t*)&cgen_var_33, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_33, (VkBuffer*)&forUnmarshaling->buffer, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
{
unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
void marshal_VkSparseImageOpaqueMemoryBindInfo(
VulkanStreamGuest* vkStream,
const VkSparseImageOpaqueMemoryBindInfo* forMarshaling)
{
uint64_t cgen_var_34;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_34, 1);
vkStream->write((uint64_t*)&cgen_var_34, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
{
marshal_VkSparseMemoryBind(vkStream, (const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
}
}
void unmarshal_VkSparseImageOpaqueMemoryBindInfo(
VulkanStreamGuest* vkStream,
VkSparseImageOpaqueMemoryBindInfo* forUnmarshaling)
{
uint64_t cgen_var_35;
vkStream->read((uint64_t*)&cgen_var_35, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_35, (VkImage*)&forUnmarshaling->image, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
{
unmarshal_VkSparseMemoryBind(vkStream, (VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
void marshal_VkImageSubresource(
VulkanStreamGuest* vkStream,
const VkImageSubresource* forMarshaling)
{
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->arrayLayer, sizeof(uint32_t));
}
void unmarshal_VkImageSubresource(
VulkanStreamGuest* vkStream,
VkImageSubresource* forUnmarshaling)
{
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->arrayLayer, sizeof(uint32_t));
}
void marshal_VkOffset3D(
VulkanStreamGuest* vkStream,
const VkOffset3D* forMarshaling)
{
vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t));
vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t));
vkStream->write((int32_t*)&forMarshaling->z, sizeof(int32_t));
}
void unmarshal_VkOffset3D(
VulkanStreamGuest* vkStream,
VkOffset3D* forUnmarshaling)
{
vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t));
vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t));
vkStream->read((int32_t*)&forUnmarshaling->z, sizeof(int32_t));
}
void marshal_VkSparseImageMemoryBind(
VulkanStreamGuest* vkStream,
const VkSparseImageMemoryBind* forMarshaling)
{
marshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forMarshaling->subresource));
marshal_VkOffset3D(vkStream, (VkOffset3D*)(&forMarshaling->offset));
marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
uint64_t cgen_var_36;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_36, 1);
vkStream->write((uint64_t*)&cgen_var_36, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags, sizeof(VkSparseMemoryBindFlags));
}
void unmarshal_VkSparseImageMemoryBind(
VulkanStreamGuest* vkStream,
VkSparseImageMemoryBind* forUnmarshaling)
{
unmarshal_VkImageSubresource(vkStream, (VkImageSubresource*)(&forUnmarshaling->subresource));
unmarshal_VkOffset3D(vkStream, (VkOffset3D*)(&forUnmarshaling->offset));
unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
uint64_t cgen_var_37;
vkStream->read((uint64_t*)&cgen_var_37, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_37, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags, sizeof(VkSparseMemoryBindFlags));
}
void marshal_VkSparseImageMemoryBindInfo(
VulkanStreamGuest* vkStream,
const VkSparseImageMemoryBindInfo* forMarshaling)
{
uint64_t cgen_var_38;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_38, 1);
vkStream->write((uint64_t*)&cgen_var_38, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i)
{
marshal_VkSparseImageMemoryBind(vkStream, (const VkSparseImageMemoryBind*)(forMarshaling->pBinds + i));
}
}
void unmarshal_VkSparseImageMemoryBindInfo(
VulkanStreamGuest* vkStream,
VkSparseImageMemoryBindInfo* forUnmarshaling)
{
uint64_t cgen_var_39;
vkStream->read((uint64_t*)&cgen_var_39, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_39, (VkImage*)&forUnmarshaling->image, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i)
{
unmarshal_VkSparseImageMemoryBind(vkStream, (VkSparseImageMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
void marshal_VkBindSparseInfo(
VulkanStreamGuest* vkStream,
const VkBindSparseInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->waitSemaphoreCount)
{
uint64_t* cgen_var_40;
vkStream->alloc((void**)&cgen_var_40, forMarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pWaitSemaphores, cgen_var_40, forMarshaling->waitSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_40, forMarshaling->waitSemaphoreCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->bufferBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bufferBindCount; ++i)
{
marshal_VkSparseBufferMemoryBindInfo(vkStream, (const VkSparseBufferMemoryBindInfo*)(forMarshaling->pBufferBinds + i));
}
vkStream->write((uint32_t*)&forMarshaling->imageOpaqueBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageOpaqueBindCount; ++i)
{
marshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (const VkSparseImageOpaqueMemoryBindInfo*)(forMarshaling->pImageOpaqueBinds + i));
}
vkStream->write((uint32_t*)&forMarshaling->imageBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageBindCount; ++i)
{
marshal_VkSparseImageMemoryBindInfo(vkStream, (const VkSparseImageMemoryBindInfo*)(forMarshaling->pImageBinds + i));
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->signalSemaphoreCount)
{
uint64_t* cgen_var_41;
vkStream->alloc((void**)&cgen_var_41, forMarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(forMarshaling->pSignalSemaphores, cgen_var_41, forMarshaling->signalSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_41, forMarshaling->signalSemaphoreCount * 8);
}
}
void unmarshal_VkBindSparseInfo(
VulkanStreamGuest* vkStream,
VkBindSparseInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->waitSemaphoreCount)
{
uint64_t* cgen_var_42;
vkStream->alloc((void**)&cgen_var_42, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_42, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_42, (VkSemaphore*)forUnmarshaling->pWaitSemaphores, forUnmarshaling->waitSemaphoreCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->bufferBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bufferBindCount; ++i)
{
unmarshal_VkSparseBufferMemoryBindInfo(vkStream, (VkSparseBufferMemoryBindInfo*)(forUnmarshaling->pBufferBinds + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->imageOpaqueBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageOpaqueBindCount; ++i)
{
unmarshal_VkSparseImageOpaqueMemoryBindInfo(vkStream, (VkSparseImageOpaqueMemoryBindInfo*)(forUnmarshaling->pImageOpaqueBinds + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->imageBindCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageBindCount; ++i)
{
unmarshal_VkSparseImageMemoryBindInfo(vkStream, (VkSparseImageMemoryBindInfo*)(forUnmarshaling->pImageBinds + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->signalSemaphoreCount)
{
uint64_t* cgen_var_43;
vkStream->alloc((void**)&cgen_var_43, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_43, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(cgen_var_43, (VkSemaphore*)forUnmarshaling->pSignalSemaphores, forUnmarshaling->signalSemaphoreCount);
}
}
void marshal_VkFenceCreateInfo(
VulkanStreamGuest* vkStream,
const VkFenceCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkFenceCreateFlags*)&forMarshaling->flags, sizeof(VkFenceCreateFlags));
}
void unmarshal_VkFenceCreateInfo(
VulkanStreamGuest* vkStream,
VkFenceCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFenceCreateFlags*)&forUnmarshaling->flags, sizeof(VkFenceCreateFlags));
}
void marshal_VkSemaphoreCreateInfo(
VulkanStreamGuest* vkStream,
const VkSemaphoreCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkSemaphoreCreateFlags*)&forMarshaling->flags, sizeof(VkSemaphoreCreateFlags));
}
void unmarshal_VkSemaphoreCreateInfo(
VulkanStreamGuest* vkStream,
VkSemaphoreCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSemaphoreCreateFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreCreateFlags));
}
void marshal_VkEventCreateInfo(
VulkanStreamGuest* vkStream,
const VkEventCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkEventCreateFlags*)&forMarshaling->flags, sizeof(VkEventCreateFlags));
}
void unmarshal_VkEventCreateInfo(
VulkanStreamGuest* vkStream,
VkEventCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkEventCreateFlags*)&forUnmarshaling->flags, sizeof(VkEventCreateFlags));
}
void marshal_VkQueryPoolCreateInfo(
VulkanStreamGuest* vkStream,
const VkQueryPoolCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkQueryPoolCreateFlags*)&forMarshaling->flags, sizeof(VkQueryPoolCreateFlags));
vkStream->write((VkQueryType*)&forMarshaling->queryType, sizeof(VkQueryType));
vkStream->write((uint32_t*)&forMarshaling->queryCount, sizeof(uint32_t));
vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
}
void unmarshal_VkQueryPoolCreateInfo(
VulkanStreamGuest* vkStream,
VkQueryPoolCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkQueryPoolCreateFlags*)&forUnmarshaling->flags, sizeof(VkQueryPoolCreateFlags));
vkStream->read((VkQueryType*)&forUnmarshaling->queryType, sizeof(VkQueryType));
vkStream->read((uint32_t*)&forUnmarshaling->queryCount, sizeof(uint32_t));
vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics, sizeof(VkQueryPipelineStatisticFlags));
}
void marshal_VkBufferCreateInfo(
VulkanStreamGuest* vkStream,
const VkBufferCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags));
vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_44 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
vkStream->putBe64(cgen_var_44);
if (forMarshaling->pQueueFamilyIndices)
{
vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
}
void unmarshal_VkBufferCreateInfo(
VulkanStreamGuest* vkStream,
VkBufferCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags));
vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint32_t* check_pQueueFamilyIndices;
check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pQueueFamilyIndices)
{
if (!(check_pQueueFamilyIndices))
{
fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n");
}
vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
}
void marshal_VkBufferViewCreateInfo(
VulkanStreamGuest* vkStream,
const VkBufferViewCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkBufferViewCreateFlags*)&forMarshaling->flags, sizeof(VkBufferViewCreateFlags));
uint64_t cgen_var_46;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_46, 1);
vkStream->write((uint64_t*)&cgen_var_46, 1 * 8);
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize));
}
void unmarshal_VkBufferViewCreateInfo(
VulkanStreamGuest* vkStream,
VkBufferViewCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBufferViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferViewCreateFlags));
uint64_t cgen_var_47;
vkStream->read((uint64_t*)&cgen_var_47, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_47, (VkBuffer*)&forUnmarshaling->buffer, 1);
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize));
}
void marshal_VkImageCreateInfo(
VulkanStreamGuest* vkStream,
const VkImageCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags));
vkStream->write((VkImageType*)&forMarshaling->imageType, sizeof(VkImageType));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
marshal_VkExtent3D(vkStream, (VkExtent3D*)(&forMarshaling->extent));
vkStream->write((uint32_t*)&forMarshaling->mipLevels, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->arrayLayers, sizeof(uint32_t));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->write((VkSharingMode*)&forMarshaling->sharingMode, sizeof(VkSharingMode));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_48 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
vkStream->putBe64(cgen_var_48);
if (forMarshaling->pQueueFamilyIndices)
{
vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices, forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
}
void unmarshal_VkImageCreateInfo(
VulkanStreamGuest* vkStream,
VkImageCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags));
vkStream->read((VkImageType*)&forUnmarshaling->imageType, sizeof(VkImageType));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
unmarshal_VkExtent3D(vkStream, (VkExtent3D*)(&forUnmarshaling->extent));
vkStream->read((uint32_t*)&forUnmarshaling->mipLevels, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->arrayLayers, sizeof(uint32_t));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples, sizeof(VkSampleCountFlagBits));
vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->read((VkSharingMode*)&forUnmarshaling->sharingMode, sizeof(VkSharingMode));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndexCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint32_t* check_pQueueFamilyIndices;
check_pQueueFamilyIndices = (const uint32_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pQueueFamilyIndices)
{
if (!(check_pQueueFamilyIndices))
{
fprintf(stderr, "fatal: forUnmarshaling->pQueueFamilyIndices inconsistent between guest and host\n");
}
vkStream->read((uint32_t*)forUnmarshaling->pQueueFamilyIndices, forUnmarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
}
void marshal_VkSubresourceLayout(
VulkanStreamGuest* vkStream,
const VkSubresourceLayout* forMarshaling)
{
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->rowPitch, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->arrayPitch, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->depthPitch, sizeof(VkDeviceSize));
}
void unmarshal_VkSubresourceLayout(
VulkanStreamGuest* vkStream,
VkSubresourceLayout* forUnmarshaling)
{
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->rowPitch, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->arrayPitch, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->depthPitch, sizeof(VkDeviceSize));
}
void marshal_VkComponentMapping(
VulkanStreamGuest* vkStream,
const VkComponentMapping* forMarshaling)
{
vkStream->write((VkComponentSwizzle*)&forMarshaling->r, sizeof(VkComponentSwizzle));
vkStream->write((VkComponentSwizzle*)&forMarshaling->g, sizeof(VkComponentSwizzle));
vkStream->write((VkComponentSwizzle*)&forMarshaling->b, sizeof(VkComponentSwizzle));
vkStream->write((VkComponentSwizzle*)&forMarshaling->a, sizeof(VkComponentSwizzle));
}
void unmarshal_VkComponentMapping(
VulkanStreamGuest* vkStream,
VkComponentMapping* forUnmarshaling)
{
vkStream->read((VkComponentSwizzle*)&forUnmarshaling->r, sizeof(VkComponentSwizzle));
vkStream->read((VkComponentSwizzle*)&forUnmarshaling->g, sizeof(VkComponentSwizzle));
vkStream->read((VkComponentSwizzle*)&forUnmarshaling->b, sizeof(VkComponentSwizzle));
vkStream->read((VkComponentSwizzle*)&forUnmarshaling->a, sizeof(VkComponentSwizzle));
}
void marshal_VkImageSubresourceRange(
VulkanStreamGuest* vkStream,
const VkImageSubresourceRange* forMarshaling)
{
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->write((uint32_t*)&forMarshaling->baseMipLevel, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->levelCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
}
void unmarshal_VkImageSubresourceRange(
VulkanStreamGuest* vkStream,
VkImageSubresourceRange* forUnmarshaling)
{
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->read((uint32_t*)&forUnmarshaling->baseMipLevel, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->levelCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
}
void marshal_VkImageViewCreateInfo(
VulkanStreamGuest* vkStream,
const VkImageViewCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkImageViewCreateFlags*)&forMarshaling->flags, sizeof(VkImageViewCreateFlags));
uint64_t cgen_var_50;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_50, 1);
vkStream->write((uint64_t*)&cgen_var_50, 1 * 8);
vkStream->write((VkImageViewType*)&forMarshaling->viewType, sizeof(VkImageViewType));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
marshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forMarshaling->components));
marshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forMarshaling->subresourceRange));
}
void unmarshal_VkImageViewCreateInfo(
VulkanStreamGuest* vkStream,
VkImageViewCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageViewCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageViewCreateFlags));
uint64_t cgen_var_51;
vkStream->read((uint64_t*)&cgen_var_51, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_51, (VkImage*)&forUnmarshaling->image, 1);
vkStream->read((VkImageViewType*)&forUnmarshaling->viewType, sizeof(VkImageViewType));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
unmarshal_VkComponentMapping(vkStream, (VkComponentMapping*)(&forUnmarshaling->components));
unmarshal_VkImageSubresourceRange(vkStream, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange));
}
void marshal_VkShaderModuleCreateInfo(
VulkanStreamGuest* vkStream,
const VkShaderModuleCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkShaderModuleCreateFlags*)&forMarshaling->flags, sizeof(VkShaderModuleCreateFlags));
uint64_t cgen_var_52 = (uint64_t)forMarshaling->codeSize;
vkStream->putBe64(cgen_var_52);
vkStream->write((const uint32_t*)forMarshaling->pCode, (forMarshaling->codeSize / 4) * sizeof(const uint32_t));
}
void unmarshal_VkShaderModuleCreateInfo(
VulkanStreamGuest* vkStream,
VkShaderModuleCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkShaderModuleCreateFlags*)&forUnmarshaling->flags, sizeof(VkShaderModuleCreateFlags));
forUnmarshaling->codeSize = (size_t)vkStream->getBe64();
vkStream->read((uint32_t*)forUnmarshaling->pCode, (forUnmarshaling->codeSize / 4) * sizeof(const uint32_t));
}
void marshal_VkPipelineCacheCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineCacheCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineCacheCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCacheCreateFlags));
uint64_t cgen_var_54 = (uint64_t)forMarshaling->initialDataSize;
vkStream->putBe64(cgen_var_54);
vkStream->write((const void*)forMarshaling->pInitialData, forMarshaling->initialDataSize * sizeof(const uint8_t));
}
void unmarshal_VkPipelineCacheCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineCacheCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineCacheCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCacheCreateFlags));
forUnmarshaling->initialDataSize = (size_t)vkStream->getBe64();
vkStream->read((void*)forUnmarshaling->pInitialData, forUnmarshaling->initialDataSize * sizeof(const uint8_t));
}
void marshal_VkSpecializationMapEntry(
VulkanStreamGuest* vkStream,
const VkSpecializationMapEntry* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->constantID, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
uint64_t cgen_var_56 = (uint64_t)forMarshaling->size;
vkStream->putBe64(cgen_var_56);
}
void unmarshal_VkSpecializationMapEntry(
VulkanStreamGuest* vkStream,
VkSpecializationMapEntry* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->constantID, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
forUnmarshaling->size = (size_t)vkStream->getBe64();
}
void marshal_VkSpecializationInfo(
VulkanStreamGuest* vkStream,
const VkSpecializationInfo* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->mapEntryCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->mapEntryCount; ++i)
{
marshal_VkSpecializationMapEntry(vkStream, (const VkSpecializationMapEntry*)(forMarshaling->pMapEntries + i));
}
uint64_t cgen_var_58 = (uint64_t)forMarshaling->dataSize;
vkStream->putBe64(cgen_var_58);
vkStream->write((const void*)forMarshaling->pData, forMarshaling->dataSize * sizeof(const uint8_t));
}
void unmarshal_VkSpecializationInfo(
VulkanStreamGuest* vkStream,
VkSpecializationInfo* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->mapEntryCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->mapEntryCount; ++i)
{
unmarshal_VkSpecializationMapEntry(vkStream, (VkSpecializationMapEntry*)(forUnmarshaling->pMapEntries + i));
}
forUnmarshaling->dataSize = (size_t)vkStream->getBe64();
vkStream->read((void*)forUnmarshaling->pData, forUnmarshaling->dataSize * sizeof(const uint8_t));
}
void marshal_VkPipelineShaderStageCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineShaderStageCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineShaderStageCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags));
vkStream->write((VkShaderStageFlagBits*)&forMarshaling->stage, sizeof(VkShaderStageFlagBits));
uint64_t cgen_var_60;
vkStream->handleMapping()->mapHandles_VkShaderModule_u64(&forMarshaling->module, &cgen_var_60, 1);
vkStream->write((uint64_t*)&cgen_var_60, 1 * 8);
vkStream->putString(forMarshaling->pName);
// WARNING PTR CHECK
uint64_t cgen_var_61 = (uint64_t)(uintptr_t)forMarshaling->pSpecializationInfo;
vkStream->putBe64(cgen_var_61);
if (forMarshaling->pSpecializationInfo)
{
marshal_VkSpecializationInfo(vkStream, (const VkSpecializationInfo*)(forMarshaling->pSpecializationInfo));
}
}
void unmarshal_VkPipelineShaderStageCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineShaderStageCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineShaderStageCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineShaderStageCreateFlags));
vkStream->read((VkShaderStageFlagBits*)&forUnmarshaling->stage, sizeof(VkShaderStageFlagBits));
uint64_t cgen_var_62;
vkStream->read((uint64_t*)&cgen_var_62, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkShaderModule(&cgen_var_62, (VkShaderModule*)&forUnmarshaling->module, 1);
vkStream->loadStringInPlace((char**)&forUnmarshaling->pName);
// WARNING PTR CHECK
const VkSpecializationInfo* check_pSpecializationInfo;
check_pSpecializationInfo = (const VkSpecializationInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pSpecializationInfo)
{
if (!(check_pSpecializationInfo))
{
fprintf(stderr, "fatal: forUnmarshaling->pSpecializationInfo inconsistent between guest and host\n");
}
unmarshal_VkSpecializationInfo(vkStream, (VkSpecializationInfo*)(forUnmarshaling->pSpecializationInfo));
}
}
void marshal_VkVertexInputBindingDescription(
VulkanStreamGuest* vkStream,
const VkVertexInputBindingDescription* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->stride, sizeof(uint32_t));
vkStream->write((VkVertexInputRate*)&forMarshaling->inputRate, sizeof(VkVertexInputRate));
}
void unmarshal_VkVertexInputBindingDescription(
VulkanStreamGuest* vkStream,
VkVertexInputBindingDescription* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->stride, sizeof(uint32_t));
vkStream->read((VkVertexInputRate*)&forUnmarshaling->inputRate, sizeof(VkVertexInputRate));
}
void marshal_VkVertexInputAttributeDescription(
VulkanStreamGuest* vkStream,
const VkVertexInputAttributeDescription* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->location, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
}
void unmarshal_VkVertexInputAttributeDescription(
VulkanStreamGuest* vkStream,
VkVertexInputAttributeDescription* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->location, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
}
void marshal_VkPipelineVertexInputStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineVertexInputStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineVertexInputStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDescriptionCount; ++i)
{
marshal_VkVertexInputBindingDescription(vkStream, (const VkVertexInputBindingDescription*)(forMarshaling->pVertexBindingDescriptions + i));
}
vkStream->write((uint32_t*)&forMarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexAttributeDescriptionCount; ++i)
{
marshal_VkVertexInputAttributeDescription(vkStream, (const VkVertexInputAttributeDescription*)(forMarshaling->pVertexAttributeDescriptions + i));
}
}
void unmarshal_VkPipelineVertexInputStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineVertexInputStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineVertexInputStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineVertexInputStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDescriptionCount; ++i)
{
unmarshal_VkVertexInputBindingDescription(vkStream, (VkVertexInputBindingDescription*)(forUnmarshaling->pVertexBindingDescriptions + i));
}
vkStream->read((uint32_t*)&forUnmarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexAttributeDescriptionCount; ++i)
{
unmarshal_VkVertexInputAttributeDescription(vkStream, (VkVertexInputAttributeDescription*)(forUnmarshaling->pVertexAttributeDescriptions + i));
}
}
void marshal_VkPipelineInputAssemblyStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineInputAssemblyStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineInputAssemblyStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags));
vkStream->write((VkPrimitiveTopology*)&forMarshaling->topology, sizeof(VkPrimitiveTopology));
vkStream->write((VkBool32*)&forMarshaling->primitiveRestartEnable, sizeof(VkBool32));
}
void unmarshal_VkPipelineInputAssemblyStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineInputAssemblyStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineInputAssemblyStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineInputAssemblyStateCreateFlags));
vkStream->read((VkPrimitiveTopology*)&forUnmarshaling->topology, sizeof(VkPrimitiveTopology));
vkStream->read((VkBool32*)&forUnmarshaling->primitiveRestartEnable, sizeof(VkBool32));
}
void marshal_VkPipelineTessellationStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineTessellationStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineTessellationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->patchControlPoints, sizeof(uint32_t));
}
void unmarshal_VkPipelineTessellationStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineTessellationStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineTessellationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineTessellationStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->patchControlPoints, sizeof(uint32_t));
}
void marshal_VkViewport(
VulkanStreamGuest* vkStream,
const VkViewport* forMarshaling)
{
vkStream->write((float*)&forMarshaling->x, sizeof(float));
vkStream->write((float*)&forMarshaling->y, sizeof(float));
vkStream->write((float*)&forMarshaling->width, sizeof(float));
vkStream->write((float*)&forMarshaling->height, sizeof(float));
vkStream->write((float*)&forMarshaling->minDepth, sizeof(float));
vkStream->write((float*)&forMarshaling->maxDepth, sizeof(float));
}
void unmarshal_VkViewport(
VulkanStreamGuest* vkStream,
VkViewport* forUnmarshaling)
{
vkStream->read((float*)&forUnmarshaling->x, sizeof(float));
vkStream->read((float*)&forUnmarshaling->y, sizeof(float));
vkStream->read((float*)&forUnmarshaling->width, sizeof(float));
vkStream->read((float*)&forUnmarshaling->height, sizeof(float));
vkStream->read((float*)&forUnmarshaling->minDepth, sizeof(float));
vkStream->read((float*)&forUnmarshaling->maxDepth, sizeof(float));
}
void marshal_VkOffset2D(
VulkanStreamGuest* vkStream,
const VkOffset2D* forMarshaling)
{
vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t));
vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t));
}
void unmarshal_VkOffset2D(
VulkanStreamGuest* vkStream,
VkOffset2D* forUnmarshaling)
{
vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t));
vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t));
}
void marshal_VkExtent2D(
VulkanStreamGuest* vkStream,
const VkExtent2D* forMarshaling)
{
vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
}
void unmarshal_VkExtent2D(
VulkanStreamGuest* vkStream,
VkExtent2D* forUnmarshaling)
{
vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
}
void marshal_VkRect2D(
VulkanStreamGuest* vkStream,
const VkRect2D* forMarshaling)
{
marshal_VkOffset2D(vkStream, (VkOffset2D*)(&forMarshaling->offset));
marshal_VkExtent2D(vkStream, (VkExtent2D*)(&forMarshaling->extent));
}
void unmarshal_VkRect2D(
VulkanStreamGuest* vkStream,
VkRect2D* forUnmarshaling)
{
unmarshal_VkOffset2D(vkStream, (VkOffset2D*)(&forUnmarshaling->offset));
unmarshal_VkExtent2D(vkStream, (VkExtent2D*)(&forUnmarshaling->extent));
}
void marshal_VkPipelineViewportStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineViewportStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineViewportStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->viewportCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_64 = (uint64_t)(uintptr_t)forMarshaling->pViewports;
vkStream->putBe64(cgen_var_64);
if (forMarshaling->pViewports)
{
for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i)
{
marshal_VkViewport(vkStream, (const VkViewport*)(forMarshaling->pViewports + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->scissorCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_65 = (uint64_t)(uintptr_t)forMarshaling->pScissors;
vkStream->putBe64(cgen_var_65);
if (forMarshaling->pScissors)
{
for (uint32_t i = 0; i < (uint32_t)forMarshaling->scissorCount; ++i)
{
marshal_VkRect2D(vkStream, (const VkRect2D*)(forMarshaling->pScissors + i));
}
}
}
void unmarshal_VkPipelineViewportStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineViewportStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineViewportStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineViewportStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->viewportCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkViewport* check_pViewports;
check_pViewports = (const VkViewport*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pViewports)
{
if (!(check_pViewports))
{
fprintf(stderr, "fatal: forUnmarshaling->pViewports inconsistent between guest and host\n");
}
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i)
{
unmarshal_VkViewport(vkStream, (VkViewport*)(forUnmarshaling->pViewports + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->scissorCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkRect2D* check_pScissors;
check_pScissors = (const VkRect2D*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pScissors)
{
if (!(check_pScissors))
{
fprintf(stderr, "fatal: forUnmarshaling->pScissors inconsistent between guest and host\n");
}
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->scissorCount; ++i)
{
unmarshal_VkRect2D(vkStream, (VkRect2D*)(forUnmarshaling->pScissors + i));
}
}
}
void marshal_VkPipelineRasterizationStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineRasterizationStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineRasterizationStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags));
vkStream->write((VkBool32*)&forMarshaling->depthClampEnable, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->rasterizerDiscardEnable, sizeof(VkBool32));
vkStream->write((VkPolygonMode*)&forMarshaling->polygonMode, sizeof(VkPolygonMode));
vkStream->write((VkCullModeFlags*)&forMarshaling->cullMode, sizeof(VkCullModeFlags));
vkStream->write((VkFrontFace*)&forMarshaling->frontFace, sizeof(VkFrontFace));
vkStream->write((VkBool32*)&forMarshaling->depthBiasEnable, sizeof(VkBool32));
vkStream->write((float*)&forMarshaling->depthBiasConstantFactor, sizeof(float));
vkStream->write((float*)&forMarshaling->depthBiasClamp, sizeof(float));
vkStream->write((float*)&forMarshaling->depthBiasSlopeFactor, sizeof(float));
vkStream->write((float*)&forMarshaling->lineWidth, sizeof(float));
}
void unmarshal_VkPipelineRasterizationStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineRasterizationStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineRasterizationStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineRasterizationStateCreateFlags));
vkStream->read((VkBool32*)&forUnmarshaling->depthClampEnable, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->rasterizerDiscardEnable, sizeof(VkBool32));
vkStream->read((VkPolygonMode*)&forUnmarshaling->polygonMode, sizeof(VkPolygonMode));
vkStream->read((VkCullModeFlags*)&forUnmarshaling->cullMode, sizeof(VkCullModeFlags));
vkStream->read((VkFrontFace*)&forUnmarshaling->frontFace, sizeof(VkFrontFace));
vkStream->read((VkBool32*)&forUnmarshaling->depthBiasEnable, sizeof(VkBool32));
vkStream->read((float*)&forUnmarshaling->depthBiasConstantFactor, sizeof(float));
vkStream->read((float*)&forUnmarshaling->depthBiasClamp, sizeof(float));
vkStream->read((float*)&forUnmarshaling->depthBiasSlopeFactor, sizeof(float));
vkStream->read((float*)&forUnmarshaling->lineWidth, sizeof(float));
}
void marshal_VkPipelineMultisampleStateCreateInfo(
VulkanStreamGuest* vkStream,
const VkPipelineMultisampleStateCreateInfo* forMarshaling)
{
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
marshal_extension_struct(vkStream, forMarshaling->pNext);
vkStream->write((VkPipelineMultisampleStateCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->rasterizationSamples, sizeof(VkSampleCountFlagBits));
vkStream->write((VkBool32*)&forMarshaling->sampleShadingEnable, sizeof(VkBool32));
vkStream->write((float*)&forMarshaling->minSampleShading, sizeof(float));
// WARNING PTR CHECK
uint64_t cgen_var_68 = (uint64_t)(uintptr_t)forMarshaling->pSampleMask;
vkStream->putBe64(cgen_var_68);
if (forMarshaling->pSampleMask)
{
vkStream->write((const VkSampleMask*)forMarshaling->pSampleMask, (((forMarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
}
vkStream->write((VkBool32*)&forMarshaling->alphaToCoverageEnable, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->alphaToOneEnable, sizeof(VkBool32));
}
void unmarshal_VkPipelineMultisampleStateCreateInfo(
VulkanStreamGuest* vkStream,
VkPipelineMultisampleStateCreateInfo* forUnmarshaling)
{
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
unmarshal_extension_struct(vkStream, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineMultisampleStateCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineMultisampleStateCreateFlags));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->rasterizationSam