2019-01-09 10:55:11 +00:00
|
|
|
// Copyright(c) 2015-2019, NVIDIA CORPORATION. All rights reserved.
|
2017-12-21 11:40:48 +00:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
2020-04-12 19:49:12 +00:00
|
|
|
#include <map>
|
2017-12-21 11:40:48 +00:00
|
|
|
#include <set>
|
|
|
|
#include <tinyxml2.h>
|
2020-04-12 19:49:12 +00:00
|
|
|
#include <vector>
|
2017-12-21 11:40:48 +00:00
|
|
|
|
2022-09-12 14:53:44 +00:00
|
|
|
const size_t INVALID_INDEX = (size_t)~0;
|
|
|
|
|
2022-11-28 15:53:24 +00:00
|
|
|
template <typename BitType>
|
|
|
|
class Flags
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
using MaskType = typename std::underlying_type<BitType>::type;
|
|
|
|
|
|
|
|
constexpr Flags() noexcept : m_mask( 0 ) {}
|
|
|
|
|
|
|
|
constexpr Flags( BitType bit ) noexcept : m_mask( static_cast<MaskType>( bit ) ) {}
|
|
|
|
|
|
|
|
constexpr explicit Flags( MaskType flags ) noexcept : m_mask( flags ) {}
|
|
|
|
|
|
|
|
constexpr bool operator!() const noexcept
|
|
|
|
{
|
|
|
|
return !m_mask;
|
|
|
|
}
|
|
|
|
|
|
|
|
constexpr bool operator&( BitType const & rhs ) const noexcept
|
|
|
|
{
|
|
|
|
return m_mask & static_cast<MaskType>( rhs );
|
|
|
|
}
|
|
|
|
|
|
|
|
constexpr Flags<BitType> operator&( Flags<BitType> const & rhs ) const noexcept
|
|
|
|
{
|
|
|
|
return Flags<BitType>( m_mask & rhs.m_mask );
|
|
|
|
}
|
|
|
|
|
|
|
|
constexpr Flags<BitType> operator|( Flags<BitType> const & rhs ) const noexcept
|
|
|
|
{
|
|
|
|
return Flags<BitType>( m_mask | rhs.m_mask );
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
MaskType m_mask;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class CommandFlavourFlagBits : uint8_t
|
|
|
|
{
|
2023-02-02 13:09:45 +00:00
|
|
|
enhanced = 1 << 0,
|
|
|
|
chained = 1 << 1,
|
|
|
|
singular = 1 << 2,
|
|
|
|
unique = 1 << 3,
|
|
|
|
withAllocator = 1 << 4
|
2022-11-28 15:53:24 +00:00
|
|
|
};
|
|
|
|
using CommandFlavourFlags = Flags<CommandFlavourFlagBits>;
|
|
|
|
|
|
|
|
constexpr CommandFlavourFlags operator|( CommandFlavourFlagBits const & lhs, CommandFlavourFlagBits const & rhs ) noexcept
|
|
|
|
{
|
|
|
|
return CommandFlavourFlags( lhs ) | CommandFlavourFlags( rhs );
|
|
|
|
}
|
|
|
|
|
2017-12-21 11:40:48 +00:00
|
|
|
class VulkanHppGenerator
|
|
|
|
{
|
2020-04-12 19:49:12 +00:00
|
|
|
public:
|
|
|
|
VulkanHppGenerator( tinyxml2::XMLDocument const & document );
|
|
|
|
|
2022-08-02 08:00:16 +00:00
|
|
|
void generateVulkanEnumsHppFile() const;
|
|
|
|
void generateVulkanFormatTraitsHppFile() const;
|
|
|
|
void generateVulkanFuncsHppFile() const;
|
|
|
|
void generateVulkanHandlesHppFile() const;
|
|
|
|
void generateVulkanHashHppFile() const;
|
|
|
|
void generateVulkanHppFile() const;
|
|
|
|
void generateVulkanRAIIHppFile() const;
|
2022-08-03 09:48:29 +00:00
|
|
|
void generateVulkanStaticAssertionsHppFile() const;
|
|
|
|
void generateVulkanStructsHppFile() const;
|
|
|
|
void generateVulkanToStringHppFile() const;
|
2022-08-02 08:00:16 +00:00
|
|
|
void prepareRAIIHandles();
|
2023-01-09 10:32:23 +00:00
|
|
|
void prepareVulkanFuncs();
|
2020-04-12 19:49:12 +00:00
|
|
|
|
|
|
|
private:
|
2020-05-18 10:02:10 +00:00
|
|
|
struct TypeInfo
|
2020-04-12 19:49:12 +00:00
|
|
|
{
|
2021-10-14 06:36:04 +00:00
|
|
|
std::string compose( std::string const & nameSpace ) const;
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2020-05-18 10:02:10 +00:00
|
|
|
bool operator==( TypeInfo const & rhs ) const
|
2017-12-21 11:40:48 +00:00
|
|
|
{
|
2020-04-12 19:49:12 +00:00
|
|
|
return ( prefix == rhs.prefix ) && ( type == rhs.type ) && ( postfix == rhs.postfix );
|
|
|
|
}
|
|
|
|
|
2021-08-02 10:04:37 +00:00
|
|
|
bool operator!=( TypeInfo const & rhs ) const
|
|
|
|
{
|
|
|
|
return !operator==( rhs );
|
|
|
|
}
|
|
|
|
|
2021-07-28 07:13:25 +00:00
|
|
|
bool operator<( TypeInfo const & rhs ) const
|
|
|
|
{
|
2022-02-28 09:11:04 +00:00
|
|
|
return ( prefix < rhs.prefix ) || ( ( prefix == rhs.prefix ) && ( ( type < rhs.type ) || ( ( type == rhs.type ) && ( postfix < rhs.postfix ) ) ) );
|
2021-07-28 07:13:25 +00:00
|
|
|
}
|
|
|
|
|
2020-09-15 08:23:19 +00:00
|
|
|
bool isConstPointer() const
|
|
|
|
{
|
|
|
|
return ( prefix.find( "const" ) != std::string::npos ) && ( postfix.find( '*' ) != std::string::npos );
|
|
|
|
}
|
|
|
|
|
2020-09-02 13:00:06 +00:00
|
|
|
bool isNonConstPointer() const
|
|
|
|
{
|
|
|
|
return ( prefix.find( "const" ) == std::string::npos ) && ( postfix.find( '*' ) != std::string::npos );
|
|
|
|
}
|
|
|
|
|
|
|
|
bool isValue() const
|
|
|
|
{
|
2020-09-25 21:45:55 +00:00
|
|
|
return ( ( prefix.find( '*' ) == std::string::npos ) && ( postfix.find( '*' ) == std::string::npos ) );
|
2020-09-02 13:00:06 +00:00
|
|
|
}
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
std::string prefix;
|
|
|
|
std::string type;
|
|
|
|
std::string postfix;
|
|
|
|
};
|
|
|
|
|
2021-06-30 06:56:05 +00:00
|
|
|
struct BaseTypeData
|
|
|
|
{
|
|
|
|
BaseTypeData( TypeInfo const & typeInfo_, int line ) : typeInfo( typeInfo_ ), xmlLine( line ) {}
|
|
|
|
|
|
|
|
TypeInfo typeInfo;
|
2021-07-05 07:29:12 +00:00
|
|
|
int xmlLine;
|
2021-06-30 06:56:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct BitmaskData
|
|
|
|
{
|
2022-02-28 09:11:04 +00:00
|
|
|
BitmaskData( std::string const & r, std::string const & t, int line ) : requirements( r ), type( t ), xmlLine( line ) {}
|
2021-06-30 06:56:05 +00:00
|
|
|
|
|
|
|
std::string requirements;
|
|
|
|
std::string type;
|
|
|
|
std::string alias;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct NameData
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
std::vector<std::string> arraySizes;
|
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
struct ParamData
|
|
|
|
{
|
|
|
|
ParamData( int line ) : optional( false ), xmlLine( line ) {}
|
|
|
|
|
2020-05-18 10:02:10 +00:00
|
|
|
TypeInfo type;
|
2020-04-12 19:49:12 +00:00
|
|
|
std::string name;
|
|
|
|
std::vector<std::string> arraySizes;
|
|
|
|
std::string len;
|
|
|
|
bool optional;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string stride;
|
2020-04-12 19:49:12 +00:00
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CommandData
|
|
|
|
{
|
|
|
|
CommandData( int line ) : xmlLine( line ) {}
|
|
|
|
|
2021-04-28 11:35:14 +00:00
|
|
|
std::string alias;
|
|
|
|
std::vector<std::string> errorCodes;
|
|
|
|
std::string handle;
|
|
|
|
std::vector<ParamData> params;
|
2023-02-20 19:01:34 +00:00
|
|
|
std::set<std::string> requiredIn;
|
2021-04-28 11:35:14 +00:00
|
|
|
std::string returnType;
|
|
|
|
std::vector<std::string> successCodes;
|
|
|
|
int xmlLine;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
2023-01-26 16:12:29 +00:00
|
|
|
struct DefineData
|
|
|
|
{
|
|
|
|
DefineData( std::string const & require_, int line ) : require( require_ ), xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string require;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2021-05-04 15:08:24 +00:00
|
|
|
struct EnumAliasData
|
|
|
|
{
|
2021-06-01 17:48:06 +00:00
|
|
|
EnumAliasData( std::string const & name_, int line ) : name( name_ ), xmlLine( line ) {}
|
2021-05-04 15:08:24 +00:00
|
|
|
|
2021-06-01 17:48:06 +00:00
|
|
|
std::string name;
|
2021-05-04 15:08:24 +00:00
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
struct EnumValueData
|
|
|
|
{
|
2023-02-22 15:20:44 +00:00
|
|
|
EnumValueData( int line,
|
|
|
|
std::string const & name_,
|
|
|
|
std::string const & protect_,
|
|
|
|
std::string const & extension_,
|
|
|
|
std::vector<std::string> const & depends_,
|
|
|
|
bool singleBit_ )
|
|
|
|
: name( name_ ), depends( depends_ ), extension( extension_ ), protect( protect_ ), singleBit( singleBit_ ), xmlLine( line )
|
2022-03-09 10:20:05 +00:00
|
|
|
{
|
|
|
|
}
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2023-02-22 15:20:44 +00:00
|
|
|
std::string name;
|
|
|
|
std::vector<std::string> depends;
|
|
|
|
std::string extension;
|
|
|
|
std::string protect;
|
|
|
|
bool singleBit;
|
|
|
|
int xmlLine;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct EnumData
|
|
|
|
{
|
2021-06-01 17:48:06 +00:00
|
|
|
void addEnumAlias( int line, std::string const & name, std::string const & alias );
|
2023-02-22 15:20:44 +00:00
|
|
|
void addEnumValue( int line,
|
|
|
|
std::string const & valueName,
|
|
|
|
std::string const & protect,
|
|
|
|
bool bitpos,
|
|
|
|
std::string const & extension,
|
|
|
|
std::vector<std::string> const & depends );
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2023-01-26 16:12:29 +00:00
|
|
|
std::string alias = {}; // alias for this enum
|
|
|
|
std::map<std::string, EnumAliasData> aliases = {}; // aliases for the values
|
|
|
|
std::string bitwidth = {};
|
|
|
|
bool isBitmask = false;
|
|
|
|
std::vector<EnumValueData> values = {};
|
|
|
|
int xmlLine = 0;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
2021-07-21 15:09:21 +00:00
|
|
|
struct RequireData
|
|
|
|
{
|
2022-11-23 16:42:23 +00:00
|
|
|
RequireData( int line, std::vector<std::string> const & depends_ );
|
2021-07-21 15:09:21 +00:00
|
|
|
|
2022-11-09 15:25:43 +00:00
|
|
|
std::vector<std::string> depends;
|
2021-07-21 15:09:21 +00:00
|
|
|
std::vector<std::string> commands;
|
|
|
|
std::vector<std::string> types;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2021-04-27 15:19:32 +00:00
|
|
|
struct FeatureData
|
|
|
|
{
|
|
|
|
FeatureData( std::string const & number_ ) : number( number_ ) {}
|
|
|
|
|
2021-06-08 06:32:46 +00:00
|
|
|
std::string number;
|
2021-07-21 15:09:21 +00:00
|
|
|
std::vector<RequireData> requireData;
|
2021-04-27 15:19:32 +00:00
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
struct ExtensionData
|
|
|
|
{
|
2020-05-18 10:02:10 +00:00
|
|
|
ExtensionData( int line,
|
|
|
|
std::string const & deprecatedBy_,
|
2021-04-27 15:19:32 +00:00
|
|
|
std::string const & number_,
|
2020-05-18 10:02:10 +00:00
|
|
|
std::string const & obsoletedBy_,
|
|
|
|
std::string const & platform_,
|
|
|
|
std::string const & promotedTo_ )
|
2022-02-28 09:11:04 +00:00
|
|
|
: deprecatedBy( deprecatedBy_ ), number( number_ ), obsoletedBy( obsoletedBy_ ), platform( platform_ ), promotedTo( promotedTo_ ), xmlLine( line )
|
2022-03-09 10:20:05 +00:00
|
|
|
{
|
|
|
|
}
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2021-07-21 15:09:21 +00:00
|
|
|
std::string deprecatedBy;
|
|
|
|
std::string number;
|
|
|
|
std::string obsoletedBy;
|
|
|
|
std::string platform;
|
|
|
|
std::string promotedTo;
|
2022-11-09 15:25:43 +00:00
|
|
|
std::set<std::string> depends;
|
2021-07-21 15:09:21 +00:00
|
|
|
std::vector<RequireData> requireData;
|
|
|
|
int xmlLine;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
2021-11-22 13:27:34 +00:00
|
|
|
struct ComponentData
|
|
|
|
{
|
|
|
|
ComponentData( int line ) : xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string bits;
|
|
|
|
std::string name;
|
|
|
|
std::string numericFormat;
|
|
|
|
std::string planeIndex;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PlaneData
|
|
|
|
{
|
|
|
|
PlaneData( int line ) : xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string compatible;
|
|
|
|
std::string heightDivisor;
|
|
|
|
std::string widthDivisor;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FormatData
|
|
|
|
{
|
|
|
|
FormatData( int line ) : xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string blockExtent;
|
|
|
|
std::string blockSize;
|
|
|
|
std::string chroma;
|
|
|
|
std::string classAttribute;
|
|
|
|
std::vector<ComponentData> components;
|
|
|
|
std::string compressed;
|
|
|
|
std::string packed;
|
|
|
|
std::vector<PlaneData> planes;
|
|
|
|
std::string spirvImageFormat;
|
|
|
|
std::string texelsPerBlock;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2021-09-21 12:20:24 +00:00
|
|
|
struct FuncPointerArgumentData
|
|
|
|
{
|
|
|
|
FuncPointerArgumentData( std::string const & t, int line ) : type( t ), xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string type;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
struct FuncPointerData
|
|
|
|
{
|
|
|
|
FuncPointerData( std::string const & r, int line ) : requirements( r ), xmlLine( line ) {}
|
|
|
|
|
2021-09-21 12:20:24 +00:00
|
|
|
std::vector<FuncPointerArgumentData> arguments;
|
|
|
|
std::string requirements;
|
|
|
|
int xmlLine;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct HandleData
|
|
|
|
{
|
2022-04-15 09:24:30 +00:00
|
|
|
HandleData( std::string const & p, std::string const & objType, bool isDispatchable, int line )
|
|
|
|
: objTypeEnum( objType ), parent( p ), isDispatchable( isDispatchable ), xmlLine( line )
|
|
|
|
{
|
|
|
|
}
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2021-04-12 10:38:04 +00:00
|
|
|
std::string alias;
|
|
|
|
std::set<std::string> childrenHandles;
|
|
|
|
std::set<std::string> commands;
|
|
|
|
std::string deleteCommand;
|
2023-02-08 16:21:03 +00:00
|
|
|
std::string deleteParent;
|
2021-04-12 10:38:04 +00:00
|
|
|
std::string deletePool;
|
|
|
|
std::string objTypeEnum;
|
|
|
|
std::string parent;
|
|
|
|
std::set<std::string> secondLevelCommands;
|
2022-04-15 09:24:30 +00:00
|
|
|
bool isDispatchable;
|
2021-04-12 10:38:04 +00:00
|
|
|
int xmlLine;
|
2021-02-17 09:49:59 +00:00
|
|
|
|
|
|
|
// RAII data
|
|
|
|
std::map<std::string, CommandData>::const_iterator destructorIt;
|
|
|
|
std::vector<std::map<std::string, CommandData>::const_iterator> constructorIts;
|
2020-04-12 19:49:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct MemberData
|
|
|
|
{
|
|
|
|
MemberData( int line ) : xmlLine( line ) {}
|
|
|
|
|
2020-05-18 10:02:10 +00:00
|
|
|
TypeInfo type;
|
2020-04-12 19:49:12 +00:00
|
|
|
std::string name;
|
|
|
|
std::vector<std::string> arraySizes;
|
|
|
|
std::string bitCount;
|
2020-07-01 12:43:37 +00:00
|
|
|
std::vector<std::string> len;
|
2020-07-08 08:58:37 +00:00
|
|
|
bool noAutoValidity = false;
|
2020-12-10 10:11:13 +00:00
|
|
|
std::vector<bool> optional;
|
2022-09-27 06:50:36 +00:00
|
|
|
std::vector<std::string> selection;
|
2020-06-15 06:03:17 +00:00
|
|
|
std::string selector;
|
2021-07-26 15:59:25 +00:00
|
|
|
std::string value;
|
2020-04-12 19:49:12 +00:00
|
|
|
std::string usedConstant;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2020-05-18 10:02:10 +00:00
|
|
|
struct PlatformData
|
|
|
|
{
|
|
|
|
PlatformData( std::string const & protect_ ) : protect( protect_ ) {}
|
|
|
|
|
|
|
|
std::string protect;
|
|
|
|
};
|
|
|
|
|
2021-06-22 08:15:24 +00:00
|
|
|
struct StructureAliasData
|
|
|
|
{
|
|
|
|
StructureAliasData( std::string const & alias_, int line ) : alias( alias_ ), xmlLine( line ) {}
|
|
|
|
|
|
|
|
std::string alias;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
struct StructureData
|
|
|
|
{
|
2020-06-15 06:03:17 +00:00
|
|
|
StructureData( std::vector<std::string> const & extends, int line ) : structExtends( extends ), xmlLine( line ) {}
|
2020-04-12 19:49:12 +00:00
|
|
|
|
2020-12-10 16:23:44 +00:00
|
|
|
bool allowDuplicate = false;
|
|
|
|
bool isUnion = false;
|
|
|
|
bool returnedOnly = false;
|
|
|
|
bool mutualExclusiveLens = false;
|
2020-04-12 19:49:12 +00:00
|
|
|
std::vector<MemberData> members;
|
|
|
|
std::vector<std::string> structExtends;
|
|
|
|
std::string subStruct;
|
|
|
|
int xmlLine;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class TypeCategory
|
|
|
|
{
|
|
|
|
Bitmask,
|
|
|
|
BaseType,
|
|
|
|
Define,
|
|
|
|
Enum,
|
|
|
|
FuncPointer,
|
|
|
|
Handle,
|
|
|
|
Requires,
|
|
|
|
Struct,
|
|
|
|
Union,
|
|
|
|
Unknown
|
|
|
|
};
|
|
|
|
|
2020-05-18 10:02:10 +00:00
|
|
|
struct TypeData
|
|
|
|
{
|
2023-02-20 19:01:34 +00:00
|
|
|
TypeCategory category = TypeCategory::Unknown;
|
|
|
|
std::set<std::string> requiredIn = {};
|
2020-05-18 10:02:10 +00:00
|
|
|
};
|
|
|
|
|
2022-09-12 14:53:44 +00:00
|
|
|
struct VectorParamData
|
|
|
|
{
|
|
|
|
size_t lenParam = INVALID_INDEX;
|
|
|
|
size_t strideParam = INVALID_INDEX;
|
|
|
|
};
|
|
|
|
|
2020-04-12 19:49:12 +00:00
|
|
|
private:
|
2021-07-13 07:01:55 +00:00
|
|
|
void addCommand( std::string const & name, CommandData & commandData );
|
2023-02-20 19:01:34 +00:00
|
|
|
void addMissingFlagBits( std::vector<RequireData> & requireData, std::string const & requiredIn );
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string addTitleAndProtection( std::string const & title, std::string const & strIf, std::string const & strElse = {} ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
bool allVectorSizesSupported( std::vector<ParamData> const & params, std::map<size_t, VectorParamData> const & vectorParams ) const;
|
2021-07-21 15:09:21 +00:00
|
|
|
void appendDispatchLoaderDynamicCommands( std::vector<RequireData> const & requireData,
|
2021-07-13 07:01:55 +00:00
|
|
|
std::set<std::string> & listedCommands,
|
|
|
|
std::string const & title,
|
|
|
|
std::string & commandMembers,
|
|
|
|
std::string & initialCommandAssignments,
|
|
|
|
std::string & instanceCommandAssignments,
|
|
|
|
std::string & deviceCommandAssignments ) const;
|
2021-07-21 16:15:31 +00:00
|
|
|
void appendRAIIDispatcherCommands( std::vector<RequireData> const & requireData,
|
|
|
|
std::set<std::string> & listedCommands,
|
|
|
|
std::string const & title,
|
|
|
|
std::string & contextInitializers,
|
|
|
|
std::string & contextMembers,
|
|
|
|
std::string & deviceAssignments,
|
|
|
|
std::string & deviceMembers,
|
|
|
|
std::string & instanceAssignments,
|
|
|
|
std::string & instanceMembers ) const;
|
2021-08-02 10:04:37 +00:00
|
|
|
void checkBitmaskCorrectness() const;
|
|
|
|
void checkCommandCorrectness() const;
|
2021-08-04 21:43:49 +00:00
|
|
|
void checkCorrectness() const;
|
2023-01-26 16:12:29 +00:00
|
|
|
void checkDefineCorrectness() const;
|
2021-08-02 10:04:37 +00:00
|
|
|
void checkEnumCorrectness() const;
|
2021-07-30 09:25:48 +00:00
|
|
|
void checkEnumCorrectness( std::vector<RequireData> const & requireData ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
bool checkEquivalentSingularConstructor( std::vector<std::map<std::string, CommandData>::const_iterator> const & constructorIts,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::vector<ParamData>::const_iterator lenIt ) const;
|
|
|
|
void checkExtensionCorrectness() const;
|
|
|
|
void checkFuncPointerCorrectness() const;
|
|
|
|
void checkHandleCorrectness() const;
|
|
|
|
void checkStructCorrectness() const;
|
|
|
|
void checkStructMemberCorrectness( std::string const & structureName, std::vector<MemberData> const & members, std::set<std::string> & sTypeValues ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string combineDataTypes( std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
bool enumerating,
|
|
|
|
std::vector<std::string> const & dataTypes,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii ) const;
|
2022-05-04 06:37:09 +00:00
|
|
|
bool containsArray( std::string const & type ) const;
|
2022-06-13 08:47:13 +00:00
|
|
|
bool containsFuncPointer( std::string const & type ) const;
|
2022-05-04 06:37:09 +00:00
|
|
|
bool containsFloatingPoints( std::vector<MemberData> const & members ) const;
|
|
|
|
bool containsUnion( std::string const & type ) const;
|
|
|
|
std::vector<size_t> determineConstPointerParams( std::vector<ParamData> const & params ) const;
|
|
|
|
std::vector<std::string> determineDataTypes( std::vector<VulkanHppGenerator::ParamData> const & params,
|
2022-09-12 14:53:44 +00:00
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-05-04 06:37:09 +00:00
|
|
|
std::vector<size_t> const & returnParams,
|
2022-09-21 07:28:38 +00:00
|
|
|
std::set<size_t> const & templatedParams ) const;
|
2022-05-04 06:37:09 +00:00
|
|
|
size_t determineDefaultStartIndex( std::vector<ParamData> const & params, std::set<size_t> const & skippedParams ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
bool determineEnumeration( std::map<size_t, VectorParamData> const & vectorParams, std::vector<size_t> const & returnParams ) const;
|
2022-05-18 07:12:00 +00:00
|
|
|
size_t determineInitialSkipCount( std::string const & command ) const;
|
|
|
|
std::vector<size_t> determineReturnParams( std::vector<ParamData> const & params ) const;
|
2021-02-17 09:49:59 +00:00
|
|
|
std::vector<std::map<std::string, CommandData>::const_iterator>
|
2022-02-28 09:11:04 +00:00
|
|
|
determineRAIIHandleConstructors( std::string const & handleType, std::map<std::string, CommandData>::const_iterator destructorIt ) const;
|
|
|
|
std::map<std::string, CommandData>::const_iterator determineRAIIHandleDestructor( std::string const & handleType ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::set<size_t> determineSingularParams( size_t returnParam, std::map<size_t, VectorParamData> const & vectorParams ) const;
|
|
|
|
std::set<size_t> determineSkippedParams( std::vector<ParamData> const & params,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::vector<size_t> const & returnParam,
|
|
|
|
bool singular ) const;
|
|
|
|
std::string determineSubStruct( std::pair<std::string, StructureData> const & structure ) const;
|
|
|
|
std::map<size_t, VectorParamData> determineVectorParams( std::vector<ParamData> const & params ) const;
|
|
|
|
std::set<size_t> determineVoidPointerParams( std::vector<ParamData> const & params ) const;
|
|
|
|
void distributeSecondLevelCommands( std::set<std::string> const & specialFunctions );
|
|
|
|
std::string findBaseName( std::string aliasName, std::map<std::string, EnumAliasData> const & aliases ) const;
|
|
|
|
std::vector<MemberData>::const_iterator findStructMemberIt( std::string const & name, std::vector<MemberData> const & memberData ) const;
|
|
|
|
std::vector<MemberData>::const_iterator findStructMemberItByType( std::string const & type, std::vector<MemberData> const & memberData ) const;
|
|
|
|
std::pair<std::string, std::string> generateAllocatorTemplates( std::vector<size_t> const & returnParams,
|
|
|
|
std::vector<std::string> const & returnDataTypes,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
|
|
|
bool definition ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateArgumentListEnhanced( std::vector<ParamData> const & params,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & skippedParams,
|
|
|
|
std::set<size_t> const & singularParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
|
|
|
bool definition,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool withDispatcher ) const;
|
|
|
|
std::string generateArgumentListStandard( std::vector<ParamData> const & params, std::set<size_t> const & skippedParams ) const;
|
|
|
|
std::string generateArgumentTemplates( std::vector<ParamData> const & params,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii ) const;
|
|
|
|
std::string generateBaseTypes() const;
|
2022-10-05 14:58:40 +00:00
|
|
|
std::string generateBitmask( std::map<std::string, BitmaskData>::const_iterator bitmaskIt, std::string const & surroundingProtect ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateBitmasksToString() const;
|
2022-07-26 09:13:43 +00:00
|
|
|
std::string generateBitmasksToString( std::vector<RequireData> const & requireData, std::set<std::string> & listedBitmasks, std::string const & title ) const;
|
|
|
|
std::string generateBitmaskToString( std::map<std::string, BitmaskData>::const_iterator bitmaskIt ) const;
|
2021-10-20 14:55:30 +00:00
|
|
|
std::string generateCallArgumentsEnhanced( CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool nonConstPointerAsNullptr,
|
|
|
|
std::set<size_t> const & singularParams,
|
2022-01-10 10:50:11 +00:00
|
|
|
std::set<size_t> const & templatedParams,
|
2021-10-20 14:55:30 +00:00
|
|
|
bool raiiHandleMemberFunction ) const;
|
2021-10-14 06:36:04 +00:00
|
|
|
std::string generateCallArgumentsRAIIFactory( std::vector<ParamData> const & params,
|
|
|
|
size_t initialSkipCount,
|
2022-01-11 08:45:35 +00:00
|
|
|
std::set<size_t> const & skippedParams,
|
2021-10-14 06:36:04 +00:00
|
|
|
std::set<size_t> const & singularParams ) const;
|
2021-07-21 16:15:31 +00:00
|
|
|
std::string generateCallArgumentsStandard( std::string const & handle, std::vector<ParamData> const & params ) const;
|
2021-08-05 11:13:41 +00:00
|
|
|
std::string generateCallArgumentEnhanced( std::vector<ParamData> const & params,
|
|
|
|
size_t paramIndex,
|
|
|
|
bool nonConstPointerAsNullptr,
|
|
|
|
std::set<size_t> const & singularParams,
|
2022-09-21 07:28:38 +00:00
|
|
|
std::set<size_t> const & templatedParams ) const;
|
2021-08-05 11:13:41 +00:00
|
|
|
std::string generateCallArgumentEnhancedConstPointer( ParamData const & param,
|
|
|
|
size_t paramIndex,
|
2022-01-10 10:50:11 +00:00
|
|
|
std::set<size_t> const & singularParams,
|
|
|
|
std::set<size_t> const & templatedParams ) const;
|
2022-09-21 07:28:38 +00:00
|
|
|
std::string generateCallArgumentEnhancedNonConstPointer( ParamData const & param,
|
|
|
|
size_t paramIndex,
|
|
|
|
bool nonConstPointerAsNullptr,
|
|
|
|
std::set<size_t> const & singularParams ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCallArgumentEnhancedValue( std::vector<ParamData> const & params, size_t paramIndex, std::set<size_t> const & singularParams ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateCallSequence( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::set<size_t> const & singularParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii ) const;
|
2022-04-27 08:37:11 +00:00
|
|
|
std::string generateChainTemplates( std::vector<size_t> const & returnParams, bool chained ) const;
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string generateCommand( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateCommandDefinitions() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
|
|
|
generateCommandDefinitions( std::vector<RequireData> const & requireData, std::set<std::string> & listedCommands, std::string const & title ) const;
|
2021-06-24 09:09:49 +00:00
|
|
|
std::string generateCommandDefinitions( std::string const & command, std::string const & handle ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateCommandEnhanced( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::vector<size_t> const & returnParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags = {} ) const;
|
2021-07-07 06:30:14 +00:00
|
|
|
std::string generateCommandName( std::string const & vulkanCommandName,
|
|
|
|
std::vector<ParamData> const & params,
|
|
|
|
size_t initialSkipCount,
|
2022-04-07 13:38:51 +00:00
|
|
|
std::set<std::string> const & tags,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags = {} ) const;
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string generateCommandResult( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandResultMultiSuccessNoErrors(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandResultMultiSuccessWithErrors(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultMultiSuccessWithErrors1Return(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
|
|
|
std::string generateCommandResultMultiSuccessWithErrors2Return( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::vector<size_t> const & returnParamIndices,
|
|
|
|
bool raii ) const;
|
|
|
|
std::string generateCommandResultMultiSuccessWithErrors3Return( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::vector<size_t> const & returnParamIndices,
|
|
|
|
bool raii ) const;
|
2021-09-21 11:37:15 +00:00
|
|
|
std::string
|
2023-02-02 13:09:45 +00:00
|
|
|
generateCommandResultSingleSuccess( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandResultSingleSuccessNoErrors(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandResultSingleSuccessWithErrors(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultSingleSuccessWithErrors1Return(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultSingleSuccessWithErrors1ReturnChain(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultSingleSuccessWithErrors1ReturnHandle(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultSingleSuccessWithErrors1ReturnValue(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandResultSingleSuccessWithErrors1ReturnVoid(
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
|
|
|
std::string generateCommandResultSingleSuccessWithErrors2Return( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::vector<size_t> const & returnParamIndices,
|
|
|
|
bool raii ) const;
|
|
|
|
std::string generateCommandResultWithErrors0Return(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-11-29 08:18:43 +00:00
|
|
|
std::string generateCommandSet( bool definition,
|
|
|
|
std::string const & standard,
|
|
|
|
std::vector<std::string> const & enhanced = {},
|
|
|
|
std::vector<std::string> const & unique = {} ) const;
|
|
|
|
std::string generateCommandSet( std::string const & standard, std::string const & enhanced ) const;
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string generateCommandSetInclusive( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::vector<size_t> returnParams,
|
|
|
|
std::map<size_t, VectorParamData> vectorParams,
|
|
|
|
bool unique,
|
|
|
|
std::vector<CommandFlavourFlags> const & flags,
|
|
|
|
bool raii,
|
|
|
|
bool raiiFactory,
|
|
|
|
std::vector<CommandFlavourFlags> const & raiiFlags ) const;
|
|
|
|
std::string
|
|
|
|
generateCommandSetExclusive( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateCommandStandard( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition ) const;
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string generateCommandVoid( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandValue( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
2023-02-02 13:09:45 +00:00
|
|
|
generateCommandVoid0Return( std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, bool raii ) const;
|
|
|
|
std::string generateCommandVoid1Return(
|
|
|
|
std::string const & name, CommandData const & commandData, size_t initialSkipCount, bool definition, size_t returnParam, bool raii ) const;
|
|
|
|
std::string generateCommandVoid2Return( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
bool definition,
|
|
|
|
std::vector<size_t> const & returnParamIndices,
|
|
|
|
bool raii ) const;
|
2021-11-12 01:59:37 +00:00
|
|
|
std::string generateConstexprString( std::string const & structName ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateDataDeclarations( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii,
|
|
|
|
std::vector<std::string> const & dataTypes,
|
|
|
|
std::string const & dataType,
|
|
|
|
std::string const & returnType,
|
|
|
|
std::string const & returnVariable ) const;
|
|
|
|
std::string generateDataDeclarations1Return( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
std::vector<std::string> const & dataTypes,
|
|
|
|
std::string const & dataType,
|
|
|
|
std::string const & returnType,
|
|
|
|
std::string const & returnVariable ) const;
|
|
|
|
std::string generateDataDeclarations2Returns( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii,
|
|
|
|
std::vector<std::string> const & dataTypes,
|
|
|
|
std::string const & dataType,
|
|
|
|
std::string const & returnVariable ) const;
|
2022-08-30 08:27:36 +00:00
|
|
|
std::string generateDataDeclarations3Returns( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-08-30 08:27:36 +00:00
|
|
|
bool raii,
|
|
|
|
std::vector<std::string> const & dataTypes ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateDataPreparation( CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool enumerating ) const;
|
|
|
|
std::string generateDataSizeChecks( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::vector<std::string> const & returnParamTypes,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::set<size_t> const & templatedParams,
|
|
|
|
bool singular ) const;
|
2022-07-28 15:09:08 +00:00
|
|
|
std::string generateDispatchLoaderDynamic() const; // uses vkGet*ProcAddress to get function pointers
|
|
|
|
std::string generateDispatchLoaderStatic() const; // uses exported symbols from loader
|
2021-07-13 07:01:55 +00:00
|
|
|
std::string generateDestroyCommand( std::string const & name, CommandData const & commandData ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
|
|
|
generateDispatchLoaderDynamicCommandAssignment( std::string const & commandName, CommandData const & commandData, std::string const & firstArg ) const;
|
2021-07-21 15:09:21 +00:00
|
|
|
std::string generateDispatchLoaderStaticCommands( std::vector<RequireData> const & requireData,
|
2021-07-08 15:30:53 +00:00
|
|
|
std::set<std::string> & listedCommands,
|
2021-07-09 07:01:56 +00:00
|
|
|
std::string const & title ) const;
|
2022-10-05 07:28:37 +00:00
|
|
|
std::string generateEnum( std::pair<std::string, EnumData> const & enumData, std::string const & surroundingProtect ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateEnums() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateEnums( std::vector<RequireData> const & requireData, std::set<std::string> & listedEnums, std::string const & title ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateEnumsToString() const;
|
2022-07-26 09:13:43 +00:00
|
|
|
std::string generateEnumsToString( std::vector<RequireData> const & requireData, std::set<std::string> & listedEnums, std::string const & title ) const;
|
2021-07-13 07:01:55 +00:00
|
|
|
std::string generateEnumInitializer( TypeInfo const & type,
|
|
|
|
std::vector<std::string> const & arraySizes,
|
|
|
|
std::vector<EnumValueData> const & values,
|
|
|
|
bool bitmask ) const;
|
|
|
|
std::string generateEnumToString( std::pair<std::string, EnumData> const & enumData ) const;
|
2021-07-26 15:59:25 +00:00
|
|
|
std::string generateFailureCheck( std::vector<std::string> const & successCodes ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateFormatTraits() const;
|
2023-02-20 19:01:34 +00:00
|
|
|
std::string generateFunctionPointerCheck( std::string const & function, std::set<std::string> const & requiredIn ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateHandle( std::pair<std::string, HandleData> const & handle, std::set<std::string> & listedHandles ) const;
|
2021-09-14 08:01:02 +00:00
|
|
|
std::string generateHandleCommandDeclarations( std::set<std::string> const & commands ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateHandleDependencies( std::pair<std::string, HandleData> const & handle, std::set<std::string> & listedHandles ) const;
|
2021-09-14 08:01:02 +00:00
|
|
|
std::string generateHandleEmpty( HandleData const & handleData ) const;
|
2023-02-08 16:21:03 +00:00
|
|
|
std::string generateHandleForwardDeclarations() const;
|
|
|
|
std::string generateHandleForwardDeclarations( std::vector<RequireData> const & requireData, std::string const & title ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateHandleHashStructures( std::vector<RequireData> const & requireData, std::string const & title ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateHandleHashStructures() const;
|
|
|
|
std::string generateHandles() const;
|
|
|
|
std::string generateIndexTypeTraits() const;
|
2020-12-10 16:23:44 +00:00
|
|
|
std::string
|
2022-04-07 13:38:51 +00:00
|
|
|
generateLenInitializer( std::vector<MemberData>::const_iterator mit,
|
|
|
|
std::map<std::vector<MemberData>::const_iterator, std::vector<std::vector<MemberData>::const_iterator>>::const_iterator litit,
|
|
|
|
bool mutualExclusiveLens ) const;
|
|
|
|
std::string generateName( TypeInfo const & typeInfo ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateNoExcept( std::vector<std::string> const & errorCodes,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool vectorSizeCheck,
|
|
|
|
bool raii ) const;
|
2022-04-07 13:38:51 +00:00
|
|
|
std::string generateObjectDeleter( std::string const & commandName, CommandData const & commandData, size_t initialSkipCount, size_t returnParam ) const;
|
2022-10-05 07:28:37 +00:00
|
|
|
std::pair<std::string, std::string> generateProtection( std::string const & protect ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateRAIICommandDefinitions() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
|
|
|
generateRAIICommandDefinitions( std::vector<RequireData> const & requireData, std::set<std::string> & listedCommands, std::string const & title ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateRAIIDispatchers() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandle( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::set<std::string> & listedHandles,
|
|
|
|
std::set<std::string> const & specialFunctions ) const;
|
2021-10-25 09:22:02 +00:00
|
|
|
std::string generateRAIIHandleCommand( std::string const & command, size_t initialSkipCount, bool definition ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandleCommandDeclarations( std::pair<std::string, HandleData> const & handle, std::set<std::string> const & specialFunctions ) const;
|
2023-02-02 13:09:45 +00:00
|
|
|
std::string generateRAIIHandleCommandEnhanced( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParamIndices,
|
|
|
|
bool definition,
|
|
|
|
CommandFlavourFlags flavourFlags = {} ) const;
|
|
|
|
std::string generateRAIIHandleCommandFactory( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
bool definition,
|
|
|
|
CommandFlavourFlags flavourFlags = {} ) const;
|
2021-10-14 06:36:04 +00:00
|
|
|
std::string generateRAIIHandleCommandFactoryArgumentList( std::vector<ParamData> const & params,
|
2022-01-11 08:45:35 +00:00
|
|
|
std::set<size_t> const & skippedParams,
|
2021-10-14 06:36:04 +00:00
|
|
|
bool definition,
|
|
|
|
bool singular ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::pair<std::string, std::string> generateRAIIHandleConstructor( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
|
|
|
std::pair<std::string, std::string> generateRAIIHandleConstructor1Return2Vector( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave,
|
|
|
|
size_t returnParam,
|
2022-09-12 14:53:44 +00:00
|
|
|
std::map<size_t, VectorParamData> const & vectorParamIndices ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::pair<std::string, std::string> generateRAIIHandleConstructors( std::pair<std::string, HandleData> const & handle ) const;
|
|
|
|
std::string generateRAIIHandleConstructorArgument( ParamData const & param, bool definition, bool singular, bool takesOwnership ) const;
|
|
|
|
std::string generateRAIIHandleConstructorArguments( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, VulkanHppGenerator::CommandData>::const_iterator constructorIt,
|
|
|
|
bool singular,
|
|
|
|
bool takesOwnership ) const;
|
|
|
|
std::string generateRAIIHandleConstructorCallArguments( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, VulkanHppGenerator::CommandData>::const_iterator constructorIt,
|
|
|
|
bool nonConstPointerAsNullptr,
|
|
|
|
std::set<size_t> const & singularParams,
|
|
|
|
bool allocatorIsMemberVariable ) const;
|
2021-09-06 12:38:17 +00:00
|
|
|
std::string generateRAIIHandleConstructorEnumerate( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::vector<ParamData>::const_iterator handleParamIt,
|
|
|
|
std::vector<ParamData>::const_iterator lenParamIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandleConstructorInitializationList( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::map<std::string, CommandData>::const_iterator destructorIt,
|
|
|
|
bool takesOwnership ) const;
|
|
|
|
std::string generateRAIIHandleConstructorParamName( std::string const & type, std::map<std::string, CommandData>::const_iterator destructorIt ) const;
|
|
|
|
std::pair<std::string, std::string> generateRAIIHandleConstructorResult( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
|
|
|
std::string generateRAIIHandleConstructorResultSingleSuccessWithErrors1Return0Vector( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
2021-07-26 15:59:25 +00:00
|
|
|
std::string generateRAIIHandleConstructorTakeOwnership( std::pair<std::string, HandleData> const & handle ) const;
|
2021-09-06 12:38:17 +00:00
|
|
|
std::string generateRAIIHandleConstructorVector( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::vector<ParamData>::const_iterator handleParamIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandleConstructorVectorSingular( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::vector<ParamData>::const_iterator handleParamIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
|
|
|
std::pair<std::string, std::string> generateRAIIHandleConstructorVoid( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
|
|
|
std::string generateRAIIHandleConstructorVoid1Return0Vector( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt,
|
|
|
|
std::string const & enter,
|
|
|
|
std::string const & leave ) const;
|
|
|
|
std::string generateRAIIHandleContext( std::pair<std::string, HandleData> const & handle, std::set<std::string> const & specialFunctions ) const;
|
|
|
|
std::string generateRAIIHandleDestructorCallArguments( std::string const & handleType,
|
|
|
|
std::map<std::string, CommandData>::const_iterator destructorIt ) const;
|
2022-10-25 10:11:29 +00:00
|
|
|
std::tuple<std::string, std::string, std::string, std::string, std::string, std::string, std::string>
|
2022-02-15 09:50:52 +00:00
|
|
|
generateRAIIHandleDetails( std::pair<std::string, HandleData> const & handle ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandleForwardDeclarations( std::vector<RequireData> const & requireData, std::string const & title ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateRAIIHandles() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateRAIIHandleSingularConstructorArguments( std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::map<std::string, CommandData>::const_iterator constructorIt ) const;
|
2021-07-26 15:59:25 +00:00
|
|
|
std::string generateRAIIHandleVectorSizeCheck( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::map<size_t, std::vector<size_t>> const & countToVectorMap,
|
|
|
|
std::set<size_t> const & skippedParams ) const;
|
2022-03-24 09:52:24 +00:00
|
|
|
std::string generateResultAssignment( CommandData const & commandData ) const;
|
2022-04-28 09:53:52 +00:00
|
|
|
std::string generateResultCheck(
|
|
|
|
CommandData const & commandData, std::string const & className, std::string const & classSeparator, std::string commandName, bool enumerating ) const;
|
2022-07-28 15:09:08 +00:00
|
|
|
std::string generateResultExceptions() const;
|
2022-04-07 13:38:51 +00:00
|
|
|
std::string generateReturnStatement( std::string const & commandName,
|
|
|
|
CommandData const & commandData,
|
|
|
|
std::string const & returnVariable,
|
|
|
|
std::string const & returnType,
|
|
|
|
std::string const & dataType,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
size_t returnParam,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-05-25 18:21:21 +00:00
|
|
|
bool enumerating,
|
|
|
|
bool raii ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateReturnType( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags,
|
2022-09-12 14:53:44 +00:00
|
|
|
bool raii,
|
|
|
|
std::string const & dataType ) const;
|
|
|
|
std::string generateReturnVariable( CommandData const & commandData,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
|
|
|
generateSizeCheck( std::vector<std::vector<MemberData>::const_iterator> const & arrayIts, std::string const & structName, bool mutualExclusiveLens ) const;
|
2022-09-21 07:28:38 +00:00
|
|
|
std::string generateStaticAssertions() const;
|
2023-02-20 19:01:34 +00:00
|
|
|
std::string generateStaticAssertions( std::vector<RequireData> const & requireData, std::string const & title, std::set<std::string> & listedStructs ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateStruct( std::pair<std::string, StructureData> const & structure, std::set<std::string> & listedStructs ) const;
|
2022-01-03 11:35:24 +00:00
|
|
|
std::string generateStructCompareOperators( std::pair<std::string, StructureData> const & structure ) const;
|
2021-09-28 06:56:30 +00:00
|
|
|
std::string generateStructConstructors( std::pair<std::string, StructureData> const & structData ) const;
|
|
|
|
std::string generateStructConstructorsEnhanced( std::pair<std::string, StructureData> const & structData ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateStructConstructorArgument( bool listedArgument, MemberData const & memberData, bool withDefault ) const;
|
|
|
|
std::string generateStructHashStructure( std::pair<std::string, StructureData> const & structure, std::set<std::string> & listedStructs ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateStructHashStructures() const;
|
2021-12-02 11:21:30 +00:00
|
|
|
std::string generateStructHashSum( std::string const & structName, std::vector<MemberData> const & members ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateStructs() const;
|
2021-09-28 06:56:30 +00:00
|
|
|
std::string generateStructure( std::pair<std::string, StructureData> const & structure ) const;
|
2022-07-28 15:09:08 +00:00
|
|
|
std::string generateStructExtendsStructs() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string
|
|
|
|
generateStructExtendsStructs( std::vector<RequireData> const & requireData, std::set<std::string> & listedStructs, std::string const & title ) const;
|
2022-08-02 08:00:16 +00:00
|
|
|
std::string generateStructForwardDeclarations() const;
|
2023-02-20 19:01:34 +00:00
|
|
|
std::string
|
|
|
|
generateStructForwardDeclarations( std::vector<RequireData> const & requireData, std::string const & title, std::set<std::string> & listedStructs ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::tuple<std::string, std::string, std::string, std::string> generateStructMembers( std::pair<std::string, StructureData> const & structData ) const;
|
|
|
|
std::string generateStructSetter( std::string const & structureName, std::vector<MemberData> const & memberData, size_t index ) const;
|
|
|
|
std::string generateStructSubConstructor( std::pair<std::string, StructureData> const & structData ) const;
|
|
|
|
std::string generateSuccessCheck( std::vector<std::string> const & successCodes ) const;
|
2022-04-28 09:53:52 +00:00
|
|
|
std::string generateSuccessCodeList( std::vector<std::string> const & successCodes, bool enumerating ) const;
|
2022-07-28 15:09:08 +00:00
|
|
|
std::string generateThrowResultException() const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string generateTypenameCheck( std::vector<size_t> const & returnParams,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
bool definition,
|
|
|
|
std::vector<std::string> const & dataTypes,
|
2022-11-28 15:53:24 +00:00
|
|
|
CommandFlavourFlags flavourFlags ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateUnion( std::pair<std::string, StructureData> const & structure ) const;
|
2023-02-08 16:21:03 +00:00
|
|
|
std::string generateUniqueHandle( std::pair<std::string, HandleData> const & handleData ) const;
|
|
|
|
std::string generateUniqueHandle( std::vector<RequireData> const & requireData, std::string const & title ) const;
|
|
|
|
std::string generateUniqueHandles() const;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::string generateVectorSizeCheck( std::string const & name,
|
|
|
|
CommandData const & commandData,
|
|
|
|
size_t initialSkipCount,
|
|
|
|
std::map<size_t, std::vector<size_t>> const & countToVectorMap,
|
2022-03-15 09:00:04 +00:00
|
|
|
std::set<size_t> const & skippedParams,
|
|
|
|
bool onlyThrows ) const;
|
2021-10-20 14:55:30 +00:00
|
|
|
std::pair<std::string, std::string> getParentTypeAndName( std::pair<std::string, HandleData> const & handle ) const;
|
|
|
|
std::string getPlatform( std::string const & title ) const;
|
2020-10-07 20:44:44 +00:00
|
|
|
std::pair<std::string, std::string> getPoolTypeAndName( std::string const & type ) const;
|
2022-10-05 07:28:37 +00:00
|
|
|
std::string getProtect( EnumValueData const & evd ) const;
|
|
|
|
std::string getProtectFromPlatform( std::string const & platform ) const;
|
|
|
|
std::string getProtectFromTitle( std::string const & title ) const;
|
2023-02-20 14:58:14 +00:00
|
|
|
std::string getProtectFromTitles( std::set<std::string> const & titles ) const;
|
2022-10-05 07:28:37 +00:00
|
|
|
std::string getProtectFromType( std::string const & type ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::string getVectorSize( std::vector<ParamData> const & params,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParamIndices,
|
|
|
|
size_t returnParam,
|
|
|
|
std::string const & returnParamType,
|
|
|
|
std::set<size_t> const & templatedParams ) const;
|
2022-10-24 08:39:19 +00:00
|
|
|
bool hasLen( std::vector<MemberData> const & members, MemberData const & md ) const;
|
2022-04-06 08:33:08 +00:00
|
|
|
bool hasParentHandle( std::string const & handle, std::string const & parent ) const;
|
|
|
|
bool isDeviceCommand( CommandData const & commandData ) const;
|
|
|
|
bool isHandleType( std::string const & type ) const;
|
|
|
|
bool isLenByStructMember( std::string const & name, std::vector<ParamData> const & params ) const;
|
|
|
|
bool isLenByStructMember( std::string const & name, ParamData const & param ) const;
|
|
|
|
bool isMultiSuccessCodeConstructor( std::vector<std::map<std::string, CommandData>::const_iterator> const & constructorIts ) const;
|
|
|
|
bool isParam( std::string const & name, std::vector<ParamData> const & params ) const;
|
|
|
|
bool isStructMember( std::string const & name, std::vector<MemberData> const & memberData ) const;
|
|
|
|
bool isStructureChainAnchor( std::string const & type ) const;
|
2022-09-12 14:53:44 +00:00
|
|
|
std::pair<bool, std::map<size_t, std::vector<size_t>>> needsVectorSizeCheck( std::vector<ParamData> const & params,
|
|
|
|
std::map<size_t, VectorParamData> const & vectorParams,
|
|
|
|
std::vector<size_t> const & returnParams,
|
|
|
|
std::set<size_t> const & singularParams ) const;
|
2022-02-28 09:11:04 +00:00
|
|
|
void readCommands( tinyxml2::XMLElement const * element );
|
|
|
|
void readCommandsCommand( tinyxml2::XMLElement const * element );
|
2023-01-26 16:12:29 +00:00
|
|
|
std::pair<bool, ParamData> readCommandsCommandParam( tinyxml2::XMLElement const * element, std::vector<ParamData> const & params );
|
2021-09-28 06:56:30 +00:00
|
|
|
std::pair<std::string, std::string> readCommandsCommandProto( tinyxml2::XMLElement const * element );
|
2020-04-12 19:49:12 +00:00
|
|
|
std::string readComment( tinyxml2::XMLElement const * element );
|
2021-09-28 06:56:30 +00:00
|
|
|
void readEnums( tinyxml2::XMLElement const * element );
|
|
|
|
void readEnumsConstant( tinyxml2::XMLElement const * element );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readEnumsEnum( tinyxml2::XMLElement const * element, std::map<std::string, EnumData>::iterator enumIt );
|
|
|
|
void readExtensions( tinyxml2::XMLElement const * element );
|
|
|
|
void readExtensionsExtension( tinyxml2::XMLElement const * element );
|
|
|
|
void readExtensionsExtensionRequire( tinyxml2::XMLElement const * element, std::map<std::string, ExtensionData>::iterator extensionIt );
|
2023-02-16 07:24:33 +00:00
|
|
|
void readExtensionsExtensionRequireRemove( tinyxml2::XMLElement const * element );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readExtensionsExtensionRequireType( tinyxml2::XMLElement const * element, std::string const & extensionName, RequireData & requireData );
|
2020-04-12 19:49:12 +00:00
|
|
|
void readFeature( tinyxml2::XMLElement const * element );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readFeatureRequire( tinyxml2::XMLElement const * element, std::map<std::string, FeatureData>::iterator featureIt );
|
2023-02-16 07:24:33 +00:00
|
|
|
void readFeatureRequireCommandRemove( tinyxml2::XMLElement const * element );
|
|
|
|
void readFeatureRequireRemove( tinyxml2::XMLElement const * element );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readFeatureRequireType( tinyxml2::XMLElement const * element, std::map<std::string, FeatureData>::iterator featureIt, RequireData & requireData );
|
2021-11-22 13:27:34 +00:00
|
|
|
void readFormats( tinyxml2::XMLElement const * element );
|
|
|
|
void readFormatsFormat( tinyxml2::XMLElement const * element );
|
|
|
|
void readFormatsFormatComponent( tinyxml2::XMLElement const * element, FormatData & formatData );
|
|
|
|
void readFormatsFormatPlane( tinyxml2::XMLElement const * element, FormatData & formatData );
|
|
|
|
void readFormatsFormatSPIRVImageFormat( tinyxml2::XMLElement const * element, FormatData & formatData );
|
2020-05-18 10:02:10 +00:00
|
|
|
std::pair<NameData, TypeInfo> readNameAndType( tinyxml2::XMLElement const * elements );
|
2020-04-12 19:49:12 +00:00
|
|
|
void readPlatforms( tinyxml2::XMLElement const * element );
|
2021-09-28 06:56:30 +00:00
|
|
|
void readPlatformsPlatform( tinyxml2::XMLElement const * element );
|
2020-04-12 19:49:12 +00:00
|
|
|
void readRegistry( tinyxml2::XMLElement const * element );
|
2023-02-20 14:58:14 +00:00
|
|
|
void readRequireCommand( tinyxml2::XMLElement const * element, std::string const & title, RequireData & requireData );
|
2023-02-16 07:24:33 +00:00
|
|
|
void readRequireCommandRemove( tinyxml2::XMLElement const * element );
|
2023-02-22 15:20:44 +00:00
|
|
|
void readRequireEnum( tinyxml2::XMLElement const * element, std::string const & extensionName, std::vector<std::string> const & depends );
|
|
|
|
void readRequireEnumRemove( tinyxml2::XMLElement const * element );
|
|
|
|
void readRequireTypeRemove( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVCapabilities( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapability( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapabilityEnable( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapabilityEnableExtension( int xmlLine, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapabilityEnableProperty( int xmlLine, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapabilityEnableStruct( int xmlLine, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readSPIRVCapabilitiesSPIRVCapabilityEnableVersion( int xmlLine, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readSPIRVExtensions( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVExtensionsExtension( tinyxml2::XMLElement const * element );
|
|
|
|
void readSPIRVExtensionsExtensionEnable( tinyxml2::XMLElement const * element );
|
|
|
|
void readTags( tinyxml2::XMLElement const * element );
|
|
|
|
void readTagsTag( tinyxml2::XMLElement const * element );
|
|
|
|
void readTypes( tinyxml2::XMLElement const * element );
|
|
|
|
void readTypesType( tinyxml2::XMLElement const * element );
|
|
|
|
void readTypesTypeBasetype( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeBitmask( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeDefine( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeEnum( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeFuncpointer( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeHandle( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeInclude( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeRequires( tinyxml2::XMLElement const * element, std::map<std::string, std::string> const & attributes );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readTypesTypeStruct( tinyxml2::XMLElement const * element, bool isUnion, std::map<std::string, std::string> const & attributes );
|
|
|
|
void readTypesTypeStructMember( tinyxml2::XMLElement const * element, std::vector<MemberData> & members, bool isUnion );
|
2021-10-04 10:10:04 +00:00
|
|
|
void readTypesTypeStructMemberEnum( tinyxml2::XMLElement const * element, MemberData & memberData );
|
2022-02-28 09:11:04 +00:00
|
|
|
void readTypesTypeStructMemberName( tinyxml2::XMLElement const * element, MemberData & memberData, std::vector<MemberData> const & members );
|
2021-10-04 10:10:04 +00:00
|
|
|
void readTypesTypeStructMemberType( tinyxml2::XMLElement const * element, MemberData & memberData );
|
2021-07-21 16:15:31 +00:00
|
|
|
TypeInfo readTypeInfo( tinyxml2::XMLElement const * element ) const;
|
|
|
|
void registerDeleter( std::string const & name, std::pair<std::string, CommandData> const & commandData );
|
|
|
|
void rescheduleRAIIHandle( std::string & str,
|
|
|
|
std::pair<std::string, HandleData> const & handle,
|
|
|
|
std::set<std::string> & listedHandles,
|
|
|
|
std::set<std::string> const & specialFunctions ) const;
|
2021-07-21 15:09:21 +00:00
|
|
|
std::vector<std::string> selectCommandsByHandle( std::vector<RequireData> const & requireData,
|
|
|
|
std::set<std::string> const & handleCommands,
|
|
|
|
std::set<std::string> & listedCommands ) const;
|
|
|
|
void setVulkanLicenseHeader( int line, std::string const & comment );
|
2021-10-20 14:55:30 +00:00
|
|
|
bool skipLeadingGrandParent( std::pair<std::string, HandleData> const & handle ) const;
|
2021-07-21 16:15:31 +00:00
|
|
|
std::string toString( TypeCategory category );
|
2017-12-21 11:40:48 +00:00
|
|
|
|
2020-04-21 12:26:32 +00:00
|
|
|
private:
|
2022-02-28 09:11:04 +00:00
|
|
|
std::map<std::string, BaseTypeData> m_baseTypes;
|
|
|
|
std::map<std::string, BitmaskData> m_bitmasks;
|
|
|
|
std::map<std::string, CommandData> m_commands;
|
|
|
|
std::map<std::string, std::string> m_constants;
|
2023-01-26 16:12:29 +00:00
|
|
|
std::map<std::string, DefineData> m_defines;
|
2022-02-28 09:11:04 +00:00
|
|
|
std::map<std::string, EnumData> m_enums;
|
|
|
|
std::set<std::string> m_extendedStructs; // structs which are referenced by the structextends tag
|
|
|
|
std::map<std::string, ExtensionData> m_extensions;
|
2021-04-29 08:23:41 +00:00
|
|
|
std::map<int, std::map<std::string, ExtensionData>::const_iterator> m_extensionsByNumber;
|
|
|
|
std::map<std::string, FeatureData> m_features;
|
2021-11-22 13:27:34 +00:00
|
|
|
std::map<std::string, FormatData> m_formats;
|
2021-04-29 08:23:41 +00:00
|
|
|
std::map<std::string, FuncPointerData> m_funcPointers;
|
|
|
|
std::map<std::string, HandleData> m_handles;
|
|
|
|
std::set<std::string> m_includes;
|
|
|
|
std::map<std::string, PlatformData> m_platforms;
|
2021-07-06 07:13:53 +00:00
|
|
|
std::set<std::string> m_RAIISpecialFunctions;
|
2023-02-16 07:24:33 +00:00
|
|
|
std::set<std::string> m_removedCommands;
|
|
|
|
std::map<std::string, EnumData> m_removedEnums;
|
|
|
|
std::set<std::string> m_removedFeatures;
|
2023-02-16 12:12:55 +00:00
|
|
|
std::set<std::string> m_removedStructs;
|
2023-02-16 07:24:33 +00:00
|
|
|
std::map<std::string, TypeData> m_removedTypes;
|
2023-02-20 19:01:34 +00:00
|
|
|
std::map<std::string, StructureData> m_structs;
|
|
|
|
std::map<std::string, StructureAliasData> m_structsAliases;
|
|
|
|
std::map<std::string, std::set<std::string>> m_structsAliasesInverse;
|
2021-04-29 08:23:41 +00:00
|
|
|
std::set<std::string> m_tags;
|
|
|
|
std::map<std::string, TypeData> m_types;
|
|
|
|
std::string m_typesafeCheck;
|
|
|
|
std::string m_version;
|
|
|
|
std::string m_vulkanLicenseHeader;
|
2019-01-09 10:55:11 +00:00
|
|
|
};
|