mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-18 03:59:17 +01:00
500b49d329
This commit adds Vulkan-Hpp as a library to the project. The headers are from a modified version of `VulkanHppGenerator`. They are broken into multiple files to avoid exceeding the Intellisense file size limit of Android Studio.
160 lines
6.0 KiB
C++
160 lines
6.0 KiB
C++
// Copyright (c) 2015-2019 The Khronos Group 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.
|
|
//
|
|
// ---- Exceptions to the Apache 2.0 License: ----
|
|
//
|
|
// As an exception, if you use this Software to generate code and portions of
|
|
// this Software are embedded into the generated code as a result, you may
|
|
// redistribute such product without providing attribution as would otherwise
|
|
// be required by Sections 4(a), 4(b) and 4(d) of the License.
|
|
//
|
|
// In addition, if you combine or link code generated by this Software with
|
|
// software that is licensed under the GPLv2 or the LGPL v2.0 or 2.1
|
|
// ("`Combined Software`") and if a court of competent jurisdiction determines
|
|
// that the patent provision (Section 3), the indemnity provision (Section 9)
|
|
// or other Section of the License conflicts with the conditions of the
|
|
// applicable GPL or LGPL license, you may retroactively and prospectively
|
|
// choose to deem waived or otherwise exclude such Section(s) of the License,
|
|
// but only in their entirety and only with respect to the Combined Software.
|
|
//
|
|
|
|
// This header is generated from the Khronos Vulkan XML API Registry.
|
|
|
|
#pragma once
|
|
|
|
#include "../handles.hpp"
|
|
#include "VkAcquire.hpp"
|
|
#include "VkAcceleration.hpp"
|
|
|
|
namespace VULKAN_HPP_NAMESPACE
|
|
{
|
|
struct AllocationCallbacks
|
|
{
|
|
VULKAN_HPP_CONSTEXPR AllocationCallbacks( void* pUserData_ = {},
|
|
PFN_vkAllocationFunction pfnAllocation_ = {},
|
|
PFN_vkReallocationFunction pfnReallocation_ = {},
|
|
PFN_vkFreeFunction pfnFree_ = {},
|
|
PFN_vkInternalAllocationNotification pfnInternalAllocation_ = {},
|
|
PFN_vkInternalFreeNotification pfnInternalFree_ = {} ) VULKAN_HPP_NOEXCEPT
|
|
: pUserData( pUserData_ )
|
|
, pfnAllocation( pfnAllocation_ )
|
|
, pfnReallocation( pfnReallocation_ )
|
|
, pfnFree( pfnFree_ )
|
|
, pfnInternalAllocation( pfnInternalAllocation_ )
|
|
, pfnInternalFree( pfnInternalFree_ )
|
|
{}
|
|
|
|
VULKAN_HPP_CONSTEXPR AllocationCallbacks( AllocationCallbacks const& rhs ) VULKAN_HPP_NOEXCEPT
|
|
: pUserData( rhs.pUserData )
|
|
, pfnAllocation( rhs.pfnAllocation )
|
|
, pfnReallocation( rhs.pfnReallocation )
|
|
, pfnFree( rhs.pfnFree )
|
|
, pfnInternalAllocation( rhs.pfnInternalAllocation )
|
|
, pfnInternalFree( rhs.pfnInternalFree )
|
|
{}
|
|
|
|
AllocationCallbacks & operator=( AllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
memcpy( static_cast<void*>(this), &rhs, sizeof( AllocationCallbacks ) );
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
*this = rhs;
|
|
}
|
|
|
|
AllocationCallbacks& operator=( VkAllocationCallbacks const & rhs ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
*this = *reinterpret_cast<VULKAN_HPP_NAMESPACE::AllocationCallbacks const *>(&rhs);
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPUserData( void* pUserData_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pUserData = pUserData_;
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPfnAllocation( PFN_vkAllocationFunction pfnAllocation_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pfnAllocation = pfnAllocation_;
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPfnReallocation( PFN_vkReallocationFunction pfnReallocation_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pfnReallocation = pfnReallocation_;
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPfnFree( PFN_vkFreeFunction pfnFree_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pfnFree = pfnFree_;
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPfnInternalAllocation( PFN_vkInternalAllocationNotification pfnInternalAllocation_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pfnInternalAllocation = pfnInternalAllocation_;
|
|
return *this;
|
|
}
|
|
|
|
AllocationCallbacks & setPfnInternalFree( PFN_vkInternalFreeNotification pfnInternalFree_ ) VULKAN_HPP_NOEXCEPT
|
|
{
|
|
pfnInternalFree = pfnInternalFree_;
|
|
return *this;
|
|
}
|
|
|
|
operator VkAllocationCallbacks const&() const VULKAN_HPP_NOEXCEPT
|
|
{
|
|
return *reinterpret_cast<const VkAllocationCallbacks*>( this );
|
|
}
|
|
|
|
operator VkAllocationCallbacks &() VULKAN_HPP_NOEXCEPT
|
|
{
|
|
return *reinterpret_cast<VkAllocationCallbacks*>( this );
|
|
}
|
|
|
|
#if defined(VULKAN_HPP_HAS_SPACESHIP_OPERATOR)
|
|
auto operator<=>( AllocationCallbacks const& ) const = default;
|
|
#else
|
|
bool operator==( AllocationCallbacks const& rhs ) const VULKAN_HPP_NOEXCEPT
|
|
{
|
|
return ( pUserData == rhs.pUserData )
|
|
&& ( pfnAllocation == rhs.pfnAllocation )
|
|
&& ( pfnReallocation == rhs.pfnReallocation )
|
|
&& ( pfnFree == rhs.pfnFree )
|
|
&& ( pfnInternalAllocation == rhs.pfnInternalAllocation )
|
|
&& ( pfnInternalFree == rhs.pfnInternalFree );
|
|
}
|
|
|
|
bool operator!=( AllocationCallbacks const& rhs ) const VULKAN_HPP_NOEXCEPT
|
|
{
|
|
return !operator==( rhs );
|
|
}
|
|
#endif
|
|
|
|
public:
|
|
void* pUserData = {};
|
|
PFN_vkAllocationFunction pfnAllocation = {};
|
|
PFN_vkReallocationFunction pfnReallocation = {};
|
|
PFN_vkFreeFunction pfnFree = {};
|
|
PFN_vkInternalAllocationNotification pfnInternalAllocation = {};
|
|
PFN_vkInternalFreeNotification pfnInternalFree = {};
|
|
};
|
|
static_assert( sizeof( AllocationCallbacks ) == sizeof( VkAllocationCallbacks ), "struct and wrapper have different size!" );
|
|
static_assert( std::is_standard_layout<AllocationCallbacks>::value, "struct wrapper is not a standard layout!" );
|
|
} // namespace VULKAN_HPP_NAMESPACE
|