blob: 29c04ba3024ed0d436eb4ad6308210f9605fbc0b [file] [log] [blame]
// *** THIS FILE IS GENERATED - DO NOT EDIT ***
// See helper_file_generator.py for modifications
/***************************************************************************
*
* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (c) 2015-2019 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.
*
* Author: Mark Lobodzinski <mark@lunarg.com>
* Author: Courtney Goeltzenleuchter <courtneygo@google.com>
* Author: Tobin Ehlis <tobine@google.com>
* Author: Chris Forbes <chrisforbes@google.com>
* Author: John Zulauf<jzulauf@lunarg.com>
*
****************************************************************************/
#include "vk_safe_struct.h"
#include <string.h>
#include <cassert>
#include <cstring>
#include <vulkan/vk_layer.h>
safe_VkApplicationInfo::safe_VkApplicationInfo(const VkApplicationInfo* in_struct) :
sType(in_struct->sType),
applicationVersion(in_struct->applicationVersion),
engineVersion(in_struct->engineVersion),
apiVersion(in_struct->apiVersion)
{
pNext = SafePnextCopy(in_struct->pNext);
pApplicationName = SafeStringCopy(in_struct->pApplicationName);
pEngineName = SafeStringCopy(in_struct->pEngineName);
}
safe_VkApplicationInfo::safe_VkApplicationInfo() :
pNext(nullptr),
pApplicationName(nullptr),
pEngineName(nullptr)
{}
safe_VkApplicationInfo::safe_VkApplicationInfo(const safe_VkApplicationInfo& src)
{
sType = src.sType;
applicationVersion = src.applicationVersion;
engineVersion = src.engineVersion;
apiVersion = src.apiVersion;
pNext = SafePnextCopy(src.pNext);
pApplicationName = SafeStringCopy(src.pApplicationName);
pEngineName = SafeStringCopy(src.pEngineName);
}
safe_VkApplicationInfo& safe_VkApplicationInfo::operator=(const safe_VkApplicationInfo& src)
{
if (&src == this) return *this;
if (pApplicationName) delete [] pApplicationName;
if (pEngineName) delete [] pEngineName;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
applicationVersion = src.applicationVersion;
engineVersion = src.engineVersion;
apiVersion = src.apiVersion;
pNext = SafePnextCopy(src.pNext);
pApplicationName = SafeStringCopy(src.pApplicationName);
pEngineName = SafeStringCopy(src.pEngineName);
return *this;
}
safe_VkApplicationInfo::~safe_VkApplicationInfo()
{
if (pApplicationName) delete [] pApplicationName;
if (pEngineName) delete [] pEngineName;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkApplicationInfo::initialize(const VkApplicationInfo* in_struct)
{
sType = in_struct->sType;
applicationVersion = in_struct->applicationVersion;
engineVersion = in_struct->engineVersion;
apiVersion = in_struct->apiVersion;
pNext = SafePnextCopy(in_struct->pNext);
pApplicationName = SafeStringCopy(in_struct->pApplicationName);
pEngineName = SafeStringCopy(in_struct->pEngineName);
}
void safe_VkApplicationInfo::initialize(const safe_VkApplicationInfo* src)
{
sType = src->sType;
applicationVersion = src->applicationVersion;
engineVersion = src->engineVersion;
apiVersion = src->apiVersion;
pNext = SafePnextCopy(src->pNext);
pApplicationName = SafeStringCopy(src->pApplicationName);
pEngineName = SafeStringCopy(src->pEngineName);
}
safe_VkInstanceCreateInfo::safe_VkInstanceCreateInfo(const VkInstanceCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
pApplicationInfo(nullptr),
enabledLayerCount(in_struct->enabledLayerCount),
enabledExtensionCount(in_struct->enabledExtensionCount)
{
pNext = SafePnextCopy(in_struct->pNext);
char **tmp_ppEnabledLayerNames = new char *[in_struct->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(in_struct->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[in_struct->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(in_struct->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (in_struct->pApplicationInfo)
pApplicationInfo = new safe_VkApplicationInfo(in_struct->pApplicationInfo);
}
safe_VkInstanceCreateInfo::safe_VkInstanceCreateInfo() :
pNext(nullptr),
pApplicationInfo(nullptr),
ppEnabledLayerNames(nullptr),
ppEnabledExtensionNames(nullptr)
{}
safe_VkInstanceCreateInfo::safe_VkInstanceCreateInfo(const safe_VkInstanceCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
pApplicationInfo = nullptr;
enabledLayerCount = src.enabledLayerCount;
enabledExtensionCount = src.enabledExtensionCount;
pNext = SafePnextCopy(src.pNext);
char **tmp_ppEnabledLayerNames = new char *[src.enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src.ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src.enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src.ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (src.pApplicationInfo)
pApplicationInfo = new safe_VkApplicationInfo(*src.pApplicationInfo);
}
safe_VkInstanceCreateInfo& safe_VkInstanceCreateInfo::operator=(const safe_VkInstanceCreateInfo& src)
{
if (&src == this) return *this;
if (pApplicationInfo)
delete pApplicationInfo;
if (ppEnabledLayerNames) {
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
delete [] ppEnabledLayerNames[i];
}
delete [] ppEnabledLayerNames;
}
if (ppEnabledExtensionNames) {
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
delete [] ppEnabledExtensionNames[i];
}
delete [] ppEnabledExtensionNames;
}
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
pApplicationInfo = nullptr;
enabledLayerCount = src.enabledLayerCount;
enabledExtensionCount = src.enabledExtensionCount;
pNext = SafePnextCopy(src.pNext);
char **tmp_ppEnabledLayerNames = new char *[src.enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src.ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src.enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src.ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (src.pApplicationInfo)
pApplicationInfo = new safe_VkApplicationInfo(*src.pApplicationInfo);
return *this;
}
safe_VkInstanceCreateInfo::~safe_VkInstanceCreateInfo()
{
if (pApplicationInfo)
delete pApplicationInfo;
if (ppEnabledLayerNames) {
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
delete [] ppEnabledLayerNames[i];
}
delete [] ppEnabledLayerNames;
}
if (ppEnabledExtensionNames) {
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
delete [] ppEnabledExtensionNames[i];
}
delete [] ppEnabledExtensionNames;
}
if (pNext)
FreePnextChain(pNext);
}
void safe_VkInstanceCreateInfo::initialize(const VkInstanceCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
pApplicationInfo = nullptr;
enabledLayerCount = in_struct->enabledLayerCount;
enabledExtensionCount = in_struct->enabledExtensionCount;
pNext = SafePnextCopy(in_struct->pNext);
char **tmp_ppEnabledLayerNames = new char *[in_struct->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(in_struct->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[in_struct->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(in_struct->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (in_struct->pApplicationInfo)
pApplicationInfo = new safe_VkApplicationInfo(in_struct->pApplicationInfo);
}
void safe_VkInstanceCreateInfo::initialize(const safe_VkInstanceCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
pApplicationInfo = nullptr;
enabledLayerCount = src->enabledLayerCount;
enabledExtensionCount = src->enabledExtensionCount;
pNext = SafePnextCopy(src->pNext);
char **tmp_ppEnabledLayerNames = new char *[src->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (src->pApplicationInfo)
pApplicationInfo = new safe_VkApplicationInfo(*src->pApplicationInfo);
}
safe_VkAllocationCallbacks::safe_VkAllocationCallbacks(const VkAllocationCallbacks* in_struct) :
pUserData(in_struct->pUserData),
pfnAllocation(in_struct->pfnAllocation),
pfnReallocation(in_struct->pfnReallocation),
pfnFree(in_struct->pfnFree),
pfnInternalAllocation(in_struct->pfnInternalAllocation),
pfnInternalFree(in_struct->pfnInternalFree)
{
}
safe_VkAllocationCallbacks::safe_VkAllocationCallbacks() :
pUserData(nullptr)
{}
safe_VkAllocationCallbacks::safe_VkAllocationCallbacks(const safe_VkAllocationCallbacks& src)
{
pUserData = src.pUserData;
pfnAllocation = src.pfnAllocation;
pfnReallocation = src.pfnReallocation;
pfnFree = src.pfnFree;
pfnInternalAllocation = src.pfnInternalAllocation;
pfnInternalFree = src.pfnInternalFree;
}
safe_VkAllocationCallbacks& safe_VkAllocationCallbacks::operator=(const safe_VkAllocationCallbacks& src)
{
if (&src == this) return *this;
pUserData = src.pUserData;
pfnAllocation = src.pfnAllocation;
pfnReallocation = src.pfnReallocation;
pfnFree = src.pfnFree;
pfnInternalAllocation = src.pfnInternalAllocation;
pfnInternalFree = src.pfnInternalFree;
return *this;
}
safe_VkAllocationCallbacks::~safe_VkAllocationCallbacks()
{
}
void safe_VkAllocationCallbacks::initialize(const VkAllocationCallbacks* in_struct)
{
pUserData = in_struct->pUserData;
pfnAllocation = in_struct->pfnAllocation;
pfnReallocation = in_struct->pfnReallocation;
pfnFree = in_struct->pfnFree;
pfnInternalAllocation = in_struct->pfnInternalAllocation;
pfnInternalFree = in_struct->pfnInternalFree;
}
void safe_VkAllocationCallbacks::initialize(const safe_VkAllocationCallbacks* src)
{
pUserData = src->pUserData;
pfnAllocation = src->pfnAllocation;
pfnReallocation = src->pfnReallocation;
pfnFree = src->pfnFree;
pfnInternalAllocation = src->pfnInternalAllocation;
pfnInternalFree = src->pfnInternalFree;
}
safe_VkDeviceQueueCreateInfo::safe_VkDeviceQueueCreateInfo(const VkDeviceQueueCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
queueFamilyIndex(in_struct->queueFamilyIndex),
queueCount(in_struct->queueCount),
pQueuePriorities(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueuePriorities) {
pQueuePriorities = new float[in_struct->queueCount];
memcpy ((void *)pQueuePriorities, (void *)in_struct->pQueuePriorities, sizeof(float)*in_struct->queueCount);
}
}
safe_VkDeviceQueueCreateInfo::safe_VkDeviceQueueCreateInfo() :
pNext(nullptr),
pQueuePriorities(nullptr)
{}
safe_VkDeviceQueueCreateInfo::safe_VkDeviceQueueCreateInfo(const safe_VkDeviceQueueCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
queueFamilyIndex = src.queueFamilyIndex;
queueCount = src.queueCount;
pQueuePriorities = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pQueuePriorities) {
pQueuePriorities = new float[src.queueCount];
memcpy ((void *)pQueuePriorities, (void *)src.pQueuePriorities, sizeof(float)*src.queueCount);
}
}
safe_VkDeviceQueueCreateInfo& safe_VkDeviceQueueCreateInfo::operator=(const safe_VkDeviceQueueCreateInfo& src)
{
if (&src == this) return *this;
if (pQueuePriorities)
delete[] pQueuePriorities;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
queueFamilyIndex = src.queueFamilyIndex;
queueCount = src.queueCount;
pQueuePriorities = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pQueuePriorities) {
pQueuePriorities = new float[src.queueCount];
memcpy ((void *)pQueuePriorities, (void *)src.pQueuePriorities, sizeof(float)*src.queueCount);
}
return *this;
}
safe_VkDeviceQueueCreateInfo::~safe_VkDeviceQueueCreateInfo()
{
if (pQueuePriorities)
delete[] pQueuePriorities;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkDeviceQueueCreateInfo::initialize(const VkDeviceQueueCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
queueFamilyIndex = in_struct->queueFamilyIndex;
queueCount = in_struct->queueCount;
pQueuePriorities = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueuePriorities) {
pQueuePriorities = new float[in_struct->queueCount];
memcpy ((void *)pQueuePriorities, (void *)in_struct->pQueuePriorities, sizeof(float)*in_struct->queueCount);
}
}
void safe_VkDeviceQueueCreateInfo::initialize(const safe_VkDeviceQueueCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
queueFamilyIndex = src->queueFamilyIndex;
queueCount = src->queueCount;
pQueuePriorities = nullptr;
pNext = SafePnextCopy(src->pNext);
if (src->pQueuePriorities) {
pQueuePriorities = new float[src->queueCount];
memcpy ((void *)pQueuePriorities, (void *)src->pQueuePriorities, sizeof(float)*src->queueCount);
}
}
safe_VkDeviceCreateInfo::safe_VkDeviceCreateInfo(const VkDeviceCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
queueCreateInfoCount(in_struct->queueCreateInfoCount),
pQueueCreateInfos(nullptr),
enabledLayerCount(in_struct->enabledLayerCount),
enabledExtensionCount(in_struct->enabledExtensionCount),
pEnabledFeatures(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
char **tmp_ppEnabledLayerNames = new char *[in_struct->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(in_struct->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[in_struct->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(in_struct->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (queueCreateInfoCount && in_struct->pQueueCreateInfos) {
pQueueCreateInfos = new safe_VkDeviceQueueCreateInfo[queueCreateInfoCount];
for (uint32_t i = 0; i < queueCreateInfoCount; ++i) {
pQueueCreateInfos[i].initialize(&in_struct->pQueueCreateInfos[i]);
}
}
if (in_struct->pEnabledFeatures) {
pEnabledFeatures = new VkPhysicalDeviceFeatures(*in_struct->pEnabledFeatures);
}
}
safe_VkDeviceCreateInfo::safe_VkDeviceCreateInfo() :
pNext(nullptr),
pQueueCreateInfos(nullptr),
ppEnabledLayerNames(nullptr),
ppEnabledExtensionNames(nullptr),
pEnabledFeatures(nullptr)
{}
safe_VkDeviceCreateInfo::safe_VkDeviceCreateInfo(const safe_VkDeviceCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
queueCreateInfoCount = src.queueCreateInfoCount;
pQueueCreateInfos = nullptr;
enabledLayerCount = src.enabledLayerCount;
enabledExtensionCount = src.enabledExtensionCount;
pEnabledFeatures = nullptr;
pNext = SafePnextCopy(src.pNext);
char **tmp_ppEnabledLayerNames = new char *[src.enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src.ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src.enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src.ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (queueCreateInfoCount && src.pQueueCreateInfos) {
pQueueCreateInfos = new safe_VkDeviceQueueCreateInfo[queueCreateInfoCount];
for (uint32_t i = 0; i < queueCreateInfoCount; ++i) {
pQueueCreateInfos[i].initialize(&src.pQueueCreateInfos[i]);
}
}
if (src.pEnabledFeatures) {
pEnabledFeatures = new VkPhysicalDeviceFeatures(*src.pEnabledFeatures);
}
}
safe_VkDeviceCreateInfo& safe_VkDeviceCreateInfo::operator=(const safe_VkDeviceCreateInfo& src)
{
if (&src == this) return *this;
if (pQueueCreateInfos)
delete[] pQueueCreateInfos;
if (ppEnabledLayerNames) {
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
delete [] ppEnabledLayerNames[i];
}
delete [] ppEnabledLayerNames;
}
if (ppEnabledExtensionNames) {
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
delete [] ppEnabledExtensionNames[i];
}
delete [] ppEnabledExtensionNames;
}
if (pEnabledFeatures)
delete pEnabledFeatures;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
queueCreateInfoCount = src.queueCreateInfoCount;
pQueueCreateInfos = nullptr;
enabledLayerCount = src.enabledLayerCount;
enabledExtensionCount = src.enabledExtensionCount;
pEnabledFeatures = nullptr;
pNext = SafePnextCopy(src.pNext);
char **tmp_ppEnabledLayerNames = new char *[src.enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src.ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src.enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src.ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (queueCreateInfoCount && src.pQueueCreateInfos) {
pQueueCreateInfos = new safe_VkDeviceQueueCreateInfo[queueCreateInfoCount];
for (uint32_t i = 0; i < queueCreateInfoCount; ++i) {
pQueueCreateInfos[i].initialize(&src.pQueueCreateInfos[i]);
}
}
if (src.pEnabledFeatures) {
pEnabledFeatures = new VkPhysicalDeviceFeatures(*src.pEnabledFeatures);
}
return *this;
}
safe_VkDeviceCreateInfo::~safe_VkDeviceCreateInfo()
{
if (pQueueCreateInfos)
delete[] pQueueCreateInfos;
if (ppEnabledLayerNames) {
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
delete [] ppEnabledLayerNames[i];
}
delete [] ppEnabledLayerNames;
}
if (ppEnabledExtensionNames) {
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
delete [] ppEnabledExtensionNames[i];
}
delete [] ppEnabledExtensionNames;
}
if (pEnabledFeatures)
delete pEnabledFeatures;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkDeviceCreateInfo::initialize(const VkDeviceCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
queueCreateInfoCount = in_struct->queueCreateInfoCount;
pQueueCreateInfos = nullptr;
enabledLayerCount = in_struct->enabledLayerCount;
enabledExtensionCount = in_struct->enabledExtensionCount;
pEnabledFeatures = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
char **tmp_ppEnabledLayerNames = new char *[in_struct->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(in_struct->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[in_struct->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(in_struct->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (queueCreateInfoCount && in_struct->pQueueCreateInfos) {
pQueueCreateInfos = new safe_VkDeviceQueueCreateInfo[queueCreateInfoCount];
for (uint32_t i = 0; i < queueCreateInfoCount; ++i) {
pQueueCreateInfos[i].initialize(&in_struct->pQueueCreateInfos[i]);
}
}
if (in_struct->pEnabledFeatures) {
pEnabledFeatures = new VkPhysicalDeviceFeatures(*in_struct->pEnabledFeatures);
}
}
void safe_VkDeviceCreateInfo::initialize(const safe_VkDeviceCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
queueCreateInfoCount = src->queueCreateInfoCount;
pQueueCreateInfos = nullptr;
enabledLayerCount = src->enabledLayerCount;
enabledExtensionCount = src->enabledExtensionCount;
pEnabledFeatures = nullptr;
pNext = SafePnextCopy(src->pNext);
char **tmp_ppEnabledLayerNames = new char *[src->enabledLayerCount];
for (uint32_t i = 0; i < enabledLayerCount; ++i) {
tmp_ppEnabledLayerNames[i] = SafeStringCopy(src->ppEnabledLayerNames[i]);
}
ppEnabledLayerNames = tmp_ppEnabledLayerNames;
char **tmp_ppEnabledExtensionNames = new char *[src->enabledExtensionCount];
for (uint32_t i = 0; i < enabledExtensionCount; ++i) {
tmp_ppEnabledExtensionNames[i] = SafeStringCopy(src->ppEnabledExtensionNames[i]);
}
ppEnabledExtensionNames = tmp_ppEnabledExtensionNames;
if (queueCreateInfoCount && src->pQueueCreateInfos) {
pQueueCreateInfos = new safe_VkDeviceQueueCreateInfo[queueCreateInfoCount];
for (uint32_t i = 0; i < queueCreateInfoCount; ++i) {
pQueueCreateInfos[i].initialize(&src->pQueueCreateInfos[i]);
}
}
if (src->pEnabledFeatures) {
pEnabledFeatures = new VkPhysicalDeviceFeatures(*src->pEnabledFeatures);
}
}
safe_VkSubmitInfo::safe_VkSubmitInfo(const VkSubmitInfo* in_struct) :
sType(in_struct->sType),
waitSemaphoreCount(in_struct->waitSemaphoreCount),
pWaitSemaphores(nullptr),
pWaitDstStageMask(nullptr),
commandBufferCount(in_struct->commandBufferCount),
pCommandBuffers(nullptr),
signalSemaphoreCount(in_struct->signalSemaphoreCount),
pSignalSemaphores(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (waitSemaphoreCount && in_struct->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = in_struct->pWaitSemaphores[i];
}
}
if (in_struct->pWaitDstStageMask) {
pWaitDstStageMask = new VkPipelineStageFlags[in_struct->waitSemaphoreCount];
memcpy ((void *)pWaitDstStageMask, (void *)in_struct->pWaitDstStageMask, sizeof(VkPipelineStageFlags)*in_struct->waitSemaphoreCount);
}
if (in_struct->pCommandBuffers) {
pCommandBuffers = new VkCommandBuffer[in_struct->commandBufferCount];
memcpy ((void *)pCommandBuffers, (void *)in_struct->pCommandBuffers, sizeof(VkCommandBuffer)*in_struct->commandBufferCount);
}
if (signalSemaphoreCount && in_struct->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = in_struct->pSignalSemaphores[i];
}
}
}
safe_VkSubmitInfo::safe_VkSubmitInfo() :
pNext(nullptr),
pWaitSemaphores(nullptr),
pWaitDstStageMask(nullptr),
pCommandBuffers(nullptr),
pSignalSemaphores(nullptr)
{}
safe_VkSubmitInfo::safe_VkSubmitInfo(const safe_VkSubmitInfo& src)
{
sType = src.sType;
waitSemaphoreCount = src.waitSemaphoreCount;
pWaitSemaphores = nullptr;
pWaitDstStageMask = nullptr;
commandBufferCount = src.commandBufferCount;
pCommandBuffers = nullptr;
signalSemaphoreCount = src.signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src.pNext);
if (waitSemaphoreCount && src.pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src.pWaitSemaphores[i];
}
}
if (src.pWaitDstStageMask) {
pWaitDstStageMask = new VkPipelineStageFlags[src.waitSemaphoreCount];
memcpy ((void *)pWaitDstStageMask, (void *)src.pWaitDstStageMask, sizeof(VkPipelineStageFlags)*src.waitSemaphoreCount);
}
if (src.pCommandBuffers) {
pCommandBuffers = new VkCommandBuffer[src.commandBufferCount];
memcpy ((void *)pCommandBuffers, (void *)src.pCommandBuffers, sizeof(VkCommandBuffer)*src.commandBufferCount);
}
if (signalSemaphoreCount && src.pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src.pSignalSemaphores[i];
}
}
}
safe_VkSubmitInfo& safe_VkSubmitInfo::operator=(const safe_VkSubmitInfo& src)
{
if (&src == this) return *this;
if (pWaitSemaphores)
delete[] pWaitSemaphores;
if (pWaitDstStageMask)
delete[] pWaitDstStageMask;
if (pCommandBuffers)
delete[] pCommandBuffers;
if (pSignalSemaphores)
delete[] pSignalSemaphores;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
waitSemaphoreCount = src.waitSemaphoreCount;
pWaitSemaphores = nullptr;
pWaitDstStageMask = nullptr;
commandBufferCount = src.commandBufferCount;
pCommandBuffers = nullptr;
signalSemaphoreCount = src.signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src.pNext);
if (waitSemaphoreCount && src.pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src.pWaitSemaphores[i];
}
}
if (src.pWaitDstStageMask) {
pWaitDstStageMask = new VkPipelineStageFlags[src.waitSemaphoreCount];
memcpy ((void *)pWaitDstStageMask, (void *)src.pWaitDstStageMask, sizeof(VkPipelineStageFlags)*src.waitSemaphoreCount);
}
if (src.pCommandBuffers) {
pCommandBuffers = new VkCommandBuffer[src.commandBufferCount];
memcpy ((void *)pCommandBuffers, (void *)src.pCommandBuffers, sizeof(VkCommandBuffer)*src.commandBufferCount);
}
if (signalSemaphoreCount && src.pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src.pSignalSemaphores[i];
}
}
return *this;
}
safe_VkSubmitInfo::~safe_VkSubmitInfo()
{
if (pWaitSemaphores)
delete[] pWaitSemaphores;
if (pWaitDstStageMask)
delete[] pWaitDstStageMask;
if (pCommandBuffers)
delete[] pCommandBuffers;
if (pSignalSemaphores)
delete[] pSignalSemaphores;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkSubmitInfo::initialize(const VkSubmitInfo* in_struct)
{
sType = in_struct->sType;
waitSemaphoreCount = in_struct->waitSemaphoreCount;
pWaitSemaphores = nullptr;
pWaitDstStageMask = nullptr;
commandBufferCount = in_struct->commandBufferCount;
pCommandBuffers = nullptr;
signalSemaphoreCount = in_struct->signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (waitSemaphoreCount && in_struct->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = in_struct->pWaitSemaphores[i];
}
}
if (in_struct->pWaitDstStageMask) {
pWaitDstStageMask = new VkPipelineStageFlags[in_struct->waitSemaphoreCount];
memcpy ((void *)pWaitDstStageMask, (void *)in_struct->pWaitDstStageMask, sizeof(VkPipelineStageFlags)*in_struct->waitSemaphoreCount);
}
if (in_struct->pCommandBuffers) {
pCommandBuffers = new VkCommandBuffer[in_struct->commandBufferCount];
memcpy ((void *)pCommandBuffers, (void *)in_struct->pCommandBuffers, sizeof(VkCommandBuffer)*in_struct->commandBufferCount);
}
if (signalSemaphoreCount && in_struct->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = in_struct->pSignalSemaphores[i];
}
}
}
void safe_VkSubmitInfo::initialize(const safe_VkSubmitInfo* src)
{
sType = src->sType;
waitSemaphoreCount = src->waitSemaphoreCount;
pWaitSemaphores = nullptr;
pWaitDstStageMask = nullptr;
commandBufferCount = src->commandBufferCount;
pCommandBuffers = nullptr;
signalSemaphoreCount = src->signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src->pNext);
if (waitSemaphoreCount && src->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src->pWaitSemaphores[i];
}
}
if (src->pWaitDstStageMask) {
pWaitDstStageMask = new VkPipelineStageFlags[src->waitSemaphoreCount];
memcpy ((void *)pWaitDstStageMask, (void *)src->pWaitDstStageMask, sizeof(VkPipelineStageFlags)*src->waitSemaphoreCount);
}
if (src->pCommandBuffers) {
pCommandBuffers = new VkCommandBuffer[src->commandBufferCount];
memcpy ((void *)pCommandBuffers, (void *)src->pCommandBuffers, sizeof(VkCommandBuffer)*src->commandBufferCount);
}
if (signalSemaphoreCount && src->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src->pSignalSemaphores[i];
}
}
}
safe_VkMemoryAllocateInfo::safe_VkMemoryAllocateInfo(const VkMemoryAllocateInfo* in_struct) :
sType(in_struct->sType),
allocationSize(in_struct->allocationSize),
memoryTypeIndex(in_struct->memoryTypeIndex)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkMemoryAllocateInfo::safe_VkMemoryAllocateInfo() :
pNext(nullptr)
{}
safe_VkMemoryAllocateInfo::safe_VkMemoryAllocateInfo(const safe_VkMemoryAllocateInfo& src)
{
sType = src.sType;
allocationSize = src.allocationSize;
memoryTypeIndex = src.memoryTypeIndex;
pNext = SafePnextCopy(src.pNext);
}
safe_VkMemoryAllocateInfo& safe_VkMemoryAllocateInfo::operator=(const safe_VkMemoryAllocateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
allocationSize = src.allocationSize;
memoryTypeIndex = src.memoryTypeIndex;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkMemoryAllocateInfo::~safe_VkMemoryAllocateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkMemoryAllocateInfo::initialize(const VkMemoryAllocateInfo* in_struct)
{
sType = in_struct->sType;
allocationSize = in_struct->allocationSize;
memoryTypeIndex = in_struct->memoryTypeIndex;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkMemoryAllocateInfo::initialize(const safe_VkMemoryAllocateInfo* src)
{
sType = src->sType;
allocationSize = src->allocationSize;
memoryTypeIndex = src->memoryTypeIndex;
pNext = SafePnextCopy(src->pNext);
}
safe_VkMappedMemoryRange::safe_VkMappedMemoryRange(const VkMappedMemoryRange* in_struct) :
sType(in_struct->sType),
memory(in_struct->memory),
offset(in_struct->offset),
size(in_struct->size)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkMappedMemoryRange::safe_VkMappedMemoryRange() :
pNext(nullptr)
{}
safe_VkMappedMemoryRange::safe_VkMappedMemoryRange(const safe_VkMappedMemoryRange& src)
{
sType = src.sType;
memory = src.memory;
offset = src.offset;
size = src.size;
pNext = SafePnextCopy(src.pNext);
}
safe_VkMappedMemoryRange& safe_VkMappedMemoryRange::operator=(const safe_VkMappedMemoryRange& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
memory = src.memory;
offset = src.offset;
size = src.size;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkMappedMemoryRange::~safe_VkMappedMemoryRange()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkMappedMemoryRange::initialize(const VkMappedMemoryRange* in_struct)
{
sType = in_struct->sType;
memory = in_struct->memory;
offset = in_struct->offset;
size = in_struct->size;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkMappedMemoryRange::initialize(const safe_VkMappedMemoryRange* src)
{
sType = src->sType;
memory = src->memory;
offset = src->offset;
size = src->size;
pNext = SafePnextCopy(src->pNext);
}
safe_VkSparseBufferMemoryBindInfo::safe_VkSparseBufferMemoryBindInfo(const VkSparseBufferMemoryBindInfo* in_struct) :
buffer(in_struct->buffer),
bindCount(in_struct->bindCount),
pBinds(nullptr)
{
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
safe_VkSparseBufferMemoryBindInfo::safe_VkSparseBufferMemoryBindInfo() :
pBinds(nullptr)
{}
safe_VkSparseBufferMemoryBindInfo::safe_VkSparseBufferMemoryBindInfo(const safe_VkSparseBufferMemoryBindInfo& src)
{
buffer = src.buffer;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
}
safe_VkSparseBufferMemoryBindInfo& safe_VkSparseBufferMemoryBindInfo::operator=(const safe_VkSparseBufferMemoryBindInfo& src)
{
if (&src == this) return *this;
if (pBinds)
delete[] pBinds;
buffer = src.buffer;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
return *this;
}
safe_VkSparseBufferMemoryBindInfo::~safe_VkSparseBufferMemoryBindInfo()
{
if (pBinds)
delete[] pBinds;
}
void safe_VkSparseBufferMemoryBindInfo::initialize(const VkSparseBufferMemoryBindInfo* in_struct)
{
buffer = in_struct->buffer;
bindCount = in_struct->bindCount;
pBinds = nullptr;
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
void safe_VkSparseBufferMemoryBindInfo::initialize(const safe_VkSparseBufferMemoryBindInfo* src)
{
buffer = src->buffer;
bindCount = src->bindCount;
pBinds = nullptr;
if (bindCount && src->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src->pBinds[i];
}
}
}
safe_VkSparseImageOpaqueMemoryBindInfo::safe_VkSparseImageOpaqueMemoryBindInfo(const VkSparseImageOpaqueMemoryBindInfo* in_struct) :
image(in_struct->image),
bindCount(in_struct->bindCount),
pBinds(nullptr)
{
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
safe_VkSparseImageOpaqueMemoryBindInfo::safe_VkSparseImageOpaqueMemoryBindInfo() :
pBinds(nullptr)
{}
safe_VkSparseImageOpaqueMemoryBindInfo::safe_VkSparseImageOpaqueMemoryBindInfo(const safe_VkSparseImageOpaqueMemoryBindInfo& src)
{
image = src.image;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
}
safe_VkSparseImageOpaqueMemoryBindInfo& safe_VkSparseImageOpaqueMemoryBindInfo::operator=(const safe_VkSparseImageOpaqueMemoryBindInfo& src)
{
if (&src == this) return *this;
if (pBinds)
delete[] pBinds;
image = src.image;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
return *this;
}
safe_VkSparseImageOpaqueMemoryBindInfo::~safe_VkSparseImageOpaqueMemoryBindInfo()
{
if (pBinds)
delete[] pBinds;
}
void safe_VkSparseImageOpaqueMemoryBindInfo::initialize(const VkSparseImageOpaqueMemoryBindInfo* in_struct)
{
image = in_struct->image;
bindCount = in_struct->bindCount;
pBinds = nullptr;
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
void safe_VkSparseImageOpaqueMemoryBindInfo::initialize(const safe_VkSparseImageOpaqueMemoryBindInfo* src)
{
image = src->image;
bindCount = src->bindCount;
pBinds = nullptr;
if (bindCount && src->pBinds) {
pBinds = new VkSparseMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src->pBinds[i];
}
}
}
safe_VkSparseImageMemoryBindInfo::safe_VkSparseImageMemoryBindInfo(const VkSparseImageMemoryBindInfo* in_struct) :
image(in_struct->image),
bindCount(in_struct->bindCount),
pBinds(nullptr)
{
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseImageMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
safe_VkSparseImageMemoryBindInfo::safe_VkSparseImageMemoryBindInfo() :
pBinds(nullptr)
{}
safe_VkSparseImageMemoryBindInfo::safe_VkSparseImageMemoryBindInfo(const safe_VkSparseImageMemoryBindInfo& src)
{
image = src.image;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseImageMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
}
safe_VkSparseImageMemoryBindInfo& safe_VkSparseImageMemoryBindInfo::operator=(const safe_VkSparseImageMemoryBindInfo& src)
{
if (&src == this) return *this;
if (pBinds)
delete[] pBinds;
image = src.image;
bindCount = src.bindCount;
pBinds = nullptr;
if (bindCount && src.pBinds) {
pBinds = new VkSparseImageMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src.pBinds[i];
}
}
return *this;
}
safe_VkSparseImageMemoryBindInfo::~safe_VkSparseImageMemoryBindInfo()
{
if (pBinds)
delete[] pBinds;
}
void safe_VkSparseImageMemoryBindInfo::initialize(const VkSparseImageMemoryBindInfo* in_struct)
{
image = in_struct->image;
bindCount = in_struct->bindCount;
pBinds = nullptr;
if (bindCount && in_struct->pBinds) {
pBinds = new VkSparseImageMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = in_struct->pBinds[i];
}
}
}
void safe_VkSparseImageMemoryBindInfo::initialize(const safe_VkSparseImageMemoryBindInfo* src)
{
image = src->image;
bindCount = src->bindCount;
pBinds = nullptr;
if (bindCount && src->pBinds) {
pBinds = new VkSparseImageMemoryBind[bindCount];
for (uint32_t i = 0; i < bindCount; ++i) {
pBinds[i] = src->pBinds[i];
}
}
}
safe_VkBindSparseInfo::safe_VkBindSparseInfo(const VkBindSparseInfo* in_struct) :
sType(in_struct->sType),
waitSemaphoreCount(in_struct->waitSemaphoreCount),
pWaitSemaphores(nullptr),
bufferBindCount(in_struct->bufferBindCount),
pBufferBinds(nullptr),
imageOpaqueBindCount(in_struct->imageOpaqueBindCount),
pImageOpaqueBinds(nullptr),
imageBindCount(in_struct->imageBindCount),
pImageBinds(nullptr),
signalSemaphoreCount(in_struct->signalSemaphoreCount),
pSignalSemaphores(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (waitSemaphoreCount && in_struct->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = in_struct->pWaitSemaphores[i];
}
}
if (bufferBindCount && in_struct->pBufferBinds) {
pBufferBinds = new safe_VkSparseBufferMemoryBindInfo[bufferBindCount];
for (uint32_t i = 0; i < bufferBindCount; ++i) {
pBufferBinds[i].initialize(&in_struct->pBufferBinds[i]);
}
}
if (imageOpaqueBindCount && in_struct->pImageOpaqueBinds) {
pImageOpaqueBinds = new safe_VkSparseImageOpaqueMemoryBindInfo[imageOpaqueBindCount];
for (uint32_t i = 0; i < imageOpaqueBindCount; ++i) {
pImageOpaqueBinds[i].initialize(&in_struct->pImageOpaqueBinds[i]);
}
}
if (imageBindCount && in_struct->pImageBinds) {
pImageBinds = new safe_VkSparseImageMemoryBindInfo[imageBindCount];
for (uint32_t i = 0; i < imageBindCount; ++i) {
pImageBinds[i].initialize(&in_struct->pImageBinds[i]);
}
}
if (signalSemaphoreCount && in_struct->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = in_struct->pSignalSemaphores[i];
}
}
}
safe_VkBindSparseInfo::safe_VkBindSparseInfo() :
pNext(nullptr),
pWaitSemaphores(nullptr),
pBufferBinds(nullptr),
pImageOpaqueBinds(nullptr),
pImageBinds(nullptr),
pSignalSemaphores(nullptr)
{}
safe_VkBindSparseInfo::safe_VkBindSparseInfo(const safe_VkBindSparseInfo& src)
{
sType = src.sType;
waitSemaphoreCount = src.waitSemaphoreCount;
pWaitSemaphores = nullptr;
bufferBindCount = src.bufferBindCount;
pBufferBinds = nullptr;
imageOpaqueBindCount = src.imageOpaqueBindCount;
pImageOpaqueBinds = nullptr;
imageBindCount = src.imageBindCount;
pImageBinds = nullptr;
signalSemaphoreCount = src.signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src.pNext);
if (waitSemaphoreCount && src.pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src.pWaitSemaphores[i];
}
}
if (bufferBindCount && src.pBufferBinds) {
pBufferBinds = new safe_VkSparseBufferMemoryBindInfo[bufferBindCount];
for (uint32_t i = 0; i < bufferBindCount; ++i) {
pBufferBinds[i].initialize(&src.pBufferBinds[i]);
}
}
if (imageOpaqueBindCount && src.pImageOpaqueBinds) {
pImageOpaqueBinds = new safe_VkSparseImageOpaqueMemoryBindInfo[imageOpaqueBindCount];
for (uint32_t i = 0; i < imageOpaqueBindCount; ++i) {
pImageOpaqueBinds[i].initialize(&src.pImageOpaqueBinds[i]);
}
}
if (imageBindCount && src.pImageBinds) {
pImageBinds = new safe_VkSparseImageMemoryBindInfo[imageBindCount];
for (uint32_t i = 0; i < imageBindCount; ++i) {
pImageBinds[i].initialize(&src.pImageBinds[i]);
}
}
if (signalSemaphoreCount && src.pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src.pSignalSemaphores[i];
}
}
}
safe_VkBindSparseInfo& safe_VkBindSparseInfo::operator=(const safe_VkBindSparseInfo& src)
{
if (&src == this) return *this;
if (pWaitSemaphores)
delete[] pWaitSemaphores;
if (pBufferBinds)
delete[] pBufferBinds;
if (pImageOpaqueBinds)
delete[] pImageOpaqueBinds;
if (pImageBinds)
delete[] pImageBinds;
if (pSignalSemaphores)
delete[] pSignalSemaphores;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
waitSemaphoreCount = src.waitSemaphoreCount;
pWaitSemaphores = nullptr;
bufferBindCount = src.bufferBindCount;
pBufferBinds = nullptr;
imageOpaqueBindCount = src.imageOpaqueBindCount;
pImageOpaqueBinds = nullptr;
imageBindCount = src.imageBindCount;
pImageBinds = nullptr;
signalSemaphoreCount = src.signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src.pNext);
if (waitSemaphoreCount && src.pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src.pWaitSemaphores[i];
}
}
if (bufferBindCount && src.pBufferBinds) {
pBufferBinds = new safe_VkSparseBufferMemoryBindInfo[bufferBindCount];
for (uint32_t i = 0; i < bufferBindCount; ++i) {
pBufferBinds[i].initialize(&src.pBufferBinds[i]);
}
}
if (imageOpaqueBindCount && src.pImageOpaqueBinds) {
pImageOpaqueBinds = new safe_VkSparseImageOpaqueMemoryBindInfo[imageOpaqueBindCount];
for (uint32_t i = 0; i < imageOpaqueBindCount; ++i) {
pImageOpaqueBinds[i].initialize(&src.pImageOpaqueBinds[i]);
}
}
if (imageBindCount && src.pImageBinds) {
pImageBinds = new safe_VkSparseImageMemoryBindInfo[imageBindCount];
for (uint32_t i = 0; i < imageBindCount; ++i) {
pImageBinds[i].initialize(&src.pImageBinds[i]);
}
}
if (signalSemaphoreCount && src.pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src.pSignalSemaphores[i];
}
}
return *this;
}
safe_VkBindSparseInfo::~safe_VkBindSparseInfo()
{
if (pWaitSemaphores)
delete[] pWaitSemaphores;
if (pBufferBinds)
delete[] pBufferBinds;
if (pImageOpaqueBinds)
delete[] pImageOpaqueBinds;
if (pImageBinds)
delete[] pImageBinds;
if (pSignalSemaphores)
delete[] pSignalSemaphores;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkBindSparseInfo::initialize(const VkBindSparseInfo* in_struct)
{
sType = in_struct->sType;
waitSemaphoreCount = in_struct->waitSemaphoreCount;
pWaitSemaphores = nullptr;
bufferBindCount = in_struct->bufferBindCount;
pBufferBinds = nullptr;
imageOpaqueBindCount = in_struct->imageOpaqueBindCount;
pImageOpaqueBinds = nullptr;
imageBindCount = in_struct->imageBindCount;
pImageBinds = nullptr;
signalSemaphoreCount = in_struct->signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (waitSemaphoreCount && in_struct->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = in_struct->pWaitSemaphores[i];
}
}
if (bufferBindCount && in_struct->pBufferBinds) {
pBufferBinds = new safe_VkSparseBufferMemoryBindInfo[bufferBindCount];
for (uint32_t i = 0; i < bufferBindCount; ++i) {
pBufferBinds[i].initialize(&in_struct->pBufferBinds[i]);
}
}
if (imageOpaqueBindCount && in_struct->pImageOpaqueBinds) {
pImageOpaqueBinds = new safe_VkSparseImageOpaqueMemoryBindInfo[imageOpaqueBindCount];
for (uint32_t i = 0; i < imageOpaqueBindCount; ++i) {
pImageOpaqueBinds[i].initialize(&in_struct->pImageOpaqueBinds[i]);
}
}
if (imageBindCount && in_struct->pImageBinds) {
pImageBinds = new safe_VkSparseImageMemoryBindInfo[imageBindCount];
for (uint32_t i = 0; i < imageBindCount; ++i) {
pImageBinds[i].initialize(&in_struct->pImageBinds[i]);
}
}
if (signalSemaphoreCount && in_struct->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = in_struct->pSignalSemaphores[i];
}
}
}
void safe_VkBindSparseInfo::initialize(const safe_VkBindSparseInfo* src)
{
sType = src->sType;
waitSemaphoreCount = src->waitSemaphoreCount;
pWaitSemaphores = nullptr;
bufferBindCount = src->bufferBindCount;
pBufferBinds = nullptr;
imageOpaqueBindCount = src->imageOpaqueBindCount;
pImageOpaqueBinds = nullptr;
imageBindCount = src->imageBindCount;
pImageBinds = nullptr;
signalSemaphoreCount = src->signalSemaphoreCount;
pSignalSemaphores = nullptr;
pNext = SafePnextCopy(src->pNext);
if (waitSemaphoreCount && src->pWaitSemaphores) {
pWaitSemaphores = new VkSemaphore[waitSemaphoreCount];
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
pWaitSemaphores[i] = src->pWaitSemaphores[i];
}
}
if (bufferBindCount && src->pBufferBinds) {
pBufferBinds = new safe_VkSparseBufferMemoryBindInfo[bufferBindCount];
for (uint32_t i = 0; i < bufferBindCount; ++i) {
pBufferBinds[i].initialize(&src->pBufferBinds[i]);
}
}
if (imageOpaqueBindCount && src->pImageOpaqueBinds) {
pImageOpaqueBinds = new safe_VkSparseImageOpaqueMemoryBindInfo[imageOpaqueBindCount];
for (uint32_t i = 0; i < imageOpaqueBindCount; ++i) {
pImageOpaqueBinds[i].initialize(&src->pImageOpaqueBinds[i]);
}
}
if (imageBindCount && src->pImageBinds) {
pImageBinds = new safe_VkSparseImageMemoryBindInfo[imageBindCount];
for (uint32_t i = 0; i < imageBindCount; ++i) {
pImageBinds[i].initialize(&src->pImageBinds[i]);
}
}
if (signalSemaphoreCount && src->pSignalSemaphores) {
pSignalSemaphores = new VkSemaphore[signalSemaphoreCount];
for (uint32_t i = 0; i < signalSemaphoreCount; ++i) {
pSignalSemaphores[i] = src->pSignalSemaphores[i];
}
}
}
safe_VkFenceCreateInfo::safe_VkFenceCreateInfo(const VkFenceCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkFenceCreateInfo::safe_VkFenceCreateInfo() :
pNext(nullptr)
{}
safe_VkFenceCreateInfo::safe_VkFenceCreateInfo(const safe_VkFenceCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
}
safe_VkFenceCreateInfo& safe_VkFenceCreateInfo::operator=(const safe_VkFenceCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkFenceCreateInfo::~safe_VkFenceCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkFenceCreateInfo::initialize(const VkFenceCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkFenceCreateInfo::initialize(const safe_VkFenceCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
pNext = SafePnextCopy(src->pNext);
}
safe_VkSemaphoreCreateInfo::safe_VkSemaphoreCreateInfo(const VkSemaphoreCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkSemaphoreCreateInfo::safe_VkSemaphoreCreateInfo() :
pNext(nullptr)
{}
safe_VkSemaphoreCreateInfo::safe_VkSemaphoreCreateInfo(const safe_VkSemaphoreCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
}
safe_VkSemaphoreCreateInfo& safe_VkSemaphoreCreateInfo::operator=(const safe_VkSemaphoreCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkSemaphoreCreateInfo::~safe_VkSemaphoreCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkSemaphoreCreateInfo::initialize(const VkSemaphoreCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkSemaphoreCreateInfo::initialize(const safe_VkSemaphoreCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
pNext = SafePnextCopy(src->pNext);
}
safe_VkEventCreateInfo::safe_VkEventCreateInfo(const VkEventCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkEventCreateInfo::safe_VkEventCreateInfo() :
pNext(nullptr)
{}
safe_VkEventCreateInfo::safe_VkEventCreateInfo(const safe_VkEventCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
}
safe_VkEventCreateInfo& safe_VkEventCreateInfo::operator=(const safe_VkEventCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkEventCreateInfo::~safe_VkEventCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkEventCreateInfo::initialize(const VkEventCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkEventCreateInfo::initialize(const safe_VkEventCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
pNext = SafePnextCopy(src->pNext);
}
safe_VkQueryPoolCreateInfo::safe_VkQueryPoolCreateInfo(const VkQueryPoolCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
queryType(in_struct->queryType),
queryCount(in_struct->queryCount),
pipelineStatistics(in_struct->pipelineStatistics)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkQueryPoolCreateInfo::safe_VkQueryPoolCreateInfo() :
pNext(nullptr)
{}
safe_VkQueryPoolCreateInfo::safe_VkQueryPoolCreateInfo(const safe_VkQueryPoolCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
queryType = src.queryType;
queryCount = src.queryCount;
pipelineStatistics = src.pipelineStatistics;
pNext = SafePnextCopy(src.pNext);
}
safe_VkQueryPoolCreateInfo& safe_VkQueryPoolCreateInfo::operator=(const safe_VkQueryPoolCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
queryType = src.queryType;
queryCount = src.queryCount;
pipelineStatistics = src.pipelineStatistics;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkQueryPoolCreateInfo::~safe_VkQueryPoolCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkQueryPoolCreateInfo::initialize(const VkQueryPoolCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
queryType = in_struct->queryType;
queryCount = in_struct->queryCount;
pipelineStatistics = in_struct->pipelineStatistics;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkQueryPoolCreateInfo::initialize(const safe_VkQueryPoolCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
queryType = src->queryType;
queryCount = src->queryCount;
pipelineStatistics = src->pipelineStatistics;
pNext = SafePnextCopy(src->pNext);
}
safe_VkBufferCreateInfo::safe_VkBufferCreateInfo(const VkBufferCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
size(in_struct->size),
usage(in_struct->usage),
sharingMode(in_struct->sharingMode),
queueFamilyIndexCount(in_struct->queueFamilyIndexCount),
pQueueFamilyIndices(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[in_struct->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)in_struct->pQueueFamilyIndices, sizeof(uint32_t)*in_struct->queueFamilyIndexCount);
}
}
safe_VkBufferCreateInfo::safe_VkBufferCreateInfo() :
pNext(nullptr),
pQueueFamilyIndices(nullptr)
{}
safe_VkBufferCreateInfo::safe_VkBufferCreateInfo(const safe_VkBufferCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
size = src.size;
usage = src.usage;
sharingMode = src.sharingMode;
queueFamilyIndexCount = src.queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src.queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src.pQueueFamilyIndices, sizeof(uint32_t)*src.queueFamilyIndexCount);
}
}
safe_VkBufferCreateInfo& safe_VkBufferCreateInfo::operator=(const safe_VkBufferCreateInfo& src)
{
if (&src == this) return *this;
if (pQueueFamilyIndices)
delete[] pQueueFamilyIndices;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
size = src.size;
usage = src.usage;
sharingMode = src.sharingMode;
queueFamilyIndexCount = src.queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src.queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src.pQueueFamilyIndices, sizeof(uint32_t)*src.queueFamilyIndexCount);
}
return *this;
}
safe_VkBufferCreateInfo::~safe_VkBufferCreateInfo()
{
if (pQueueFamilyIndices)
delete[] pQueueFamilyIndices;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkBufferCreateInfo::initialize(const VkBufferCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
size = in_struct->size;
usage = in_struct->usage;
sharingMode = in_struct->sharingMode;
queueFamilyIndexCount = in_struct->queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[in_struct->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)in_struct->pQueueFamilyIndices, sizeof(uint32_t)*in_struct->queueFamilyIndexCount);
}
}
void safe_VkBufferCreateInfo::initialize(const safe_VkBufferCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
size = src->size;
usage = src->usage;
sharingMode = src->sharingMode;
queueFamilyIndexCount = src->queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
pNext = SafePnextCopy(src->pNext);
if (src->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src->pQueueFamilyIndices, sizeof(uint32_t)*src->queueFamilyIndexCount);
}
}
safe_VkBufferViewCreateInfo::safe_VkBufferViewCreateInfo(const VkBufferViewCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
buffer(in_struct->buffer),
format(in_struct->format),
offset(in_struct->offset),
range(in_struct->range)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkBufferViewCreateInfo::safe_VkBufferViewCreateInfo() :
pNext(nullptr)
{}
safe_VkBufferViewCreateInfo::safe_VkBufferViewCreateInfo(const safe_VkBufferViewCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
buffer = src.buffer;
format = src.format;
offset = src.offset;
range = src.range;
pNext = SafePnextCopy(src.pNext);
}
safe_VkBufferViewCreateInfo& safe_VkBufferViewCreateInfo::operator=(const safe_VkBufferViewCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
buffer = src.buffer;
format = src.format;
offset = src.offset;
range = src.range;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkBufferViewCreateInfo::~safe_VkBufferViewCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkBufferViewCreateInfo::initialize(const VkBufferViewCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
buffer = in_struct->buffer;
format = in_struct->format;
offset = in_struct->offset;
range = in_struct->range;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkBufferViewCreateInfo::initialize(const safe_VkBufferViewCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
buffer = src->buffer;
format = src->format;
offset = src->offset;
range = src->range;
pNext = SafePnextCopy(src->pNext);
}
safe_VkImageCreateInfo::safe_VkImageCreateInfo(const VkImageCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
imageType(in_struct->imageType),
format(in_struct->format),
extent(in_struct->extent),
mipLevels(in_struct->mipLevels),
arrayLayers(in_struct->arrayLayers),
samples(in_struct->samples),
tiling(in_struct->tiling),
usage(in_struct->usage),
sharingMode(in_struct->sharingMode),
queueFamilyIndexCount(in_struct->queueFamilyIndexCount),
pQueueFamilyIndices(nullptr),
initialLayout(in_struct->initialLayout)
{
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[in_struct->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)in_struct->pQueueFamilyIndices, sizeof(uint32_t)*in_struct->queueFamilyIndexCount);
}
}
safe_VkImageCreateInfo::safe_VkImageCreateInfo() :
pNext(nullptr),
pQueueFamilyIndices(nullptr)
{}
safe_VkImageCreateInfo::safe_VkImageCreateInfo(const safe_VkImageCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
imageType = src.imageType;
format = src.format;
extent = src.extent;
mipLevels = src.mipLevels;
arrayLayers = src.arrayLayers;
samples = src.samples;
tiling = src.tiling;
usage = src.usage;
sharingMode = src.sharingMode;
queueFamilyIndexCount = src.queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
initialLayout = src.initialLayout;
pNext = SafePnextCopy(src.pNext);
if (src.pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src.queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src.pQueueFamilyIndices, sizeof(uint32_t)*src.queueFamilyIndexCount);
}
}
safe_VkImageCreateInfo& safe_VkImageCreateInfo::operator=(const safe_VkImageCreateInfo& src)
{
if (&src == this) return *this;
if (pQueueFamilyIndices)
delete[] pQueueFamilyIndices;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
imageType = src.imageType;
format = src.format;
extent = src.extent;
mipLevels = src.mipLevels;
arrayLayers = src.arrayLayers;
samples = src.samples;
tiling = src.tiling;
usage = src.usage;
sharingMode = src.sharingMode;
queueFamilyIndexCount = src.queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
initialLayout = src.initialLayout;
pNext = SafePnextCopy(src.pNext);
if (src.pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src.queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src.pQueueFamilyIndices, sizeof(uint32_t)*src.queueFamilyIndexCount);
}
return *this;
}
safe_VkImageCreateInfo::~safe_VkImageCreateInfo()
{
if (pQueueFamilyIndices)
delete[] pQueueFamilyIndices;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkImageCreateInfo::initialize(const VkImageCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
imageType = in_struct->imageType;
format = in_struct->format;
extent = in_struct->extent;
mipLevels = in_struct->mipLevels;
arrayLayers = in_struct->arrayLayers;
samples = in_struct->samples;
tiling = in_struct->tiling;
usage = in_struct->usage;
sharingMode = in_struct->sharingMode;
queueFamilyIndexCount = in_struct->queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
initialLayout = in_struct->initialLayout;
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[in_struct->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)in_struct->pQueueFamilyIndices, sizeof(uint32_t)*in_struct->queueFamilyIndexCount);
}
}
void safe_VkImageCreateInfo::initialize(const safe_VkImageCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
imageType = src->imageType;
format = src->format;
extent = src->extent;
mipLevels = src->mipLevels;
arrayLayers = src->arrayLayers;
samples = src->samples;
tiling = src->tiling;
usage = src->usage;
sharingMode = src->sharingMode;
queueFamilyIndexCount = src->queueFamilyIndexCount;
pQueueFamilyIndices = nullptr;
initialLayout = src->initialLayout;
pNext = SafePnextCopy(src->pNext);
if (src->pQueueFamilyIndices) {
pQueueFamilyIndices = new uint32_t[src->queueFamilyIndexCount];
memcpy ((void *)pQueueFamilyIndices, (void *)src->pQueueFamilyIndices, sizeof(uint32_t)*src->queueFamilyIndexCount);
}
}
safe_VkImageViewCreateInfo::safe_VkImageViewCreateInfo(const VkImageViewCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
image(in_struct->image),
viewType(in_struct->viewType),
format(in_struct->format),
components(in_struct->components),
subresourceRange(in_struct->subresourceRange)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkImageViewCreateInfo::safe_VkImageViewCreateInfo() :
pNext(nullptr)
{}
safe_VkImageViewCreateInfo::safe_VkImageViewCreateInfo(const safe_VkImageViewCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
image = src.image;
viewType = src.viewType;
format = src.format;
components = src.components;
subresourceRange = src.subresourceRange;
pNext = SafePnextCopy(src.pNext);
}
safe_VkImageViewCreateInfo& safe_VkImageViewCreateInfo::operator=(const safe_VkImageViewCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
image = src.image;
viewType = src.viewType;
format = src.format;
components = src.components;
subresourceRange = src.subresourceRange;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkImageViewCreateInfo::~safe_VkImageViewCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkImageViewCreateInfo::initialize(const VkImageViewCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
image = in_struct->image;
viewType = in_struct->viewType;
format = in_struct->format;
components = in_struct->components;
subresourceRange = in_struct->subresourceRange;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkImageViewCreateInfo::initialize(const safe_VkImageViewCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
image = src->image;
viewType = src->viewType;
format = src->format;
components = src->components;
subresourceRange = src->subresourceRange;
pNext = SafePnextCopy(src->pNext);
}
safe_VkShaderModuleCreateInfo::safe_VkShaderModuleCreateInfo(const VkShaderModuleCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
codeSize(in_struct->codeSize),
pCode(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pCode) {
pCode = reinterpret_cast<uint32_t *>(new uint8_t[codeSize]);
memcpy((void *)pCode, (void *)in_struct->pCode, codeSize);
}
}
safe_VkShaderModuleCreateInfo::safe_VkShaderModuleCreateInfo() :
pNext(nullptr),
pCode(nullptr)
{}
safe_VkShaderModuleCreateInfo::safe_VkShaderModuleCreateInfo(const safe_VkShaderModuleCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
codeSize = src.codeSize;
pCode = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pCode) {
pCode = reinterpret_cast<uint32_t *>(new uint8_t[codeSize]);
memcpy((void *)pCode, (void *)src.pCode, codeSize);
}
}
safe_VkShaderModuleCreateInfo& safe_VkShaderModuleCreateInfo::operator=(const safe_VkShaderModuleCreateInfo& src)
{
if (&src == this) return *this;
if (pCode)
delete[] reinterpret_cast<const uint8_t *>(pCode);
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
codeSize = src.codeSize;
pCode = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pCode) {
pCode = reinterpret_cast<uint32_t *>(new uint8_t[codeSize]);
memcpy((void *)pCode, (void *)src.pCode, codeSize);
}
return *this;
}
safe_VkShaderModuleCreateInfo::~safe_VkShaderModuleCreateInfo()
{
if (pCode)
delete[] reinterpret_cast<const uint8_t *>(pCode);
if (pNext)
FreePnextChain(pNext);
}
void safe_VkShaderModuleCreateInfo::initialize(const VkShaderModuleCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
codeSize = in_struct->codeSize;
pCode = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pCode) {
pCode = reinterpret_cast<uint32_t *>(new uint8_t[codeSize]);
memcpy((void *)pCode, (void *)in_struct->pCode, codeSize);
}
}
void safe_VkShaderModuleCreateInfo::initialize(const safe_VkShaderModuleCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
codeSize = src->codeSize;
pCode = nullptr;
pNext = SafePnextCopy(src->pNext);
if (src->pCode) {
pCode = reinterpret_cast<uint32_t *>(new uint8_t[codeSize]);
memcpy((void *)pCode, (void *)src->pCode, codeSize);
}
}
safe_VkPipelineCacheCreateInfo::safe_VkPipelineCacheCreateInfo(const VkPipelineCacheCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
initialDataSize(in_struct->initialDataSize),
pInitialData(in_struct->pInitialData)
{
pNext = SafePnextCopy(in_struct->pNext);
}
safe_VkPipelineCacheCreateInfo::safe_VkPipelineCacheCreateInfo() :
pNext(nullptr),
pInitialData(nullptr)
{}
safe_VkPipelineCacheCreateInfo::safe_VkPipelineCacheCreateInfo(const safe_VkPipelineCacheCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
initialDataSize = src.initialDataSize;
pInitialData = src.pInitialData;
pNext = SafePnextCopy(src.pNext);
}
safe_VkPipelineCacheCreateInfo& safe_VkPipelineCacheCreateInfo::operator=(const safe_VkPipelineCacheCreateInfo& src)
{
if (&src == this) return *this;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
initialDataSize = src.initialDataSize;
pInitialData = src.pInitialData;
pNext = SafePnextCopy(src.pNext);
return *this;
}
safe_VkPipelineCacheCreateInfo::~safe_VkPipelineCacheCreateInfo()
{
if (pNext)
FreePnextChain(pNext);
}
void safe_VkPipelineCacheCreateInfo::initialize(const VkPipelineCacheCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
initialDataSize = in_struct->initialDataSize;
pInitialData = in_struct->pInitialData;
pNext = SafePnextCopy(in_struct->pNext);
}
void safe_VkPipelineCacheCreateInfo::initialize(const safe_VkPipelineCacheCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
initialDataSize = src->initialDataSize;
pInitialData = src->pInitialData;
pNext = SafePnextCopy(src->pNext);
}
safe_VkSpecializationInfo::safe_VkSpecializationInfo(const VkSpecializationInfo* in_struct) :
mapEntryCount(in_struct->mapEntryCount),
pMapEntries(nullptr),
dataSize(in_struct->dataSize),
pData(in_struct->pData)
{
if (in_struct->pMapEntries) {
pMapEntries = new VkSpecializationMapEntry[in_struct->mapEntryCount];
memcpy ((void *)pMapEntries, (void *)in_struct->pMapEntries, sizeof(VkSpecializationMapEntry)*in_struct->mapEntryCount);
}
}
safe_VkSpecializationInfo::safe_VkSpecializationInfo() :
pMapEntries(nullptr),
pData(nullptr)
{}
safe_VkSpecializationInfo::safe_VkSpecializationInfo(const safe_VkSpecializationInfo& src)
{
mapEntryCount = src.mapEntryCount;
pMapEntries = nullptr;
dataSize = src.dataSize;
pData = src.pData;
if (src.pMapEntries) {
pMapEntries = new VkSpecializationMapEntry[src.mapEntryCount];
memcpy ((void *)pMapEntries, (void *)src.pMapEntries, sizeof(VkSpecializationMapEntry)*src.mapEntryCount);
}
}
safe_VkSpecializationInfo& safe_VkSpecializationInfo::operator=(const safe_VkSpecializationInfo& src)
{
if (&src == this) return *this;
if (pMapEntries)
delete[] pMapEntries;
mapEntryCount = src.mapEntryCount;
pMapEntries = nullptr;
dataSize = src.dataSize;
pData = src.pData;
if (src.pMapEntries) {
pMapEntries = new VkSpecializationMapEntry[src.mapEntryCount];
memcpy ((void *)pMapEntries, (void *)src.pMapEntries, sizeof(VkSpecializationMapEntry)*src.mapEntryCount);
}
return *this;
}
safe_VkSpecializationInfo::~safe_VkSpecializationInfo()
{
if (pMapEntries)
delete[] pMapEntries;
}
void safe_VkSpecializationInfo::initialize(const VkSpecializationInfo* in_struct)
{
mapEntryCount = in_struct->mapEntryCount;
pMapEntries = nullptr;
dataSize = in_struct->dataSize;
pData = in_struct->pData;
if (in_struct->pMapEntries) {
pMapEntries = new VkSpecializationMapEntry[in_struct->mapEntryCount];
memcpy ((void *)pMapEntries, (void *)in_struct->pMapEntries, sizeof(VkSpecializationMapEntry)*in_struct->mapEntryCount);
}
}
void safe_VkSpecializationInfo::initialize(const safe_VkSpecializationInfo* src)
{
mapEntryCount = src->mapEntryCount;
pMapEntries = nullptr;
dataSize = src->dataSize;
pData = src->pData;
if (src->pMapEntries) {
pMapEntries = new VkSpecializationMapEntry[src->mapEntryCount];
memcpy ((void *)pMapEntries, (void *)src->pMapEntries, sizeof(VkSpecializationMapEntry)*src->mapEntryCount);
}
}
safe_VkPipelineShaderStageCreateInfo::safe_VkPipelineShaderStageCreateInfo(const VkPipelineShaderStageCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
stage(in_struct->stage),
module(in_struct->module),
pSpecializationInfo(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
pName = SafeStringCopy(in_struct->pName);
if (in_struct->pSpecializationInfo)
pSpecializationInfo = new safe_VkSpecializationInfo(in_struct->pSpecializationInfo);
}
safe_VkPipelineShaderStageCreateInfo::safe_VkPipelineShaderStageCreateInfo() :
pNext(nullptr),
pName(nullptr),
pSpecializationInfo(nullptr)
{}
safe_VkPipelineShaderStageCreateInfo::safe_VkPipelineShaderStageCreateInfo(const safe_VkPipelineShaderStageCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
stage = src.stage;
module = src.module;
pSpecializationInfo = nullptr;
pNext = SafePnextCopy(src.pNext);
pName = SafeStringCopy(src.pName);
if (src.pSpecializationInfo)
pSpecializationInfo = new safe_VkSpecializationInfo(*src.pSpecializationInfo);
}
safe_VkPipelineShaderStageCreateInfo& safe_VkPipelineShaderStageCreateInfo::operator=(const safe_VkPipelineShaderStageCreateInfo& src)
{
if (&src == this) return *this;
if (pName) delete [] pName;
if (pSpecializationInfo)
delete pSpecializationInfo;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
stage = src.stage;
module = src.module;
pSpecializationInfo = nullptr;
pNext = SafePnextCopy(src.pNext);
pName = SafeStringCopy(src.pName);
if (src.pSpecializationInfo)
pSpecializationInfo = new safe_VkSpecializationInfo(*src.pSpecializationInfo);
return *this;
}
safe_VkPipelineShaderStageCreateInfo::~safe_VkPipelineShaderStageCreateInfo()
{
if (pName) delete [] pName;
if (pSpecializationInfo)
delete pSpecializationInfo;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkPipelineShaderStageCreateInfo::initialize(const VkPipelineShaderStageCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
stage = in_struct->stage;
module = in_struct->module;
pSpecializationInfo = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
pName = SafeStringCopy(in_struct->pName);
if (in_struct->pSpecializationInfo)
pSpecializationInfo = new safe_VkSpecializationInfo(in_struct->pSpecializationInfo);
}
void safe_VkPipelineShaderStageCreateInfo::initialize(const safe_VkPipelineShaderStageCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
stage = src->stage;
module = src->module;
pSpecializationInfo = nullptr;
pNext = SafePnextCopy(src->pNext);
pName = SafeStringCopy(src->pName);
if (src->pSpecializationInfo)
pSpecializationInfo = new safe_VkSpecializationInfo(*src->pSpecializationInfo);
}
safe_VkPipelineVertexInputStateCreateInfo::safe_VkPipelineVertexInputStateCreateInfo(const VkPipelineVertexInputStateCreateInfo* in_struct) :
sType(in_struct->sType),
flags(in_struct->flags),
vertexBindingDescriptionCount(in_struct->vertexBindingDescriptionCount),
pVertexBindingDescriptions(nullptr),
vertexAttributeDescriptionCount(in_struct->vertexAttributeDescriptionCount),
pVertexAttributeDescriptions(nullptr)
{
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pVertexBindingDescriptions) {
pVertexBindingDescriptions = new VkVertexInputBindingDescription[in_struct->vertexBindingDescriptionCount];
memcpy ((void *)pVertexBindingDescriptions, (void *)in_struct->pVertexBindingDescriptions, sizeof(VkVertexInputBindingDescription)*in_struct->vertexBindingDescriptionCount);
}
if (in_struct->pVertexAttributeDescriptions) {
pVertexAttributeDescriptions = new VkVertexInputAttributeDescription[in_struct->vertexAttributeDescriptionCount];
memcpy ((void *)pVertexAttributeDescriptions, (void *)in_struct->pVertexAttributeDescriptions, sizeof(VkVertexInputAttributeDescription)*in_struct->vertexAttributeDescriptionCount);
}
}
safe_VkPipelineVertexInputStateCreateInfo::safe_VkPipelineVertexInputStateCreateInfo() :
pNext(nullptr),
pVertexBindingDescriptions(nullptr),
pVertexAttributeDescriptions(nullptr)
{}
safe_VkPipelineVertexInputStateCreateInfo::safe_VkPipelineVertexInputStateCreateInfo(const safe_VkPipelineVertexInputStateCreateInfo& src)
{
sType = src.sType;
flags = src.flags;
vertexBindingDescriptionCount = src.vertexBindingDescriptionCount;
pVertexBindingDescriptions = nullptr;
vertexAttributeDescriptionCount = src.vertexAttributeDescriptionCount;
pVertexAttributeDescriptions = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pVertexBindingDescriptions) {
pVertexBindingDescriptions = new VkVertexInputBindingDescription[src.vertexBindingDescriptionCount];
memcpy ((void *)pVertexBindingDescriptions, (void *)src.pVertexBindingDescriptions, sizeof(VkVertexInputBindingDescription)*src.vertexBindingDescriptionCount);
}
if (src.pVertexAttributeDescriptions) {
pVertexAttributeDescriptions = new VkVertexInputAttributeDescription[src.vertexAttributeDescriptionCount];
memcpy ((void *)pVertexAttributeDescriptions, (void *)src.pVertexAttributeDescriptions, sizeof(VkVertexInputAttributeDescription)*src.vertexAttributeDescriptionCount);
}
}
safe_VkPipelineVertexInputStateCreateInfo& safe_VkPipelineVertexInputStateCreateInfo::operator=(const safe_VkPipelineVertexInputStateCreateInfo& src)
{
if (&src == this) return *this;
if (pVertexBindingDescriptions)
delete[] pVertexBindingDescriptions;
if (pVertexAttributeDescriptions)
delete[] pVertexAttributeDescriptions;
if (pNext)
FreePnextChain(pNext);
sType = src.sType;
flags = src.flags;
vertexBindingDescriptionCount = src.vertexBindingDescriptionCount;
pVertexBindingDescriptions = nullptr;
vertexAttributeDescriptionCount = src.vertexAttributeDescriptionCount;
pVertexAttributeDescriptions = nullptr;
pNext = SafePnextCopy(src.pNext);
if (src.pVertexBindingDescriptions) {
pVertexBindingDescriptions = new VkVertexInputBindingDescription[src.vertexBindingDescriptionCount];
memcpy ((void *)pVertexBindingDescriptions, (void *)src.pVertexBindingDescriptions, sizeof(VkVertexInputBindingDescription)*src.vertexBindingDescriptionCount);
}
if (src.pVertexAttributeDescriptions) {
pVertexAttributeDescriptions = new VkVertexInputAttributeDescription[src.vertexAttributeDescriptionCount];
memcpy ((void *)pVertexAttributeDescriptions, (void *)src.pVertexAttributeDescriptions, sizeof(VkVertexInputAttributeDescription)*src.vertexAttributeDescriptionCount);
}
return *this;
}
safe_VkPipelineVertexInputStateCreateInfo::~safe_VkPipelineVertexInputStateCreateInfo()
{
if (pVertexBindingDescriptions)
delete[] pVertexBindingDescriptions;
if (pVertexAttributeDescriptions)
delete[] pVertexAttributeDescriptions;
if (pNext)
FreePnextChain(pNext);
}
void safe_VkPipelineVertexInputStateCreateInfo::initialize(const VkPipelineVertexInputStateCreateInfo* in_struct)
{
sType = in_struct->sType;
flags = in_struct->flags;
vertexBindingDescriptionCount = in_struct->vertexBindingDescriptionCount;
pVertexBindingDescriptions = nullptr;
vertexAttributeDescriptionCount = in_struct->vertexAttributeDescriptionCount;
pVertexAttributeDescriptions = nullptr;
pNext = SafePnextCopy(in_struct->pNext);
if (in_struct->pVertexBindingDescriptions) {
pVertexBindingDescriptions = new VkVertexInputBindingDescription[in_struct->vertexBindingDescriptionCount];
memcpy ((void *)pVertexBindingDescriptions, (void *)in_struct->pVertexBindingDescriptions, sizeof(VkVertexInputBindingDescription)*in_struct->vertexBindingDescriptionCount);
}
if (in_struct->pVertexAttributeDescriptions) {
pVertexAttributeDescriptions = new VkVertexInputAttributeDescription[in_struct->vertexAttributeDescriptionCount];
memcpy ((void *)pVertexAttributeDescriptions, (void *)in_struct->pVertexAttributeDescriptions, sizeof(VkVertexInputAttributeDescription)*in_struct->vertexAttributeDescriptionCount);
}
}
void safe_VkPipelineVertexInputStateCreateInfo::initialize(const safe_VkPipelineVertexInputStateCreateInfo* src)
{
sType = src->sType;
flags = src->flags;
vertexBindingDescriptionCount = src->vertexBindingDescriptionCount;
pVertexBindingDescriptions = nullptr;
vertexAttributeDescriptionCount = src->vertexAttributeDescriptionCount;
pVertexAttributeDescriptions = nullptr;
pNext = SafePnextCopy(src->pNext);
if (src->pVertexBindingDescriptions) {
pVertexBindingDescriptions = new VkVertexInputBindingDescription[src->vertexBindingDescriptionCount];
memcpy ((void *)pVertexBindingDescriptions, (void *)src->pVertexBindingDescriptions,