blob: 3fb53d21d697d9adb78133ed7c003fbf09d9f035 [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 registry/vulkan/scripts/genvk.py -registry registry/vulkan/xml/vk.xml cereal
// -o ../vulkan-cereal/stream-servers/vulkan/cereal
//
// Please do not modify directly;
// re-run gfxstream-protocols/scripts/generate-vulkan-sources.sh,
// or directly from Python by defining:
// VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml
// VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py
// CEREAL_OUTPUT_DIR: Where to put the generated sources.
//
// python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o
// $CEREAL_OUTPUT_DIR
//
#include "goldfish_vk_marshaling_guest.h"
#include <cstring>
#include "goldfish_vk_extension_structs_guest.h"
#include "goldfish_vk_private_defs.h"
namespace goldfish_vk {
void marshal_extension_struct(VulkanStreamGuest* vkStream, VkStructureType rootType,
const void* structExtension);
void unmarshal_extension_struct(VulkanStreamGuest* vkStream, VkStructureType rootType,
void* structExtension_out);
#ifdef VK_VERSION_1_0
void marshal_VkExtent2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExtent2D* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
}
void unmarshal_VkExtent2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExtent2D* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
}
void marshal_VkExtent3D(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExtent3D* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkExtent3D* forUnmarshaling) {
(void)rootType;
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_VkOffset2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkOffset2D* forMarshaling) {
(void)rootType;
vkStream->write((int32_t*)&forMarshaling->x, sizeof(int32_t));
vkStream->write((int32_t*)&forMarshaling->y, sizeof(int32_t));
}
void unmarshal_VkOffset2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkOffset2D* forUnmarshaling) {
(void)rootType;
vkStream->read((int32_t*)&forUnmarshaling->x, sizeof(int32_t));
vkStream->read((int32_t*)&forUnmarshaling->y, sizeof(int32_t));
}
void marshal_VkOffset3D(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkOffset3D* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkOffset3D* forUnmarshaling) {
(void)rootType;
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_VkRect2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRect2D* forMarshaling) {
(void)rootType;
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->offset));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->extent));
}
void unmarshal_VkRect2D(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRect2D* forUnmarshaling) {
(void)rootType;
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->offset));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->extent));
}
void marshal_VkBaseInStructure(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBaseInStructure* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
}
void unmarshal_VkBaseInStructure(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBaseInStructure* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
}
void marshal_VkBaseOutStructure(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBaseOutStructure* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
}
void unmarshal_VkBaseOutStructure(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBaseOutStructure* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
}
void marshal_VkBufferMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferMemoryBarrier* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
}
void unmarshal_VkBufferMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferMemoryBarrier* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
}
void marshal_VkDispatchIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDispatchIndirectCommand* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->x, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->y, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->z, sizeof(uint32_t));
}
void unmarshal_VkDispatchIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDispatchIndirectCommand* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->x, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->y, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->z, sizeof(uint32_t));
}
void marshal_VkDrawIndexedIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDrawIndexedIndirectCommand* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->indexCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->firstIndex, sizeof(uint32_t));
vkStream->write((int32_t*)&forMarshaling->vertexOffset, sizeof(int32_t));
vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t));
}
void unmarshal_VkDrawIndexedIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDrawIndexedIndirectCommand* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->indexCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->firstIndex, sizeof(uint32_t));
vkStream->read((int32_t*)&forUnmarshaling->vertexOffset, sizeof(int32_t));
vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t));
}
void marshal_VkDrawIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDrawIndirectCommand* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->vertexCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->instanceCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->firstVertex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->firstInstance, sizeof(uint32_t));
}
void unmarshal_VkDrawIndirectCommand(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDrawIndirectCommand* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->vertexCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->instanceCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->firstVertex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->firstInstance, sizeof(uint32_t));
}
void marshal_VkImageSubresourceRange(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageSubresourceRange* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkImageSubresourceRange* forUnmarshaling) {
(void)rootType;
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_VkImageMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageMemoryBarrier* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkImageLayout*)&forMarshaling->oldLayout, sizeof(VkImageLayout));
vkStream->write((VkImageLayout*)&forMarshaling->newLayout, sizeof(VkImageLayout));
vkStream->write((uint32_t*)&forMarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
marshal_VkImageSubresourceRange(vkStream, rootType,
(VkImageSubresourceRange*)(&forMarshaling->subresourceRange));
}
void unmarshal_VkImageMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageMemoryBarrier* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkImageLayout*)&forUnmarshaling->oldLayout, sizeof(VkImageLayout));
vkStream->read((VkImageLayout*)&forUnmarshaling->newLayout, sizeof(VkImageLayout));
vkStream->read((uint32_t*)&forUnmarshaling->srcQueueFamilyIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstQueueFamilyIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
unmarshal_VkImageSubresourceRange(
vkStream, rootType, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange));
}
void marshal_VkMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryBarrier* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
}
void unmarshal_VkMemoryBarrier(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryBarrier* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
}
void marshal_VkPipelineCacheHeaderVersionOne(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineCacheHeaderVersionOne* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->headerSize, sizeof(uint32_t));
vkStream->write((VkPipelineCacheHeaderVersion*)&forMarshaling->headerVersion,
sizeof(VkPipelineCacheHeaderVersion));
vkStream->write((uint32_t*)&forMarshaling->vendorID, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->deviceID, sizeof(uint32_t));
vkStream->write((uint8_t*)forMarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
}
void unmarshal_VkPipelineCacheHeaderVersionOne(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPipelineCacheHeaderVersionOne* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->headerSize, sizeof(uint32_t));
vkStream->read((VkPipelineCacheHeaderVersion*)&forUnmarshaling->headerVersion,
sizeof(VkPipelineCacheHeaderVersion));
vkStream->read((uint32_t*)&forUnmarshaling->vendorID, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->deviceID, sizeof(uint32_t));
vkStream->read((uint8_t*)forUnmarshaling->pipelineCacheUUID, VK_UUID_SIZE * sizeof(uint8_t));
}
void marshal_VkAllocationCallbacks(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAllocationCallbacks* forMarshaling) {
(void)rootType;
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pUserData;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pUserData) {
vkStream->write((void*)forMarshaling->pUserData, sizeof(uint8_t));
}
uint64_t cgen_var_1 = (uint64_t)forMarshaling->pfnAllocation;
vkStream->putBe64(cgen_var_1);
uint64_t cgen_var_2 = (uint64_t)forMarshaling->pfnReallocation;
vkStream->putBe64(cgen_var_2);
uint64_t cgen_var_3 = (uint64_t)forMarshaling->pfnFree;
vkStream->putBe64(cgen_var_3);
uint64_t cgen_var_4 = (uint64_t)forMarshaling->pfnInternalAllocation;
vkStream->putBe64(cgen_var_4);
uint64_t cgen_var_5 = (uint64_t)forMarshaling->pfnInternalFree;
vkStream->putBe64(cgen_var_5);
}
void unmarshal_VkAllocationCallbacks(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAllocationCallbacks* forUnmarshaling) {
(void)rootType;
// 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_VkApplicationInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkApplicationInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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_0 = (uint64_t)(uintptr_t)forMarshaling->pEngineName;
vkStream->putBe64(cgen_var_0);
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, VkStructureType rootType,
VkApplicationInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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_VkFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFormatProperties* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkFormatProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->linearTilingFeatures,
sizeof(VkFormatFeatureFlags));
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->optimalTilingFeatures,
sizeof(VkFormatFeatureFlags));
vkStream->read((VkFormatFeatureFlags*)&forUnmarshaling->bufferFeatures,
sizeof(VkFormatFeatureFlags));
}
void marshal_VkImageFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageFormatProperties* forMarshaling) {
(void)rootType;
marshal_VkExtent3D(vkStream, rootType, (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, VkStructureType rootType,
VkImageFormatProperties* forUnmarshaling) {
(void)rootType;
unmarshal_VkExtent3D(vkStream, rootType, (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_VkInstanceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkInstanceCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkInstanceCreateFlags*)&forMarshaling->flags, sizeof(VkInstanceCreateFlags));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pApplicationInfo;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pApplicationInfo) {
marshal_VkApplicationInfo(vkStream, rootType,
(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, VkStructureType rootType,
VkInstanceCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, rootType,
(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_VkMemoryHeap(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryHeap* forMarshaling) {
(void)rootType;
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
vkStream->write((VkMemoryHeapFlags*)&forMarshaling->flags, sizeof(VkMemoryHeapFlags));
}
void unmarshal_VkMemoryHeap(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryHeap* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
vkStream->read((VkMemoryHeapFlags*)&forUnmarshaling->flags, sizeof(VkMemoryHeapFlags));
}
void marshal_VkMemoryType(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryType* forMarshaling) {
(void)rootType;
vkStream->write((VkMemoryPropertyFlags*)&forMarshaling->propertyFlags,
sizeof(VkMemoryPropertyFlags));
vkStream->write((uint32_t*)&forMarshaling->heapIndex, sizeof(uint32_t));
}
void unmarshal_VkMemoryType(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryType* forUnmarshaling) {
(void)rootType;
vkStream->read((VkMemoryPropertyFlags*)&forUnmarshaling->propertyFlags,
sizeof(VkMemoryPropertyFlags));
vkStream->read((uint32_t*)&forUnmarshaling->heapIndex, sizeof(uint32_t));
}
void marshal_VkPhysicalDeviceFeatures(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceFeatures* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkPhysicalDeviceFeatures* forUnmarshaling) {
(void)rootType;
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_VkPhysicalDeviceLimits(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceLimits* forMarshaling) {
(void)rootType;
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_0 = (uint64_t)forMarshaling->minMemoryMapAlignment;
vkStream->putBe64(cgen_var_0);
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, VkStructureType rootType,
VkPhysicalDeviceLimits* forUnmarshaling) {
(void)rootType;
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_VkPhysicalDeviceMemoryProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceMemoryProperties* forMarshaling) {
(void)rootType;
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, rootType, (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, rootType, (VkMemoryHeap*)(forMarshaling->memoryHeaps + i));
}
}
void unmarshal_VkPhysicalDeviceMemoryProperties(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceMemoryProperties* forUnmarshaling) {
(void)rootType;
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, rootType,
(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, rootType,
(VkMemoryHeap*)(forUnmarshaling->memoryHeaps + i));
}
}
void marshal_VkPhysicalDeviceSparseProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSparseProperties* forMarshaling) {
(void)rootType;
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,
VkStructureType rootType,
VkPhysicalDeviceSparseProperties* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkPhysicalDeviceProperties* forMarshaling) {
(void)rootType;
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, rootType,
(VkPhysicalDeviceLimits*)(&forMarshaling->limits));
marshal_VkPhysicalDeviceSparseProperties(
vkStream, rootType, (VkPhysicalDeviceSparseProperties*)(&forMarshaling->sparseProperties));
}
void unmarshal_VkPhysicalDeviceProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceProperties* forUnmarshaling) {
(void)rootType;
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, rootType,
(VkPhysicalDeviceLimits*)(&forUnmarshaling->limits));
unmarshal_VkPhysicalDeviceSparseProperties(
vkStream, rootType,
(VkPhysicalDeviceSparseProperties*)(&forUnmarshaling->sparseProperties));
}
void marshal_VkQueueFamilyProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkQueueFamilyProperties* forMarshaling) {
(void)rootType;
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, rootType,
(VkExtent3D*)(&forMarshaling->minImageTransferGranularity));
}
void unmarshal_VkQueueFamilyProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkQueueFamilyProperties* forUnmarshaling) {
(void)rootType;
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, rootType,
(VkExtent3D*)(&forUnmarshaling->minImageTransferGranularity));
}
void marshal_VkDeviceQueueCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceQueueCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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, VkStructureType rootType,
VkDeviceQueueCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkDeviceCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDeviceCreateFlags*)&forMarshaling->flags, sizeof(VkDeviceCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->queueCreateInfoCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->queueCreateInfoCount; ++i) {
marshal_VkDeviceQueueCreateInfo(
vkStream, rootType,
(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_0 = (uint64_t)(uintptr_t)forMarshaling->pEnabledFeatures;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pEnabledFeatures) {
marshal_VkPhysicalDeviceFeatures(
vkStream, rootType, (const VkPhysicalDeviceFeatures*)(forMarshaling->pEnabledFeatures));
}
}
void unmarshal_VkDeviceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceCreateFlags*)&forUnmarshaling->flags, sizeof(VkDeviceCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueCreateInfoCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->queueCreateInfoCount; ++i) {
unmarshal_VkDeviceQueueCreateInfo(
vkStream, rootType,
(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, rootType, (VkPhysicalDeviceFeatures*)(forUnmarshaling->pEnabledFeatures));
}
}
void marshal_VkExtensionProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExtensionProperties* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkExtensionProperties* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkLayerProperties* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkLayerProperties* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkSubmitInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pWaitSemaphores, cgen_var_0, forMarshaling->waitSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_0, 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_1;
vkStream->alloc((void**)&cgen_var_1, forMarshaling->commandBufferCount * 8);
vkStream->handleMapping()->mapHandles_VkCommandBuffer_u64(
forMarshaling->pCommandBuffers, cgen_var_1, forMarshaling->commandBufferCount);
vkStream->write((uint64_t*)cgen_var_1, forMarshaling->commandBufferCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->signalSemaphoreCount) {
uint64_t* cgen_var_2;
vkStream->alloc((void**)&cgen_var_2, forMarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pSignalSemaphores, cgen_var_2, forMarshaling->signalSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_2, forMarshaling->signalSemaphoreCount * 8);
}
}
void unmarshal_VkSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubmitInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_0, (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_1;
vkStream->alloc((void**)&cgen_var_1, forUnmarshaling->commandBufferCount * 8);
vkStream->read((uint64_t*)cgen_var_1, forUnmarshaling->commandBufferCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkCommandBuffer(
cgen_var_1, (VkCommandBuffer*)forUnmarshaling->pCommandBuffers,
forUnmarshaling->commandBufferCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->signalSemaphoreCount) {
uint64_t* cgen_var_2;
vkStream->alloc((void**)&cgen_var_2, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_2, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_2, (VkSemaphore*)forUnmarshaling->pSignalSemaphores,
forUnmarshaling->signalSemaphoreCount);
}
}
void marshal_VkMappedMemoryRange(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMappedMemoryRange* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
}
void unmarshal_VkMappedMemoryRange(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMappedMemoryRange* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
}
void marshal_VkMemoryAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDeviceSize*)&forMarshaling->allocationSize, sizeof(VkDeviceSize));
vkStream->write((uint32_t*)&forMarshaling->memoryTypeIndex, sizeof(uint32_t));
}
void unmarshal_VkMemoryAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceSize*)&forUnmarshaling->allocationSize, sizeof(VkDeviceSize));
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeIndex, sizeof(uint32_t));
}
void marshal_VkMemoryRequirements(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryRequirements* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkMemoryRequirements* forUnmarshaling) {
(void)rootType;
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_VkSparseMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseMemoryBind* forMarshaling) {
(void)rootType;
vkStream->write((VkDeviceSize*)&forMarshaling->resourceOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags,
sizeof(VkSparseMemoryBindFlags));
}
void unmarshal_VkSparseMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseMemoryBind* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDeviceSize*)&forUnmarshaling->resourceOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags,
sizeof(VkSparseMemoryBindFlags));
}
void marshal_VkSparseBufferMemoryBindInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseBufferMemoryBindInfo* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) {
marshal_VkSparseMemoryBind(vkStream, rootType,
(const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
}
}
}
void unmarshal_VkSparseBufferMemoryBindInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseBufferMemoryBindInfo* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) {
unmarshal_VkSparseMemoryBind(vkStream, rootType,
(VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
}
void marshal_VkSparseImageOpaqueMemoryBindInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageOpaqueMemoryBindInfo* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) {
marshal_VkSparseMemoryBind(vkStream, rootType,
(const VkSparseMemoryBind*)(forMarshaling->pBinds + i));
}
}
}
void unmarshal_VkSparseImageOpaqueMemoryBindInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseImageOpaqueMemoryBindInfo* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) {
unmarshal_VkSparseMemoryBind(vkStream, rootType,
(VkSparseMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
}
void marshal_VkImageSubresource(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageSubresource* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkImageSubresource* forUnmarshaling) {
(void)rootType;
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_VkSparseImageMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageMemoryBind* forMarshaling) {
(void)rootType;
marshal_VkImageSubresource(vkStream, rootType,
(VkImageSubresource*)(&forMarshaling->subresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->offset));
marshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->extent));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->write((VkSparseMemoryBindFlags*)&forMarshaling->flags,
sizeof(VkSparseMemoryBindFlags));
}
void unmarshal_VkSparseImageMemoryBind(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseImageMemoryBind* forUnmarshaling) {
(void)rootType;
unmarshal_VkImageSubresource(vkStream, rootType,
(VkImageSubresource*)(&forUnmarshaling->subresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->offset));
unmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forUnmarshaling->extent));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->read((VkSparseMemoryBindFlags*)&forUnmarshaling->flags,
sizeof(VkSparseMemoryBindFlags));
}
void marshal_VkSparseImageMemoryBindInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageMemoryBindInfo* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->bindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindCount; ++i) {
marshal_VkSparseImageMemoryBind(
vkStream, rootType, (const VkSparseImageMemoryBind*)(forMarshaling->pBinds + i));
}
}
}
void unmarshal_VkSparseImageMemoryBindInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseImageMemoryBindInfo* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
vkStream->read((uint32_t*)&forUnmarshaling->bindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindCount; ++i) {
unmarshal_VkSparseImageMemoryBind(
vkStream, rootType, (VkSparseImageMemoryBind*)(forUnmarshaling->pBinds + i));
}
}
}
void marshal_VkBindSparseInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindSparseInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pWaitSemaphores, cgen_var_0, forMarshaling->waitSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->waitSemaphoreCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->bufferBindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bufferBindCount; ++i) {
marshal_VkSparseBufferMemoryBindInfo(
vkStream, rootType,
(const VkSparseBufferMemoryBindInfo*)(forMarshaling->pBufferBinds + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->imageOpaqueBindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageOpaqueBindCount; ++i) {
marshal_VkSparseImageOpaqueMemoryBindInfo(
vkStream, rootType,
(const VkSparseImageOpaqueMemoryBindInfo*)(forMarshaling->pImageOpaqueBinds + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->imageBindCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->imageBindCount; ++i) {
marshal_VkSparseImageMemoryBindInfo(
vkStream, rootType,
(const VkSparseImageMemoryBindInfo*)(forMarshaling->pImageBinds + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->signalSemaphoreCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forMarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pSignalSemaphores, cgen_var_1, forMarshaling->signalSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_1, forMarshaling->signalSemaphoreCount * 8);
}
}
void unmarshal_VkBindSparseInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindSparseInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_0, (VkSemaphore*)forUnmarshaling->pWaitSemaphores,
forUnmarshaling->waitSemaphoreCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->bufferBindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bufferBindCount; ++i) {
unmarshal_VkSparseBufferMemoryBindInfo(
vkStream, rootType,
(VkSparseBufferMemoryBindInfo*)(forUnmarshaling->pBufferBinds + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->imageOpaqueBindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageOpaqueBindCount; ++i) {
unmarshal_VkSparseImageOpaqueMemoryBindInfo(
vkStream, rootType,
(VkSparseImageOpaqueMemoryBindInfo*)(forUnmarshaling->pImageOpaqueBinds + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->imageBindCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->imageBindCount; ++i) {
unmarshal_VkSparseImageMemoryBindInfo(
vkStream, rootType,
(VkSparseImageMemoryBindInfo*)(forUnmarshaling->pImageBinds + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->signalSemaphoreCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_1, forUnmarshaling->signalSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_1, (VkSemaphore*)forUnmarshaling->pSignalSemaphores,
forUnmarshaling->signalSemaphoreCount);
}
}
void marshal_VkSparseImageFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageFormatProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
marshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->imageGranularity));
vkStream->write((VkSparseImageFormatFlags*)&forMarshaling->flags,
sizeof(VkSparseImageFormatFlags));
}
void unmarshal_VkSparseImageFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseImageFormatProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
unmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forUnmarshaling->imageGranularity));
vkStream->read((VkSparseImageFormatFlags*)&forUnmarshaling->flags,
sizeof(VkSparseImageFormatFlags));
}
void marshal_VkSparseImageMemoryRequirements(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageMemoryRequirements* forMarshaling) {
(void)rootType;
marshal_VkSparseImageFormatProperties(
vkStream, rootType, (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,
VkStructureType rootType,
VkSparseImageMemoryRequirements* forUnmarshaling) {
(void)rootType;
unmarshal_VkSparseImageFormatProperties(
vkStream, rootType, (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_VkFenceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFenceCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFenceCreateFlags*)&forMarshaling->flags, sizeof(VkFenceCreateFlags));
}
void unmarshal_VkFenceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFenceCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFenceCreateFlags*)&forUnmarshaling->flags, sizeof(VkFenceCreateFlags));
}
void marshal_VkSemaphoreCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSemaphoreCreateFlags*)&forMarshaling->flags, sizeof(VkSemaphoreCreateFlags));
}
void unmarshal_VkSemaphoreCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSemaphoreCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSemaphoreCreateFlags*)&forUnmarshaling->flags,
sizeof(VkSemaphoreCreateFlags));
}
void marshal_VkEventCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkEventCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkEventCreateFlags*)&forMarshaling->flags, sizeof(VkEventCreateFlags));
}
void unmarshal_VkEventCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkEventCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkEventCreateFlags*)&forUnmarshaling->flags, sizeof(VkEventCreateFlags));
}
void marshal_VkQueryPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkQueryPoolCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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, VkStructureType rootType,
VkQueryPoolCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkBufferCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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_0 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pQueueFamilyIndices) {
vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices,
forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
}
void unmarshal_VkBufferCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkBufferViewCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBufferViewCreateFlags*)&forMarshaling->flags,
sizeof(VkBufferViewCreateFlags));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 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, VkStructureType rootType,
VkBufferViewCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBufferViewCreateFlags*)&forUnmarshaling->flags,
sizeof(VkBufferViewCreateFlags));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(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, VkStructureType rootType,
const VkImageCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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, rootType, (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_0 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
vkStream->putBe64(cgen_var_0);
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, VkStructureType rootType,
VkImageCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, rootType, (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, VkStructureType rootType,
const VkSubresourceLayout* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkSubresourceLayout* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkComponentMapping* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkComponentMapping* forUnmarshaling) {
(void)rootType;
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_VkImageViewCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageViewCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageViewCreateFlags*)&forMarshaling->flags, sizeof(VkImageViewCreateFlags));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkImageViewType*)&forMarshaling->viewType, sizeof(VkImageViewType));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
marshal_VkComponentMapping(vkStream, rootType,
(VkComponentMapping*)(&forMarshaling->components));
marshal_VkImageSubresourceRange(vkStream, rootType,
(VkImageSubresourceRange*)(&forMarshaling->subresourceRange));
}
void unmarshal_VkImageViewCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageViewCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageViewCreateFlags*)&forUnmarshaling->flags,
sizeof(VkImageViewCreateFlags));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
vkStream->read((VkImageViewType*)&forUnmarshaling->viewType, sizeof(VkImageViewType));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
unmarshal_VkComponentMapping(vkStream, rootType,
(VkComponentMapping*)(&forUnmarshaling->components));
unmarshal_VkImageSubresourceRange(
vkStream, rootType, (VkImageSubresourceRange*)(&forUnmarshaling->subresourceRange));
}
void marshal_VkShaderModuleCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkShaderModuleCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkShaderModuleCreateFlags*)&forMarshaling->flags,
sizeof(VkShaderModuleCreateFlags));
uint64_t cgen_var_0 = (uint64_t)forMarshaling->codeSize;
vkStream->putBe64(cgen_var_0);
vkStream->write((const uint32_t*)forMarshaling->pCode,
(forMarshaling->codeSize / 4) * sizeof(const uint32_t));
}
void unmarshal_VkShaderModuleCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkShaderModuleCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkPipelineCacheCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineCacheCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineCacheCreateFlags));
uint64_t cgen_var_0 = (uint64_t)forMarshaling->initialDataSize;
vkStream->putBe64(cgen_var_0);
vkStream->write((const void*)forMarshaling->pInitialData,
forMarshaling->initialDataSize * sizeof(const uint8_t));
}
void unmarshal_VkPipelineCacheCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineCacheCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkSpecializationMapEntry* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->constantID, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
uint64_t cgen_var_0 = (uint64_t)forMarshaling->size;
vkStream->putBe64(cgen_var_0);
}
void unmarshal_VkSpecializationMapEntry(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSpecializationMapEntry* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkSpecializationInfo* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->mapEntryCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->mapEntryCount; ++i) {
marshal_VkSpecializationMapEntry(
vkStream, rootType,
(const VkSpecializationMapEntry*)(forMarshaling->pMapEntries + i));
}
}
uint64_t cgen_var_0 = (uint64_t)forMarshaling->dataSize;
vkStream->putBe64(cgen_var_0);
vkStream->write((const void*)forMarshaling->pData,
forMarshaling->dataSize * sizeof(const uint8_t));
}
void unmarshal_VkSpecializationInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSpecializationInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->mapEntryCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->mapEntryCount; ++i) {
unmarshal_VkSpecializationMapEntry(
vkStream, rootType, (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, VkStructureType rootType,
const VkPipelineShaderStageCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineShaderStageCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineShaderStageCreateFlags));
vkStream->write((VkShaderStageFlagBits*)&forMarshaling->stage, sizeof(VkShaderStageFlagBits));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkShaderModule_u64(&forMarshaling->module, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->putString(forMarshaling->pName);
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pSpecializationInfo;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pSpecializationInfo) {
marshal_VkSpecializationInfo(
vkStream, rootType, (const VkSpecializationInfo*)(forMarshaling->pSpecializationInfo));
}
}
void unmarshal_VkPipelineShaderStageCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPipelineShaderStageCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineShaderStageCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineShaderStageCreateFlags));
vkStream->read((VkShaderStageFlagBits*)&forUnmarshaling->stage, sizeof(VkShaderStageFlagBits));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkShaderModule(
&cgen_var_0, (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, rootType, (VkSpecializationInfo*)(forUnmarshaling->pSpecializationInfo));
}
}
void marshal_VkComputePipelineCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkComputePipelineCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags));
marshal_VkPipelineShaderStageCreateInfo(
vkStream, rootType, (VkPipelineShaderStageCreateInfo*)(&forMarshaling->stage));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle,
&cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t));
}
void unmarshal_VkComputePipelineCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkComputePipelineCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags));
unmarshal_VkPipelineShaderStageCreateInfo(
vkStream, rootType, (VkPipelineShaderStageCreateInfo*)(&forUnmarshaling->stage));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(
&cgen_var_0, (VkPipelineLayout*)&forUnmarshaling->layout, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkPipeline(
&cgen_var_1, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1);
vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t));
}
void marshal_VkVertexInputBindingDescription(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVertexInputBindingDescription* forMarshaling) {
(void)rootType;
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,
VkStructureType rootType,
VkVertexInputBindingDescription* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkVertexInputAttributeDescription* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkVertexInputAttributeDescription* forUnmarshaling) {
(void)rootType;
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, VkStructureType rootType,
const VkPipelineVertexInputStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineVertexInputStateCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineVertexInputStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexBindingDescriptionCount; ++i) {
marshal_VkVertexInputBindingDescription(
vkStream, rootType,
(const VkVertexInputBindingDescription*)(forMarshaling->pVertexBindingDescriptions +
i));
}
}
vkStream->write((uint32_t*)&forMarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->vertexAttributeDescriptionCount; ++i) {
marshal_VkVertexInputAttributeDescription(
vkStream, rootType,
(const VkVertexInputAttributeDescription*)(forMarshaling
->pVertexAttributeDescriptions +
i));
}
}
}
void unmarshal_VkPipelineVertexInputStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineVertexInputStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineVertexInputStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineVertexInputStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->vertexBindingDescriptionCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexBindingDescriptionCount; ++i) {
unmarshal_VkVertexInputBindingDescription(
vkStream, rootType,
(VkVertexInputBindingDescription*)(forUnmarshaling->pVertexBindingDescriptions +
i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->vertexAttributeDescriptionCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->vertexAttributeDescriptionCount; ++i) {
unmarshal_VkVertexInputAttributeDescription(
vkStream, rootType,
(VkVertexInputAttributeDescription*)(forUnmarshaling->pVertexAttributeDescriptions +
i));
}
}
}
void marshal_VkPipelineInputAssemblyStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineInputAssemblyStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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, VkStructureType rootType,
VkPipelineInputAssemblyStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkPipelineTessellationStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineTessellationStateCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineTessellationStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->patchControlPoints, sizeof(uint32_t));
}
void unmarshal_VkPipelineTessellationStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineTessellationStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineTessellationStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineTessellationStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->patchControlPoints, sizeof(uint32_t));
}
void marshal_VkViewport(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkViewport* forMarshaling) {
(void)rootType;
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, VkStructureType rootType,
VkViewport* forUnmarshaling) {
(void)rootType;
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_VkPipelineViewportStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineViewportStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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_0 = (uint64_t)(uintptr_t)forMarshaling->pViewports;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pViewports) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->viewportCount; ++i) {
marshal_VkViewport(vkStream, rootType,
(const VkViewport*)(forMarshaling->pViewports + i));
}
}
}
vkStream->write((uint32_t*)&forMarshaling->scissorCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pScissors;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pScissors) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->scissorCount; ++i) {
marshal_VkRect2D(vkStream, rootType,
(const VkRect2D*)(forMarshaling->pScissors + i));
}
}
}
}
void unmarshal_VkPipelineViewportStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineViewportStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->viewportCount; ++i) {
unmarshal_VkViewport(vkStream, rootType,
(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");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->scissorCount; ++i) {
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(forUnmarshaling->pScissors + i));
}
}
}
}
void marshal_VkPipelineRasterizationStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineRasterizationStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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, VkStructureType rootType,
VkPipelineRasterizationStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (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, VkStructureType rootType,
const VkPipelineMultisampleStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, 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_0 = (uint64_t)(uintptr_t)forMarshaling->pSampleMask;
vkStream->putBe64(cgen_var_0);
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, VkStructureType rootType,
VkPipelineMultisampleStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineMultisampleStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineMultisampleStateCreateFlags));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->rasterizationSamples,
sizeof(VkSampleCountFlagBits));
vkStream->read((VkBool32*)&forUnmarshaling->sampleShadingEnable, sizeof(VkBool32));
vkStream->read((float*)&forUnmarshaling->minSampleShading, sizeof(float));
// WARNING PTR CHECK
const VkSampleMask* check_pSampleMask;
check_pSampleMask = (const VkSampleMask*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pSampleMask) {
if (!(check_pSampleMask)) {
fprintf(stderr,
"fatal: forUnmarshaling->pSampleMask inconsistent between guest and host\n");
}
vkStream->read(
(VkSampleMask*)forUnmarshaling->pSampleMask,
(((forUnmarshaling->rasterizationSamples) + 31) / 32) * sizeof(const VkSampleMask));
}
vkStream->read((VkBool32*)&forUnmarshaling->alphaToCoverageEnable, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->alphaToOneEnable, sizeof(VkBool32));
}
void marshal_VkStencilOpState(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkStencilOpState* forMarshaling) {
(void)rootType;
vkStream->write((VkStencilOp*)&forMarshaling->failOp, sizeof(VkStencilOp));
vkStream->write((VkStencilOp*)&forMarshaling->passOp, sizeof(VkStencilOp));
vkStream->write((VkStencilOp*)&forMarshaling->depthFailOp, sizeof(VkStencilOp));
vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp));
vkStream->write((uint32_t*)&forMarshaling->compareMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->writeMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->reference, sizeof(uint32_t));
}
void unmarshal_VkStencilOpState(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkStencilOpState* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStencilOp*)&forUnmarshaling->failOp, sizeof(VkStencilOp));
vkStream->read((VkStencilOp*)&forUnmarshaling->passOp, sizeof(VkStencilOp));
vkStream->read((VkStencilOp*)&forUnmarshaling->depthFailOp, sizeof(VkStencilOp));
vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp));
vkStream->read((uint32_t*)&forUnmarshaling->compareMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->writeMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->reference, sizeof(uint32_t));
}
void marshal_VkPipelineDepthStencilStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineDepthStencilStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineDepthStencilStateCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineDepthStencilStateCreateFlags));
vkStream->write((VkBool32*)&forMarshaling->depthTestEnable, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->depthWriteEnable, sizeof(VkBool32));
vkStream->write((VkCompareOp*)&forMarshaling->depthCompareOp, sizeof(VkCompareOp));
vkStream->write((VkBool32*)&forMarshaling->depthBoundsTestEnable, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->stencilTestEnable, sizeof(VkBool32));
marshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forMarshaling->front));
marshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forMarshaling->back));
vkStream->write((float*)&forMarshaling->minDepthBounds, sizeof(float));
vkStream->write((float*)&forMarshaling->maxDepthBounds, sizeof(float));
}
void unmarshal_VkPipelineDepthStencilStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineDepthStencilStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineDepthStencilStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineDepthStencilStateCreateFlags));
vkStream->read((VkBool32*)&forUnmarshaling->depthTestEnable, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->depthWriteEnable, sizeof(VkBool32));
vkStream->read((VkCompareOp*)&forUnmarshaling->depthCompareOp, sizeof(VkCompareOp));
vkStream->read((VkBool32*)&forUnmarshaling->depthBoundsTestEnable, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->stencilTestEnable, sizeof(VkBool32));
unmarshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forUnmarshaling->front));
unmarshal_VkStencilOpState(vkStream, rootType, (VkStencilOpState*)(&forUnmarshaling->back));
vkStream->read((float*)&forUnmarshaling->minDepthBounds, sizeof(float));
vkStream->read((float*)&forUnmarshaling->maxDepthBounds, sizeof(float));
}
void marshal_VkPipelineColorBlendAttachmentState(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineColorBlendAttachmentState* forMarshaling) {
(void)rootType;
vkStream->write((VkBool32*)&forMarshaling->blendEnable, sizeof(VkBool32));
vkStream->write((VkBlendFactor*)&forMarshaling->srcColorBlendFactor, sizeof(VkBlendFactor));
vkStream->write((VkBlendFactor*)&forMarshaling->dstColorBlendFactor, sizeof(VkBlendFactor));
vkStream->write((VkBlendOp*)&forMarshaling->colorBlendOp, sizeof(VkBlendOp));
vkStream->write((VkBlendFactor*)&forMarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor));
vkStream->write((VkBlendFactor*)&forMarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor));
vkStream->write((VkBlendOp*)&forMarshaling->alphaBlendOp, sizeof(VkBlendOp));
vkStream->write((VkColorComponentFlags*)&forMarshaling->colorWriteMask,
sizeof(VkColorComponentFlags));
}
void unmarshal_VkPipelineColorBlendAttachmentState(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineColorBlendAttachmentState* forUnmarshaling) {
(void)rootType;
vkStream->read((VkBool32*)&forUnmarshaling->blendEnable, sizeof(VkBool32));
vkStream->read((VkBlendFactor*)&forUnmarshaling->srcColorBlendFactor, sizeof(VkBlendFactor));
vkStream->read((VkBlendFactor*)&forUnmarshaling->dstColorBlendFactor, sizeof(VkBlendFactor));
vkStream->read((VkBlendOp*)&forUnmarshaling->colorBlendOp, sizeof(VkBlendOp));
vkStream->read((VkBlendFactor*)&forUnmarshaling->srcAlphaBlendFactor, sizeof(VkBlendFactor));
vkStream->read((VkBlendFactor*)&forUnmarshaling->dstAlphaBlendFactor, sizeof(VkBlendFactor));
vkStream->read((VkBlendOp*)&forUnmarshaling->alphaBlendOp, sizeof(VkBlendOp));
vkStream->read((VkColorComponentFlags*)&forUnmarshaling->colorWriteMask,
sizeof(VkColorComponentFlags));
}
void marshal_VkPipelineColorBlendStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineColorBlendStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineColorBlendStateCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineColorBlendStateCreateFlags));
vkStream->write((VkBool32*)&forMarshaling->logicOpEnable, sizeof(VkBool32));
vkStream->write((VkLogicOp*)&forMarshaling->logicOp, sizeof(VkLogicOp));
vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) {
marshal_VkPipelineColorBlendAttachmentState(
vkStream, rootType,
(const VkPipelineColorBlendAttachmentState*)(forMarshaling->pAttachments + i));
}
}
vkStream->write((float*)forMarshaling->blendConstants, 4 * sizeof(float));
}
void unmarshal_VkPipelineColorBlendStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineColorBlendStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineColorBlendStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineColorBlendStateCreateFlags));
vkStream->read((VkBool32*)&forUnmarshaling->logicOpEnable, sizeof(VkBool32));
vkStream->read((VkLogicOp*)&forUnmarshaling->logicOp, sizeof(VkLogicOp));
vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) {
unmarshal_VkPipelineColorBlendAttachmentState(
vkStream, rootType,
(VkPipelineColorBlendAttachmentState*)(forUnmarshaling->pAttachments + i));
}
}
vkStream->read((float*)forUnmarshaling->blendConstants, 4 * sizeof(float));
}
void marshal_VkPipelineDynamicStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineDynamicStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineDynamicStateCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineDynamicStateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->dynamicStateCount, sizeof(uint32_t));
vkStream->write((const VkDynamicState*)forMarshaling->pDynamicStates,
forMarshaling->dynamicStateCount * sizeof(const VkDynamicState));
}
void unmarshal_VkPipelineDynamicStateCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPipelineDynamicStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineDynamicStateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineDynamicStateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->dynamicStateCount, sizeof(uint32_t));
vkStream->read((VkDynamicState*)forUnmarshaling->pDynamicStates,
forUnmarshaling->dynamicStateCount * sizeof(const VkDynamicState));
}
void marshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkGraphicsPipelineCreateInfo* forMarshaling) {
(void)rootType;
uint32_t hasRasterization = 1;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
hasRasterization =
(((0 == forMarshaling->pRasterizationState))
? (0)
: (!((*(forMarshaling->pRasterizationState)).rasterizerDiscardEnable)));
uint32_t cgen_var_0 = (uint32_t)hasRasterization;
vkStream->putBe32(cgen_var_0);
}
uint32_t hasTessellation = 1;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
hasTessellation =
arrayany(forMarshaling->pStages, 0, forMarshaling->stageCount,
[](VkPipelineShaderStageCreateInfo s) {
return ((s.stage == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) ||
(s.stage == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT));
});
uint32_t cgen_var_0 = (uint32_t)hasTessellation;
vkStream->putBe32(cgen_var_0);
}
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineCreateFlags*)&forMarshaling->flags, sizeof(VkPipelineCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->stageCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->stageCount; ++i) {
marshal_VkPipelineShaderStageCreateInfo(
vkStream, rootType,
(const VkPipelineShaderStageCreateInfo*)(forMarshaling->pStages + i));
}
}
// WARNING PTR CHECK
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pVertexInputState;
vkStream->putBe64(cgen_var_0);
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forMarshaling->pVertexInputState)) {
marshal_VkPipelineVertexInputStateCreateInfo(
vkStream, rootType,
(const VkPipelineVertexInputStateCreateInfo*)(forMarshaling->pVertexInputState));
}
// WARNING PTR CHECK
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pInputAssemblyState;
vkStream->putBe64(cgen_var_0);
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forMarshaling->pInputAssemblyState)) {
marshal_VkPipelineInputAssemblyStateCreateInfo(
vkStream, rootType,
(const VkPipelineInputAssemblyStateCreateInfo*)(forMarshaling->pInputAssemblyState));
}
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pTessellationState;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pTessellationState) {
if (hasTessellation) {
marshal_VkPipelineTessellationStateCreateInfo(
vkStream, rootType,
(const VkPipelineTessellationStateCreateInfo*)(forMarshaling->pTessellationState));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pViewportState;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pViewportState) {
if (hasRasterization) {
marshal_VkPipelineViewportStateCreateInfo(
vkStream, rootType,
(const VkPipelineViewportStateCreateInfo*)(forMarshaling->pViewportState));
}
}
// WARNING PTR CHECK
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
uint64_t cgen_var_1_0 = (uint64_t)(uintptr_t)forMarshaling->pRasterizationState;
vkStream->putBe64(cgen_var_1_0);
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forMarshaling->pRasterizationState)) {
marshal_VkPipelineRasterizationStateCreateInfo(
vkStream, rootType,
(const VkPipelineRasterizationStateCreateInfo*)(forMarshaling->pRasterizationState));
}
// WARNING PTR CHECK
uint64_t cgen_var_2 = (uint64_t)(uintptr_t)forMarshaling->pMultisampleState;
vkStream->putBe64(cgen_var_2);
if (forMarshaling->pMultisampleState) {
if (hasRasterization) {
marshal_VkPipelineMultisampleStateCreateInfo(
vkStream, rootType,
(const VkPipelineMultisampleStateCreateInfo*)(forMarshaling->pMultisampleState));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_3 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilState;
vkStream->putBe64(cgen_var_3);
if (forMarshaling->pDepthStencilState) {
if (hasRasterization) {
marshal_VkPipelineDepthStencilStateCreateInfo(
vkStream, rootType,
(const VkPipelineDepthStencilStateCreateInfo*)(forMarshaling->pDepthStencilState));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_4 = (uint64_t)(uintptr_t)forMarshaling->pColorBlendState;
vkStream->putBe64(cgen_var_4);
if (forMarshaling->pColorBlendState) {
if (hasRasterization) {
marshal_VkPipelineColorBlendStateCreateInfo(
vkStream, rootType,
(const VkPipelineColorBlendStateCreateInfo*)(forMarshaling->pColorBlendState));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_5 = (uint64_t)(uintptr_t)forMarshaling->pDynamicState;
vkStream->putBe64(cgen_var_5);
if (forMarshaling->pDynamicState) {
marshal_VkPipelineDynamicStateCreateInfo(
vkStream, rootType,
(const VkPipelineDynamicStateCreateInfo*)(forMarshaling->pDynamicState));
}
uint64_t cgen_var_6;
vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->layout, &cgen_var_6,
1);
vkStream->write((uint64_t*)&cgen_var_6, 1 * 8);
uint64_t cgen_var_7;
vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_7,
1);
vkStream->write((uint64_t*)&cgen_var_7, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
uint64_t cgen_var_8;
vkStream->handleMapping()->mapHandles_VkPipeline_u64(&forMarshaling->basePipelineHandle,
&cgen_var_8, 1);
vkStream->write((uint64_t*)&cgen_var_8, 1 * 8);
vkStream->write((int32_t*)&forMarshaling->basePipelineIndex, sizeof(int32_t));
}
void unmarshal_VkGraphicsPipelineCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkGraphicsPipelineCreateInfo* forUnmarshaling) {
(void)rootType;
uint32_t hasRasterization = 1;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
hasRasterization = (const uint32_t)vkStream->getBe32();
}
uint32_t hasTessellation = 1;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
hasTessellation = (const uint32_t)vkStream->getBe32();
}
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineCreateFlags*)&forUnmarshaling->flags, sizeof(VkPipelineCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->stageCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->stageCount; ++i) {
unmarshal_VkPipelineShaderStageCreateInfo(
vkStream, rootType,
(VkPipelineShaderStageCreateInfo*)(forUnmarshaling->pStages + i));
}
}
// WARNING PTR CHECK
const VkPipelineVertexInputStateCreateInfo* check_pVertexInputState;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
check_pVertexInputState =
(const VkPipelineVertexInputStateCreateInfo*)(uintptr_t)vkStream->getBe64();
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forUnmarshaling->pVertexInputState)) {
unmarshal_VkPipelineVertexInputStateCreateInfo(
vkStream, rootType,
(VkPipelineVertexInputStateCreateInfo*)(forUnmarshaling->pVertexInputState));
}
// WARNING PTR CHECK
const VkPipelineInputAssemblyStateCreateInfo* check_pInputAssemblyState;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
check_pInputAssemblyState =
(const VkPipelineInputAssemblyStateCreateInfo*)(uintptr_t)vkStream->getBe64();
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forUnmarshaling->pInputAssemblyState)) {
unmarshal_VkPipelineInputAssemblyStateCreateInfo(
vkStream, rootType,
(VkPipelineInputAssemblyStateCreateInfo*)(forUnmarshaling->pInputAssemblyState));
}
// WARNING PTR CHECK
const VkPipelineTessellationStateCreateInfo* check_pTessellationState;
check_pTessellationState =
(const VkPipelineTessellationStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pTessellationState) {
if (!(check_pTessellationState)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pTessellationState inconsistent between guest and host\n");
}
if (hasTessellation) {
unmarshal_VkPipelineTessellationStateCreateInfo(
vkStream, rootType,
(VkPipelineTessellationStateCreateInfo*)(forUnmarshaling->pTessellationState));
} else {
forUnmarshaling->pTessellationState = 0;
}
}
// WARNING PTR CHECK
const VkPipelineViewportStateCreateInfo* check_pViewportState;
check_pViewportState = (const VkPipelineViewportStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pViewportState) {
if (!(check_pViewportState)) {
fprintf(stderr,
"fatal: forUnmarshaling->pViewportState inconsistent between guest and host\n");
}
if (hasRasterization) {
unmarshal_VkPipelineViewportStateCreateInfo(
vkStream, rootType,
(VkPipelineViewportStateCreateInfo*)(forUnmarshaling->pViewportState));
} else {
forUnmarshaling->pViewportState = 0;
}
}
// WARNING PTR CHECK
const VkPipelineRasterizationStateCreateInfo* check_pRasterizationState;
if (vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) {
check_pRasterizationState =
(const VkPipelineRasterizationStateCreateInfo*)(uintptr_t)vkStream->getBe64();
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
forUnmarshaling->pRasterizationState)) {
unmarshal_VkPipelineRasterizationStateCreateInfo(
vkStream, rootType,
(VkPipelineRasterizationStateCreateInfo*)(forUnmarshaling->pRasterizationState));
}
// WARNING PTR CHECK
const VkPipelineMultisampleStateCreateInfo* check_pMultisampleState;
check_pMultisampleState =
(const VkPipelineMultisampleStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pMultisampleState) {
if (!(check_pMultisampleState)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pMultisampleState inconsistent between guest and host\n");
}
if (hasRasterization) {
unmarshal_VkPipelineMultisampleStateCreateInfo(
vkStream, rootType,
(VkPipelineMultisampleStateCreateInfo*)(forUnmarshaling->pMultisampleState));
} else {
forUnmarshaling->pMultisampleState = 0;
}
}
// WARNING PTR CHECK
const VkPipelineDepthStencilStateCreateInfo* check_pDepthStencilState;
check_pDepthStencilState =
(const VkPipelineDepthStencilStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDepthStencilState) {
if (!(check_pDepthStencilState)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pDepthStencilState inconsistent between guest and host\n");
}
if (hasRasterization) {
unmarshal_VkPipelineDepthStencilStateCreateInfo(
vkStream, rootType,
(VkPipelineDepthStencilStateCreateInfo*)(forUnmarshaling->pDepthStencilState));
} else {
forUnmarshaling->pDepthStencilState = 0;
}
}
// WARNING PTR CHECK
const VkPipelineColorBlendStateCreateInfo* check_pColorBlendState;
check_pColorBlendState =
(const VkPipelineColorBlendStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pColorBlendState) {
if (!(check_pColorBlendState)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pColorBlendState inconsistent between guest and host\n");
}
if (hasRasterization) {
unmarshal_VkPipelineColorBlendStateCreateInfo(
vkStream, rootType,
(VkPipelineColorBlendStateCreateInfo*)(forUnmarshaling->pColorBlendState));
} else {
forUnmarshaling->pColorBlendState = 0;
}
}
// WARNING PTR CHECK
const VkPipelineDynamicStateCreateInfo* check_pDynamicState;
check_pDynamicState = (const VkPipelineDynamicStateCreateInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDynamicState) {
if (!(check_pDynamicState)) {
fprintf(stderr,
"fatal: forUnmarshaling->pDynamicState inconsistent between guest and host\n");
}
unmarshal_VkPipelineDynamicStateCreateInfo(
vkStream, rootType,
(VkPipelineDynamicStateCreateInfo*)(forUnmarshaling->pDynamicState));
}
uint64_t cgen_var_6;
vkStream->read((uint64_t*)&cgen_var_6, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(
&cgen_var_6, (VkPipelineLayout*)&forUnmarshaling->layout, 1);
uint64_t cgen_var_7;
vkStream->read((uint64_t*)&cgen_var_7, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkRenderPass(
&cgen_var_7, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
uint64_t cgen_var_8;
vkStream->read((uint64_t*)&cgen_var_8, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkPipeline(
&cgen_var_8, (VkPipeline*)&forUnmarshaling->basePipelineHandle, 1);
vkStream->read((int32_t*)&forUnmarshaling->basePipelineIndex, sizeof(int32_t));
}
void marshal_VkPushConstantRange(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPushConstantRange* forMarshaling) {
(void)rootType;
vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags));
vkStream->write((uint32_t*)&forMarshaling->offset, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->size, sizeof(uint32_t));
}
void unmarshal_VkPushConstantRange(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPushConstantRange* forUnmarshaling) {
(void)rootType;
vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags));
vkStream->read((uint32_t*)&forUnmarshaling->offset, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->size, sizeof(uint32_t));
}
void marshal_VkPipelineLayoutCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineLayoutCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPipelineLayoutCreateFlags*)&forMarshaling->flags,
sizeof(VkPipelineLayoutCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->setLayoutCount, sizeof(uint32_t));
if (forMarshaling->setLayoutCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->setLayoutCount * 8);
vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(
forMarshaling->pSetLayouts, cgen_var_0, forMarshaling->setLayoutCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->setLayoutCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->pushConstantRangeCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->pushConstantRangeCount; ++i) {
marshal_VkPushConstantRange(
vkStream, rootType,
(const VkPushConstantRange*)(forMarshaling->pPushConstantRanges + i));
}
}
}
void unmarshal_VkPipelineLayoutCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineLayoutCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPipelineLayoutCreateFlags*)&forUnmarshaling->flags,
sizeof(VkPipelineLayoutCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->setLayoutCount, sizeof(uint32_t));
if (forUnmarshaling->setLayoutCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->setLayoutCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->setLayoutCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(
cgen_var_0, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts,
forUnmarshaling->setLayoutCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->pushConstantRangeCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->pushConstantRangeCount; ++i) {
unmarshal_VkPushConstantRange(
vkStream, rootType,
(VkPushConstantRange*)(forUnmarshaling->pPushConstantRanges + i));
}
}
}
void marshal_VkSamplerCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSamplerCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSamplerCreateFlags*)&forMarshaling->flags, sizeof(VkSamplerCreateFlags));
vkStream->write((VkFilter*)&forMarshaling->magFilter, sizeof(VkFilter));
vkStream->write((VkFilter*)&forMarshaling->minFilter, sizeof(VkFilter));
vkStream->write((VkSamplerMipmapMode*)&forMarshaling->mipmapMode, sizeof(VkSamplerMipmapMode));
vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeU,
sizeof(VkSamplerAddressMode));
vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeV,
sizeof(VkSamplerAddressMode));
vkStream->write((VkSamplerAddressMode*)&forMarshaling->addressModeW,
sizeof(VkSamplerAddressMode));
vkStream->write((float*)&forMarshaling->mipLodBias, sizeof(float));
vkStream->write((VkBool32*)&forMarshaling->anisotropyEnable, sizeof(VkBool32));
vkStream->write((float*)&forMarshaling->maxAnisotropy, sizeof(float));
vkStream->write((VkBool32*)&forMarshaling->compareEnable, sizeof(VkBool32));
vkStream->write((VkCompareOp*)&forMarshaling->compareOp, sizeof(VkCompareOp));
vkStream->write((float*)&forMarshaling->minLod, sizeof(float));
vkStream->write((float*)&forMarshaling->maxLod, sizeof(float));
vkStream->write((VkBorderColor*)&forMarshaling->borderColor, sizeof(VkBorderColor));
vkStream->write((VkBool32*)&forMarshaling->unnormalizedCoordinates, sizeof(VkBool32));
}
void unmarshal_VkSamplerCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSamplerCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSamplerCreateFlags*)&forUnmarshaling->flags, sizeof(VkSamplerCreateFlags));
vkStream->read((VkFilter*)&forUnmarshaling->magFilter, sizeof(VkFilter));
vkStream->read((VkFilter*)&forUnmarshaling->minFilter, sizeof(VkFilter));
vkStream->read((VkSamplerMipmapMode*)&forUnmarshaling->mipmapMode, sizeof(VkSamplerMipmapMode));
vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeU,
sizeof(VkSamplerAddressMode));
vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeV,
sizeof(VkSamplerAddressMode));
vkStream->read((VkSamplerAddressMode*)&forUnmarshaling->addressModeW,
sizeof(VkSamplerAddressMode));
vkStream->read((float*)&forUnmarshaling->mipLodBias, sizeof(float));
vkStream->read((VkBool32*)&forUnmarshaling->anisotropyEnable, sizeof(VkBool32));
vkStream->read((float*)&forUnmarshaling->maxAnisotropy, sizeof(float));
vkStream->read((VkBool32*)&forUnmarshaling->compareEnable, sizeof(VkBool32));
vkStream->read((VkCompareOp*)&forUnmarshaling->compareOp, sizeof(VkCompareOp));
vkStream->read((float*)&forUnmarshaling->minLod, sizeof(float));
vkStream->read((float*)&forUnmarshaling->maxLod, sizeof(float));
vkStream->read((VkBorderColor*)&forUnmarshaling->borderColor, sizeof(VkBorderColor));
vkStream->read((VkBool32*)&forUnmarshaling->unnormalizedCoordinates, sizeof(VkBool32));
}
void marshal_VkCopyDescriptorSet(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCopyDescriptorSet* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->srcSet, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->srcBinding, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->srcArrayElement, sizeof(uint32_t));
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_1,
1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
}
void unmarshal_VkCopyDescriptorSet(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCopyDescriptorSet* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(
&cgen_var_0, (VkDescriptorSet*)&forUnmarshaling->srcSet, 1);
vkStream->read((uint32_t*)&forUnmarshaling->srcBinding, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->srcArrayElement, sizeof(uint32_t));
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(
&cgen_var_1, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1);
vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
}
void marshal_VkDescriptorBufferInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorBufferInfo* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->offset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->range, sizeof(VkDeviceSize));
}
void unmarshal_VkDescriptorBufferInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorBufferInfo* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->offset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->range, sizeof(VkDeviceSize));
}
void marshal_VkDescriptorImageInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorImageInfo* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSampler_u64(&forMarshaling->sampler, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_1,
1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout));
}
void unmarshal_VkDescriptorImageInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorImageInfo* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSampler(&cgen_var_0,
(VkSampler*)&forUnmarshaling->sampler, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_1, (VkImageView*)&forUnmarshaling->imageView, 1);
vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout));
}
void marshal_VkDescriptorPoolSize(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorPoolSize* forMarshaling) {
(void)rootType;
vkStream->write((VkDescriptorType*)&forMarshaling->type, sizeof(VkDescriptorType));
vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
}
void unmarshal_VkDescriptorPoolSize(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorPoolSize* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDescriptorType*)&forUnmarshaling->type, sizeof(VkDescriptorType));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
}
void marshal_VkDescriptorPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorPoolCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDescriptorPoolCreateFlags*)&forMarshaling->flags,
sizeof(VkDescriptorPoolCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->maxSets, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->poolSizeCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->poolSizeCount; ++i) {
marshal_VkDescriptorPoolSize(
vkStream, rootType, (const VkDescriptorPoolSize*)(forMarshaling->pPoolSizes + i));
}
}
}
void unmarshal_VkDescriptorPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorPoolCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDescriptorPoolCreateFlags*)&forUnmarshaling->flags,
sizeof(VkDescriptorPoolCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->maxSets, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->poolSizeCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->poolSizeCount; ++i) {
unmarshal_VkDescriptorPoolSize(
vkStream, rootType, (VkDescriptorPoolSize*)(forUnmarshaling->pPoolSizes + i));
}
}
}
void marshal_VkDescriptorSetAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDescriptorPool_u64(&forMarshaling->descriptorPool,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t));
if (forMarshaling->descriptorSetCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forMarshaling->descriptorSetCount * 8);
vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(
forMarshaling->pSetLayouts, cgen_var_1, forMarshaling->descriptorSetCount);
vkStream->write((uint64_t*)cgen_var_1, forMarshaling->descriptorSetCount * 8);
}
}
void unmarshal_VkDescriptorSetAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorPool(
&cgen_var_0, (VkDescriptorPool*)&forUnmarshaling->descriptorPool, 1);
vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t));
if (forUnmarshaling->descriptorSetCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forUnmarshaling->descriptorSetCount * 8);
vkStream->read((uint64_t*)cgen_var_1, forUnmarshaling->descriptorSetCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(
cgen_var_1, (VkDescriptorSetLayout*)forUnmarshaling->pSetLayouts,
forUnmarshaling->descriptorSetCount);
}
}
void marshal_VkDescriptorSetLayoutBinding(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetLayoutBinding* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->binding, sizeof(uint32_t));
vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
vkStream->write((VkShaderStageFlags*)&forMarshaling->stageFlags, sizeof(VkShaderStageFlags));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pImmutableSamplers;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pImmutableSamplers) {
if (forMarshaling->descriptorCount) {
uint64_t* cgen_var_0_0;
vkStream->alloc((void**)&cgen_var_0_0, forMarshaling->descriptorCount * 8);
vkStream->handleMapping()->mapHandles_VkSampler_u64(
forMarshaling->pImmutableSamplers, cgen_var_0_0, forMarshaling->descriptorCount);
vkStream->write((uint64_t*)cgen_var_0_0, forMarshaling->descriptorCount * 8);
}
}
}
void unmarshal_VkDescriptorSetLayoutBinding(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetLayoutBinding* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->binding, sizeof(uint32_t));
vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
vkStream->read((VkShaderStageFlags*)&forUnmarshaling->stageFlags, sizeof(VkShaderStageFlags));
// WARNING PTR CHECK
const VkSampler* check_pImmutableSamplers;
check_pImmutableSamplers = (const VkSampler*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pImmutableSamplers) {
if (!(check_pImmutableSamplers)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pImmutableSamplers inconsistent between guest and host\n");
}
if (forUnmarshaling->descriptorCount) {
uint64_t* cgen_var_0_0;
vkStream->alloc((void**)&cgen_var_0_0, forUnmarshaling->descriptorCount * 8);
vkStream->read((uint64_t*)cgen_var_0_0, forUnmarshaling->descriptorCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSampler(
cgen_var_0_0, (VkSampler*)forUnmarshaling->pImmutableSamplers,
forUnmarshaling->descriptorCount);
}
}
}
void marshal_VkDescriptorSetLayoutCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetLayoutCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDescriptorSetLayoutCreateFlags*)&forMarshaling->flags,
sizeof(VkDescriptorSetLayoutCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->bindingCount; ++i) {
marshal_VkDescriptorSetLayoutBinding(
vkStream, rootType,
(const VkDescriptorSetLayoutBinding*)(forMarshaling->pBindings + i));
}
}
}
void unmarshal_VkDescriptorSetLayoutCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkDescriptorSetLayoutCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDescriptorSetLayoutCreateFlags*)&forUnmarshaling->flags,
sizeof(VkDescriptorSetLayoutCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->bindingCount; ++i) {
unmarshal_VkDescriptorSetLayoutBinding(
vkStream, rootType,
(VkDescriptorSetLayoutBinding*)(forUnmarshaling->pBindings + i));
}
}
}
void marshal_VkWriteDescriptorSet(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkWriteDescriptorSet* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDescriptorSet_u64(&forMarshaling->dstSet, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pImageInfo;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pImageInfo) {
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_SAMPLER == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT == forMarshaling->descriptorType)))) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i) {
marshal_VkDescriptorImageInfo(
vkStream, rootType,
(const VkDescriptorImageInfo*)(forMarshaling->pImageInfo + i));
}
}
}
}
// WARNING PTR CHECK
uint64_t cgen_var_2 = (uint64_t)(uintptr_t)forMarshaling->pBufferInfo;
vkStream->putBe64(cgen_var_2);
if (forMarshaling->pBufferInfo) {
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC == forMarshaling->descriptorType)))) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorCount; ++i) {
marshal_VkDescriptorBufferInfo(
vkStream, rootType,
(const VkDescriptorBufferInfo*)(forMarshaling->pBufferInfo + i));
}
}
}
}
// WARNING PTR CHECK
uint64_t cgen_var_3 = (uint64_t)(uintptr_t)forMarshaling->pTexelBufferView;
vkStream->putBe64(cgen_var_3);
if (forMarshaling->pTexelBufferView) {
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == forMarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == forMarshaling->descriptorType)))) {
if (forMarshaling->descriptorCount) {
uint64_t* cgen_var_3_0;
vkStream->alloc((void**)&cgen_var_3_0, forMarshaling->descriptorCount * 8);
vkStream->handleMapping()->mapHandles_VkBufferView_u64(
forMarshaling->pTexelBufferView, cgen_var_3_0, forMarshaling->descriptorCount);
vkStream->write((uint64_t*)cgen_var_3_0, forMarshaling->descriptorCount * 8);
}
}
}
}
void unmarshal_VkWriteDescriptorSet(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkWriteDescriptorSet* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSet(
&cgen_var_0, (VkDescriptorSet*)&forUnmarshaling->dstSet, 1);
vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
// WARNING PTR CHECK
const VkDescriptorImageInfo* check_pImageInfo;
check_pImageInfo = (const VkDescriptorImageInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pImageInfo) {
if (!(check_pImageInfo)) {
fprintf(stderr,
"fatal: forUnmarshaling->pImageInfo inconsistent between guest and host\n");
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_SAMPLER == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_IMAGE == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT == forUnmarshaling->descriptorType)))) {
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i) {
unmarshal_VkDescriptorImageInfo(
vkStream, rootType,
(VkDescriptorImageInfo*)(forUnmarshaling->pImageInfo + i));
}
}
} else {
forUnmarshaling->pImageInfo = 0;
}
}
// WARNING PTR CHECK
const VkDescriptorBufferInfo* check_pBufferInfo;
check_pBufferInfo = (const VkDescriptorBufferInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pBufferInfo) {
if (!(check_pBufferInfo)) {
fprintf(stderr,
"fatal: forUnmarshaling->pBufferInfo inconsistent between guest and host\n");
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC == forUnmarshaling->descriptorType)))) {
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorCount; ++i) {
unmarshal_VkDescriptorBufferInfo(
vkStream, rootType,
(VkDescriptorBufferInfo*)(forUnmarshaling->pBufferInfo + i));
}
}
} else {
forUnmarshaling->pBufferInfo = 0;
}
}
// WARNING PTR CHECK
const VkBufferView* check_pTexelBufferView;
check_pTexelBufferView = (const VkBufferView*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pTexelBufferView) {
if (!(check_pTexelBufferView)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pTexelBufferView inconsistent between guest and host\n");
}
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
((VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER == forUnmarshaling->descriptorType) ||
(VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER == forUnmarshaling->descriptorType)))) {
if (forUnmarshaling->descriptorCount) {
uint64_t* cgen_var_3_0;
vkStream->alloc((void**)&cgen_var_3_0, forUnmarshaling->descriptorCount * 8);
vkStream->read((uint64_t*)cgen_var_3_0, forUnmarshaling->descriptorCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkBufferView(
cgen_var_3_0, (VkBufferView*)forUnmarshaling->pTexelBufferView,
forUnmarshaling->descriptorCount);
}
} else {
forUnmarshaling->pTexelBufferView = 0;
}
}
}
void marshal_VkAttachmentDescription(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentDescription* forMarshaling) {
(void)rootType;
vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags,
sizeof(VkAttachmentDescriptionFlags));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp));
vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp,
sizeof(VkAttachmentStoreOp));
vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout));
}
void unmarshal_VkAttachmentDescription(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentDescription* forUnmarshaling) {
(void)rootType;
vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags,
sizeof(VkAttachmentDescriptionFlags));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples,
sizeof(VkSampleCountFlagBits));
vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp));
vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp,
sizeof(VkAttachmentLoadOp));
vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp,
sizeof(VkAttachmentStoreOp));
vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout));
}
void marshal_VkAttachmentReference(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentReference* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t));
vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout));
}
void unmarshal_VkAttachmentReference(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentReference* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t));
vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout));
}
void marshal_VkFramebufferCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFramebufferCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFramebufferCreateFlags*)&forMarshaling->flags,
sizeof(VkFramebufferCreateFlags));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
(((forMarshaling->flags & VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT) == 0)))) {
if (forMarshaling->attachmentCount) {
uint64_t* cgen_var_0_0;
vkStream->alloc((void**)&cgen_var_0_0, forMarshaling->attachmentCount * 8);
vkStream->handleMapping()->mapHandles_VkImageView_u64(
forMarshaling->pAttachments, cgen_var_0_0, forMarshaling->attachmentCount);
vkStream->write((uint64_t*)cgen_var_0_0, forMarshaling->attachmentCount * 8);
}
}
vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->layers, sizeof(uint32_t));
}
void unmarshal_VkFramebufferCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFramebufferCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFramebufferCreateFlags*)&forUnmarshaling->flags,
sizeof(VkFramebufferCreateFlags));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkRenderPass(
&cgen_var_0, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
if ((!(vkStream->getFeatureBits() & VULKAN_STREAM_FEATURE_IGNORED_HANDLES_BIT) ||
(((forUnmarshaling->flags & VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT) == 0)))) {
if (forUnmarshaling->attachmentCount) {
uint64_t* cgen_var_0_0;
vkStream->alloc((void**)&cgen_var_0_0, forUnmarshaling->attachmentCount * 8);
vkStream->read((uint64_t*)cgen_var_0_0, forUnmarshaling->attachmentCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
cgen_var_0_0, (VkImageView*)forUnmarshaling->pAttachments,
forUnmarshaling->attachmentCount);
}
} else {
forUnmarshaling->pAttachments = 0;
}
vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->layers, sizeof(uint32_t));
}
void marshal_VkSubpassDescription(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassDescription* forMarshaling) {
(void)rootType;
vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags,
sizeof(VkSubpassDescriptionFlags));
vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i) {
marshal_VkAttachmentReference(
vkStream, rootType,
(const VkAttachmentReference*)(forMarshaling->pInputAttachments + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) {
marshal_VkAttachmentReference(
vkStream, rootType,
(const VkAttachmentReference*)(forMarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pResolveAttachments) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) {
marshal_VkAttachmentReference(
vkStream, rootType,
(const VkAttachmentReference*)(forMarshaling->pResolveAttachments + i));
}
}
}
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pDepthStencilAttachment) {
marshal_VkAttachmentReference(
vkStream, rootType,
(const VkAttachmentReference*)(forMarshaling->pDepthStencilAttachment));
}
vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments,
forMarshaling->preserveAttachmentCount * sizeof(const uint32_t));
}
void unmarshal_VkSubpassDescription(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassDescription* forUnmarshaling) {
(void)rootType;
vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags,
sizeof(VkSubpassDescriptionFlags));
vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i) {
unmarshal_VkAttachmentReference(
vkStream, rootType,
(VkAttachmentReference*)(forUnmarshaling->pInputAttachments + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) {
unmarshal_VkAttachmentReference(
vkStream, rootType,
(VkAttachmentReference*)(forUnmarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
const VkAttachmentReference* check_pResolveAttachments;
check_pResolveAttachments = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pResolveAttachments) {
if (!(check_pResolveAttachments)) {
fprintf(stderr,
"fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and "
"host\n");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) {
unmarshal_VkAttachmentReference(
vkStream, rootType,
(VkAttachmentReference*)(forUnmarshaling->pResolveAttachments + i));
}
}
}
// WARNING PTR CHECK
const VkAttachmentReference* check_pDepthStencilAttachment;
check_pDepthStencilAttachment = (const VkAttachmentReference*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDepthStencilAttachment) {
if (!(check_pDepthStencilAttachment)) {
fprintf(stderr,
"fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest "
"and host\n");
}
unmarshal_VkAttachmentReference(
vkStream, rootType, (VkAttachmentReference*)(forUnmarshaling->pDepthStencilAttachment));
}
vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments,
forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t));
}
void marshal_VkSubpassDependency(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassDependency* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t));
vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask,
sizeof(VkPipelineStageFlags));
vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask,
sizeof(VkPipelineStageFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags));
}
void unmarshal_VkSubpassDependency(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassDependency* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t));
vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask,
sizeof(VkPipelineStageFlags));
vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask,
sizeof(VkPipelineStageFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags,
sizeof(VkDependencyFlags));
}
void marshal_VkRenderPassCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags,
sizeof(VkRenderPassCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) {
marshal_VkAttachmentDescription(
vkStream, rootType,
(const VkAttachmentDescription*)(forMarshaling->pAttachments + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i) {
marshal_VkSubpassDescription(
vkStream, rootType, (const VkSubpassDescription*)(forMarshaling->pSubpasses + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i) {
marshal_VkSubpassDependency(
vkStream, rootType, (const VkSubpassDependency*)(forMarshaling->pDependencies + i));
}
}
}
void unmarshal_VkRenderPassCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderPassCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags,
sizeof(VkRenderPassCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) {
unmarshal_VkAttachmentDescription(
vkStream, rootType, (VkAttachmentDescription*)(forUnmarshaling->pAttachments + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i) {
unmarshal_VkSubpassDescription(
vkStream, rootType, (VkSubpassDescription*)(forUnmarshaling->pSubpasses + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i) {
unmarshal_VkSubpassDependency(
vkStream, rootType, (VkSubpassDependency*)(forUnmarshaling->pDependencies + i));
}
}
}
void marshal_VkCommandPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCommandPoolCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkCommandPoolCreateFlags*)&forMarshaling->flags,
sizeof(VkCommandPoolCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
}
void unmarshal_VkCommandPoolCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCommandPoolCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkCommandPoolCreateFlags*)&forUnmarshaling->flags,
sizeof(VkCommandPoolCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
}
void marshal_VkCommandBufferAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCommandBufferAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkCommandPool_u64(&forMarshaling->commandPool,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkCommandBufferLevel*)&forMarshaling->level, sizeof(VkCommandBufferLevel));
vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
}
void unmarshal_VkCommandBufferAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCommandBufferAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkCommandPool(
&cgen_var_0, (VkCommandPool*)&forUnmarshaling->commandPool, 1);
vkStream->read((VkCommandBufferLevel*)&forUnmarshaling->level, sizeof(VkCommandBufferLevel));
vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
}
void marshal_VkCommandBufferInheritanceInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCommandBufferInheritanceInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer,
&cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((VkBool32*)&forMarshaling->occlusionQueryEnable, sizeof(VkBool32));
vkStream->write((VkQueryControlFlags*)&forMarshaling->queryFlags, sizeof(VkQueryControlFlags));
vkStream->write((VkQueryPipelineStatisticFlags*)&forMarshaling->pipelineStatistics,
sizeof(VkQueryPipelineStatisticFlags));
}
void unmarshal_VkCommandBufferInheritanceInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCommandBufferInheritanceInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkRenderPass(
&cgen_var_0, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(
&cgen_var_1, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1);
vkStream->read((VkBool32*)&forUnmarshaling->occlusionQueryEnable, sizeof(VkBool32));
vkStream->read((VkQueryControlFlags*)&forUnmarshaling->queryFlags, sizeof(VkQueryControlFlags));
vkStream->read((VkQueryPipelineStatisticFlags*)&forUnmarshaling->pipelineStatistics,
sizeof(VkQueryPipelineStatisticFlags));
}
void marshal_VkCommandBufferBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCommandBufferBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkCommandBufferUsageFlags*)&forMarshaling->flags,
sizeof(VkCommandBufferUsageFlags));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pInheritanceInfo;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pInheritanceInfo) {
marshal_VkCommandBufferInheritanceInfo(
vkStream, rootType,
(const VkCommandBufferInheritanceInfo*)(forMarshaling->pInheritanceInfo));
}
}
void unmarshal_VkCommandBufferBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCommandBufferBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkCommandBufferUsageFlags*)&forUnmarshaling->flags,
sizeof(VkCommandBufferUsageFlags));
// WARNING PTR CHECK
const VkCommandBufferInheritanceInfo* check_pInheritanceInfo;
check_pInheritanceInfo = (const VkCommandBufferInheritanceInfo*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pInheritanceInfo) {
if (!(check_pInheritanceInfo)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pInheritanceInfo inconsistent between guest and host\n");
}
unmarshal_VkCommandBufferInheritanceInfo(
vkStream, rootType,
(VkCommandBufferInheritanceInfo*)(forUnmarshaling->pInheritanceInfo));
}
}
void marshal_VkBufferCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferCopy* forMarshaling) {
(void)rootType;
vkStream->write((VkDeviceSize*)&forMarshaling->srcOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->dstOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->size, sizeof(VkDeviceSize));
}
void unmarshal_VkBufferCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferCopy* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDeviceSize*)&forUnmarshaling->srcOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->dstOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->size, sizeof(VkDeviceSize));
}
void marshal_VkImageSubresourceLayers(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageSubresourceLayers* forMarshaling) {
(void)rootType;
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->write((uint32_t*)&forMarshaling->mipLevel, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
}
void unmarshal_VkImageSubresourceLayers(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageSubresourceLayers* forUnmarshaling) {
(void)rootType;
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->read((uint32_t*)&forUnmarshaling->mipLevel, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
}
void marshal_VkBufferImageCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferImageCopy* forMarshaling) {
(void)rootType;
vkStream->write((VkDeviceSize*)&forMarshaling->bufferOffset, sizeof(VkDeviceSize));
vkStream->write((uint32_t*)&forMarshaling->bufferRowLength, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->bufferImageHeight, sizeof(uint32_t));
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->imageSubresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->imageOffset));
marshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->imageExtent));
}
void unmarshal_VkBufferImageCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferImageCopy* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDeviceSize*)&forUnmarshaling->bufferOffset, sizeof(VkDeviceSize));
vkStream->read((uint32_t*)&forUnmarshaling->bufferRowLength, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->bufferImageHeight, sizeof(uint32_t));
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->imageSubresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->imageOffset));
unmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forUnmarshaling->imageExtent));
}
void marshal_VkClearColorValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkClearColorValue* forMarshaling) {
(void)rootType;
vkStream->write((float*)forMarshaling->float32, 4 * sizeof(float));
}
void unmarshal_VkClearColorValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkClearColorValue* forUnmarshaling) {
(void)rootType;
vkStream->read((float*)forUnmarshaling->float32, 4 * sizeof(float));
}
void marshal_VkClearDepthStencilValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkClearDepthStencilValue* forMarshaling) {
(void)rootType;
vkStream->write((float*)&forMarshaling->depth, sizeof(float));
vkStream->write((uint32_t*)&forMarshaling->stencil, sizeof(uint32_t));
}
void unmarshal_VkClearDepthStencilValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkClearDepthStencilValue* forUnmarshaling) {
(void)rootType;
vkStream->read((float*)&forUnmarshaling->depth, sizeof(float));
vkStream->read((uint32_t*)&forUnmarshaling->stencil, sizeof(uint32_t));
}
void marshal_VkClearValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkClearValue* forMarshaling) {
(void)rootType;
marshal_VkClearColorValue(vkStream, rootType, (VkClearColorValue*)(&forMarshaling->color));
}
void unmarshal_VkClearValue(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkClearValue* forUnmarshaling) {
(void)rootType;
unmarshal_VkClearColorValue(vkStream, rootType, (VkClearColorValue*)(&forUnmarshaling->color));
}
void marshal_VkClearAttachment(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkClearAttachment* forMarshaling) {
(void)rootType;
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->write((uint32_t*)&forMarshaling->colorAttachment, sizeof(uint32_t));
marshal_VkClearValue(vkStream, rootType, (VkClearValue*)(&forMarshaling->clearValue));
}
void unmarshal_VkClearAttachment(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkClearAttachment* forUnmarshaling) {
(void)rootType;
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachment, sizeof(uint32_t));
unmarshal_VkClearValue(vkStream, rootType, (VkClearValue*)(&forUnmarshaling->clearValue));
}
void marshal_VkClearRect(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkClearRect* forMarshaling) {
(void)rootType;
marshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forMarshaling->rect));
vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
}
void unmarshal_VkClearRect(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkClearRect* forUnmarshaling) {
(void)rootType;
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forUnmarshaling->rect));
vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
}
void marshal_VkImageBlit(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageBlit* forMarshaling) {
(void)rootType;
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i) {
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(forMarshaling->srcOffsets + i));
}
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i) {
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(forMarshaling->dstOffsets + i));
}
}
void unmarshal_VkImageBlit(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageBlit* forUnmarshaling) {
(void)rootType;
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i) {
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(forUnmarshaling->srcOffsets + i));
}
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
for (uint32_t i = 0; i < (uint32_t)2; ++i) {
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(forUnmarshaling->dstOffsets + i));
}
}
void marshal_VkImageCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageCopy* forMarshaling) {
(void)rootType;
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->srcOffset));
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->dstOffset));
marshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->extent));
}
void unmarshal_VkImageCopy(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageCopy* forUnmarshaling) {
(void)rootType;
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->srcOffset));
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->dstOffset));
unmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forUnmarshaling->extent));
}
void marshal_VkImageResolve(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageResolve* forMarshaling) {
(void)rootType;
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->srcSubresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->srcOffset));
marshal_VkImageSubresourceLayers(vkStream, rootType,
(VkImageSubresourceLayers*)(&forMarshaling->dstSubresource));
marshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forMarshaling->dstOffset));
marshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forMarshaling->extent));
}
void unmarshal_VkImageResolve(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageResolve* forUnmarshaling) {
(void)rootType;
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->srcSubresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->srcOffset));
unmarshal_VkImageSubresourceLayers(
vkStream, rootType, (VkImageSubresourceLayers*)(&forUnmarshaling->dstSubresource));
unmarshal_VkOffset3D(vkStream, rootType, (VkOffset3D*)(&forUnmarshaling->dstOffset));
unmarshal_VkExtent3D(vkStream, rootType, (VkExtent3D*)(&forUnmarshaling->extent));
}
void marshal_VkRenderPassBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkRenderPass_u64(&forMarshaling->renderPass, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkFramebuffer_u64(&forMarshaling->framebuffer,
&cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
marshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forMarshaling->renderArea));
vkStream->write((uint32_t*)&forMarshaling->clearValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_2 = (uint64_t)(uintptr_t)forMarshaling->pClearValues;
vkStream->putBe64(cgen_var_2);
if (forMarshaling->pClearValues) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->clearValueCount; ++i) {
marshal_VkClearValue(vkStream, rootType,
(const VkClearValue*)(forMarshaling->pClearValues + i));
}
}
}
}
void unmarshal_VkRenderPassBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderPassBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkRenderPass(
&cgen_var_0, (VkRenderPass*)&forUnmarshaling->renderPass, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFramebuffer(
&cgen_var_1, (VkFramebuffer*)&forUnmarshaling->framebuffer, 1);
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forUnmarshaling->renderArea));
vkStream->read((uint32_t*)&forUnmarshaling->clearValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkClearValue* check_pClearValues;
check_pClearValues = (const VkClearValue*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pClearValues) {
if (!(check_pClearValues)) {
fprintf(stderr,
"fatal: forUnmarshaling->pClearValues inconsistent between guest and host\n");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->clearValueCount; ++i) {
unmarshal_VkClearValue(vkStream, rootType,
(VkClearValue*)(forUnmarshaling->pClearValues + i));
}
}
}
}
#endif
#ifdef VK_VERSION_1_1
void marshal_VkPhysicalDeviceSubgroupProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSubgroupProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->subgroupSize, sizeof(uint32_t));
vkStream->write((VkShaderStageFlags*)&forMarshaling->supportedStages,
sizeof(VkShaderStageFlags));
vkStream->write((VkSubgroupFeatureFlags*)&forMarshaling->supportedOperations,
sizeof(VkSubgroupFeatureFlags));
vkStream->write((VkBool32*)&forMarshaling->quadOperationsInAllStages, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceSubgroupProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceSubgroupProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->subgroupSize, sizeof(uint32_t));
vkStream->read((VkShaderStageFlags*)&forUnmarshaling->supportedStages,
sizeof(VkShaderStageFlags));
vkStream->read((VkSubgroupFeatureFlags*)&forUnmarshaling->supportedOperations,
sizeof(VkSubgroupFeatureFlags));
vkStream->read((VkBool32*)&forUnmarshaling->quadOperationsInAllStages, sizeof(VkBool32));
}
void marshal_VkBindBufferMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindBufferMemoryInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_1,
1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
}
void unmarshal_VkBindBufferMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindBufferMemoryInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_1, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
}
void marshal_VkBindImageMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindImageMemoryInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_1,
1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
}
void unmarshal_VkBindImageMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindImageMemoryInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_1, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
}
void marshal_VkPhysicalDevice16BitStorageFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevice16BitStorageFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer16BitAccess,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storagePushConstant16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storageInputOutput16, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDevice16BitStorageFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevice16BitStorageFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer16BitAccess,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storageInputOutput16, sizeof(VkBool32));
}
void marshal_VkMemoryDedicatedRequirements(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryDedicatedRequirements* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->prefersDedicatedAllocation, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->requiresDedicatedAllocation, sizeof(VkBool32));
}
void unmarshal_VkMemoryDedicatedRequirements(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryDedicatedRequirements* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->prefersDedicatedAllocation, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->requiresDedicatedAllocation, sizeof(VkBool32));
}
void marshal_VkMemoryDedicatedAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryDedicatedAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
}
void unmarshal_VkMemoryDedicatedAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryDedicatedAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_1,
(VkBuffer*)&forUnmarshaling->buffer, 1);
}
void marshal_VkMemoryAllocateFlagsInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryAllocateFlagsInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkMemoryAllocateFlags*)&forMarshaling->flags, sizeof(VkMemoryAllocateFlags));
vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
}
void unmarshal_VkMemoryAllocateFlagsInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryAllocateFlagsInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkMemoryAllocateFlags*)&forUnmarshaling->flags, sizeof(VkMemoryAllocateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
}
void marshal_VkDeviceGroupRenderPassBeginInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupRenderPassBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->deviceRenderAreaCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->deviceRenderAreaCount; ++i) {
marshal_VkRect2D(vkStream, rootType,
(const VkRect2D*)(forMarshaling->pDeviceRenderAreas + i));
}
}
}
void unmarshal_VkDeviceGroupRenderPassBeginInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkDeviceGroupRenderPassBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->deviceRenderAreaCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->deviceRenderAreaCount; ++i) {
unmarshal_VkRect2D(vkStream, rootType,
(VkRect2D*)(forUnmarshaling->pDeviceRenderAreas + i));
}
}
}
void marshal_VkDeviceGroupCommandBufferBeginInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupCommandBufferBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
}
void unmarshal_VkDeviceGroupCommandBufferBeginInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupCommandBufferBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
}
void marshal_VkDeviceGroupSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupSubmitInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pWaitSemaphoreDeviceIndices,
forMarshaling->waitSemaphoreCount * sizeof(const uint32_t));
vkStream->write((uint32_t*)&forMarshaling->commandBufferCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pCommandBufferDeviceMasks,
forMarshaling->commandBufferCount * sizeof(const uint32_t));
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pSignalSemaphoreDeviceIndices,
forMarshaling->signalSemaphoreCount * sizeof(const uint32_t));
}
void unmarshal_VkDeviceGroupSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupSubmitInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pWaitSemaphoreDeviceIndices,
forUnmarshaling->waitSemaphoreCount * sizeof(const uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->commandBufferCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pCommandBufferDeviceMasks,
forUnmarshaling->commandBufferCount * sizeof(const uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pSignalSemaphoreDeviceIndices,
forUnmarshaling->signalSemaphoreCount * sizeof(const uint32_t));
}
void marshal_VkDeviceGroupBindSparseInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupBindSparseInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->resourceDeviceIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->memoryDeviceIndex, sizeof(uint32_t));
}
void unmarshal_VkDeviceGroupBindSparseInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupBindSparseInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->resourceDeviceIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->memoryDeviceIndex, sizeof(uint32_t));
}
void marshal_VkBindBufferMemoryDeviceGroupInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindBufferMemoryDeviceGroupInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices,
forMarshaling->deviceIndexCount * sizeof(const uint32_t));
}
void unmarshal_VkBindBufferMemoryDeviceGroupInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindBufferMemoryDeviceGroupInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices,
forUnmarshaling->deviceIndexCount * sizeof(const uint32_t));
}
void marshal_VkBindImageMemoryDeviceGroupInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindImageMemoryDeviceGroupInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->deviceIndexCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pDeviceIndices,
forMarshaling->deviceIndexCount * sizeof(const uint32_t));
vkStream->write((uint32_t*)&forMarshaling->splitInstanceBindRegionCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->splitInstanceBindRegionCount; ++i) {
marshal_VkRect2D(vkStream, rootType,
(const VkRect2D*)(forMarshaling->pSplitInstanceBindRegions + i));
}
}
}
void unmarshal_VkBindImageMemoryDeviceGroupInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkBindImageMemoryDeviceGroupInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->deviceIndexCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pDeviceIndices,
forUnmarshaling->deviceIndexCount * sizeof(const uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->splitInstanceBindRegionCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->splitInstanceBindRegionCount; ++i) {
unmarshal_VkRect2D(vkStream, rootType,
(VkRect2D*)(forUnmarshaling->pSplitInstanceBindRegions + i));
}
}
}
void marshal_VkPhysicalDeviceGroupProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceGroupProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t));
vkStream->write((VkPhysicalDevice*)forMarshaling->physicalDevices,
VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
vkStream->write((VkBool32*)&forMarshaling->subsetAllocation, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceGroupProperties(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceGroupProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t));
vkStream->read((VkPhysicalDevice*)forUnmarshaling->physicalDevices,
VK_MAX_DEVICE_GROUP_SIZE * sizeof(VkPhysicalDevice));
vkStream->read((VkBool32*)&forUnmarshaling->subsetAllocation, sizeof(VkBool32));
}
void marshal_VkDeviceGroupDeviceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupDeviceCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->physicalDeviceCount, sizeof(uint32_t));
if (forMarshaling->physicalDeviceCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->physicalDeviceCount * 8);
vkStream->handleMapping()->mapHandles_VkPhysicalDevice_u64(
forMarshaling->pPhysicalDevices, cgen_var_0, forMarshaling->physicalDeviceCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->physicalDeviceCount * 8);
}
}
void unmarshal_VkDeviceGroupDeviceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupDeviceCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->physicalDeviceCount, sizeof(uint32_t));
if (forUnmarshaling->physicalDeviceCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->physicalDeviceCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->physicalDeviceCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkPhysicalDevice(
cgen_var_0, (VkPhysicalDevice*)forUnmarshaling->pPhysicalDevices,
forUnmarshaling->physicalDeviceCount);
}
}
void marshal_VkBufferMemoryRequirementsInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferMemoryRequirementsInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkBufferMemoryRequirementsInfo2(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkBufferMemoryRequirementsInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
}
void marshal_VkImageMemoryRequirementsInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageMemoryRequirementsInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkImageMemoryRequirementsInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageMemoryRequirementsInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
}
void marshal_VkImageSparseMemoryRequirementsInfo2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageSparseMemoryRequirementsInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImage_u64(&forMarshaling->image, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkImageSparseMemoryRequirementsInfo2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageSparseMemoryRequirementsInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_0,
(VkImage*)&forUnmarshaling->image, 1);
}
void marshal_VkMemoryRequirements2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryRequirements2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkMemoryRequirements(vkStream, rootType,
(VkMemoryRequirements*)(&forMarshaling->memoryRequirements));
}
void unmarshal_VkMemoryRequirements2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryRequirements2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkMemoryRequirements(vkStream, rootType,
(VkMemoryRequirements*)(&forUnmarshaling->memoryRequirements));
}
void marshal_VkSparseImageMemoryRequirements2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageMemoryRequirements2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkSparseImageMemoryRequirements(
vkStream, rootType, (VkSparseImageMemoryRequirements*)(&forMarshaling->memoryRequirements));
}
void unmarshal_VkSparseImageMemoryRequirements2(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkSparseImageMemoryRequirements2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkSparseImageMemoryRequirements(
vkStream, rootType,
(VkSparseImageMemoryRequirements*)(&forUnmarshaling->memoryRequirements));
}
void marshal_VkPhysicalDeviceFeatures2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceFeatures2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkPhysicalDeviceFeatures(vkStream, rootType,
(VkPhysicalDeviceFeatures*)(&forMarshaling->features));
}
void unmarshal_VkPhysicalDeviceFeatures2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceFeatures2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkPhysicalDeviceFeatures(vkStream, rootType,
(VkPhysicalDeviceFeatures*)(&forUnmarshaling->features));
}
void marshal_VkPhysicalDeviceProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkPhysicalDeviceProperties(vkStream, rootType,
(VkPhysicalDeviceProperties*)(&forMarshaling->properties));
}
void unmarshal_VkPhysicalDeviceProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkPhysicalDeviceProperties(
vkStream, rootType, (VkPhysicalDeviceProperties*)(&forUnmarshaling->properties));
}
void marshal_VkFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFormatProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkFormatProperties(vkStream, rootType,
(VkFormatProperties*)(&forMarshaling->formatProperties));
}
void unmarshal_VkFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFormatProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkFormatProperties(vkStream, rootType,
(VkFormatProperties*)(&forUnmarshaling->formatProperties));
}
void marshal_VkImageFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageFormatProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkImageFormatProperties(
vkStream, rootType, (VkImageFormatProperties*)(&forMarshaling->imageFormatProperties));
}
void unmarshal_VkImageFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageFormatProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkImageFormatProperties(
vkStream, rootType, (VkImageFormatProperties*)(&forUnmarshaling->imageFormatProperties));
}
void marshal_VkPhysicalDeviceImageFormatInfo2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceImageFormatInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType));
vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags));
}
void unmarshal_VkPhysicalDeviceImageFormatInfo2(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceImageFormatInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType));
vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags));
}
void marshal_VkQueueFamilyProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkQueueFamilyProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkQueueFamilyProperties(
vkStream, rootType, (VkQueueFamilyProperties*)(&forMarshaling->queueFamilyProperties));
}
void unmarshal_VkQueueFamilyProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkQueueFamilyProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkQueueFamilyProperties(
vkStream, rootType, (VkQueueFamilyProperties*)(&forUnmarshaling->queueFamilyProperties));
}
void marshal_VkPhysicalDeviceMemoryProperties2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceMemoryProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkPhysicalDeviceMemoryProperties(
vkStream, rootType, (VkPhysicalDeviceMemoryProperties*)(&forMarshaling->memoryProperties));
}
void unmarshal_VkPhysicalDeviceMemoryProperties2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceMemoryProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkPhysicalDeviceMemoryProperties(
vkStream, rootType,
(VkPhysicalDeviceMemoryProperties*)(&forUnmarshaling->memoryProperties));
}
void marshal_VkSparseImageFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSparseImageFormatProperties2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkSparseImageFormatProperties(
vkStream, rootType, (VkSparseImageFormatProperties*)(&forMarshaling->properties));
}
void unmarshal_VkSparseImageFormatProperties2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSparseImageFormatProperties2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkSparseImageFormatProperties(
vkStream, rootType, (VkSparseImageFormatProperties*)(&forUnmarshaling->properties));
}
void marshal_VkPhysicalDeviceSparseImageFormatInfo2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSparseImageFormatInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkImageType*)&forMarshaling->type, sizeof(VkImageType));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->write((VkImageTiling*)&forMarshaling->tiling, sizeof(VkImageTiling));
}
void unmarshal_VkPhysicalDeviceSparseImageFormatInfo2(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceSparseImageFormatInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkImageType*)&forUnmarshaling->type, sizeof(VkImageType));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples,
sizeof(VkSampleCountFlagBits));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->read((VkImageTiling*)&forUnmarshaling->tiling, sizeof(VkImageTiling));
}
void marshal_VkPhysicalDevicePointClippingProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevicePointClippingProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPointClippingBehavior*)&forMarshaling->pointClippingBehavior,
sizeof(VkPointClippingBehavior));
}
void unmarshal_VkPhysicalDevicePointClippingProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevicePointClippingProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPointClippingBehavior*)&forUnmarshaling->pointClippingBehavior,
sizeof(VkPointClippingBehavior));
}
void marshal_VkInputAttachmentAspectReference(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkInputAttachmentAspectReference* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->subpass, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->inputAttachmentIndex, sizeof(uint32_t));
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
}
void unmarshal_VkInputAttachmentAspectReference(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkInputAttachmentAspectReference* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->subpass, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentIndex, sizeof(uint32_t));
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
}
void marshal_VkRenderPassInputAttachmentAspectCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassInputAttachmentAspectCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->aspectReferenceCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->aspectReferenceCount; ++i) {
marshal_VkInputAttachmentAspectReference(
vkStream, rootType,
(const VkInputAttachmentAspectReference*)(forMarshaling->pAspectReferences + i));
}
}
}
void unmarshal_VkRenderPassInputAttachmentAspectCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderPassInputAttachmentAspectCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->aspectReferenceCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->aspectReferenceCount; ++i) {
unmarshal_VkInputAttachmentAspectReference(
vkStream, rootType,
(VkInputAttachmentAspectReference*)(forUnmarshaling->pAspectReferences + i));
}
}
}
void marshal_VkImageViewUsageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageViewUsageCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
}
void unmarshal_VkImageViewUsageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageViewUsageCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
}
void marshal_VkPipelineTessellationDomainOriginStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineTessellationDomainOriginStateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkTessellationDomainOrigin*)&forMarshaling->domainOrigin,
sizeof(VkTessellationDomainOrigin));
}
void unmarshal_VkPipelineTessellationDomainOriginStateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPipelineTessellationDomainOriginStateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkTessellationDomainOrigin*)&forUnmarshaling->domainOrigin,
sizeof(VkTessellationDomainOrigin));
}
void marshal_VkRenderPassMultiviewCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassMultiviewCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pViewMasks,
forMarshaling->subpassCount * sizeof(const uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
vkStream->write((const int32_t*)forMarshaling->pViewOffsets,
forMarshaling->dependencyCount * sizeof(const int32_t));
vkStream->write((uint32_t*)&forMarshaling->correlationMaskCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pCorrelationMasks,
forMarshaling->correlationMaskCount * sizeof(const uint32_t));
}
void unmarshal_VkRenderPassMultiviewCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkRenderPassMultiviewCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pViewMasks,
forUnmarshaling->subpassCount * sizeof(const uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
vkStream->read((int32_t*)forUnmarshaling->pViewOffsets,
forUnmarshaling->dependencyCount * sizeof(const int32_t));
vkStream->read((uint32_t*)&forUnmarshaling->correlationMaskCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pCorrelationMasks,
forUnmarshaling->correlationMaskCount * sizeof(const uint32_t));
}
void marshal_VkPhysicalDeviceMultiviewFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceMultiviewFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->multiview, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiviewGeometryShader, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiviewTessellationShader, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceMultiviewFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceMultiviewFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->multiview, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiviewGeometryShader, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiviewTessellationShader, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceMultiviewProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceMultiviewProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->maxMultiviewViewCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
}
void unmarshal_VkPhysicalDeviceMultiviewProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceMultiviewProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewViewCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
}
void marshal_VkPhysicalDeviceVariablePointersFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVariablePointersFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->variablePointers, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceVariablePointersFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceVariablePointersFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->variablePointers, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceProtectedMemoryFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceProtectedMemoryFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->protectedMemory, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceProtectedMemoryFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceProtectedMemoryFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->protectedMemory, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceProtectedMemoryProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceProtectedMemoryProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->protectedNoFault, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceProtectedMemoryProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceProtectedMemoryProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->protectedNoFault, sizeof(VkBool32));
}
void marshal_VkDeviceQueueInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceQueueInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDeviceQueueCreateFlags*)&forMarshaling->flags,
sizeof(VkDeviceQueueCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->queueIndex, sizeof(uint32_t));
}
void unmarshal_VkDeviceQueueInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceQueueInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceQueueCreateFlags*)&forUnmarshaling->flags,
sizeof(VkDeviceQueueCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->queueIndex, sizeof(uint32_t));
}
void marshal_VkProtectedSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkProtectedSubmitInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->protectedSubmit, sizeof(VkBool32));
}
void unmarshal_VkProtectedSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkProtectedSubmitInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->protectedSubmit, sizeof(VkBool32));
}
void marshal_VkSamplerYcbcrConversionCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSamplerYcbcrConversionCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkSamplerYcbcrModelConversion*)&forMarshaling->ycbcrModel,
sizeof(VkSamplerYcbcrModelConversion));
vkStream->write((VkSamplerYcbcrRange*)&forMarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange));
marshal_VkComponentMapping(vkStream, rootType,
(VkComponentMapping*)(&forMarshaling->components));
vkStream->write((VkChromaLocation*)&forMarshaling->xChromaOffset, sizeof(VkChromaLocation));
vkStream->write((VkChromaLocation*)&forMarshaling->yChromaOffset, sizeof(VkChromaLocation));
vkStream->write((VkFilter*)&forMarshaling->chromaFilter, sizeof(VkFilter));
vkStream->write((VkBool32*)&forMarshaling->forceExplicitReconstruction, sizeof(VkBool32));
}
void unmarshal_VkSamplerYcbcrConversionCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSamplerYcbcrConversionCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkSamplerYcbcrModelConversion*)&forUnmarshaling->ycbcrModel,
sizeof(VkSamplerYcbcrModelConversion));
vkStream->read((VkSamplerYcbcrRange*)&forUnmarshaling->ycbcrRange, sizeof(VkSamplerYcbcrRange));
unmarshal_VkComponentMapping(vkStream, rootType,
(VkComponentMapping*)(&forUnmarshaling->components));
vkStream->read((VkChromaLocation*)&forUnmarshaling->xChromaOffset, sizeof(VkChromaLocation));
vkStream->read((VkChromaLocation*)&forUnmarshaling->yChromaOffset, sizeof(VkChromaLocation));
vkStream->read((VkFilter*)&forUnmarshaling->chromaFilter, sizeof(VkFilter));
vkStream->read((VkBool32*)&forUnmarshaling->forceExplicitReconstruction, sizeof(VkBool32));
}
void marshal_VkSamplerYcbcrConversionInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSamplerYcbcrConversionInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSamplerYcbcrConversion_u64(&forMarshaling->conversion,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkSamplerYcbcrConversionInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSamplerYcbcrConversionInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSamplerYcbcrConversion(
&cgen_var_0, (VkSamplerYcbcrConversion*)&forUnmarshaling->conversion, 1);
}
void marshal_VkBindImagePlaneMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindImagePlaneMemoryInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect,
sizeof(VkImageAspectFlagBits));
}
void unmarshal_VkBindImagePlaneMemoryInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindImagePlaneMemoryInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect,
sizeof(VkImageAspectFlagBits));
}
void marshal_VkImagePlaneMemoryRequirementsInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImagePlaneMemoryRequirementsInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageAspectFlagBits*)&forMarshaling->planeAspect,
sizeof(VkImageAspectFlagBits));
}
void unmarshal_VkImagePlaneMemoryRequirementsInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImagePlaneMemoryRequirementsInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageAspectFlagBits*)&forUnmarshaling->planeAspect,
sizeof(VkImageAspectFlagBits));
}
void marshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSamplerYcbcrConversionFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->samplerYcbcrConversion, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceSamplerYcbcrConversionFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceSamplerYcbcrConversionFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->samplerYcbcrConversion, sizeof(VkBool32));
}
void marshal_VkSamplerYcbcrConversionImageFormatProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSamplerYcbcrConversionImageFormatProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->combinedImageSamplerDescriptorCount,
sizeof(uint32_t));
}
void unmarshal_VkSamplerYcbcrConversionImageFormatProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSamplerYcbcrConversionImageFormatProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->combinedImageSamplerDescriptorCount,
sizeof(uint32_t));
}
void marshal_VkDescriptorUpdateTemplateEntry(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorUpdateTemplateEntry* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->dstBinding, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->descriptorCount, sizeof(uint32_t));
vkStream->write((VkDescriptorType*)&forMarshaling->descriptorType, sizeof(VkDescriptorType));
uint64_t cgen_var_0 = (uint64_t)forMarshaling->offset;
vkStream->putBe64(cgen_var_0);
uint64_t cgen_var_1 = (uint64_t)forMarshaling->stride;
vkStream->putBe64(cgen_var_1);
}
void unmarshal_VkDescriptorUpdateTemplateEntry(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkDescriptorUpdateTemplateEntry* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->dstBinding, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstArrayElement, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorCount, sizeof(uint32_t));
vkStream->read((VkDescriptorType*)&forUnmarshaling->descriptorType, sizeof(VkDescriptorType));
forUnmarshaling->offset = (size_t)vkStream->getBe64();
forUnmarshaling->stride = (size_t)vkStream->getBe64();
}
void marshal_VkDescriptorUpdateTemplateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorUpdateTemplateCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDescriptorUpdateTemplateCreateFlags*)&forMarshaling->flags,
sizeof(VkDescriptorUpdateTemplateCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->descriptorUpdateEntryCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->descriptorUpdateEntryCount; ++i) {
marshal_VkDescriptorUpdateTemplateEntry(
vkStream, rootType,
(const VkDescriptorUpdateTemplateEntry*)(forMarshaling->pDescriptorUpdateEntries +
i));
}
}
vkStream->write((VkDescriptorUpdateTemplateType*)&forMarshaling->templateType,
sizeof(VkDescriptorUpdateTemplateType));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(
&forMarshaling->descriptorSetLayout, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkPipelineLayout_u64(&forMarshaling->pipelineLayout,
&cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->set, sizeof(uint32_t));
}
void unmarshal_VkDescriptorUpdateTemplateCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorUpdateTemplateCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDescriptorUpdateTemplateCreateFlags*)&forUnmarshaling->flags,
sizeof(VkDescriptorUpdateTemplateCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorUpdateEntryCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->descriptorUpdateEntryCount; ++i) {
unmarshal_VkDescriptorUpdateTemplateEntry(
vkStream, rootType,
(VkDescriptorUpdateTemplateEntry*)(forUnmarshaling->pDescriptorUpdateEntries + i));
}
}
vkStream->read((VkDescriptorUpdateTemplateType*)&forUnmarshaling->templateType,
sizeof(VkDescriptorUpdateTemplateType));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(
&cgen_var_0, (VkDescriptorSetLayout*)&forUnmarshaling->descriptorSetLayout, 1);
vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkPipelineLayout(
&cgen_var_1, (VkPipelineLayout*)&forUnmarshaling->pipelineLayout, 1);
vkStream->read((uint32_t*)&forUnmarshaling->set, sizeof(uint32_t));
}
void marshal_VkExternalMemoryProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalMemoryProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkExternalMemoryFeatureFlags*)&forMarshaling->externalMemoryFeatures,
sizeof(VkExternalMemoryFeatureFlags));
vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->compatibleHandleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void unmarshal_VkExternalMemoryProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExternalMemoryProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkExternalMemoryFeatureFlags*)&forUnmarshaling->externalMemoryFeatures,
sizeof(VkExternalMemoryFeatureFlags));
vkStream->read(
(VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void marshal_VkPhysicalDeviceExternalImageFormatInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceExternalImageFormatInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void unmarshal_VkPhysicalDeviceExternalImageFormatInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceExternalImageFormatInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void marshal_VkExternalImageFormatProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalImageFormatProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkExternalMemoryProperties(
vkStream, rootType,
(VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties));
}
void unmarshal_VkExternalImageFormatProperties(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkExternalImageFormatProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkExternalMemoryProperties(
vkStream, rootType,
(VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties));
}
void marshal_VkPhysicalDeviceExternalBufferInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceExternalBufferInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBufferCreateFlags*)&forMarshaling->flags, sizeof(VkBufferCreateFlags));
vkStream->write((VkBufferUsageFlags*)&forMarshaling->usage, sizeof(VkBufferUsageFlags));
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void unmarshal_VkPhysicalDeviceExternalBufferInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceExternalBufferInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBufferCreateFlags*)&forUnmarshaling->flags, sizeof(VkBufferCreateFlags));
vkStream->read((VkBufferUsageFlags*)&forUnmarshaling->usage, sizeof(VkBufferUsageFlags));
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void marshal_VkExternalBufferProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalBufferProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkExternalMemoryProperties(
vkStream, rootType,
(VkExternalMemoryProperties*)(&forMarshaling->externalMemoryProperties));
}
void unmarshal_VkExternalBufferProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExternalBufferProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkExternalMemoryProperties(
vkStream, rootType,
(VkExternalMemoryProperties*)(&forUnmarshaling->externalMemoryProperties));
}
void marshal_VkPhysicalDeviceIDProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceIDProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint8_t*)forMarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->write((uint8_t*)forMarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->write((uint8_t*)forMarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
vkStream->write((uint32_t*)&forMarshaling->deviceNodeMask, sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->deviceLUIDValid, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceIDProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceIDProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint8_t*)forUnmarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->read((uint8_t*)forUnmarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->read((uint8_t*)forUnmarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
vkStream->read((uint32_t*)&forUnmarshaling->deviceNodeMask, sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->deviceLUIDValid, sizeof(VkBool32));
}
void marshal_VkExternalMemoryImageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalMemoryImageCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void unmarshal_VkExternalMemoryImageCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkExternalMemoryImageCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void marshal_VkExternalMemoryBufferCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalMemoryBufferCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void unmarshal_VkExternalMemoryBufferCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkExternalMemoryBufferCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void marshal_VkExportMemoryAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportMemoryAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlags*)&forMarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void unmarshal_VkExportMemoryAllocateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExportMemoryAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlags*)&forUnmarshaling->handleTypes,
sizeof(VkExternalMemoryHandleTypeFlags));
}
void marshal_VkPhysicalDeviceExternalFenceInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceExternalFenceInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
void unmarshal_VkPhysicalDeviceExternalFenceInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceExternalFenceInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
void marshal_VkExternalFenceProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalFenceProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->compatibleHandleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
vkStream->write((VkExternalFenceFeatureFlags*)&forMarshaling->externalFenceFeatures,
sizeof(VkExternalFenceFeatureFlags));
}
void unmarshal_VkExternalFenceProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExternalFenceProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
vkStream->read((VkExternalFenceFeatureFlags*)&forUnmarshaling->externalFenceFeatures,
sizeof(VkExternalFenceFeatureFlags));
}
void marshal_VkExportFenceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportFenceCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalFenceHandleTypeFlags*)&forMarshaling->handleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
}
void unmarshal_VkExportFenceCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExportFenceCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalFenceHandleTypeFlags*)&forUnmarshaling->handleTypes,
sizeof(VkExternalFenceHandleTypeFlags));
}
void marshal_VkExportSemaphoreCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportSemaphoreCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->handleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
}
void unmarshal_VkExportSemaphoreCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExportSemaphoreCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->handleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
}
void marshal_VkPhysicalDeviceExternalSemaphoreInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceExternalSemaphoreInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
void unmarshal_VkPhysicalDeviceExternalSemaphoreInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceExternalSemaphoreInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
void marshal_VkExternalSemaphoreProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExternalSemaphoreProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write(
(VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
vkStream->write((VkExternalSemaphoreHandleTypeFlags*)&forMarshaling->compatibleHandleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
vkStream->write((VkExternalSemaphoreFeatureFlags*)&forMarshaling->externalSemaphoreFeatures,
sizeof(VkExternalSemaphoreFeatureFlags));
}
void unmarshal_VkExternalSemaphoreProperties(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExternalSemaphoreProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read(
(VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->exportFromImportedHandleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
vkStream->read((VkExternalSemaphoreHandleTypeFlags*)&forUnmarshaling->compatibleHandleTypes,
sizeof(VkExternalSemaphoreHandleTypeFlags));
vkStream->read((VkExternalSemaphoreFeatureFlags*)&forUnmarshaling->externalSemaphoreFeatures,
sizeof(VkExternalSemaphoreFeatureFlags));
}
void marshal_VkPhysicalDeviceMaintenance3Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceMaintenance3Properties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->maxPerSetDescriptors, sizeof(uint32_t));
vkStream->write((VkDeviceSize*)&forMarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
}
void unmarshal_VkPhysicalDeviceMaintenance3Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceMaintenance3Properties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerSetDescriptors, sizeof(uint32_t));
vkStream->read((VkDeviceSize*)&forUnmarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
}
void marshal_VkDescriptorSetLayoutSupport(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetLayoutSupport* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->supported, sizeof(VkBool32));
}
void unmarshal_VkDescriptorSetLayoutSupport(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetLayoutSupport* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->supported, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceShaderDrawParametersFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceShaderDrawParametersFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->shaderDrawParameters, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceShaderDrawParametersFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceShaderDrawParametersFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDrawParameters, sizeof(VkBool32));
}
#endif
#ifdef VK_VERSION_1_2
void marshal_VkPhysicalDeviceVulkan11Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVulkan11Features* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer16BitAccess,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storagePushConstant16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storageInputOutput16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiview, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiviewGeometryShader, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->multiviewTessellationShader, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->variablePointers, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->protectedMemory, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->samplerYcbcrConversion, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDrawParameters, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceVulkan11Features(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceVulkan11Features* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer16BitAccess, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer16BitAccess,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storageInputOutput16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiview, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiviewGeometryShader, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->multiviewTessellationShader, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->variablePointersStorageBuffer, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->variablePointers, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->protectedMemory, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->samplerYcbcrConversion, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDrawParameters, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceVulkan11Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVulkan11Properties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint8_t*)forMarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->write((uint8_t*)forMarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->write((uint8_t*)forMarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
vkStream->write((uint32_t*)&forMarshaling->deviceNodeMask, sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->deviceLUIDValid, sizeof(VkBool32));
vkStream->write((uint32_t*)&forMarshaling->subgroupSize, sizeof(uint32_t));
vkStream->write((VkShaderStageFlags*)&forMarshaling->subgroupSupportedStages,
sizeof(VkShaderStageFlags));
vkStream->write((VkSubgroupFeatureFlags*)&forMarshaling->subgroupSupportedOperations,
sizeof(VkSubgroupFeatureFlags));
vkStream->write((VkBool32*)&forMarshaling->subgroupQuadOperationsInAllStages, sizeof(VkBool32));
vkStream->write((VkPointClippingBehavior*)&forMarshaling->pointClippingBehavior,
sizeof(VkPointClippingBehavior));
vkStream->write((uint32_t*)&forMarshaling->maxMultiviewViewCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->protectedNoFault, sizeof(VkBool32));
vkStream->write((uint32_t*)&forMarshaling->maxPerSetDescriptors, sizeof(uint32_t));
vkStream->write((VkDeviceSize*)&forMarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
}
void unmarshal_VkPhysicalDeviceVulkan11Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceVulkan11Properties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint8_t*)forUnmarshaling->deviceUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->read((uint8_t*)forUnmarshaling->driverUUID, VK_UUID_SIZE * sizeof(uint8_t));
vkStream->read((uint8_t*)forUnmarshaling->deviceLUID, VK_LUID_SIZE * sizeof(uint8_t));
vkStream->read((uint32_t*)&forUnmarshaling->deviceNodeMask, sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->deviceLUIDValid, sizeof(VkBool32));
vkStream->read((uint32_t*)&forUnmarshaling->subgroupSize, sizeof(uint32_t));
vkStream->read((VkShaderStageFlags*)&forUnmarshaling->subgroupSupportedStages,
sizeof(VkShaderStageFlags));
vkStream->read((VkSubgroupFeatureFlags*)&forUnmarshaling->subgroupSupportedOperations,
sizeof(VkSubgroupFeatureFlags));
vkStream->read((VkBool32*)&forUnmarshaling->subgroupQuadOperationsInAllStages,
sizeof(VkBool32));
vkStream->read((VkPointClippingBehavior*)&forUnmarshaling->pointClippingBehavior,
sizeof(VkPointClippingBehavior));
vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewViewCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxMultiviewInstanceIndex, sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->protectedNoFault, sizeof(VkBool32));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerSetDescriptors, sizeof(uint32_t));
vkStream->read((VkDeviceSize*)&forUnmarshaling->maxMemoryAllocationSize, sizeof(VkDeviceSize));
}
void marshal_VkPhysicalDeviceVulkan12Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVulkan12Features* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->samplerMirrorClampToEdge, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->drawIndirectCount, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storagePushConstant8, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderBufferInt64Atomics, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSharedInt64Atomics, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInt8, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorIndexing, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingSampledImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUpdateUnusedWhilePending,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingVariableDescriptorCount,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->runtimeDescriptorArray, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->samplerFilterMinmax, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->scalarBlockLayout, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->imagelessFramebuffer, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->uniformBufferStandardLayout, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSubgroupExtendedTypes, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->separateDepthStencilLayouts, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->hostQueryReset, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->timelineSemaphore, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddress, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddressCaptureReplay, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddressMultiDevice, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModel, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModelDeviceScope, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModelAvailabilityVisibilityChains,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderOutputViewportIndex, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderOutputLayer, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->subgroupBroadcastDynamicId, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceVulkan12Features(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceVulkan12Features* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->samplerMirrorClampToEdge, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->drawIndirectCount, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer8BitAccess,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant8, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderBufferInt64Atomics, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSharedInt64Atomics, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInt8, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorIndexing, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingSampledImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUpdateUnusedWhilePending,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingVariableDescriptorCount,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->runtimeDescriptorArray, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->samplerFilterMinmax, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->scalarBlockLayout, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->imagelessFramebuffer, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->uniformBufferStandardLayout, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSubgroupExtendedTypes, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->separateDepthStencilLayouts, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->hostQueryReset, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->timelineSemaphore, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddress, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddressCaptureReplay, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddressMultiDevice, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModel, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModelDeviceScope, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModelAvailabilityVisibilityChains,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderOutputViewportIndex, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderOutputLayer, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->subgroupBroadcastDynamicId, sizeof(VkBool32));
}
void marshal_VkConformanceVersion(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkConformanceVersion* forMarshaling) {
(void)rootType;
vkStream->write((uint8_t*)&forMarshaling->major, sizeof(uint8_t));
vkStream->write((uint8_t*)&forMarshaling->minor, sizeof(uint8_t));
vkStream->write((uint8_t*)&forMarshaling->subminor, sizeof(uint8_t));
vkStream->write((uint8_t*)&forMarshaling->patch, sizeof(uint8_t));
}
void unmarshal_VkConformanceVersion(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkConformanceVersion* forUnmarshaling) {
(void)rootType;
vkStream->read((uint8_t*)&forUnmarshaling->major, sizeof(uint8_t));
vkStream->read((uint8_t*)&forUnmarshaling->minor, sizeof(uint8_t));
vkStream->read((uint8_t*)&forUnmarshaling->subminor, sizeof(uint8_t));
vkStream->read((uint8_t*)&forUnmarshaling->patch, sizeof(uint8_t));
}
void marshal_VkPhysicalDeviceVulkan12Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVulkan12Properties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDriverId*)&forMarshaling->driverID, sizeof(VkDriverId));
vkStream->write((char*)forMarshaling->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
vkStream->write((char*)forMarshaling->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
marshal_VkConformanceVersion(vkStream, rootType,
(VkConformanceVersion*)(&forMarshaling->conformanceVersion));
vkStream->write((VkShaderFloatControlsIndependence*)&forMarshaling->denormBehaviorIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->write((VkShaderFloatControlsIndependence*)&forMarshaling->roundingModeIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat16,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat32,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat64,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat64, sizeof(VkBool32));
vkStream->write((uint32_t*)&forMarshaling->maxUpdateAfterBindDescriptorsInAllPools,
sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageUpdateAfterBindResources,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->write((VkResolveModeFlags*)&forMarshaling->supportedDepthResolveModes,
sizeof(VkResolveModeFlags));
vkStream->write((VkResolveModeFlags*)&forMarshaling->supportedStencilResolveModes,
sizeof(VkResolveModeFlags));
vkStream->write((VkBool32*)&forMarshaling->independentResolveNone, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->independentResolve, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->filterMinmaxSingleComponentFormats,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32));
vkStream->write((uint64_t*)&forMarshaling->maxTimelineSemaphoreValueDifference,
sizeof(uint64_t));
vkStream->write((VkSampleCountFlags*)&forMarshaling->framebufferIntegerColorSampleCounts,
sizeof(VkSampleCountFlags));
}
void unmarshal_VkPhysicalDeviceVulkan12Properties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceVulkan12Properties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDriverId*)&forUnmarshaling->driverID, sizeof(VkDriverId));
vkStream->read((char*)forUnmarshaling->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
vkStream->read((char*)forUnmarshaling->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
unmarshal_VkConformanceVersion(vkStream, rootType,
(VkConformanceVersion*)(&forUnmarshaling->conformanceVersion));
vkStream->read((VkShaderFloatControlsIndependence*)&forUnmarshaling->denormBehaviorIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->read((VkShaderFloatControlsIndependence*)&forUnmarshaling->roundingModeIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat16,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat32,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat64,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat64, sizeof(VkBool32));
vkStream->read((uint32_t*)&forUnmarshaling->maxUpdateAfterBindDescriptorsInAllPools,
sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccessUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageUpdateAfterBindResources,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->read((VkResolveModeFlags*)&forUnmarshaling->supportedDepthResolveModes,
sizeof(VkResolveModeFlags));
vkStream->read((VkResolveModeFlags*)&forUnmarshaling->supportedStencilResolveModes,
sizeof(VkResolveModeFlags));
vkStream->read((VkBool32*)&forUnmarshaling->independentResolveNone, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->independentResolve, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxSingleComponentFormats,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxImageComponentMapping,
sizeof(VkBool32));
vkStream->read((uint64_t*)&forUnmarshaling->maxTimelineSemaphoreValueDifference,
sizeof(uint64_t));
vkStream->read((VkSampleCountFlags*)&forUnmarshaling->framebufferIntegerColorSampleCounts,
sizeof(VkSampleCountFlags));
}
void marshal_VkImageFormatListCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageFormatListCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->viewFormatCount, sizeof(uint32_t));
vkStream->write((const VkFormat*)forMarshaling->pViewFormats,
forMarshaling->viewFormatCount * sizeof(const VkFormat));
}
void unmarshal_VkImageFormatListCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageFormatListCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->viewFormatCount, sizeof(uint32_t));
vkStream->read((VkFormat*)forUnmarshaling->pViewFormats,
forUnmarshaling->viewFormatCount * sizeof(const VkFormat));
}
void marshal_VkAttachmentDescription2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentDescription2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAttachmentDescriptionFlags*)&forMarshaling->flags,
sizeof(VkAttachmentDescriptionFlags));
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->samples, sizeof(VkSampleCountFlagBits));
vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp));
vkStream->write((VkAttachmentLoadOp*)&forMarshaling->stencilLoadOp, sizeof(VkAttachmentLoadOp));
vkStream->write((VkAttachmentStoreOp*)&forMarshaling->stencilStoreOp,
sizeof(VkAttachmentStoreOp));
vkStream->write((VkImageLayout*)&forMarshaling->initialLayout, sizeof(VkImageLayout));
vkStream->write((VkImageLayout*)&forMarshaling->finalLayout, sizeof(VkImageLayout));
}
void unmarshal_VkAttachmentDescription2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentDescription2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAttachmentDescriptionFlags*)&forUnmarshaling->flags,
sizeof(VkAttachmentDescriptionFlags));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->samples,
sizeof(VkSampleCountFlagBits));
vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp));
vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->stencilLoadOp,
sizeof(VkAttachmentLoadOp));
vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->stencilStoreOp,
sizeof(VkAttachmentStoreOp));
vkStream->read((VkImageLayout*)&forUnmarshaling->initialLayout, sizeof(VkImageLayout));
vkStream->read((VkImageLayout*)&forUnmarshaling->finalLayout, sizeof(VkImageLayout));
}
void marshal_VkAttachmentReference2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentReference2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->attachment, sizeof(uint32_t));
vkStream->write((VkImageLayout*)&forMarshaling->layout, sizeof(VkImageLayout));
vkStream->write((VkImageAspectFlags*)&forMarshaling->aspectMask, sizeof(VkImageAspectFlags));
}
void unmarshal_VkAttachmentReference2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentReference2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->attachment, sizeof(uint32_t));
vkStream->read((VkImageLayout*)&forUnmarshaling->layout, sizeof(VkImageLayout));
vkStream->read((VkImageAspectFlags*)&forUnmarshaling->aspectMask, sizeof(VkImageAspectFlags));
}
void marshal_VkSubpassDescription2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassDescription2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSubpassDescriptionFlags*)&forMarshaling->flags,
sizeof(VkSubpassDescriptionFlags));
vkStream->write((VkPipelineBindPoint*)&forMarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->inputAttachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->inputAttachmentCount; ++i) {
marshal_VkAttachmentReference2(
vkStream, rootType,
(const VkAttachmentReference2*)(forMarshaling->pInputAttachments + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) {
marshal_VkAttachmentReference2(
vkStream, rootType,
(const VkAttachmentReference2*)(forMarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pResolveAttachments;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pResolveAttachments) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) {
marshal_VkAttachmentReference2(
vkStream, rootType,
(const VkAttachmentReference2*)(forMarshaling->pResolveAttachments + i));
}
}
}
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilAttachment;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pDepthStencilAttachment) {
marshal_VkAttachmentReference2(
vkStream, rootType,
(const VkAttachmentReference2*)(forMarshaling->pDepthStencilAttachment));
}
vkStream->write((uint32_t*)&forMarshaling->preserveAttachmentCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pPreserveAttachments,
forMarshaling->preserveAttachmentCount * sizeof(const uint32_t));
}
void unmarshal_VkSubpassDescription2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassDescription2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSubpassDescriptionFlags*)&forUnmarshaling->flags,
sizeof(VkSubpassDescriptionFlags));
vkStream->read((VkPipelineBindPoint*)&forUnmarshaling->pipelineBindPoint,
sizeof(VkPipelineBindPoint));
vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->inputAttachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->inputAttachmentCount; ++i) {
unmarshal_VkAttachmentReference2(
vkStream, rootType,
(VkAttachmentReference2*)(forUnmarshaling->pInputAttachments + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) {
unmarshal_VkAttachmentReference2(
vkStream, rootType,
(VkAttachmentReference2*)(forUnmarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
const VkAttachmentReference2* check_pResolveAttachments;
check_pResolveAttachments = (const VkAttachmentReference2*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pResolveAttachments) {
if (!(check_pResolveAttachments)) {
fprintf(stderr,
"fatal: forUnmarshaling->pResolveAttachments inconsistent between guest and "
"host\n");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) {
unmarshal_VkAttachmentReference2(
vkStream, rootType,
(VkAttachmentReference2*)(forUnmarshaling->pResolveAttachments + i));
}
}
}
// WARNING PTR CHECK
const VkAttachmentReference2* check_pDepthStencilAttachment;
check_pDepthStencilAttachment = (const VkAttachmentReference2*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDepthStencilAttachment) {
if (!(check_pDepthStencilAttachment)) {
fprintf(stderr,
"fatal: forUnmarshaling->pDepthStencilAttachment inconsistent between guest "
"and host\n");
}
unmarshal_VkAttachmentReference2(
vkStream, rootType,
(VkAttachmentReference2*)(forUnmarshaling->pDepthStencilAttachment));
}
vkStream->read((uint32_t*)&forUnmarshaling->preserveAttachmentCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pPreserveAttachments,
forUnmarshaling->preserveAttachmentCount * sizeof(const uint32_t));
}
void marshal_VkSubpassDependency2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassDependency2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->srcSubpass, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->dstSubpass, sizeof(uint32_t));
vkStream->write((VkPipelineStageFlags*)&forMarshaling->srcStageMask,
sizeof(VkPipelineStageFlags));
vkStream->write((VkPipelineStageFlags*)&forMarshaling->dstStageMask,
sizeof(VkPipelineStageFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkAccessFlags*)&forMarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->write((VkDependencyFlags*)&forMarshaling->dependencyFlags, sizeof(VkDependencyFlags));
vkStream->write((int32_t*)&forMarshaling->viewOffset, sizeof(int32_t));
}
void unmarshal_VkSubpassDependency2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassDependency2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->srcSubpass, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->dstSubpass, sizeof(uint32_t));
vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->srcStageMask,
sizeof(VkPipelineStageFlags));
vkStream->read((VkPipelineStageFlags*)&forUnmarshaling->dstStageMask,
sizeof(VkPipelineStageFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->srcAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkAccessFlags*)&forUnmarshaling->dstAccessMask, sizeof(VkAccessFlags));
vkStream->read((VkDependencyFlags*)&forUnmarshaling->dependencyFlags,
sizeof(VkDependencyFlags));
vkStream->read((int32_t*)&forUnmarshaling->viewOffset, sizeof(int32_t));
}
void marshal_VkRenderPassCreateInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassCreateInfo2* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkRenderPassCreateFlags*)&forMarshaling->flags,
sizeof(VkRenderPassCreateFlags));
vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentCount; ++i) {
marshal_VkAttachmentDescription2(
vkStream, rootType,
(const VkAttachmentDescription2*)(forMarshaling->pAttachments + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->subpassCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->subpassCount; ++i) {
marshal_VkSubpassDescription2(
vkStream, rootType, (const VkSubpassDescription2*)(forMarshaling->pSubpasses + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->dependencyCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->dependencyCount; ++i) {
marshal_VkSubpassDependency2(
vkStream, rootType,
(const VkSubpassDependency2*)(forMarshaling->pDependencies + i));
}
}
vkStream->write((uint32_t*)&forMarshaling->correlatedViewMaskCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pCorrelatedViewMasks,
forMarshaling->correlatedViewMaskCount * sizeof(const uint32_t));
}
void unmarshal_VkRenderPassCreateInfo2(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderPassCreateInfo2* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkRenderPassCreateFlags*)&forUnmarshaling->flags,
sizeof(VkRenderPassCreateFlags));
vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentCount; ++i) {
unmarshal_VkAttachmentDescription2(
vkStream, rootType, (VkAttachmentDescription2*)(forUnmarshaling->pAttachments + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->subpassCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->subpassCount; ++i) {
unmarshal_VkSubpassDescription2(
vkStream, rootType, (VkSubpassDescription2*)(forUnmarshaling->pSubpasses + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->dependencyCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->dependencyCount; ++i) {
unmarshal_VkSubpassDependency2(
vkStream, rootType, (VkSubpassDependency2*)(forUnmarshaling->pDependencies + i));
}
}
vkStream->read((uint32_t*)&forUnmarshaling->correlatedViewMaskCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pCorrelatedViewMasks,
forUnmarshaling->correlatedViewMaskCount * sizeof(const uint32_t));
}
void marshal_VkSubpassBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSubpassContents*)&forMarshaling->contents, sizeof(VkSubpassContents));
}
void unmarshal_VkSubpassBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSubpassContents*)&forUnmarshaling->contents, sizeof(VkSubpassContents));
}
void marshal_VkSubpassEndInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassEndInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
}
void unmarshal_VkSubpassEndInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassEndInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
}
void marshal_VkPhysicalDevice8BitStorageFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevice8BitStorageFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->uniformAndStorageBuffer8BitAccess, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->storagePushConstant8, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDevice8BitStorageFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevice8BitStorageFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->storageBuffer8BitAccess, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->uniformAndStorageBuffer8BitAccess,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->storagePushConstant8, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceDriverProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceDriverProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDriverId*)&forMarshaling->driverID, sizeof(VkDriverId));
vkStream->write((char*)forMarshaling->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
vkStream->write((char*)forMarshaling->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
marshal_VkConformanceVersion(vkStream, rootType,
(VkConformanceVersion*)(&forMarshaling->conformanceVersion));
}
void unmarshal_VkPhysicalDeviceDriverProperties(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceDriverProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDriverId*)&forUnmarshaling->driverID, sizeof(VkDriverId));
vkStream->read((char*)forUnmarshaling->driverName, VK_MAX_DRIVER_NAME_SIZE * sizeof(char));
vkStream->read((char*)forUnmarshaling->driverInfo, VK_MAX_DRIVER_INFO_SIZE * sizeof(char));
unmarshal_VkConformanceVersion(vkStream, rootType,
(VkConformanceVersion*)(&forUnmarshaling->conformanceVersion));
}
void marshal_VkPhysicalDeviceShaderAtomicInt64Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceShaderAtomicInt64Features* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->shaderBufferInt64Atomics, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSharedInt64Atomics, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceShaderAtomicInt64Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceShaderAtomicInt64Features* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->shaderBufferInt64Atomics, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSharedInt64Atomics, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceShaderFloat16Int8Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceShaderFloat16Int8Features* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->shaderFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInt8, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceShaderFloat16Int8Features(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceShaderFloat16Int8Features* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->shaderFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInt8, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceFloatControlsProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceFloatControlsProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkShaderFloatControlsIndependence*)&forMarshaling->denormBehaviorIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->write((VkShaderFloatControlsIndependence*)&forMarshaling->roundingModeIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat16,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat32,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSignedZeroInfNanPreserveFloat64,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormPreserveFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderDenormFlushToZeroFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTEFloat64, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat16, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat32, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderRoundingModeRTZFloat64, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceFloatControlsProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceFloatControlsProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkShaderFloatControlsIndependence*)&forUnmarshaling->denormBehaviorIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->read((VkShaderFloatControlsIndependence*)&forUnmarshaling->roundingModeIndependence,
sizeof(VkShaderFloatControlsIndependence));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat16,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat32,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSignedZeroInfNanPreserveFloat64,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormPreserveFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderDenormFlushToZeroFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTEFloat64, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat16, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat32, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderRoundingModeRTZFloat64, sizeof(VkBool32));
}
void marshal_VkDescriptorSetLayoutBindingFlagsCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetLayoutBindingFlagsCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->bindingCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pBindingFlags;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pBindingFlags) {
vkStream->write((const VkDescriptorBindingFlags*)forMarshaling->pBindingFlags,
forMarshaling->bindingCount * sizeof(const VkDescriptorBindingFlags));
}
}
void unmarshal_VkDescriptorSetLayoutBindingFlagsCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetLayoutBindingFlagsCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->bindingCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkDescriptorBindingFlags* check_pBindingFlags;
check_pBindingFlags = (const VkDescriptorBindingFlags*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pBindingFlags) {
if (!(check_pBindingFlags)) {
fprintf(stderr,
"fatal: forUnmarshaling->pBindingFlags inconsistent between guest and host\n");
}
vkStream->read((VkDescriptorBindingFlags*)forUnmarshaling->pBindingFlags,
forUnmarshaling->bindingCount * sizeof(const VkDescriptorBindingFlags));
}
}
void marshal_VkPhysicalDeviceDescriptorIndexingFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceDescriptorIndexingFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingSampledImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingUpdateUnusedWhilePending,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->descriptorBindingVariableDescriptorCount,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->runtimeDescriptorArray, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceDescriptorIndexingFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceDescriptorIndexingFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayDynamicIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageTexelBufferArrayNonUniformIndexing,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingSampledImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageImageUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUniformTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingStorageTexelBufferUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingUpdateUnusedWhilePending,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingPartiallyBound, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->descriptorBindingVariableDescriptorCount,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->runtimeDescriptorArray, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceDescriptorIndexingProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceDescriptorIndexingProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->maxUpdateAfterBindDescriptorsInAllPools,
sizeof(uint32_t));
vkStream->write((VkBool32*)&forMarshaling->shaderUniformBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderSampledImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderStorageImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->shaderInputAttachmentArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->robustBufferAccessUpdateAfterBind, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxPerStageUpdateAfterBindResources,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxDescriptorSetUpdateAfterBindInputAttachments,
sizeof(uint32_t));
}
void unmarshal_VkPhysicalDeviceDescriptorIndexingProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceDescriptorIndexingProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->maxUpdateAfterBindDescriptorsInAllPools,
sizeof(uint32_t));
vkStream->read((VkBool32*)&forUnmarshaling->shaderUniformBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSampledImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageBufferArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderStorageImageArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->shaderInputAttachmentArrayNonUniformIndexingNative,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->robustBufferAccessUpdateAfterBind,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->quadDivergentImplicitLod, sizeof(VkBool32));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxPerStageDescriptorUpdateAfterBindInputAttachments,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxPerStageUpdateAfterBindResources,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSamplers,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffers,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindUniformBuffersDynamic,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffers,
sizeof(uint32_t));
vkStream->read(
(uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageBuffersDynamic,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindSampledImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindStorageImages,
sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxDescriptorSetUpdateAfterBindInputAttachments,
sizeof(uint32_t));
}
void marshal_VkDescriptorSetVariableDescriptorCountAllocateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetVariableDescriptorCountAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->descriptorSetCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pDescriptorCounts,
forMarshaling->descriptorSetCount * sizeof(const uint32_t));
}
void unmarshal_VkDescriptorSetVariableDescriptorCountAllocateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetVariableDescriptorCountAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->descriptorSetCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pDescriptorCounts,
forUnmarshaling->descriptorSetCount * sizeof(const uint32_t));
}
void marshal_VkDescriptorSetVariableDescriptorCountLayoutSupport(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDescriptorSetVariableDescriptorCountLayoutSupport* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->maxVariableDescriptorCount, sizeof(uint32_t));
}
void unmarshal_VkDescriptorSetVariableDescriptorCountLayoutSupport(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDescriptorSetVariableDescriptorCountLayoutSupport* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->maxVariableDescriptorCount, sizeof(uint32_t));
}
void marshal_VkSubpassDescriptionDepthStencilResolve(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSubpassDescriptionDepthStencilResolve* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkResolveModeFlagBits*)&forMarshaling->depthResolveMode,
sizeof(VkResolveModeFlagBits));
vkStream->write((VkResolveModeFlagBits*)&forMarshaling->stencilResolveMode,
sizeof(VkResolveModeFlagBits));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pDepthStencilResolveAttachment;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pDepthStencilResolveAttachment) {
marshal_VkAttachmentReference2(
vkStream, rootType,
(const VkAttachmentReference2*)(forMarshaling->pDepthStencilResolveAttachment));
}
}
void unmarshal_VkSubpassDescriptionDepthStencilResolve(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSubpassDescriptionDepthStencilResolve* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkResolveModeFlagBits*)&forUnmarshaling->depthResolveMode,
sizeof(VkResolveModeFlagBits));
vkStream->read((VkResolveModeFlagBits*)&forUnmarshaling->stencilResolveMode,
sizeof(VkResolveModeFlagBits));
// WARNING PTR CHECK
const VkAttachmentReference2* check_pDepthStencilResolveAttachment;
check_pDepthStencilResolveAttachment =
(const VkAttachmentReference2*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDepthStencilResolveAttachment) {
if (!(check_pDepthStencilResolveAttachment)) {
fprintf(stderr,
"fatal: forUnmarshaling->pDepthStencilResolveAttachment inconsistent between "
"guest and host\n");
}
unmarshal_VkAttachmentReference2(
vkStream, rootType,
(VkAttachmentReference2*)(forUnmarshaling->pDepthStencilResolveAttachment));
}
}
void marshal_VkPhysicalDeviceDepthStencilResolveProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceDepthStencilResolveProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkResolveModeFlags*)&forMarshaling->supportedDepthResolveModes,
sizeof(VkResolveModeFlags));
vkStream->write((VkResolveModeFlags*)&forMarshaling->supportedStencilResolveModes,
sizeof(VkResolveModeFlags));
vkStream->write((VkBool32*)&forMarshaling->independentResolveNone, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->independentResolve, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceDepthStencilResolveProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceDepthStencilResolveProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkResolveModeFlags*)&forUnmarshaling->supportedDepthResolveModes,
sizeof(VkResolveModeFlags));
vkStream->read((VkResolveModeFlags*)&forUnmarshaling->supportedStencilResolveModes,
sizeof(VkResolveModeFlags));
vkStream->read((VkBool32*)&forUnmarshaling->independentResolveNone, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->independentResolve, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceScalarBlockLayoutFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceScalarBlockLayoutFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->scalarBlockLayout, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceScalarBlockLayoutFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceScalarBlockLayoutFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->scalarBlockLayout, sizeof(VkBool32));
}
void marshal_VkImageStencilUsageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageStencilUsageCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageUsageFlags*)&forMarshaling->stencilUsage, sizeof(VkImageUsageFlags));
}
void unmarshal_VkImageStencilUsageCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageStencilUsageCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->stencilUsage, sizeof(VkImageUsageFlags));
}
void marshal_VkSamplerReductionModeCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSamplerReductionModeCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSamplerReductionMode*)&forMarshaling->reductionMode,
sizeof(VkSamplerReductionMode));
}
void unmarshal_VkSamplerReductionModeCreateInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkSamplerReductionModeCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSamplerReductionMode*)&forUnmarshaling->reductionMode,
sizeof(VkSamplerReductionMode));
}
void marshal_VkPhysicalDeviceSamplerFilterMinmaxProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSamplerFilterMinmaxProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->filterMinmaxSingleComponentFormats,
sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->filterMinmaxImageComponentMapping, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceSamplerFilterMinmaxProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceSamplerFilterMinmaxProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxSingleComponentFormats,
sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->filterMinmaxImageComponentMapping,
sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceVulkanMemoryModelFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVulkanMemoryModelFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModel, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModelDeviceScope, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->vulkanMemoryModelAvailabilityVisibilityChains,
sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceVulkanMemoryModelFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceVulkanMemoryModelFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModel, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModelDeviceScope, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->vulkanMemoryModelAvailabilityVisibilityChains,
sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceImagelessFramebufferFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceImagelessFramebufferFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->imagelessFramebuffer, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceImagelessFramebufferFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceImagelessFramebufferFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->imagelessFramebuffer, sizeof(VkBool32));
}
void marshal_VkFramebufferAttachmentImageInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFramebufferAttachmentImageInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageCreateFlags*)&forMarshaling->flags, sizeof(VkImageCreateFlags));
vkStream->write((VkImageUsageFlags*)&forMarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->write((uint32_t*)&forMarshaling->width, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->height, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->viewFormatCount, sizeof(uint32_t));
vkStream->write((const VkFormat*)forMarshaling->pViewFormats,
forMarshaling->viewFormatCount * sizeof(const VkFormat));
}
void unmarshal_VkFramebufferAttachmentImageInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkFramebufferAttachmentImageInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageCreateFlags*)&forUnmarshaling->flags, sizeof(VkImageCreateFlags));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->usage, sizeof(VkImageUsageFlags));
vkStream->read((uint32_t*)&forUnmarshaling->width, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->height, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->viewFormatCount, sizeof(uint32_t));
vkStream->read((VkFormat*)forUnmarshaling->pViewFormats,
forUnmarshaling->viewFormatCount * sizeof(const VkFormat));
}
void marshal_VkFramebufferAttachmentsCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFramebufferAttachmentsCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->attachmentImageInfoCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->attachmentImageInfoCount; ++i) {
marshal_VkFramebufferAttachmentImageInfo(
vkStream, rootType,
(const VkFramebufferAttachmentImageInfo*)(forMarshaling->pAttachmentImageInfos +
i));
}
}
}
void unmarshal_VkFramebufferAttachmentsCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFramebufferAttachmentsCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->attachmentImageInfoCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->attachmentImageInfoCount; ++i) {
unmarshal_VkFramebufferAttachmentImageInfo(
vkStream, rootType,
(VkFramebufferAttachmentImageInfo*)(forUnmarshaling->pAttachmentImageInfos + i));
}
}
}
void marshal_VkRenderPassAttachmentBeginInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderPassAttachmentBeginInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->attachmentCount, sizeof(uint32_t));
if (forMarshaling->attachmentCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->attachmentCount * 8);
vkStream->handleMapping()->mapHandles_VkImageView_u64(
forMarshaling->pAttachments, cgen_var_0, forMarshaling->attachmentCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->attachmentCount * 8);
}
}
void unmarshal_VkRenderPassAttachmentBeginInfo(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkRenderPassAttachmentBeginInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->attachmentCount, sizeof(uint32_t));
if (forUnmarshaling->attachmentCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->attachmentCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->attachmentCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
cgen_var_0, (VkImageView*)forUnmarshaling->pAttachments,
forUnmarshaling->attachmentCount);
}
}
void marshal_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceUniformBufferStandardLayoutFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->uniformBufferStandardLayout, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceUniformBufferStandardLayoutFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->uniformBufferStandardLayout, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->shaderSubgroupExtendedTypes, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->shaderSubgroupExtendedTypes, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->separateDepthStencilLayouts, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->separateDepthStencilLayouts, sizeof(VkBool32));
}
void marshal_VkAttachmentReferenceStencilLayout(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentReferenceStencilLayout* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageLayout*)&forMarshaling->stencilLayout, sizeof(VkImageLayout));
}
void unmarshal_VkAttachmentReferenceStencilLayout(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentReferenceStencilLayout* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageLayout*)&forUnmarshaling->stencilLayout, sizeof(VkImageLayout));
}
void marshal_VkAttachmentDescriptionStencilLayout(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentDescriptionStencilLayout* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageLayout*)&forMarshaling->stencilInitialLayout, sizeof(VkImageLayout));
vkStream->write((VkImageLayout*)&forMarshaling->stencilFinalLayout, sizeof(VkImageLayout));
}
void unmarshal_VkAttachmentDescriptionStencilLayout(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentDescriptionStencilLayout* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageLayout*)&forUnmarshaling->stencilInitialLayout, sizeof(VkImageLayout));
vkStream->read((VkImageLayout*)&forUnmarshaling->stencilFinalLayout, sizeof(VkImageLayout));
}
void marshal_VkPhysicalDeviceHostQueryResetFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceHostQueryResetFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->hostQueryReset, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceHostQueryResetFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceHostQueryResetFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->hostQueryReset, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceTimelineSemaphoreFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceTimelineSemaphoreFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->timelineSemaphore, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceTimelineSemaphoreFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceTimelineSemaphoreFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->timelineSemaphore, sizeof(VkBool32));
}
void marshal_VkPhysicalDeviceTimelineSemaphoreProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceTimelineSemaphoreProperties* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint64_t*)&forMarshaling->maxTimelineSemaphoreValueDifference,
sizeof(uint64_t));
}
void unmarshal_VkPhysicalDeviceTimelineSemaphoreProperties(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceTimelineSemaphoreProperties* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint64_t*)&forUnmarshaling->maxTimelineSemaphoreValueDifference,
sizeof(uint64_t));
}
void marshal_VkSemaphoreTypeCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreTypeCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSemaphoreType*)&forMarshaling->semaphoreType, sizeof(VkSemaphoreType));
vkStream->write((uint64_t*)&forMarshaling->initialValue, sizeof(uint64_t));
}
void unmarshal_VkSemaphoreTypeCreateInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSemaphoreTypeCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSemaphoreType*)&forUnmarshaling->semaphoreType, sizeof(VkSemaphoreType));
vkStream->read((uint64_t*)&forUnmarshaling->initialValue, sizeof(uint64_t));
}
void marshal_VkTimelineSemaphoreSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkTimelineSemaphoreSubmitInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pWaitSemaphoreValues;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pWaitSemaphoreValues) {
vkStream->write((const uint64_t*)forMarshaling->pWaitSemaphoreValues,
forMarshaling->waitSemaphoreValueCount * sizeof(const uint64_t));
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pSignalSemaphoreValues;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pSignalSemaphoreValues) {
vkStream->write((const uint64_t*)forMarshaling->pSignalSemaphoreValues,
forMarshaling->signalSemaphoreValueCount * sizeof(const uint64_t));
}
}
void unmarshal_VkTimelineSemaphoreSubmitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkTimelineSemaphoreSubmitInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint64_t* check_pWaitSemaphoreValues;
check_pWaitSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pWaitSemaphoreValues) {
if (!(check_pWaitSemaphoreValues)) {
fprintf(stderr,
"fatal: forUnmarshaling->pWaitSemaphoreValues inconsistent between guest and "
"host\n");
}
vkStream->read((uint64_t*)forUnmarshaling->pWaitSemaphoreValues,
forUnmarshaling->waitSemaphoreValueCount * sizeof(const uint64_t));
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreValueCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint64_t* check_pSignalSemaphoreValues;
check_pSignalSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pSignalSemaphoreValues) {
if (!(check_pSignalSemaphoreValues)) {
fprintf(stderr,
"fatal: forUnmarshaling->pSignalSemaphoreValues inconsistent between guest and "
"host\n");
}
vkStream->read((uint64_t*)forUnmarshaling->pSignalSemaphoreValues,
forUnmarshaling->signalSemaphoreValueCount * sizeof(const uint64_t));
}
}
void marshal_VkSemaphoreWaitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreWaitInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSemaphoreWaitFlags*)&forMarshaling->flags, sizeof(VkSemaphoreWaitFlags));
vkStream->write((uint32_t*)&forMarshaling->semaphoreCount, sizeof(uint32_t));
if (forMarshaling->semaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->semaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pSemaphores, cgen_var_0, forMarshaling->semaphoreCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->semaphoreCount * 8);
}
vkStream->write((const uint64_t*)forMarshaling->pValues,
forMarshaling->semaphoreCount * sizeof(const uint64_t));
}
void unmarshal_VkSemaphoreWaitInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSemaphoreWaitInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSemaphoreWaitFlags*)&forUnmarshaling->flags, sizeof(VkSemaphoreWaitFlags));
vkStream->read((uint32_t*)&forUnmarshaling->semaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->semaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->semaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->semaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_0, (VkSemaphore*)forUnmarshaling->pSemaphores,
forUnmarshaling->semaphoreCount);
}
vkStream->read((uint64_t*)forUnmarshaling->pValues,
forUnmarshaling->semaphoreCount * sizeof(const uint64_t));
}
void marshal_VkSemaphoreSignalInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreSignalInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint64_t*)&forMarshaling->value, sizeof(uint64_t));
}
void unmarshal_VkSemaphoreSignalInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSemaphoreSignalInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_0, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
vkStream->read((uint64_t*)&forUnmarshaling->value, sizeof(uint64_t));
}
void marshal_VkPhysicalDeviceBufferDeviceAddressFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceBufferDeviceAddressFeatures* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddress, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddressCaptureReplay, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->bufferDeviceAddressMultiDevice, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceBufferDeviceAddressFeatures(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceBufferDeviceAddressFeatures* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddress, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddressCaptureReplay, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->bufferDeviceAddressMultiDevice, sizeof(VkBool32));
}
void marshal_VkBufferDeviceAddressInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferDeviceAddressInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->buffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkBufferDeviceAddressInfo(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferDeviceAddressInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->buffer, 1);
}
void marshal_VkBufferOpaqueCaptureAddressCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBufferOpaqueCaptureAddressCreateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint64_t*)&forMarshaling->opaqueCaptureAddress, sizeof(uint64_t));
}
void unmarshal_VkBufferOpaqueCaptureAddressCreateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBufferOpaqueCaptureAddressCreateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint64_t*)&forUnmarshaling->opaqueCaptureAddress, sizeof(uint64_t));
}
void marshal_VkMemoryOpaqueCaptureAddressAllocateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryOpaqueCaptureAddressAllocateInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint64_t*)&forMarshaling->opaqueCaptureAddress, sizeof(uint64_t));
}
void unmarshal_VkMemoryOpaqueCaptureAddressAllocateInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryOpaqueCaptureAddressAllocateInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint64_t*)&forUnmarshaling->opaqueCaptureAddress, sizeof(uint64_t));
}
void marshal_VkDeviceMemoryOpaqueCaptureAddressInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceMemoryOpaqueCaptureAddressInfo* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkDeviceMemoryOpaqueCaptureAddressInfo(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceMemoryOpaqueCaptureAddressInfo* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
}
#endif
#ifdef VK_KHR_surface
void marshal_VkSurfaceCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSurfaceCapabilitiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxImageCount, sizeof(uint32_t));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->currentExtent));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->minImageExtent));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->maxImageExtent));
vkStream->write((uint32_t*)&forMarshaling->maxImageArrayLayers, sizeof(uint32_t));
vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms,
sizeof(VkSurfaceTransformFlagsKHR));
vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->currentTransform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->write((VkCompositeAlphaFlagsKHR*)&forMarshaling->supportedCompositeAlpha,
sizeof(VkCompositeAlphaFlagsKHR));
vkStream->write((VkImageUsageFlags*)&forMarshaling->supportedUsageFlags,
sizeof(VkImageUsageFlags));
}
void unmarshal_VkSurfaceCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSurfaceCapabilitiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageCount, sizeof(uint32_t));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->currentExtent));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->minImageExtent));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->maxImageExtent));
vkStream->read((uint32_t*)&forUnmarshaling->maxImageArrayLayers, sizeof(uint32_t));
vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms,
sizeof(VkSurfaceTransformFlagsKHR));
vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->currentTransform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->read((VkCompositeAlphaFlagsKHR*)&forUnmarshaling->supportedCompositeAlpha,
sizeof(VkCompositeAlphaFlagsKHR));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->supportedUsageFlags,
sizeof(VkImageUsageFlags));
}
void marshal_VkSurfaceFormatKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSurfaceFormatKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
vkStream->write((VkColorSpaceKHR*)&forMarshaling->colorSpace, sizeof(VkColorSpaceKHR));
}
void unmarshal_VkSurfaceFormatKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSurfaceFormatKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->colorSpace, sizeof(VkColorSpaceKHR));
}
#endif
#ifdef VK_KHR_swapchain
void marshal_VkSwapchainCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSwapchainCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkSwapchainCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkSwapchainCreateFlagsKHR));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->minImageCount, sizeof(uint32_t));
vkStream->write((VkFormat*)&forMarshaling->imageFormat, sizeof(VkFormat));
vkStream->write((VkColorSpaceKHR*)&forMarshaling->imageColorSpace, sizeof(VkColorSpaceKHR));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->imageExtent));
vkStream->write((uint32_t*)&forMarshaling->imageArrayLayers, sizeof(uint32_t));
vkStream->write((VkImageUsageFlags*)&forMarshaling->imageUsage, sizeof(VkImageUsageFlags));
vkStream->write((VkSharingMode*)&forMarshaling->imageSharingMode, sizeof(VkSharingMode));
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndexCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pQueueFamilyIndices;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pQueueFamilyIndices) {
vkStream->write((const uint32_t*)forMarshaling->pQueueFamilyIndices,
forMarshaling->queueFamilyIndexCount * sizeof(const uint32_t));
}
vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->preTransform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->write((VkCompositeAlphaFlagBitsKHR*)&forMarshaling->compositeAlpha,
sizeof(VkCompositeAlphaFlagBitsKHR));
vkStream->write((VkPresentModeKHR*)&forMarshaling->presentMode, sizeof(VkPresentModeKHR));
vkStream->write((VkBool32*)&forMarshaling->clipped, sizeof(VkBool32));
uint64_t cgen_var_2;
vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->oldSwapchain,
&cgen_var_2, 1);
vkStream->write((uint64_t*)&cgen_var_2, 1 * 8);
}
void unmarshal_VkSwapchainCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSwapchainCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkSwapchainCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkSwapchainCreateFlagsKHR));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(
&cgen_var_0, (VkSurfaceKHR*)&forUnmarshaling->surface, 1);
vkStream->read((uint32_t*)&forUnmarshaling->minImageCount, sizeof(uint32_t));
vkStream->read((VkFormat*)&forUnmarshaling->imageFormat, sizeof(VkFormat));
vkStream->read((VkColorSpaceKHR*)&forUnmarshaling->imageColorSpace, sizeof(VkColorSpaceKHR));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->imageExtent));
vkStream->read((uint32_t*)&forUnmarshaling->imageArrayLayers, sizeof(uint32_t));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->imageUsage, sizeof(VkImageUsageFlags));
vkStream->read((VkSharingMode*)&forUnmarshaling->imageSharingMode, 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((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->preTransform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->read((VkCompositeAlphaFlagBitsKHR*)&forUnmarshaling->compositeAlpha,
sizeof(VkCompositeAlphaFlagBitsKHR));
vkStream->read((VkPresentModeKHR*)&forUnmarshaling->presentMode, sizeof(VkPresentModeKHR));
vkStream->read((VkBool32*)&forUnmarshaling->clipped, sizeof(VkBool32));
uint64_t cgen_var_2;
vkStream->read((uint64_t*)&cgen_var_2, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(
&cgen_var_2, (VkSwapchainKHR*)&forUnmarshaling->oldSwapchain, 1);
}
void marshal_VkPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPresentInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forMarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(
forMarshaling->pWaitSemaphores, cgen_var_0, forMarshaling->waitSemaphoreCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->waitSemaphoreCount * 8);
}
vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
if (forMarshaling->swapchainCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forMarshaling->swapchainCount * 8);
vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(
forMarshaling->pSwapchains, cgen_var_1, forMarshaling->swapchainCount);
vkStream->write((uint64_t*)cgen_var_1, forMarshaling->swapchainCount * 8);
}
vkStream->write((const uint32_t*)forMarshaling->pImageIndices,
forMarshaling->swapchainCount * sizeof(const uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_2 = (uint64_t)(uintptr_t)forMarshaling->pResults;
vkStream->putBe64(cgen_var_2);
if (forMarshaling->pResults) {
vkStream->write((VkResult*)forMarshaling->pResults,
forMarshaling->swapchainCount * sizeof(VkResult));
}
}
void unmarshal_VkPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPresentInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreCount, sizeof(uint32_t));
if (forUnmarshaling->waitSemaphoreCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->waitSemaphoreCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
cgen_var_0, (VkSemaphore*)forUnmarshaling->pWaitSemaphores,
forUnmarshaling->waitSemaphoreCount);
}
vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
if (forUnmarshaling->swapchainCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forUnmarshaling->swapchainCount * 8);
vkStream->read((uint64_t*)cgen_var_1, forUnmarshaling->swapchainCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(
cgen_var_1, (VkSwapchainKHR*)forUnmarshaling->pSwapchains,
forUnmarshaling->swapchainCount);
}
vkStream->read((uint32_t*)forUnmarshaling->pImageIndices,
forUnmarshaling->swapchainCount * sizeof(const uint32_t));
// WARNING PTR CHECK
VkResult* check_pResults;
check_pResults = (VkResult*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pResults) {
if (!(check_pResults)) {
fprintf(stderr,
"fatal: forUnmarshaling->pResults inconsistent between guest and host\n");
}
vkStream->read((VkResult*)forUnmarshaling->pResults,
forUnmarshaling->swapchainCount * sizeof(VkResult));
}
}
void marshal_VkImageSwapchainCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImageSwapchainCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkImageSwapchainCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImageSwapchainCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(
&cgen_var_0, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
}
void marshal_VkBindImageMemorySwapchainInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkBindImageMemorySwapchainInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->imageIndex, sizeof(uint32_t));
}
void unmarshal_VkBindImageMemorySwapchainInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkBindImageMemorySwapchainInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(
&cgen_var_0, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
vkStream->read((uint32_t*)&forUnmarshaling->imageIndex, sizeof(uint32_t));
}
void marshal_VkAcquireNextImageInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAcquireNextImageInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&forMarshaling->swapchain, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint64_t*)&forMarshaling->timeout, sizeof(uint64_t));
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_1,
1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
uint64_t cgen_var_2;
vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_2, 1);
vkStream->write((uint64_t*)&cgen_var_2, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->deviceMask, sizeof(uint32_t));
}
void unmarshal_VkAcquireNextImageInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAcquireNextImageInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSwapchainKHR(
&cgen_var_0, (VkSwapchainKHR*)&forUnmarshaling->swapchain, 1);
vkStream->read((uint64_t*)&forUnmarshaling->timeout, sizeof(uint64_t));
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_1, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
uint64_t cgen_var_2;
vkStream->read((uint64_t*)&cgen_var_2, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_2,
(VkFence*)&forUnmarshaling->fence, 1);
vkStream->read((uint32_t*)&forUnmarshaling->deviceMask, sizeof(uint32_t));
}
void marshal_VkDeviceGroupPresentCapabilitiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupPresentCapabilitiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)forMarshaling->presentMask,
VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes,
sizeof(VkDeviceGroupPresentModeFlagsKHR));
}
void unmarshal_VkDeviceGroupPresentCapabilitiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupPresentCapabilitiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)forUnmarshaling->presentMask,
VK_MAX_DEVICE_GROUP_SIZE * sizeof(uint32_t));
vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes,
sizeof(VkDeviceGroupPresentModeFlagsKHR));
}
void marshal_VkDeviceGroupPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupPresentInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pDeviceMasks,
forMarshaling->swapchainCount * sizeof(const uint32_t));
vkStream->write((VkDeviceGroupPresentModeFlagBitsKHR*)&forMarshaling->mode,
sizeof(VkDeviceGroupPresentModeFlagBitsKHR));
}
void unmarshal_VkDeviceGroupPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupPresentInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pDeviceMasks,
forUnmarshaling->swapchainCount * sizeof(const uint32_t));
vkStream->read((VkDeviceGroupPresentModeFlagBitsKHR*)&forUnmarshaling->mode,
sizeof(VkDeviceGroupPresentModeFlagBitsKHR));
}
void marshal_VkDeviceGroupSwapchainCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDeviceGroupSwapchainCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDeviceGroupPresentModeFlagsKHR*)&forMarshaling->modes,
sizeof(VkDeviceGroupPresentModeFlagsKHR));
}
void unmarshal_VkDeviceGroupSwapchainCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDeviceGroupSwapchainCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDeviceGroupPresentModeFlagsKHR*)&forUnmarshaling->modes,
sizeof(VkDeviceGroupPresentModeFlagsKHR));
}
#endif
#ifdef VK_KHR_display
void marshal_VkDisplayModeParametersKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayModeParametersKHR* forMarshaling) {
(void)rootType;
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->visibleRegion));
vkStream->write((uint32_t*)&forMarshaling->refreshRate, sizeof(uint32_t));
}
void unmarshal_VkDisplayModeParametersKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayModeParametersKHR* forUnmarshaling) {
(void)rootType;
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->visibleRegion));
vkStream->read((uint32_t*)&forUnmarshaling->refreshRate, sizeof(uint32_t));
}
void marshal_VkDisplayModeCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayModeCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDisplayModeCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkDisplayModeCreateFlagsKHR));
marshal_VkDisplayModeParametersKHR(vkStream, rootType,
(VkDisplayModeParametersKHR*)(&forMarshaling->parameters));
}
void unmarshal_VkDisplayModeCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayModeCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDisplayModeCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkDisplayModeCreateFlagsKHR));
unmarshal_VkDisplayModeParametersKHR(
vkStream, rootType, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters));
}
void marshal_VkDisplayModePropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayModePropertiesKHR* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
marshal_VkDisplayModeParametersKHR(vkStream, rootType,
(VkDisplayModeParametersKHR*)(&forMarshaling->parameters));
}
void unmarshal_VkDisplayModePropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayModePropertiesKHR* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(
&cgen_var_0, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1);
unmarshal_VkDisplayModeParametersKHR(
vkStream, rootType, (VkDisplayModeParametersKHR*)(&forUnmarshaling->parameters));
}
void marshal_VkDisplayPlaneCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPlaneCapabilitiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkDisplayPlaneAlphaFlagsKHR*)&forMarshaling->supportedAlpha,
sizeof(VkDisplayPlaneAlphaFlagsKHR));
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->minSrcPosition));
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->maxSrcPosition));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->minSrcExtent));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->maxSrcExtent));
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->minDstPosition));
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->maxDstPosition));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->minDstExtent));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->maxDstExtent));
}
void unmarshal_VkDisplayPlaneCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPlaneCapabilitiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkDisplayPlaneAlphaFlagsKHR*)&forUnmarshaling->supportedAlpha,
sizeof(VkDisplayPlaneAlphaFlagsKHR));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->minSrcPosition));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->maxSrcPosition));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->minSrcExtent));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->maxSrcExtent));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->minDstPosition));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->maxDstPosition));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->minDstExtent));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->maxDstExtent));
}
void marshal_VkDisplayPlanePropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPlanePropertiesKHR* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->currentDisplay,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->currentStackIndex, sizeof(uint32_t));
}
void unmarshal_VkDisplayPlanePropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPlanePropertiesKHR* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(
&cgen_var_0, (VkDisplayKHR*)&forUnmarshaling->currentDisplay, 1);
vkStream->read((uint32_t*)&forUnmarshaling->currentStackIndex, sizeof(uint32_t));
}
void marshal_VkDisplayPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPropertiesKHR* forMarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDisplayKHR_u64(&forMarshaling->display, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->putString(forMarshaling->displayName);
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->physicalDimensions));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->physicalResolution));
vkStream->write((VkSurfaceTransformFlagsKHR*)&forMarshaling->supportedTransforms,
sizeof(VkSurfaceTransformFlagsKHR));
vkStream->write((VkBool32*)&forMarshaling->planeReorderPossible, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->persistentContent, sizeof(VkBool32));
}
void unmarshal_VkDisplayPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPropertiesKHR* forUnmarshaling) {
(void)rootType;
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDisplayKHR(
&cgen_var_0, (VkDisplayKHR*)&forUnmarshaling->display, 1);
vkStream->loadStringInPlace((char**)&forUnmarshaling->displayName);
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->physicalDimensions));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->physicalResolution));
vkStream->read((VkSurfaceTransformFlagsKHR*)&forUnmarshaling->supportedTransforms,
sizeof(VkSurfaceTransformFlagsKHR));
vkStream->read((VkBool32*)&forUnmarshaling->planeReorderPossible, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->persistentContent, sizeof(VkBool32));
}
void marshal_VkDisplaySurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplaySurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkDisplaySurfaceCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkDisplaySurfaceCreateFlagsKHR));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->displayMode,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->planeStackIndex, sizeof(uint32_t));
vkStream->write((VkSurfaceTransformFlagBitsKHR*)&forMarshaling->transform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->write((float*)&forMarshaling->globalAlpha, sizeof(float));
vkStream->write((VkDisplayPlaneAlphaFlagBitsKHR*)&forMarshaling->alphaMode,
sizeof(VkDisplayPlaneAlphaFlagBitsKHR));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->imageExtent));
}
void unmarshal_VkDisplaySurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplaySurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkDisplaySurfaceCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkDisplaySurfaceCreateFlagsKHR));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(
&cgen_var_0, (VkDisplayModeKHR*)&forUnmarshaling->displayMode, 1);
vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->planeStackIndex, sizeof(uint32_t));
vkStream->read((VkSurfaceTransformFlagBitsKHR*)&forUnmarshaling->transform,
sizeof(VkSurfaceTransformFlagBitsKHR));
vkStream->read((float*)&forUnmarshaling->globalAlpha, sizeof(float));
vkStream->read((VkDisplayPlaneAlphaFlagBitsKHR*)&forUnmarshaling->alphaMode,
sizeof(VkDisplayPlaneAlphaFlagBitsKHR));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->imageExtent));
}
#endif
#ifdef VK_KHR_display_swapchain
void marshal_VkDisplayPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPresentInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forMarshaling->srcRect));
marshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forMarshaling->dstRect));
vkStream->write((VkBool32*)&forMarshaling->persistent, sizeof(VkBool32));
}
void unmarshal_VkDisplayPresentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPresentInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forUnmarshaling->srcRect));
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forUnmarshaling->dstRect));
vkStream->read((VkBool32*)&forUnmarshaling->persistent, sizeof(VkBool32));
}
#endif
#ifdef VK_KHR_xlib_surface
void marshal_VkXlibSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkXlibSurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkXlibSurfaceCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkXlibSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->dpy;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->dpy) {
vkStream->write((Display*)forMarshaling->dpy, sizeof(Display));
}
vkStream->write((Window*)&forMarshaling->window, sizeof(Window));
}
void unmarshal_VkXlibSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkXlibSurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkXlibSurfaceCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkXlibSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
Display* check_dpy;
check_dpy = (Display*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->dpy) {
if (!(check_dpy)) {
fprintf(stderr, "fatal: forUnmarshaling->dpy inconsistent between guest and host\n");
}
vkStream->read((Display*)forUnmarshaling->dpy, sizeof(Display));
}
vkStream->read((Window*)&forUnmarshaling->window, sizeof(Window));
}
#endif
#ifdef VK_KHR_xcb_surface
void marshal_VkXcbSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkXcbSurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
// This struct should never be marshaled / unmarshaled.
__builtin_trap();
}
void unmarshal_VkXcbSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkXcbSurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
// This struct should never be marshaled / unmarshaled.
__builtin_trap();
}
#endif
#ifdef VK_KHR_wayland_surface
void marshal_VkWaylandSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkWaylandSurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkWaylandSurfaceCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkWaylandSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->display;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->display) {
vkStream->write((wl_display*)forMarshaling->display, sizeof(wl_display));
}
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->surface;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->surface) {
vkStream->write((wl_surface*)forMarshaling->surface, sizeof(wl_surface));
}
}
void unmarshal_VkWaylandSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkWaylandSurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkWaylandSurfaceCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkWaylandSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
wl_display* check_display;
check_display = (wl_display*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->display) {
if (!(check_display)) {
fprintf(stderr,
"fatal: forUnmarshaling->display inconsistent between guest and host\n");
}
vkStream->read((wl_display*)forUnmarshaling->display, sizeof(wl_display));
}
// WARNING PTR CHECK
wl_surface* check_surface;
check_surface = (wl_surface*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->surface) {
if (!(check_surface)) {
fprintf(stderr,
"fatal: forUnmarshaling->surface inconsistent between guest and host\n");
}
vkStream->read((wl_surface*)forUnmarshaling->surface, sizeof(wl_surface));
}
}
#endif
#ifdef VK_KHR_android_surface
void marshal_VkAndroidSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAndroidSurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAndroidSurfaceCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkAndroidSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->window;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->window) {
vkStream->write((ANativeWindow*)forMarshaling->window, sizeof(ANativeWindow));
}
}
void unmarshal_VkAndroidSurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAndroidSurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAndroidSurfaceCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkAndroidSurfaceCreateFlagsKHR));
// WARNING PTR CHECK
ANativeWindow* check_window;
check_window = (ANativeWindow*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->window) {
if (!(check_window)) {
fprintf(stderr, "fatal: forUnmarshaling->window inconsistent between guest and host\n");
}
vkStream->read((ANativeWindow*)forUnmarshaling->window, sizeof(ANativeWindow));
}
}
#endif
#ifdef VK_KHR_win32_surface
void marshal_VkWin32SurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkWin32SurfaceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkWin32SurfaceCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkWin32SurfaceCreateFlagsKHR));
vkStream->write((HINSTANCE*)&forMarshaling->hinstance, sizeof(HINSTANCE));
vkStream->write((HWND*)&forMarshaling->hwnd, sizeof(HWND));
}
void unmarshal_VkWin32SurfaceCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkWin32SurfaceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkWin32SurfaceCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkWin32SurfaceCreateFlagsKHR));
vkStream->read((HINSTANCE*)&forUnmarshaling->hinstance, sizeof(HINSTANCE));
vkStream->read((HWND*)&forUnmarshaling->hwnd, sizeof(HWND));
}
#endif
#ifdef VK_KHR_sampler_mirror_clamp_to_edge
#endif
#ifdef VK_KHR_video_queue
void marshal_VkVideoQueueFamilyProperties2KHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoQueueFamilyProperties2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoCodecOperationFlagsKHR*)&forMarshaling->videoCodecOperations,
sizeof(VkVideoCodecOperationFlagsKHR));
}
void unmarshal_VkVideoQueueFamilyProperties2KHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkVideoQueueFamilyProperties2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoCodecOperationFlagsKHR*)&forUnmarshaling->videoCodecOperations,
sizeof(VkVideoCodecOperationFlagsKHR));
}
void marshal_VkVideoProfileKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoProfileKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoCodecOperationFlagBitsKHR*)&forMarshaling->videoCodecOperation,
sizeof(VkVideoCodecOperationFlagBitsKHR));
vkStream->write((VkVideoChromaSubsamplingFlagsKHR*)&forMarshaling->chromaSubsampling,
sizeof(VkVideoChromaSubsamplingFlagsKHR));
vkStream->write((VkVideoComponentBitDepthFlagsKHR*)&forMarshaling->lumaBitDepth,
sizeof(VkVideoComponentBitDepthFlagsKHR));
vkStream->write((VkVideoComponentBitDepthFlagsKHR*)&forMarshaling->chromaBitDepth,
sizeof(VkVideoComponentBitDepthFlagsKHR));
}
void unmarshal_VkVideoProfileKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoProfileKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoCodecOperationFlagBitsKHR*)&forUnmarshaling->videoCodecOperation,
sizeof(VkVideoCodecOperationFlagBitsKHR));
vkStream->read((VkVideoChromaSubsamplingFlagsKHR*)&forUnmarshaling->chromaSubsampling,
sizeof(VkVideoChromaSubsamplingFlagsKHR));
vkStream->read((VkVideoComponentBitDepthFlagsKHR*)&forUnmarshaling->lumaBitDepth,
sizeof(VkVideoComponentBitDepthFlagsKHR));
vkStream->read((VkVideoComponentBitDepthFlagsKHR*)&forUnmarshaling->chromaBitDepth,
sizeof(VkVideoComponentBitDepthFlagsKHR));
}
void marshal_VkVideoProfilesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoProfilesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->profileCount, sizeof(uint32_t));
marshal_VkVideoProfileKHR(vkStream, rootType,
(const VkVideoProfileKHR*)(forMarshaling->pProfiles));
}
void unmarshal_VkVideoProfilesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoProfilesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->profileCount, sizeof(uint32_t));
unmarshal_VkVideoProfileKHR(vkStream, rootType,
(VkVideoProfileKHR*)(forUnmarshaling->pProfiles));
}
void marshal_VkVideoCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoCapabilitiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoCapabilityFlagsKHR*)&forMarshaling->capabilityFlags,
sizeof(VkVideoCapabilityFlagsKHR));
vkStream->write((VkDeviceSize*)&forMarshaling->minBitstreamBufferOffsetAlignment,
sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->minBitstreamBufferSizeAlignment,
sizeof(VkDeviceSize));
marshal_VkExtent2D(vkStream, rootType,
(VkExtent2D*)(&forMarshaling->videoPictureExtentGranularity));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->minExtent));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->maxExtent));
vkStream->write((uint32_t*)&forMarshaling->maxReferencePicturesSlotsCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxReferencePicturesActiveCount, sizeof(uint32_t));
}
void unmarshal_VkVideoCapabilitiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoCapabilitiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoCapabilityFlagsKHR*)&forUnmarshaling->capabilityFlags,
sizeof(VkVideoCapabilityFlagsKHR));
vkStream->read((VkDeviceSize*)&forUnmarshaling->minBitstreamBufferOffsetAlignment,
sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->minBitstreamBufferSizeAlignment,
sizeof(VkDeviceSize));
unmarshal_VkExtent2D(vkStream, rootType,
(VkExtent2D*)(&forUnmarshaling->videoPictureExtentGranularity));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->minExtent));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->maxExtent));
vkStream->read((uint32_t*)&forUnmarshaling->maxReferencePicturesSlotsCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxReferencePicturesActiveCount, sizeof(uint32_t));
}
void marshal_VkPhysicalDeviceVideoFormatInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceVideoFormatInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageUsageFlags*)&forMarshaling->imageUsage, sizeof(VkImageUsageFlags));
marshal_VkVideoProfilesKHR(vkStream, rootType,
(const VkVideoProfilesKHR*)(forMarshaling->pVideoProfiles));
}
void unmarshal_VkPhysicalDeviceVideoFormatInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceVideoFormatInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->imageUsage, sizeof(VkImageUsageFlags));
unmarshal_VkVideoProfilesKHR(vkStream, rootType,
(VkVideoProfilesKHR*)(forUnmarshaling->pVideoProfiles));
}
void marshal_VkVideoFormatPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoFormatPropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkFormat*)&forMarshaling->format, sizeof(VkFormat));
}
void unmarshal_VkVideoFormatPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoFormatPropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkFormat*)&forUnmarshaling->format, sizeof(VkFormat));
}
void marshal_VkVideoPictureResourceKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoPictureResourceKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->codedOffset));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->codedExtent));
vkStream->write((uint32_t*)&forMarshaling->baseArrayLayer, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageViewBinding,
&cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkVideoPictureResourceKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoPictureResourceKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->codedOffset));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->codedExtent));
vkStream->read((uint32_t*)&forUnmarshaling->baseArrayLayer, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_0, (VkImageView*)&forUnmarshaling->imageViewBinding, 1);
}
void marshal_VkVideoReferenceSlotKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoReferenceSlotKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((int8_t*)&forMarshaling->slotIndex, sizeof(int8_t));
marshal_VkVideoPictureResourceKHR(
vkStream, rootType, (const VkVideoPictureResourceKHR*)(forMarshaling->pPictureResource));
}
void unmarshal_VkVideoReferenceSlotKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoReferenceSlotKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((int8_t*)&forUnmarshaling->slotIndex, sizeof(int8_t));
unmarshal_VkVideoPictureResourceKHR(
vkStream, rootType, (VkVideoPictureResourceKHR*)(forUnmarshaling->pPictureResource));
}
void marshal_VkVideoGetMemoryPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoGetMemoryPropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->memoryBindIndex, sizeof(uint32_t));
marshal_VkMemoryRequirements2(vkStream, rootType,
(VkMemoryRequirements2*)(forMarshaling->pMemoryRequirements));
}
void unmarshal_VkVideoGetMemoryPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoGetMemoryPropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->memoryBindIndex, sizeof(uint32_t));
unmarshal_VkMemoryRequirements2(vkStream, rootType,
(VkMemoryRequirements2*)(forUnmarshaling->pMemoryRequirements));
}
void marshal_VkVideoBindMemoryKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoBindMemoryKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->memoryBindIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->memorySize, sizeof(VkDeviceSize));
}
void unmarshal_VkVideoBindMemoryKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoBindMemoryKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->memoryBindIndex, sizeof(uint32_t));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->memoryOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->memorySize, sizeof(VkDeviceSize));
}
void marshal_VkVideoSessionCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoSessionCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->write((VkVideoSessionCreateFlagsKHR*)&forMarshaling->flags,
sizeof(VkVideoSessionCreateFlagsKHR));
marshal_VkVideoProfileKHR(vkStream, rootType,
(const VkVideoProfileKHR*)(forMarshaling->pVideoProfile));
vkStream->write((VkFormat*)&forMarshaling->pictureFormat, sizeof(VkFormat));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->maxCodedExtent));
vkStream->write((VkFormat*)&forMarshaling->referencePicturesFormat, sizeof(VkFormat));
vkStream->write((uint32_t*)&forMarshaling->maxReferencePicturesSlotsCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->maxReferencePicturesActiveCount, sizeof(uint32_t));
}
void unmarshal_VkVideoSessionCreateInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoSessionCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->read((VkVideoSessionCreateFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkVideoSessionCreateFlagsKHR));
unmarshal_VkVideoProfileKHR(vkStream, rootType,
(VkVideoProfileKHR*)(forUnmarshaling->pVideoProfile));
vkStream->read((VkFormat*)&forUnmarshaling->pictureFormat, sizeof(VkFormat));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->maxCodedExtent));
vkStream->read((VkFormat*)&forUnmarshaling->referencePicturesFormat, sizeof(VkFormat));
vkStream->read((uint32_t*)&forUnmarshaling->maxReferencePicturesSlotsCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->maxReferencePicturesActiveCount, sizeof(uint32_t));
}
void marshal_VkVideoSessionParametersCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoSessionParametersCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0 = (uint64_t)forMarshaling->videoSessionParametersTemplate;
vkStream->putBe64(cgen_var_0);
uint64_t cgen_var_1 = (uint64_t)forMarshaling->videoSession;
vkStream->putBe64(cgen_var_1);
}
void unmarshal_VkVideoSessionParametersCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoSessionParametersCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
forUnmarshaling->videoSessionParametersTemplate =
(VkVideoSessionParametersKHR)vkStream->getBe64();
forUnmarshaling->videoSession = (VkVideoSessionKHR)vkStream->getBe64();
}
void marshal_VkVideoSessionParametersUpdateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoSessionParametersUpdateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->updateSequenceCount, sizeof(uint32_t));
}
void unmarshal_VkVideoSessionParametersUpdateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoSessionParametersUpdateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->updateSequenceCount, sizeof(uint32_t));
}
void marshal_VkVideoBeginCodingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoBeginCodingInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoBeginCodingFlagsKHR*)&forMarshaling->flags,
sizeof(VkVideoBeginCodingFlagsKHR));
vkStream->write((VkVideoCodingQualityPresetFlagsKHR*)&forMarshaling->codecQualityPreset,
sizeof(VkVideoCodingQualityPresetFlagsKHR));
uint64_t cgen_var_0 = (uint64_t)forMarshaling->videoSession;
vkStream->putBe64(cgen_var_0);
uint64_t cgen_var_1 = (uint64_t)forMarshaling->videoSessionParameters;
vkStream->putBe64(cgen_var_1);
vkStream->write((uint32_t*)&forMarshaling->referenceSlotCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->referenceSlotCount; ++i) {
marshal_VkVideoReferenceSlotKHR(
vkStream, rootType,
(const VkVideoReferenceSlotKHR*)(forMarshaling->pReferenceSlots + i));
}
}
}
void unmarshal_VkVideoBeginCodingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoBeginCodingInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoBeginCodingFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkVideoBeginCodingFlagsKHR));
vkStream->read((VkVideoCodingQualityPresetFlagsKHR*)&forUnmarshaling->codecQualityPreset,
sizeof(VkVideoCodingQualityPresetFlagsKHR));
forUnmarshaling->videoSession = (VkVideoSessionKHR)vkStream->getBe64();
forUnmarshaling->videoSessionParameters = (VkVideoSessionParametersKHR)vkStream->getBe64();
vkStream->read((uint32_t*)&forUnmarshaling->referenceSlotCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->referenceSlotCount; ++i) {
unmarshal_VkVideoReferenceSlotKHR(
vkStream, rootType,
(VkVideoReferenceSlotKHR*)(forUnmarshaling->pReferenceSlots + i));
}
}
}
void marshal_VkVideoEndCodingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoEndCodingInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoEndCodingFlagsKHR*)&forMarshaling->flags,
sizeof(VkVideoEndCodingFlagsKHR));
}
void unmarshal_VkVideoEndCodingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoEndCodingInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoEndCodingFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkVideoEndCodingFlagsKHR));
}
void marshal_VkVideoCodingControlInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoCodingControlInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoCodingControlFlagsKHR*)&forMarshaling->flags,
sizeof(VkVideoCodingControlFlagsKHR));
}
void unmarshal_VkVideoCodingControlInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoCodingControlInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoCodingControlFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkVideoCodingControlFlagsKHR));
}
#endif
#ifdef VK_KHR_video_decode_queue
void marshal_VkVideoDecodeInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkVideoDecodeInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkVideoDecodeFlagsKHR*)&forMarshaling->flags, sizeof(VkVideoDecodeFlagsKHR));
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->codedOffset));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->codedExtent));
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkBuffer_u64(&forMarshaling->srcBuffer, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkDeviceSize*)&forMarshaling->srcBufferOffset, sizeof(VkDeviceSize));
vkStream->write((VkDeviceSize*)&forMarshaling->srcBufferRange, sizeof(VkDeviceSize));
marshal_VkVideoPictureResourceKHR(
vkStream, rootType, (VkVideoPictureResourceKHR*)(&forMarshaling->dstPictureResource));
marshal_VkVideoReferenceSlotKHR(
vkStream, rootType, (const VkVideoReferenceSlotKHR*)(forMarshaling->pSetupReferenceSlot));
vkStream->write((uint32_t*)&forMarshaling->referenceSlotCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->referenceSlotCount; ++i) {
marshal_VkVideoReferenceSlotKHR(
vkStream, rootType,
(const VkVideoReferenceSlotKHR*)(forMarshaling->pReferenceSlots + i));
}
}
}
void unmarshal_VkVideoDecodeInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkVideoDecodeInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkVideoDecodeFlagsKHR*)&forUnmarshaling->flags, sizeof(VkVideoDecodeFlagsKHR));
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->codedOffset));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->codedExtent));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_0,
(VkBuffer*)&forUnmarshaling->srcBuffer, 1);
vkStream->read((VkDeviceSize*)&forUnmarshaling->srcBufferOffset, sizeof(VkDeviceSize));
vkStream->read((VkDeviceSize*)&forUnmarshaling->srcBufferRange, sizeof(VkDeviceSize));
unmarshal_VkVideoPictureResourceKHR(
vkStream, rootType, (VkVideoPictureResourceKHR*)(&forUnmarshaling->dstPictureResource));
unmarshal_VkVideoReferenceSlotKHR(
vkStream, rootType, (VkVideoReferenceSlotKHR*)(forUnmarshaling->pSetupReferenceSlot));
vkStream->read((uint32_t*)&forUnmarshaling->referenceSlotCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->referenceSlotCount; ++i) {
unmarshal_VkVideoReferenceSlotKHR(
vkStream, rootType,
(VkVideoReferenceSlotKHR*)(forUnmarshaling->pReferenceSlots + i));
}
}
}
#endif
#ifdef VK_KHR_dynamic_rendering
void marshal_VkRenderingAttachmentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderingAttachmentInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout));
vkStream->write((VkResolveModeFlagBits*)&forMarshaling->resolveMode,
sizeof(VkResolveModeFlagBits));
uint64_t cgen_var_1;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->resolveImageView,
&cgen_var_1, 1);
vkStream->write((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->write((VkImageLayout*)&forMarshaling->resolveImageLayout, sizeof(VkImageLayout));
vkStream->write((VkAttachmentLoadOp*)&forMarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->write((VkAttachmentStoreOp*)&forMarshaling->storeOp, sizeof(VkAttachmentStoreOp));
marshal_VkClearValue(vkStream, rootType, (VkClearValue*)(&forMarshaling->clearValue));
}
void unmarshal_VkRenderingAttachmentInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderingAttachmentInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_0, (VkImageView*)&forUnmarshaling->imageView, 1);
vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout));
vkStream->read((VkResolveModeFlagBits*)&forUnmarshaling->resolveMode,
sizeof(VkResolveModeFlagBits));
uint64_t cgen_var_1;
vkStream->read((uint64_t*)&cgen_var_1, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_1, (VkImageView*)&forUnmarshaling->resolveImageView, 1);
vkStream->read((VkImageLayout*)&forUnmarshaling->resolveImageLayout, sizeof(VkImageLayout));
vkStream->read((VkAttachmentLoadOp*)&forUnmarshaling->loadOp, sizeof(VkAttachmentLoadOp));
vkStream->read((VkAttachmentStoreOp*)&forUnmarshaling->storeOp, sizeof(VkAttachmentStoreOp));
unmarshal_VkClearValue(vkStream, rootType, (VkClearValue*)(&forUnmarshaling->clearValue));
}
void marshal_VkRenderingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderingInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkRenderingFlagsKHR*)&forMarshaling->flags, sizeof(VkRenderingFlagsKHR));
marshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forMarshaling->renderArea));
vkStream->write((uint32_t*)&forMarshaling->layerCount, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->colorAttachmentCount; ++i) {
marshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType,
(const VkRenderingAttachmentInfoKHR*)(forMarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pDepthAttachment;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pDepthAttachment) {
marshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType,
(const VkRenderingAttachmentInfoKHR*)(forMarshaling->pDepthAttachment));
}
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pStencilAttachment;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pStencilAttachment) {
marshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType,
(const VkRenderingAttachmentInfoKHR*)(forMarshaling->pStencilAttachment));
}
}
void unmarshal_VkRenderingInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderingInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkRenderingFlagsKHR*)&forUnmarshaling->flags, sizeof(VkRenderingFlagsKHR));
unmarshal_VkRect2D(vkStream, rootType, (VkRect2D*)(&forUnmarshaling->renderArea));
vkStream->read((uint32_t*)&forUnmarshaling->layerCount, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->colorAttachmentCount; ++i) {
unmarshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType,
(VkRenderingAttachmentInfoKHR*)(forUnmarshaling->pColorAttachments + i));
}
}
// WARNING PTR CHECK
const VkRenderingAttachmentInfoKHR* check_pDepthAttachment;
check_pDepthAttachment = (const VkRenderingAttachmentInfoKHR*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pDepthAttachment) {
if (!(check_pDepthAttachment)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pDepthAttachment inconsistent between guest and host\n");
}
unmarshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType, (VkRenderingAttachmentInfoKHR*)(forUnmarshaling->pDepthAttachment));
}
// WARNING PTR CHECK
const VkRenderingAttachmentInfoKHR* check_pStencilAttachment;
check_pStencilAttachment = (const VkRenderingAttachmentInfoKHR*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pStencilAttachment) {
if (!(check_pStencilAttachment)) {
fprintf(
stderr,
"fatal: forUnmarshaling->pStencilAttachment inconsistent between guest and host\n");
}
unmarshal_VkRenderingAttachmentInfoKHR(
vkStream, rootType,
(VkRenderingAttachmentInfoKHR*)(forUnmarshaling->pStencilAttachment));
}
}
void marshal_VkPipelineRenderingCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPipelineRenderingCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
vkStream->write((const VkFormat*)forMarshaling->pColorAttachmentFormats,
forMarshaling->colorAttachmentCount * sizeof(const VkFormat));
vkStream->write((VkFormat*)&forMarshaling->depthAttachmentFormat, sizeof(VkFormat));
vkStream->write((VkFormat*)&forMarshaling->stencilAttachmentFormat, sizeof(VkFormat));
}
void unmarshal_VkPipelineRenderingCreateInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPipelineRenderingCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
vkStream->read((VkFormat*)forUnmarshaling->pColorAttachmentFormats,
forUnmarshaling->colorAttachmentCount * sizeof(const VkFormat));
vkStream->read((VkFormat*)&forUnmarshaling->depthAttachmentFormat, sizeof(VkFormat));
vkStream->read((VkFormat*)&forUnmarshaling->stencilAttachmentFormat, sizeof(VkFormat));
}
void marshal_VkPhysicalDeviceDynamicRenderingFeaturesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceDynamicRenderingFeaturesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->dynamicRendering, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDeviceDynamicRenderingFeaturesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDeviceDynamicRenderingFeaturesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->dynamicRendering, sizeof(VkBool32));
}
void marshal_VkCommandBufferInheritanceRenderingInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkCommandBufferInheritanceRenderingInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkRenderingFlagsKHR*)&forMarshaling->flags, sizeof(VkRenderingFlagsKHR));
vkStream->write((uint32_t*)&forMarshaling->viewMask, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
vkStream->write((const VkFormat*)forMarshaling->pColorAttachmentFormats,
forMarshaling->colorAttachmentCount * sizeof(const VkFormat));
vkStream->write((VkFormat*)&forMarshaling->depthAttachmentFormat, sizeof(VkFormat));
vkStream->write((VkFormat*)&forMarshaling->stencilAttachmentFormat, sizeof(VkFormat));
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->rasterizationSamples,
sizeof(VkSampleCountFlagBits));
}
void unmarshal_VkCommandBufferInheritanceRenderingInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkCommandBufferInheritanceRenderingInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkRenderingFlagsKHR*)&forUnmarshaling->flags, sizeof(VkRenderingFlagsKHR));
vkStream->read((uint32_t*)&forUnmarshaling->viewMask, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
vkStream->read((VkFormat*)forUnmarshaling->pColorAttachmentFormats,
forUnmarshaling->colorAttachmentCount * sizeof(const VkFormat));
vkStream->read((VkFormat*)&forUnmarshaling->depthAttachmentFormat, sizeof(VkFormat));
vkStream->read((VkFormat*)&forUnmarshaling->stencilAttachmentFormat, sizeof(VkFormat));
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->rasterizationSamples,
sizeof(VkSampleCountFlagBits));
}
void marshal_VkRenderingFragmentShadingRateAttachmentInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderingFragmentShadingRateAttachmentInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout));
marshal_VkExtent2D(vkStream, rootType,
(VkExtent2D*)(&forMarshaling->shadingRateAttachmentTexelSize));
}
void unmarshal_VkRenderingFragmentShadingRateAttachmentInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderingFragmentShadingRateAttachmentInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_0, (VkImageView*)&forUnmarshaling->imageView, 1);
vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout));
unmarshal_VkExtent2D(vkStream, rootType,
(VkExtent2D*)(&forUnmarshaling->shadingRateAttachmentTexelSize));
}
void marshal_VkRenderingFragmentDensityMapAttachmentInfoEXT(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRenderingFragmentDensityMapAttachmentInfoEXT* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkImageView_u64(&forMarshaling->imageView, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkImageLayout*)&forMarshaling->imageLayout, sizeof(VkImageLayout));
}
void unmarshal_VkRenderingFragmentDensityMapAttachmentInfoEXT(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRenderingFragmentDensityMapAttachmentInfoEXT* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkImageView(
&cgen_var_0, (VkImageView*)&forUnmarshaling->imageView, 1);
vkStream->read((VkImageLayout*)&forUnmarshaling->imageLayout, sizeof(VkImageLayout));
}
void marshal_VkAttachmentSampleCountInfoAMD(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAttachmentSampleCountInfoAMD* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->colorAttachmentCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pColorAttachmentSamples;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pColorAttachmentSamples) {
vkStream->write((const VkSampleCountFlagBits*)forMarshaling->pColorAttachmentSamples,
forMarshaling->colorAttachmentCount * sizeof(const VkSampleCountFlagBits));
}
vkStream->write((VkSampleCountFlagBits*)&forMarshaling->depthStencilAttachmentSamples,
sizeof(VkSampleCountFlagBits));
}
void unmarshal_VkAttachmentSampleCountInfoAMD(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAttachmentSampleCountInfoAMD* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->colorAttachmentCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkSampleCountFlagBits* check_pColorAttachmentSamples;
check_pColorAttachmentSamples = (const VkSampleCountFlagBits*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pColorAttachmentSamples) {
if (!(check_pColorAttachmentSamples)) {
fprintf(stderr,
"fatal: forUnmarshaling->pColorAttachmentSamples inconsistent between guest "
"and host\n");
}
vkStream->read((VkSampleCountFlagBits*)forUnmarshaling->pColorAttachmentSamples,
forUnmarshaling->colorAttachmentCount * sizeof(const VkSampleCountFlagBits));
}
vkStream->read((VkSampleCountFlagBits*)&forUnmarshaling->depthStencilAttachmentSamples,
sizeof(VkSampleCountFlagBits));
}
void marshal_VkMultiviewPerViewAttributesInfoNVX(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMultiviewPerViewAttributesInfoNVX* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->perViewAttributes, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->perViewAttributesPositionXOnly, sizeof(VkBool32));
}
void unmarshal_VkMultiviewPerViewAttributesInfoNVX(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMultiviewPerViewAttributesInfoNVX* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->perViewAttributes, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->perViewAttributesPositionXOnly, sizeof(VkBool32));
}
#endif
#ifdef VK_KHR_multiview
#endif
#ifdef VK_KHR_get_physical_device_properties2
#endif
#ifdef VK_KHR_device_group
#endif
#ifdef VK_KHR_shader_draw_parameters
#endif
#ifdef VK_KHR_maintenance1
#endif
#ifdef VK_KHR_device_group_creation
#endif
#ifdef VK_KHR_external_memory_capabilities
#endif
#ifdef VK_KHR_external_memory
#endif
#ifdef VK_KHR_external_memory_win32
void marshal_VkImportMemoryWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportMemoryWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkImportMemoryWin32HandleInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkImportMemoryWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkExportMemoryWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportMemoryWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pAttributes) {
vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkExportMemoryWin32HandleInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkExportMemoryWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
// WARNING PTR CHECK
const SECURITY_ATTRIBUTES* check_pAttributes;
check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pAttributes) {
if (!(check_pAttributes)) {
fprintf(stderr,
"fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
}
vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkMemoryWin32HandlePropertiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryWin32HandlePropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
}
void unmarshal_VkMemoryWin32HandlePropertiesKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkMemoryWin32HandlePropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
}
void marshal_VkMemoryGetWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryGetWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void unmarshal_VkMemoryGetWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryGetWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_external_memory_fd
void marshal_VkImportMemoryFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportMemoryFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
vkStream->write((int*)&forMarshaling->fd, sizeof(int));
}
void unmarshal_VkImportMemoryFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImportMemoryFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
}
void marshal_VkMemoryFdPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryFdPropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->memoryTypeBits, sizeof(uint32_t));
}
void unmarshal_VkMemoryFdPropertiesKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryFdPropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->memoryTypeBits, sizeof(uint32_t));
}
void marshal_VkMemoryGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkMemoryGetFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(&forMarshaling->memory, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalMemoryHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
void unmarshal_VkMemoryGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkMemoryGetFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
&cgen_var_0, (VkDeviceMemory*)&forUnmarshaling->memory, 1);
vkStream->read((VkExternalMemoryHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalMemoryHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_win32_keyed_mutex
void marshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkWin32KeyedMutexAcquireReleaseInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->acquireCount, sizeof(uint32_t));
if (forMarshaling->acquireCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forMarshaling->acquireCount * 8);
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(
forMarshaling->pAcquireSyncs, cgen_var_0, forMarshaling->acquireCount);
vkStream->write((uint64_t*)cgen_var_0, forMarshaling->acquireCount * 8);
}
vkStream->write((const uint64_t*)forMarshaling->pAcquireKeys,
forMarshaling->acquireCount * sizeof(const uint64_t));
vkStream->write((const uint32_t*)forMarshaling->pAcquireTimeouts,
forMarshaling->acquireCount * sizeof(const uint32_t));
vkStream->write((uint32_t*)&forMarshaling->releaseCount, sizeof(uint32_t));
if (forMarshaling->releaseCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forMarshaling->releaseCount * 8);
vkStream->handleMapping()->mapHandles_VkDeviceMemory_u64(
forMarshaling->pReleaseSyncs, cgen_var_1, forMarshaling->releaseCount);
vkStream->write((uint64_t*)cgen_var_1, forMarshaling->releaseCount * 8);
}
vkStream->write((const uint64_t*)forMarshaling->pReleaseKeys,
forMarshaling->releaseCount * sizeof(const uint64_t));
}
void unmarshal_VkWin32KeyedMutexAcquireReleaseInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkWin32KeyedMutexAcquireReleaseInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->acquireCount, sizeof(uint32_t));
if (forUnmarshaling->acquireCount) {
uint64_t* cgen_var_0;
vkStream->alloc((void**)&cgen_var_0, forUnmarshaling->acquireCount * 8);
vkStream->read((uint64_t*)cgen_var_0, forUnmarshaling->acquireCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
cgen_var_0, (VkDeviceMemory*)forUnmarshaling->pAcquireSyncs,
forUnmarshaling->acquireCount);
}
vkStream->read((uint64_t*)forUnmarshaling->pAcquireKeys,
forUnmarshaling->acquireCount * sizeof(const uint64_t));
vkStream->read((uint32_t*)forUnmarshaling->pAcquireTimeouts,
forUnmarshaling->acquireCount * sizeof(const uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->releaseCount, sizeof(uint32_t));
if (forUnmarshaling->releaseCount) {
uint64_t* cgen_var_1;
vkStream->alloc((void**)&cgen_var_1, forUnmarshaling->releaseCount * 8);
vkStream->read((uint64_t*)cgen_var_1, forUnmarshaling->releaseCount * 8);
vkStream->handleMapping()->mapHandles_u64_VkDeviceMemory(
cgen_var_1, (VkDeviceMemory*)forUnmarshaling->pReleaseSyncs,
forUnmarshaling->releaseCount);
}
vkStream->read((uint64_t*)forUnmarshaling->pReleaseKeys,
forUnmarshaling->releaseCount * sizeof(const uint64_t));
}
#endif
#ifdef VK_KHR_external_semaphore_capabilities
#endif
#ifdef VK_KHR_external_semaphore
#endif
#ifdef VK_KHR_external_semaphore_win32
void marshal_VkImportSemaphoreWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportSemaphoreWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags));
vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkImportSemaphoreWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImportSemaphoreWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_0, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags,
sizeof(VkSemaphoreImportFlags));
vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkExportSemaphoreWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportSemaphoreWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pAttributes) {
vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkExportSemaphoreWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkExportSemaphoreWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
// WARNING PTR CHECK
const SECURITY_ATTRIBUTES* check_pAttributes;
check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pAttributes) {
if (!(check_pAttributes)) {
fprintf(stderr,
"fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
}
vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkD3D12FenceSubmitInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkD3D12FenceSubmitInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->waitSemaphoreValuesCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pWaitSemaphoreValues;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pWaitSemaphoreValues) {
vkStream->write((const uint64_t*)forMarshaling->pWaitSemaphoreValues,
forMarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t));
}
vkStream->write((uint32_t*)&forMarshaling->signalSemaphoreValuesCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_1 = (uint64_t)(uintptr_t)forMarshaling->pSignalSemaphoreValues;
vkStream->putBe64(cgen_var_1);
if (forMarshaling->pSignalSemaphoreValues) {
vkStream->write((const uint64_t*)forMarshaling->pSignalSemaphoreValues,
forMarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t));
}
}
void unmarshal_VkD3D12FenceSubmitInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkD3D12FenceSubmitInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->waitSemaphoreValuesCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint64_t* check_pWaitSemaphoreValues;
check_pWaitSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pWaitSemaphoreValues) {
if (!(check_pWaitSemaphoreValues)) {
fprintf(stderr,
"fatal: forUnmarshaling->pWaitSemaphoreValues inconsistent between guest and "
"host\n");
}
vkStream->read((uint64_t*)forUnmarshaling->pWaitSemaphoreValues,
forUnmarshaling->waitSemaphoreValuesCount * sizeof(const uint64_t));
}
vkStream->read((uint32_t*)&forUnmarshaling->signalSemaphoreValuesCount, sizeof(uint32_t));
// WARNING PTR CHECK
const uint64_t* check_pSignalSemaphoreValues;
check_pSignalSemaphoreValues = (const uint64_t*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pSignalSemaphoreValues) {
if (!(check_pSignalSemaphoreValues)) {
fprintf(stderr,
"fatal: forUnmarshaling->pSignalSemaphoreValues inconsistent between guest and "
"host\n");
}
vkStream->read((uint64_t*)forUnmarshaling->pSignalSemaphoreValues,
forUnmarshaling->signalSemaphoreValuesCount * sizeof(const uint64_t));
}
}
void marshal_VkSemaphoreGetWin32HandleInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreGetWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
void unmarshal_VkSemaphoreGetWin32HandleInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkSemaphoreGetWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_0, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_external_semaphore_fd
void marshal_VkImportSemaphoreFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportSemaphoreFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkSemaphoreImportFlags*)&forMarshaling->flags, sizeof(VkSemaphoreImportFlags));
vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
vkStream->write((int*)&forMarshaling->fd, sizeof(int));
}
void unmarshal_VkImportSemaphoreFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImportSemaphoreFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_0, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
vkStream->read((VkSemaphoreImportFlags*)&forUnmarshaling->flags,
sizeof(VkSemaphoreImportFlags));
vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
}
void marshal_VkSemaphoreGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSemaphoreGetFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSemaphore_u64(&forMarshaling->semaphore, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalSemaphoreHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
void unmarshal_VkSemaphoreGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSemaphoreGetFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSemaphore(
&cgen_var_0, (VkSemaphore*)&forUnmarshaling->semaphore, 1);
vkStream->read((VkExternalSemaphoreHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalSemaphoreHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_push_descriptor
void marshal_VkPhysicalDevicePushDescriptorPropertiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevicePushDescriptorPropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->maxPushDescriptors, sizeof(uint32_t));
}
void unmarshal_VkPhysicalDevicePushDescriptorPropertiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevicePushDescriptorPropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->maxPushDescriptors, sizeof(uint32_t));
}
#endif
#ifdef VK_KHR_shader_float16_int8
#endif
#ifdef VK_KHR_16bit_storage
#endif
#ifdef VK_KHR_incremental_present
void marshal_VkRectLayerKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkRectLayerKHR* forMarshaling) {
(void)rootType;
marshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forMarshaling->offset));
marshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forMarshaling->extent));
vkStream->write((uint32_t*)&forMarshaling->layer, sizeof(uint32_t));
}
void unmarshal_VkRectLayerKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkRectLayerKHR* forUnmarshaling) {
(void)rootType;
unmarshal_VkOffset2D(vkStream, rootType, (VkOffset2D*)(&forUnmarshaling->offset));
unmarshal_VkExtent2D(vkStream, rootType, (VkExtent2D*)(&forUnmarshaling->extent));
vkStream->read((uint32_t*)&forUnmarshaling->layer, sizeof(uint32_t));
}
void marshal_VkPresentRegionKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPresentRegionKHR* forMarshaling) {
(void)rootType;
vkStream->write((uint32_t*)&forMarshaling->rectangleCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pRectangles;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pRectangles) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->rectangleCount; ++i) {
marshal_VkRectLayerKHR(vkStream, rootType,
(const VkRectLayerKHR*)(forMarshaling->pRectangles + i));
}
}
}
}
void unmarshal_VkPresentRegionKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPresentRegionKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((uint32_t*)&forUnmarshaling->rectangleCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkRectLayerKHR* check_pRectangles;
check_pRectangles = (const VkRectLayerKHR*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pRectangles) {
if (!(check_pRectangles)) {
fprintf(stderr,
"fatal: forUnmarshaling->pRectangles inconsistent between guest and host\n");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->rectangleCount; ++i) {
unmarshal_VkRectLayerKHR(vkStream, rootType,
(VkRectLayerKHR*)(forUnmarshaling->pRectangles + i));
}
}
}
}
void marshal_VkPresentRegionsKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPresentRegionsKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->swapchainCount, sizeof(uint32_t));
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pRegions;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pRegions) {
if (forMarshaling) {
for (uint32_t i = 0; i < (uint32_t)forMarshaling->swapchainCount; ++i) {
marshal_VkPresentRegionKHR(
vkStream, rootType, (const VkPresentRegionKHR*)(forMarshaling->pRegions + i));
}
}
}
}
void unmarshal_VkPresentRegionsKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPresentRegionsKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->swapchainCount, sizeof(uint32_t));
// WARNING PTR CHECK
const VkPresentRegionKHR* check_pRegions;
check_pRegions = (const VkPresentRegionKHR*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pRegions) {
if (!(check_pRegions)) {
fprintf(stderr,
"fatal: forUnmarshaling->pRegions inconsistent between guest and host\n");
}
if (forUnmarshaling) {
for (uint32_t i = 0; i < (uint32_t)forUnmarshaling->swapchainCount; ++i) {
unmarshal_VkPresentRegionKHR(vkStream, rootType,
(VkPresentRegionKHR*)(forUnmarshaling->pRegions + i));
}
}
}
}
#endif
#ifdef VK_KHR_descriptor_update_template
#endif
#ifdef VK_KHR_imageless_framebuffer
#endif
#ifdef VK_KHR_create_renderpass2
#endif
#ifdef VK_KHR_shared_presentable_image
void marshal_VkSharedPresentSurfaceCapabilitiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSharedPresentSurfaceCapabilitiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkImageUsageFlags*)&forMarshaling->sharedPresentSupportedUsageFlags,
sizeof(VkImageUsageFlags));
}
void unmarshal_VkSharedPresentSurfaceCapabilitiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSharedPresentSurfaceCapabilitiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkImageUsageFlags*)&forUnmarshaling->sharedPresentSupportedUsageFlags,
sizeof(VkImageUsageFlags));
}
#endif
#ifdef VK_KHR_external_fence_capabilities
#endif
#ifdef VK_KHR_external_fence
#endif
#ifdef VK_KHR_external_fence_win32
void marshal_VkImportFenceWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportFenceWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags));
vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
vkStream->write((HANDLE*)&forMarshaling->handle, sizeof(HANDLE));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkImportFenceWin32HandleInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkImportFenceWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_0,
(VkFence*)&forUnmarshaling->fence, 1);
vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags));
vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
vkStream->read((HANDLE*)&forUnmarshaling->handle, sizeof(HANDLE));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkExportFenceWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkExportFenceWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
// WARNING PTR CHECK
uint64_t cgen_var_0 = (uint64_t)(uintptr_t)forMarshaling->pAttributes;
vkStream->putBe64(cgen_var_0);
if (forMarshaling->pAttributes) {
vkStream->write((const SECURITY_ATTRIBUTES*)forMarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->write((DWORD*)&forMarshaling->dwAccess, sizeof(DWORD));
vkStream->write((LPCWSTR*)&forMarshaling->name, sizeof(LPCWSTR));
}
void unmarshal_VkExportFenceWin32HandleInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkExportFenceWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
// WARNING PTR CHECK
const SECURITY_ATTRIBUTES* check_pAttributes;
check_pAttributes = (const SECURITY_ATTRIBUTES*)(uintptr_t)vkStream->getBe64();
if (forUnmarshaling->pAttributes) {
if (!(check_pAttributes)) {
fprintf(stderr,
"fatal: forUnmarshaling->pAttributes inconsistent between guest and host\n");
}
vkStream->read((SECURITY_ATTRIBUTES*)forUnmarshaling->pAttributes,
sizeof(const SECURITY_ATTRIBUTES));
}
vkStream->read((DWORD*)&forUnmarshaling->dwAccess, sizeof(DWORD));
vkStream->read((LPCWSTR*)&forUnmarshaling->name, sizeof(LPCWSTR));
}
void marshal_VkFenceGetWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFenceGetWin32HandleInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
void unmarshal_VkFenceGetWin32HandleInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFenceGetWin32HandleInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_0,
(VkFence*)&forUnmarshaling->fence, 1);
vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_external_fence_fd
void marshal_VkImportFenceFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkImportFenceFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkFenceImportFlags*)&forMarshaling->flags, sizeof(VkFenceImportFlags));
vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
vkStream->write((int*)&forMarshaling->fd, sizeof(int));
}
void unmarshal_VkImportFenceFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkImportFenceFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_0,
(VkFence*)&forUnmarshaling->fence, 1);
vkStream->read((VkFenceImportFlags*)&forUnmarshaling->flags, sizeof(VkFenceImportFlags));
vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
vkStream->read((int*)&forUnmarshaling->fd, sizeof(int));
}
void marshal_VkFenceGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkFenceGetFdInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkFence_u64(&forMarshaling->fence, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((VkExternalFenceHandleTypeFlagBits*)&forMarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
void unmarshal_VkFenceGetFdInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkFenceGetFdInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_0,
(VkFence*)&forUnmarshaling->fence, 1);
vkStream->read((VkExternalFenceHandleTypeFlagBits*)&forUnmarshaling->handleType,
sizeof(VkExternalFenceHandleTypeFlagBits));
}
#endif
#ifdef VK_KHR_performance_query
void marshal_VkPhysicalDevicePerformanceQueryFeaturesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevicePerformanceQueryFeaturesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->performanceCounterQueryPools, sizeof(VkBool32));
vkStream->write((VkBool32*)&forMarshaling->performanceCounterMultipleQueryPools,
sizeof(VkBool32));
}
void unmarshal_VkPhysicalDevicePerformanceQueryFeaturesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevicePerformanceQueryFeaturesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->performanceCounterQueryPools, sizeof(VkBool32));
vkStream->read((VkBool32*)&forUnmarshaling->performanceCounterMultipleQueryPools,
sizeof(VkBool32));
}
void marshal_VkPhysicalDevicePerformanceQueryPropertiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDevicePerformanceQueryPropertiesKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkBool32*)&forMarshaling->allowCommandBufferQueryCopies, sizeof(VkBool32));
}
void unmarshal_VkPhysicalDevicePerformanceQueryPropertiesKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPhysicalDevicePerformanceQueryPropertiesKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkBool32*)&forUnmarshaling->allowCommandBufferQueryCopies, sizeof(VkBool32));
}
void marshal_VkPerformanceCounterKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPerformanceCounterKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPerformanceCounterUnitKHR*)&forMarshaling->unit,
sizeof(VkPerformanceCounterUnitKHR));
vkStream->write((VkPerformanceCounterScopeKHR*)&forMarshaling->scope,
sizeof(VkPerformanceCounterScopeKHR));
vkStream->write((VkPerformanceCounterStorageKHR*)&forMarshaling->storage,
sizeof(VkPerformanceCounterStorageKHR));
vkStream->write((uint8_t*)forMarshaling->uuid, VK_UUID_SIZE * sizeof(uint8_t));
}
void unmarshal_VkPerformanceCounterKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPerformanceCounterKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPerformanceCounterUnitKHR*)&forUnmarshaling->unit,
sizeof(VkPerformanceCounterUnitKHR));
vkStream->read((VkPerformanceCounterScopeKHR*)&forUnmarshaling->scope,
sizeof(VkPerformanceCounterScopeKHR));
vkStream->read((VkPerformanceCounterStorageKHR*)&forUnmarshaling->storage,
sizeof(VkPerformanceCounterStorageKHR));
vkStream->read((uint8_t*)forUnmarshaling->uuid, VK_UUID_SIZE * sizeof(uint8_t));
}
void marshal_VkPerformanceCounterDescriptionKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPerformanceCounterDescriptionKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkPerformanceCounterDescriptionFlagsKHR*)&forMarshaling->flags,
sizeof(VkPerformanceCounterDescriptionFlagsKHR));
vkStream->write((char*)forMarshaling->name, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
vkStream->write((char*)forMarshaling->category, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
vkStream->write((char*)forMarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
}
void unmarshal_VkPerformanceCounterDescriptionKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPerformanceCounterDescriptionKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkPerformanceCounterDescriptionFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkPerformanceCounterDescriptionFlagsKHR));
vkStream->read((char*)forUnmarshaling->name, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
vkStream->read((char*)forUnmarshaling->category, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
vkStream->read((char*)forUnmarshaling->description, VK_MAX_DESCRIPTION_SIZE * sizeof(char));
}
void marshal_VkQueryPoolPerformanceCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkQueryPoolPerformanceCreateInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->write((uint32_t*)&forMarshaling->counterIndexCount, sizeof(uint32_t));
vkStream->write((const uint32_t*)forMarshaling->pCounterIndices,
forMarshaling->counterIndexCount * sizeof(const uint32_t));
}
void unmarshal_VkQueryPoolPerformanceCreateInfoKHR(
VulkanStreamGuest* vkStream, VkStructureType rootType,
VkQueryPoolPerformanceCreateInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->queueFamilyIndex, sizeof(uint32_t));
vkStream->read((uint32_t*)&forUnmarshaling->counterIndexCount, sizeof(uint32_t));
vkStream->read((uint32_t*)forUnmarshaling->pCounterIndices,
forUnmarshaling->counterIndexCount * sizeof(const uint32_t));
}
void marshal_VkPerformanceCounterResultKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPerformanceCounterResultKHR* forMarshaling) {
(void)rootType;
vkStream->write((int32_t*)&forMarshaling->int32, sizeof(int32_t));
}
void unmarshal_VkPerformanceCounterResultKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkPerformanceCounterResultKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((int32_t*)&forUnmarshaling->int32, sizeof(int32_t));
}
void marshal_VkAcquireProfilingLockInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkAcquireProfilingLockInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((VkAcquireProfilingLockFlagsKHR*)&forMarshaling->flags,
sizeof(VkAcquireProfilingLockFlagsKHR));
vkStream->write((uint64_t*)&forMarshaling->timeout, sizeof(uint64_t));
}
void unmarshal_VkAcquireProfilingLockInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkAcquireProfilingLockInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((VkAcquireProfilingLockFlagsKHR*)&forUnmarshaling->flags,
sizeof(VkAcquireProfilingLockFlagsKHR));
vkStream->read((uint64_t*)&forUnmarshaling->timeout, sizeof(uint64_t));
}
void marshal_VkPerformanceQuerySubmitInfoKHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPerformanceQuerySubmitInfoKHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
vkStream->write((uint32_t*)&forMarshaling->counterPassIndex, sizeof(uint32_t));
}
void unmarshal_VkPerformanceQuerySubmitInfoKHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPerformanceQuerySubmitInfoKHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
vkStream->read((uint32_t*)&forUnmarshaling->counterPassIndex, sizeof(uint32_t));
}
#endif
#ifdef VK_KHR_maintenance2
#endif
#ifdef VK_KHR_get_surface_capabilities2
void marshal_VkPhysicalDeviceSurfaceInfo2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkPhysicalDeviceSurfaceInfo2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&forMarshaling->surface, &cgen_var_0, 1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
}
void unmarshal_VkPhysicalDeviceSurfaceInfo2KHR(VulkanStreamGuest* vkStream,
VkStructureType rootType,
VkPhysicalDeviceSurfaceInfo2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkSurfaceKHR(
&cgen_var_0, (VkSurfaceKHR*)&forUnmarshaling->surface, 1);
}
void marshal_VkSurfaceCapabilities2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSurfaceCapabilities2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkSurfaceCapabilitiesKHR(
vkStream, rootType, (VkSurfaceCapabilitiesKHR*)(&forMarshaling->surfaceCapabilities));
}
void unmarshal_VkSurfaceCapabilities2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSurfaceCapabilities2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkSurfaceCapabilitiesKHR(
vkStream, rootType, (VkSurfaceCapabilitiesKHR*)(&forUnmarshaling->surfaceCapabilities));
}
void marshal_VkSurfaceFormat2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkSurfaceFormat2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkSurfaceFormatKHR(vkStream, rootType,
(VkSurfaceFormatKHR*)(&forMarshaling->surfaceFormat));
}
void unmarshal_VkSurfaceFormat2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkSurfaceFormat2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkSurfaceFormatKHR(vkStream, rootType,
(VkSurfaceFormatKHR*)(&forUnmarshaling->surfaceFormat));
}
#endif
#ifdef VK_KHR_variable_pointers
#endif
#ifdef VK_KHR_get_display_properties2
void marshal_VkDisplayProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayProperties2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkDisplayPropertiesKHR(vkStream, rootType,
(VkDisplayPropertiesKHR*)(&forMarshaling->displayProperties));
}
void unmarshal_VkDisplayProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayProperties2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkDisplayPropertiesKHR(
vkStream, rootType, (VkDisplayPropertiesKHR*)(&forUnmarshaling->displayProperties));
}
void marshal_VkDisplayPlaneProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPlaneProperties2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkDisplayPlanePropertiesKHR(
vkStream, rootType, (VkDisplayPlanePropertiesKHR*)(&forMarshaling->displayPlaneProperties));
}
void unmarshal_VkDisplayPlaneProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPlaneProperties2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkDisplayPlanePropertiesKHR(
vkStream, rootType,
(VkDisplayPlanePropertiesKHR*)(&forUnmarshaling->displayPlaneProperties));
}
void marshal_VkDisplayModeProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayModeProperties2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkDisplayModePropertiesKHR(
vkStream, rootType, (VkDisplayModePropertiesKHR*)(&forMarshaling->displayModeProperties));
}
void unmarshal_VkDisplayModeProperties2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayModeProperties2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
unmarshal_VkDisplayModePropertiesKHR(
vkStream, rootType, (VkDisplayModePropertiesKHR*)(&forUnmarshaling->displayModeProperties));
}
void marshal_VkDisplayPlaneInfo2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPlaneInfo2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
uint64_t cgen_var_0;
vkStream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(&forMarshaling->mode, &cgen_var_0,
1);
vkStream->write((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->write((uint32_t*)&forMarshaling->planeIndex, sizeof(uint32_t));
}
void unmarshal_VkDisplayPlaneInfo2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPlaneInfo2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forUnmarshaling->sType;
}
unmarshal_extension_struct(vkStream, rootType, (void*)(forUnmarshaling->pNext));
uint64_t cgen_var_0;
vkStream->read((uint64_t*)&cgen_var_0, 1 * 8);
vkStream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(
&cgen_var_0, (VkDisplayModeKHR*)&forUnmarshaling->mode, 1);
vkStream->read((uint32_t*)&forUnmarshaling->planeIndex, sizeof(uint32_t));
}
void marshal_VkDisplayPlaneCapabilities2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
const VkDisplayPlaneCapabilities2KHR* forMarshaling) {
(void)rootType;
vkStream->write((VkStructureType*)&forMarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
rootType = forMarshaling->sType;
}
marshal_extension_struct(vkStream, rootType, forMarshaling->pNext);
marshal_VkDisplayPlaneCapabilitiesKHR(
vkStream, rootType, (VkDisplayPlaneCapabilitiesKHR*)(&forMarshaling->capabilities));
}
void unmarshal_VkDisplayPlaneCapabilities2KHR(VulkanStreamGuest* vkStream, VkStructureType rootType,
VkDisplayPlaneCapabilities2KHR* forUnmarshaling) {
(void)rootType;
vkStream->read((VkStructureType*)&forUnmarshaling->sType, sizeof(VkStructureType));
if (rootType == VK_STRUCTURE_TYPE_MAX_ENUM) {
ro